PageSourceSearch

https://havenonseneca.com/wp-content/uploads/siteground-optimizer-…ined-js-bdb7293b76a073940961377f7fd933af.js

js havenonseneca.com collected 2026-10-06 20:58:51 UTC 553,515 bytes, 5,634 lines download raw bytes

1/*! jQuery Migrate v3.4.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
2"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],a=1;a<=3;a++){if(+o[a]<+n[a])return 1;if(+n[a]<+o[a])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.4.1";var t=Object.create(null);s.migrateDisablePatches=function(){for(var e=0;e<arguments.length;e++)t[arguments[e]]=!0},s.migrateEnablePatches=function(){for(var e=0;e<arguments.length;e++)delete t[arguments[e]]},s.migrateIsPatchEnabled=function(e){return!t[e]},n.console&&n.console.log&&(s&&e("3.0.0")&&!e("5.0.0")||n.console.log("JQMIGRATE: jQuery 3.x-4.x REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var o={};function u(e,t){var r=n.console;!s.migrateIsPatchEnabled(e)||s.migrateDeduplicateWarnings&&o[t]||(o[t]=!0,s.migrateWarnings.push(t+" ["+e+"]"),r&&r.warn&&!s.migrateMute&&(r.warn("JQMIGRATE: "+t),s.migrateTrace&&r.trace&&r.trace()))}function r(e,t,r,n,o){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n,o),r},set:function(e){u(n,o),r=e}})}function a(e,t,r,n,o){var a=e[t];e[t]=function(){return o&&u(n,o),(s.migrateIsPatchEnabled(n)?r:a||s.noop).apply(this,arguments)}}function c(e,t,r,n,o){if(!o)throw new Error("No warning message provided");return a(e,t,r,n,o),0}function i(e,t,r,n){return a(e,t,r,n),0}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){o={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("quirks","jQuery is not compatible with Quirks Mode");var d,l,p,f={},m=s.fn.init,y=s.find,h=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,g=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,v=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;for(d in i(s.fn,"init",function(e){var t=Array.prototype.slice.call(arguments);return s.migrateIsPatchEnabled("selector-empty-id")&&"string"==typeof e&&"#"===e&&(u("selector-empty-id","jQuery( '#' ) is not a valid selector"),t[0]=[]),m.apply(this,t)},"selector-empty-id"),s.fn.init.prototype=s.fn,i(s,"find",function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&h.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(g,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("selector-hash","Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("selector-hash","Attribute selector with '#' was not fixed: "+r[0])}}return y.apply(this,r)},"selector-hash"),y)Object.prototype.hasOwnProperty.call(y,d)&&(s.find[d]=y[d]);c(s.fn,"size",function(){return this.length},"size","jQuery.fn.size() is deprecated and removed; use the .length property"),c(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"parseJSON","jQuery.parseJSON is deprecated; use JSON.parse"),c(s,"holdReady",s.holdReady,"holdReady","jQuery.holdReady is deprecated"),c(s,"unique",s.uniqueSort,"unique","jQuery.unique is deprecated; use jQuery.uniqueSort"),r(s.expr,"filters",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),r(s.expr,":",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&c(s,"trim",function(e){return null==e?"":(e+"").replace(v,"$1")},"trim","jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(c(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"nodeName","jQuery.nodeName is deprecated"),c(s,"isArray",Array.isArray,"isArray","jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(c(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"isNumeric","jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()}),c(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[Object.prototype.toString.call(e)]||"object":typeof e},"type","jQuery.type is deprecated"),c(s,"isFunction",function(e){return"function"==typeof e},"isFunction","jQuery.isFunction() is deprecated"),c(s,"isWindow",function(e){return null!=e&&e===e.window}
2,"isWindow","jQuery.isWindow() is deprecated")),s.ajax&&(l=s.ajax,p=/(=)\?(?=&|$)|\?\?/,i(s,"ajax",function(){var e=l.apply(this,arguments);return e.promise&&(c(e,"success",e.done,"jqXHR-methods","jQXHR.success is deprecated and removed"),c(e,"error",e.fail,"jqXHR-methods","jQXHR.error is deprecated and removed"),c(e,"complete",e.always,"jqXHR-methods","jQXHR.complete is deprecated and removed")),e},"jqXHR-methods"),e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(p.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&p.test(e.data))&&u("jsonp-promotion","JSON-to-JSONP auto-promotion is deprecated")}));var j=s.fn.removeAttr,b=s.fn.toggleClass,w=/\S+/g;function x(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}i(s.fn,"removeAttr",function(e){var r=this,n=!1;return s.each(e.match(w),function(e,t){s.expr.match.bool.test(t)&&r.each(function(){if(!1!==s(this).prop(t))return!(n=!0)}),n&&(u("removeAttr-bool","jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),j.apply(this,arguments)},"removeAttr-bool"),i(s.fn,"toggleClass",function(t){return void 0!==t&&"boolean"!=typeof t?b.apply(this,arguments):(u("toggleClass-bool","jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))},"toggleClass-bool");var Q,A,R=!1,C=/^[a-z]/,N=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return R=!0,e=r.apply(this,arguments),R=!1,e})}),i(s,"swap",function(e,t,r,n){var o,a,i={};for(a in R||u("swap","jQuery.swap() is undocumented and deprecated"),t)i[a]=e.style[a],e.style[a]=t[a];for(a in o=r.apply(e,n||[]),t)e.style[a]=i[a];return o},"swap"),e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("cssProps","jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),e("4.0.0")?(A={animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},"undefined"!=typeof Proxy?s.cssNumber=new Proxy(A,{get:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.get.apply(this,arguments)},set:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.set.apply(this,arguments)}}):s.cssNumber=A):A=s.cssNumber,Q=s.fn.css,i(s.fn,"css",function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=x(e),n=r,C.test(n)&&N.test(n[0].toUpperCase()+n.slice(1))||A[r]||u("css-number",'Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))},"css-number");var S,P,k,H,E=s.data;i(s,"data",function(e,t,r){var n,o,a;if(t&&"object"==typeof t&&2===arguments.length){for(a in n=s.hasData(e)&&E.call(this,e),o={},t)a!==x(a)?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+a),n[a]=t[a]):o[a]=t[a];return E.call(this,e,o),t}return t&&"string"==typeof t&&t!==x(t)&&(n=s.hasData(e)&&E.call(this,e))&&t in n?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):E.apply(this,arguments)},"data-camelCase"),s.fx&&(k=s.Tween.prototype.run,H=function(e){return e},i(s.Tween.prototype,"run",function(){1<s.easing[this.easing].length&&(u("easing-one-arg","'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=H),k.apply(this,arguments)},"easing-one-arg"),S=s.fx.interval,P="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u("fx-interval",P),s.migrateIsPatchEnabled("fx-interval")&&void 0===S?13:S},set:function(e){u("fx-interval",P),S=e}}));var M=s.fn.load,q=s.event.add,O=s.event.fix;s.event.props=[],s.event.fixHooks={}
2,r(s.event.props,"concat",s.event.props.concat,"event-old-patch","jQuery.event.props.concat() is deprecated and removed"),i(s.event,"fix",function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("event-old-patch","jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("event-old-patch","jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=O.call(this,e),n&&n.filter?n.filter(t,e):t},"event-old-patch"),i(s.event,"add",function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("load-after-event","jQuery(window).on('load'...) called after load event occurred"),q.apply(this,arguments)},"load-after-event"),s.each(["load","unload","error"],function(e,t){i(s.fn,t,function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?M.apply(this,e):(u("shorthand-removed-v3","jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))},"shorthand-removed-v3")}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){c(s.fn,r,function(e,t){return 0<arguments.length?this.on(r,null,e,t):this.trigger(r)},"shorthand-deprecated-v3","jQuery.fn."+r+"() event shorthand is deprecated")}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("ready-event","'ready' event is deprecated")}},c(s.fn,"bind",function(e,t,r){return this.on(e,null,t,r)},"pre-on-methods","jQuery.fn.bind() is deprecated"),c(s.fn,"unbind",function(e,t){return this.off(e,null,t)},"pre-on-methods","jQuery.fn.unbind() is deprecated"),c(s.fn,"delegate",function(e,t,r,n){return this.on(t,e,r,n)},"pre-on-methods","jQuery.fn.delegate() is deprecated"),c(s.fn,"undelegate",function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},"pre-on-methods","jQuery.fn.undelegate() is deprecated"),c(s.fn,"hover",function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)},"pre-on-methods","jQuery.fn.hover() is deprecated");function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}var F=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags")},i(s,"htmlPrefilter",function(e){var t,r;return(r=(t=e).replace(F,"<$1></$2>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(F,"<$1></$2>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var D,W,_,I=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?I.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(D=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(W=s.Deferred,_=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=W(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(_,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=W.exceptionHook),s});
3;
4/*!
5 * Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com
6 * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
7 */
8(function(){
vendor: 14,869 bytes, line 8
8var l,a;l=this,a=function(){"use strict";var l={},a={};try{"undefined"!=typeof window&&(l=window),"undefined"!=typeof document&&(a=document)}catch(l){}var e=(l.navigator||{}).userAgent,r=void 0===e?"":e,n=l,o=a,u=(n.document,!!o.documentElement&&!!o.head&&"function"==typeof o.addEventListener&&o.createElement,~r.indexOf("MSIE")||r.indexOf("Trident/"),"___FONT_AWESOME___"),t=function(){try{return"production"===process.env.NODE_ENV}catch(l){return!1}}();var f=n||{};f[u]||(f[u]={}),f[u].styles||(f[u].styles={}),f[u].hooks||(f[u].hooks={}),f[u].shims||(f[u].shims=[]);var i=f[u],s=[["glass",null,"glass-martini"],["meetup","fab",null],["star-o","far","star"],["remove",null,"times"],["close",null,"times"],["gear",null,"cog"],["trash-o","far","trash-alt"],["file-o","far","file"],["clock-o","far","clock"],["arrow-circle-o-down","far","arrow-alt-circle-down"],["arrow-circle-o-up","far","arrow-alt-circle-up"],["play-circle-o","far","play-circle"],["repeat",null,"redo"],["rotate-right",null,"redo"],["refresh",null,"sync"],["list-alt","far",null],["dedent",null,"outdent"],["video-camera",null,"video"],["picture-o","far","image"],["photo","far","image"],["image","far","image"],["pencil",null,"pencil-alt"],["map-marker",null,"map-marker-alt"],["pencil-square-o","far","edit"],["share-square-o","far","share-square"],["check-square-o","far","check-square"],["arrows",null,"arrows-alt"],["times-circle-o","far","times-circle"],["check-circle-o","far","check-circle"],["mail-forward",null,"share"],["expand",null,"expand-alt"],["compress",null,"compress-alt"],["eye","far",null],["eye-slash","far",null],["warning",null,"exclamation-triangle"],["calendar",null,"calendar-alt"],["arrows-v",null,"arrows-alt-v"],["arrows-h",null,"arrows-alt-h"],["bar-chart","far","chart-bar"],["bar-chart-o","far","chart-bar"],["twitter-square","fab",null],["facebook-square","fab",null],["gears",null,"cogs"],["thumbs-o-up","far","thumbs-up"],["thumbs-o-down","far","thumbs-down"],["heart-o","far","heart"],["sign-out",null,"sign-out-alt"],["linkedin-square","fab","linkedin"],["thumb-tack",null,"thumbtack"],["external-link",null,"external-link-alt"],["sign-in",null,"sign-in-alt"],["github-square","fab",null],["lemon-o","far","lemon"],["square-o","far","square"],["bookmark-o","far","bookmark"],["twitter","fab",null],["facebook","fab","facebook-f"],["facebook-f","fab","facebook-f"],["github","fab",null],["credit-card","far",null],["feed",null,"rss"],["hdd-o","far","hdd"],["hand-o-right","far","hand-point-right"],["hand-o-left","far","hand-point-left"],["hand-o-up","far","hand-point-up"],["hand-o-down","far","hand-point-down"],["arrows-alt",null,"expand-arrows-alt"],["group",null,"users"],["chain",null,"link"],["scissors",null,"cut"],["files-o","far","copy"],["floppy-o","far","save"],["navicon",null,"bars"],["reorder",null,"bars"],["pinterest","fab",null],["pinterest-square","fab",null],["google-plus-square","fab",null],["google-plus","fab","google-plus-g"],["money","far","money-bill-alt"],["unsorted",null,"sort"],["sort-desc",null,"sort-down"],["sort-asc",null,"sort-up"],["linkedin","fab","linkedin-in"],["rotate-left",null,"undo"],["legal",null,"gavel"],["tachometer",null,"tachometer-alt"],["dashboard",null,"tachometer-alt"],["comment-o","far","comment"],["comments-o","far","comments"],["flash",null,"bolt"],["clipboard","far",null],["paste","far","clipboard"],["lightbulb-o","far","lightbulb"],["exchange",null,"exchange-alt"],["cloud-download",null,"cloud-download-alt"],["cloud-upload",null,"cloud-upload-alt"],["bell-o","far","bell"],["cutlery",null,"utensils"],["file-text-o","far","file-alt"],["building-o","far","building"],["hospital-o","far","hospital"],["tablet",null,"tablet-alt"],["mobile",null,"mobile-alt"],["mobile-phone",null,"mobile-alt"],["circle-o","far","circle"],["mail-reply",null,"reply"],["github-alt","fab",null],["folder-o","far","folder"],["folder-open-o","far","folder-open"],["smile-o","far","smile"],["frown-o","far","frown"],["meh-o","far","meh"],["keyboard-o","far","keyboard"],["flag-o","far","flag"],["mail-reply-all",null,"reply-all"],["star-half-o","far","star-half"],["star-half-empty","far","star-half"],["star-half-full","far","star-half"],["code-fork",null,"code-branch"],["chain-broken",null,"unlink"],["shield",null,"shield-alt"],["calendar-o","far","calendar"],["maxcdn","fab",null],["html5","fab",null],["css3","fab",null],["ticket",null,"ticket-alt"],["minus-square-o","far","minus-square"],["level-up",null,"level-up-alt"],["level-down",null,"level-down-alt"],["pencil-square",null,"pen-square"],["external-link-square",null,"external-link-square-alt"],["compass","far",null],["caret-square-o-down","far","caret-square-down"],["toggle-down","far","caret-square-down"],["caret-square-o-up","far","caret-square-up"],["toggle-up","far","caret-square-up"],["caret-square-o-right","far","caret-square-right"],["toggle-right","far","caret-square-right"],["eur",null,"euro-sign"],["euro",null,"euro-sign"],["gbp",null,"pound-sign"],["usd",null,"dollar-sign"],["dollar",null,"dollar-sign"],["inr",null,"rupee-sign"],["rupee",null,"rupee-sign"],["jpy",null,"yen-sign"],["cny",null,"yen-sign"],["rmb",null,"yen-sign"],["yen",null,"yen-sign"],["rub",null,"ruble-sign"],["ruble",null,"ruble-sign"],["rouble",null,"ruble-sign"],["krw",null,"won-sign"],["won",null,"won-sign"],["btc","fab",null],["bitcoin","fab","btc"],["file-text",null,"file-alt"],["sort-alpha-asc",null,"sort-alpha-down"],["sort-alpha-desc",null,"sort-alpha-down-alt"],["sort-amount-asc",null,"sort-amount-down"],["sort-amount-desc",null,"sort-amount-down-alt"],["sort-numeric-asc",null,"sort-numeric-down"],["sort-numeric-desc",null,"sort-numeric-down-alt"],["youtube-square","fab",null],["youtube","fab",null],["xing","fab",null],["xing-square","fab",null],["youtube-play","fab","youtube"],["dropbox","fab",null],["stack-overflow","fab",null],["instagram","fab",null],["flickr","fab",null],["adn","fab",null],["bitbucket","fab",null],["bitbucket-square","fab","bitbucket"],["tumblr","fab",null],["tumblr-square","fab",null],["long-arrow-down",null,"long-arrow-alt-down"],["long-arrow-up",null,"long-arrow-alt-up"],["long-arrow-left",null,"long-arrow-alt-left"],["long-arrow-right",null,"long-arrow-alt-right"],["apple","fab",null],["windows","fab",null],["android","fab",null],["linux","fab",null],["dribbble","fab",null],["skype","fab",null],["foursquare","fab",null],["trello","fab",null],["gratipay","fab",null],["gittip","fab","gratipay"],["sun-o","far","sun"],["moon-o","far","moon"],["vk","fab",null],["weibo","fab",null],["renren","fab",null],["pagelines","fab",null],["stack-exchange","fab",null],["arrow-circle-o-right","far","arrow-alt-circle-right"],["arrow-circle-o-left","far","arrow-alt-circle-left"],["caret-square-o-left","far","caret-square-left"],["toggle-left","far","caret-square-left"],["dot-circle-o","far","dot-circle"],["vimeo-square","fab",null],["try",null,"lira-sign"],["turkish-lira",null,"lira-sign"],["plus-square-o","far","plus-square"],["slack","fab",null],["wordpress","fab",null],["openid","fab",null],["institution",null,"university"],["bank",null,"university"],["mortar-board",null,"graduation-cap"],["yahoo","fab",null],["google","fab",null],["reddit","fab",null],["reddit-square","fab",null],["stumbleupon-circle","fab",null],["stumbleupon","fab",null],["delicious","fab",null],["digg","fab",null],["pied-piper-pp","fab",null],["pied-piper-alt","fab",null],["drupal","fab",null],["joomla","fab",null],["spoon",null,"utensil-spoon"],["behance","fab",null],["behance-square","fab",null],["steam","fab",null],["steam-square","fab",null],["automobile",null,"car"],["envelope-o","far","envelope"],["spotify","fab",null],["deviantart","fab",null],["soundcloud","fab",null],["file-pdf-o","far","file-pdf"],["file-word-o","far","file-word"],["file-excel-o","far","file-excel"],["file-powerpoint-o","far","file-powerpoint"],["file-image-o","far","file-image"],["file-photo-o","far","file-image"],["file-picture-o","far","file-image"],["file-archive-o","far","file-archive"],["file-zip-o","far","file-archive"],["file-audio-o","far","file-audio"],["file-sound-o","far","file-audio"],["file-video-o","far","file-video"],["file-movie-o","far","file-video"],["file-code-o","far","file-code"],["vine","fab",null],["codepen","fab",null],["jsfiddle","fab",null],["life-ring","far",null],["life-bouy","far","life-ring"],["life-buoy","far","life-ring"],["life-saver","far","life-ring"],["support","far","life-ring"],["circle-o-notch",null,"circle-notch"],["rebel","fab",null],["ra","fab","rebel"],["resistance","fab","rebel"],["empire","fab",null],["ge","fab","empire"],["git-square","fab",null],["git","fab",null],["hacker-news","fab",null],["y-combinator-square","fab","hacker-news"],["yc-square","fab","hacker-news"],["tencent-weibo","fab",null],["qq","fab",null],["weixin","fab",null],["wechat","fab","weixin"],["send",null,"paper-plane"],["paper-plane-o","far","paper-plane"],["send-o","far","paper-plane"],["circle-thin","far","circle"],["header",null,"heading"],["sliders",null,"sliders-h"],["futbol-o","far","futbol"],["soccer-ball-o","far","futbol"],["slideshare","fab",null],["twitch","fab",null],["yelp","fab",null],["newspaper-o","far","newspaper"],["paypal","fab",null],["google-wallet","fab",null],["cc-visa","fab",null],["cc-mastercard","fab",null],["cc-discover","fab",null],["cc-amex","fab",null],["cc-paypal","fab",null],["cc-stripe","fab",null],["bell-slash-o","far","bell-slash"],["trash",null,"trash-alt"],["copyright","far",null],["eyedropper",null,"eye-dropper"],["area-chart",null,"chart-area"],["pie-chart",null,"chart-pie"],["line-chart",null,"chart-line"],["lastfm","fab",null],["lastfm-square","fab",null],["ioxhost","fab",null],["angellist","fab",null],["cc","far","closed-captioning"],["ils",null,"shekel-sign"],["shekel",null,"shekel-sign"],["sheqel",null,"shekel-sign"],["meanpath","fab","font-awesome"],["buysellads","fab",null],["connectdevelop","fab",null],["dashcube","fab",null],["forumbee","fab",null],["leanpub","fab",null],["sellsy","fab",null],["shirtsinbulk","fab",null],["simplybuilt","fab",null],["skyatlas","fab",null],["diamond","far","gem"],["intersex",null,"transgender"],["facebook-official","fab","facebook"],["pinterest-p","fab",null],["whatsapp","fab",null],["hotel",null,"bed"],["viacoin","fab",null],["medium","fab",null],["y-combinator","fab",null],["yc","fab","y-combinator"],["optin-monster","fab",null],["opencart","fab",null],["expeditedssl","fab",null],["battery-4",null,"battery-full"],["battery",null,"battery-full"],["battery-3",null,"battery-three-quarters"],["battery-2",null,"battery-half"],["battery-1",null,"battery-quarter"],["battery-0",null,"battery-empty"],["object-group","far",null],["object-ungroup","far",null],["sticky-note-o","far","sticky-note"],["cc-jcb","fab",null],["cc-diners-club","fab",null],["clone","far",null],["hourglass-o","far","hourglass"],["hourglass-1",null,"hourglass-start"],["hourglass-2",null,"hourglass-half"],["hourglass-3",null,"hourglass-end"],["hand-rock-o","far","hand-rock"],["hand-grab-o","far","hand-rock"],["hand-paper-o","far","hand-paper"],["hand-stop-o","far","hand-paper"],["hand-scissors-o","far","hand-scissors"],["hand-lizard-o","far","hand-lizard"],["hand-spock-o","far","hand-spock"],["hand-pointer-o","far","hand-pointer"],["hand-peace-o","far","hand-peace"],["registered","far",null],["creative-commons","fab",null],["gg","fab",null],["gg-circle","fab",null],["tripadvisor","fab",null],["odnoklassniki","fab",null],["odnoklassniki-square","fab",null],["get-pocket","fab",null],["wikipedia-w","fab",null],["safari","fab",null],["chrome","fab",null],["firefox","fab",null],["opera","fab",null],["internet-explorer","fab",null],["television",null,"tv"],["contao","fab",null],["500px","fab",null],["amazon","fab",null],["calendar-plus-o","far","calendar-plus"],["calendar-minus-o","far","calendar-minus"],["calendar-times-o","far","calendar-times"],["calendar-check-o","far","calendar-check"],["map-o","far","map"],["commenting",null,"comment-dots"],["commenting-o","far","comment-dots"],["houzz","fab",null],["vimeo","fab","vimeo-v"],["black-tie","fab",null],["fonticons","fab",null],["reddit-alien","fab",null],["edge","fab",null],["credit-card-alt",null,"credit-card"],["codiepie","fab",null],["modx","fab",null],["fort-awesome","fab",null],["usb","fab",null],["product-hunt","fab",null],["mixcloud","fab",null],["scribd","fab",null],["pause-circle-o","far","pause-circle"],["stop-circle-o","far","stop-circle"],["bluetooth","fab",null],["bluetooth-b","fab",null],["gitlab","fab",null],["wpbeginner","fab",null],["wpforms","fab",null],["envira","fab",null],["wheelchair-alt","fab","accessible-icon"],["question-circle-o","far","question-circle"],["volume-control-phone",null,"phone-volume"],["asl-interpreting",null,"american-sign-language-interpreting"],["deafness",null,"deaf"],["hard-of-hearing",null,"deaf"],["glide","fab",null],["glide-g","fab",null],["signing",null,"sign-language"],["viadeo","fab",null],["viadeo-square","fab",null],["snapchat","fab",null],["snapchat-ghost","fab",null],["snapchat-square","fab",null],["pied-piper","fab",null],["first-order","fab",null],["yoast","fab",null],["themeisle","fab",null],["google-plus-official","fab","google-plus"],["google-plus-circle","fab","google-plus"],["font-awesome","fab",null],["fa","fab","font-awesome"],["handshake-o","far","handshake"],["envelope-open-o","far","envelope-open"],["linode","fab",null],["address-book-o","far","address-book"],["vcard",null,"address-card"],["address-card-o","far","address-card"],["vcard-o","far","address-card"],["user-circle-o","far","user-circle"],["user-o","far","user"],["id-badge","far",null],["drivers-license",null,"id-card"],["id-card-o","far","id-card"],["drivers-license-o","far","id-card"],["quora","fab",null],["free-code-camp","fab",null],["telegram","fab",null],["thermometer-4",null,"thermometer-full"],["thermometer",null,"thermometer-full"],["thermometer-3",null,"thermometer-three-quarters"],["thermometer-2",null,"thermometer-half"],["thermometer-1",null,"thermometer-quarter"],["thermometer-0",null,"thermometer-empty"],["bathtub",null,"bath"],["s15",null,"bath"],["window-maximize","far",null],["window-restore","far",null],["times-rectangle",null,"window-close"],["window-close-o","far","window-close"],["times-rectangle-o","far","window-close"],["bandcamp","fab",null],["grav","fab",null],["etsy","fab",null],["imdb","fab",null],["ravelry","fab",null],["eercast","fab","sellcast"],["snowflake-o","far","snowflake"],["superpowers","fab",null],["wpexplorer","fab",null],["cab",null,"taxi"]];return function(l){try{l()}catch(l){if(!t)throw l}}(function(){var l;"function"==typeof i.hooks.addShims?i.hooks.addShims(s):(l=i.shims).push.apply(l,s)}),s},"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):l["fontawesome-free-shims"]=a();
8})();
9;
10/*!
11 * 
12 * 	elfsight.com
13 * 	
14 * 	Copyright (c) 2026 Elfsight, LLC. ALL RIGHTS RESERVED
15 * 
16 */
17!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="/dev/",t(0)}([function(e,t,n){n(1),n(2)(window),n(14)},function(e,t,n){e.exports=n.p+"index.html"},function(e,t,n){function i(e){if(!e.eapps){var t={},n=new o,i=new r(e,e.document.body,n);t.platform=i.facade(),t.apps=n.facade(),e.eapps=t}}var r=n(3),o=n(10);e.exports=i},function(e,t,n){function i(e){"@babel/helpers - typeof";return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}
17)),i.forEach(function(t){o(e,t,n[t])})}return e}function o(e,t,n){return t=a(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=s(e,"string");return"symbol"===i(t)?t:String(t)}function s(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function l(e,t){return f(e)||u(e,t)||p(e,t)||c()}function c(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function u(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}function f(e){if(Array.isArray(e))return e}var g=n(4),b=n(5),h=n(8),v=n(9),m="eapps.Platform",w="disabled",y="enabled",x="first-activity",C="in-viewport",k=[w,y,x,C],L=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/,j="https://core.service.elfsight.com",E=function(e,t,n){t=t||e.document;var i,o=this,a={},s=[],c=[],p=[],d=[];o.initialize=function(){o.logError=h.withModule(m),o.establishPreconnections(),o.collectWidgets(t),o.revise(),g(function(){o.collectWidgets(t),o.revise(),o.observe(),o.watchWidgetReset()})},o.establishPreconnections=function(){o.preconnect(o.getPlatformUrl())},o.preconnect=function(e){var t=document.createElement("link");t.href=e,t.rel="preconnect",t.crossOrigin="",document.head.appendChild(t)},o.facade=function(){return new v(o)},o.requireWidget=function(e){"string"!=typeof e&&o.logError("Widget Public ID required and should be a string",{pid:e}),~s.indexOf(e)||s.push(e)},o.getEappsClass=function(e){var t=e.className.split(" ");return 1===t.length?e.className:t.length>1?(t.filter(function(e){return/elfsight-app-[\S]+/.test(e)}),t[0]):void 0},o.getWidgetIdByElement=function(e){return"div"===e.tagName.toLowerCase()?o.getEappsClass(e).replace("elfsight-app-",""):e.getAttribute("data-id")},o.getLazyMode=function(e){var t=e.getAttribute("data-elfsight-app-lazy");return""===t?y:null!==t&&k.includes(t)?t:w},o.getWidgetsElements=function(e){if(e=e||t,!e||"function"!=typeof e.getElementsByTagName||"function"!=typeof e.querySelectorAll)return[];var n=Array.prototype.slice.call(e.getElementsByTagName("elfsight-app")),i=Array.prototype.slice.call(e.querySelectorAll('*[class^="elfsight-app"]')),r=i.concat(n);return e instanceof HTMLElement&&~e.className.indexOf("elfsight-app")&&r.push(e),r},o.collectWidgets=function(e){o.getWidgetsElements(e).forEach(function(e){if(!c.includes(e)){var t=o.getWidgetIdByElement(e);if(t){var n=o.getLazyMode(e);n===w?o.requireWidget(t):o.bootWidgetDeferredly(e,t,n),c.push(e)}}})},o.bootWidgetDeferredly=function(e,t,n){function i(){l.splice(0,l.length).forEach(function(e){e()})}function r(){i(),o.requireWidget(t),o.revise()}function a(){var e=["scroll","mousemove","touchstart","keydown","click"],t={capture:!0,passive:!0};return e.forEach(function(e){window.addEventListener(e,r,t)}),function(){e.forEach(function(e){window.removeEventListener(e,r,t)})}}function s(){if("undefined"==typeof window.IntersectionObserver)return function(){};var t=new IntersectionObserver(function(e){for(var t=0;t<e.length;++t)if(e[t].isIntersecting){r();break}});return t.observe(e),function(){t.disconnect()}}var l=[],c=[y,C].includes(n);c&&l.push(s());var p=[y,x].includes(n);p&&l.push(a())},o.watchWidgetReset=function(){window.addEventListener("message",function(e){var t=e.data;t.action&&"EappsPlatform.widgetReset"===t.action&&o.resetWidget(t.widgetId)})},o.resetWidget=function(e){var t=function e(t){var e=document.createElement("div");return e.className="elfsight-app-"+t,e};
17o.getWidgetsElements().forEach(function(n){o.getWidgetIdByElement(n)===e&&(delete a[e],n.parentNode.replaceChild(t(e),n))})},o.initWidget=function(e){var t=o.getWidgetIdByElement(e),i=a[t];if(i){if(!i.status||!i.data)return void o.logError('Widget "'+t+'" can`t be initialized because '+i.reason,e);i.data.id=t,i.data.platform=!0;var r=i.user||i.data.user;r&&(i.data.isOwner=r.owner),n.initWidget(e,i.data)}},o.boot=function(e,t){var n=t||s,i=[];if(n.forEach(function(e){d.includes(e)||(d.push(e),i.push(e))}),i.length){var p=new XMLHttpRequest,u=o.getPlatformUrl();u+="/p/boot/";var f=b.stringify({w:i.join(","),page:o.getPage()});p.open("get",u+"?"+f),p.withCredentials=!0,p.onload=function(){var t=JSON.parse(p.response);t.status||o.logError("Boot failed because "+t.reason,t.data);var n=Object.fromEntries(Object.entries(t.data.widgets).map(function(e){var t=l(e,2),n=t[0],i=t[1];return[n,r({},i,{data:i.data?r({},i.data,{settings:"string"==typeof i.data.settings?JSON.parse(i.data.settings):i.data.settings}):void 0})]}));a=Object.assign({},a,n),o.loadAssets(t.data.assets),c.forEach(o.initWidget.bind(o)),d=d.filter(function(e){return!i.includes(e)}),e&&e()},p.send()}},o.getPage=function(){try{var e=document.location.href;if(L.test(e))return new URL(e).toString()}catch(e){}},o.getPlatformUrl=function(){return e.eappsCustomPlatformUrl?e.eappsCustomPlatformUrl:j},o.revise=function(){var e=s.filter(function(e){return!(e in a)});e.length>0?o.boot(null,e):c.forEach(o.initWidget.bind(o))},o.loadAssets=function(t){t&&t.length&&t.map(function(e){return"string"==typeof e?{url:e}:e&&"string"==typeof e.url?{url:e.url,integrity:e.integrity}:null}).filter(function(e){return e&&p.indexOf(e.url)===-1}).forEach(function(t){var n=e.document.createElement("script");n.src=t.url,n.async=!0,n.charset="UTF-8",t.integrity&&(n.integrity=t.integrity,n.crossOrigin="anonymous"),e.document.head.appendChild(n),p.push(t.url)})},o.observe=function(){if(e.MutationObserver&&!i){var t={childList:!0,subtree:!0,characterData:!0},n=null;i=new MutationObserver(function(e){var t=function(e){o.requireWidget(o.getWidgetIdByElement(e)),c.includes(e)||c.push(e)};e.forEach(function(e){var i=function(e){var i=o.getWidgetsElements(e);i.forEach(t),i.length>0&&(n&&clearTimeout(n),n=setTimeout(function(){o.revise()},1e3))};Array.prototype.forEach.call(e.addedNodes,i)})}),i.observe(e.document,t)}},o.initialize()};e.exports=E},function(e,t,n){/*!
18	  * domready (c) Dustin Diaz 2014 - License MIT
19	  */
20!function(t,n){e.exports=n()}("domready",function(){var e,t=[],n=document,i=n.documentElement.doScroll,r="DOMContentLoaded",o=(i?/^loaded|^c/:/^loaded|^i|^c/).test(n.readyState);return o||n.addEventListener(r,e=function(){for(n.removeEventListener(r,e),o=1;e=t.shift();)e()}),function(e){o?setTimeout(e,0):t.push(e)}})},function(e,t,n){"use strict";function i(e){"@babel/helpers - typeof";return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){switch(e.arrayFormat){case"index":return function(t,n,i){return null===n?[a(t,e),"[",i,"]"].join(""):[a(t,e),"[",a(i,e),"]=",a(n,e)].join("")};case"bracket":return function(t,n){return null===n?a(t,e):[a(t,e),"[]=",a(n,e)].join("")};default:return function(t,n){return null===n?a(t,e):[a(t,e),"=",a(n,e)].join("")}}}function o(e){var t;switch(e.arrayFormat){case"index":return function(e,n,i){return t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===i[e]&&(i[e]={}),void(i[e][t[1]]=n)):void(i[e]=n)};case"bracket":return function(e,n,i){return t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0===i[e]?void(i[e]=[n]):void(i[e]=[].concat(i[e],n)):void(i[e]=n)};default:return function(e,t,n){return void 0===n[e]?void(n[e]=t):void(n[e]=[].concat(n[e],t))}}}function a(e,t){return t.encode?t.strict?l(e):encodeURIComponent(e):e}function s(e){return Array.isArray(e)?e.sort():"object"===i(e)?s(Object.keys(e)).sort(function(e,t){return Number(e)-Number(t)}).map(function(t){return e[t]}):e}var l=n(6),c=n(7);t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e,t){t=c({arrayFormat:"none"},t);var n=o(t),r=Object.create(null);return"string"!=typeof e?r:(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach(function(e){var t=e.replace(/\+/g," ").split("="),i=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:decodeURIComponent(o),n(decodeURIComponent(i),o,r)}),Object.keys(r).sort().reduce(function(e,t){var n=r[t];return Boolean(n)&&"object"===i(n)&&!Array.isArray(n)?e[t]=s(n):e[t]=n,e},Object.create(null))):r},t.stringify=function(e,t){var n={encode:!0,strict:!0,arrayFormat:"none"};t=c(n,t);var i=r(t);return e?Object.keys(e).sort().map(function(n){var r=e[n];if(void 0===r)return"";if(null===r)return a(n,t);if(Array.isArray(r)){var o=[];
20return r.slice().forEach(function(e){void 0!==e&&o.push(i(n,e,o.length))}),o.join("&")}return a(n,t)+"="+a(r,t)}).filter(function(e){return e.length>0}).join("&"):""}},function(e,t){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},function(e,t){/*
21	object-assign
22	(c) Sindre Sorhus
23	@license MIT
24	*/
25"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function i(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var i=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==i.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=i()?Object.assign:function(e,t){for(var i,s,l=n(e),c=1;c<arguments.length;c++){i=Object(arguments[c]);for(var p in i)o.call(i,p)&&(l[p]=i[p]);if(r){s=r(i);for(var d=0;d<s.length;
25d++)a.call(i,s[d])&&(l[s[d]]=i[s[d]])}}return l}},function(e,t){function n(e,t,n){var i=[n+' throws: "'+e+'"'];t&&(i.push("with \n\t ->"),i.push(t)),console.error.apply(console,i)}n.withModule=function(e){return function(t,i){return n(t,i,e)}},e.exports=n},function(e,t){var n=function(e){var t=this;t.initialize=function(){},t.requireWidget=function(t){return e.requireWidget(t)},t.resetWidget=function(t){return e.resetWidget(t)},t.initialize()};e.exports=n},function(e,t,n){var i=n(8),r=n(11),o=n(12),a=n(13),s=a.findLegacyOrModernAlias,l="eapps.AppsManager",c=function(){var e=this,t={},n=[],a=[];e.initialize=function(){e.logError=i.withModule(l)},e.facade=function(){return new r(e)},e.register=function(n,i){if(t.name)return void e.logError('Application "'+n+'" is already registered');t[n]=new o(new i),e.initWidgetsFromBuffer(n);var r=s(n);r&&(t[r]=new o(new i),e.initWidgetsFromBuffer(r))},e.app=function(e){return t[e]},e.initWidget=function(t,i){var r=e.app(i.app);if(r){if(a.indexOf(t)!==-1)return;a.push(t),r.initWidget(t,i),e.sendExtensionPostMessage(t,i)}else n.push({element:t,config:i,initialized:!1})},e.initWidgetsFromBuffer=function(t){n&&n.length&&n.forEach(function(n){t!==n.config.app||n.initialized||(n.initialized=!0,e.initWidget(n.element,n.config))})},e.sendExtensionPostMessage=function(e,t){var n={settings:t.settings,app_slug:t.app,public_id:t.id,platform:"core",widget_name:t.meta.widget_name,app_version:t.meta.app_version,thumbnail_url:t.meta.thumbnail_url};window.postMessage({method:"postMessagePlatformWidget",data:n},"*")},e.initialize()};e.exports=c},function(e,t){var n=function(e){var t=this;t.initialize=function(){},t.register=function(t,n){return e.register(t,n)},t.initialize()};e.exports=n},function(e,t){var n="https://dash.elfsight.com",i=function(e){var t=this,i=!1,r=[];t.initialize=function(){e.whenReady(t.ready.bind(t))},t.ready=function(){i=!0,t.initWidgetsFromBuffer()},t.initWidget=function(n,o){if(i){o.websiteUrl=window.location.host||"undefined";var a={widgetId:o.id||null,widgetToken:o.public_widget_token||null,widgetOrigin:"apps.elfsight.com",websiteUrl:o.websiteUrl,deactivate:1===o.preferences.disable_widget,deactivatedWidgetUrl:o.preferences.deactivated_widget_url,showElfsightLogo:!o.preferences.hide_elfsight_logo,owner:o.isOwner,platform:o.platform,freeLinkUrl:o.preferences.free_link_url,displayFreeLink:!!o.preferences.display_free_link,displayFreeLinkRemove:!!o.preferences.display_free_link_remove,freeLinkURL:o.preferences.free_link_url,freeLinkRemoveURL:o.preferences.free_link_remove_url,freeLinkAnchor:o.preferences.free_link_anchor,displayDeactivation:!!o.preferences.display_deactivation,deactivationURL:o.preferences.deactivation_url,displayPoweredBy:!!o.preferences.display_elfsight_powered_by},s=t.getAttributeSettings(n),l=[o.settings,a,s].reduce(function(e,t){return Object.keys(t).forEach(function(n){e[n]=t[n]}),e},{});e.initWidget(n,l,o),o.isOwner&&setTimeout(function(){t.initToolbar(n,o)},500)}else r.push({element:n,config:o,initialized:!1})},t.initToolbar=function(e,t){var i=0;t.usageStatus=function(){var e="green";return i=100*t.percentage,i>=100&&(e="red"),i>=90&&i<100&&(e="orange"),e};var r=document.implementation.createHTMLDocument(),o="".concat(n,"/apps/").concat(t.app),a="".concat(n,"/apps/").concat(t.app,"/pricing"),s="".concat(n,"/widget/").concat(t.id),l=function(e,n){var i=new URLSearchParams({utm_source:"clients",utm_medium:"user-panel",utm_campaign:n,utm_content:t.app,utm_term:t.websiteUrl}),r=e.includes("?")?"&":"?";return"".concat(e).concat(r).concat(i.toString())};r.body.innerHTML='<div class="eapps-widget-toolbar">\n                <div class="eapps-widget-toolbar-panel-wrapper">\n                    <div class="eapps-widget-toolbar-panel-only-you">Panel only seen by widget owner</div>\n                    \n                    <div class="eapps-widget-toolbar-panel">\n                        <a href="'.concat(l(o,"elfsight-icon"),'" target="_blank" title="Panel only seen by widget owner"> \n                            <div class="eapps-widget-toolbar-panel-logo">\n                                <svg width="15px" height="15px" viewBox="0 0 15 15">\n                                    <path d="M9.3907705,9.84479984 C9.39084949,9.84789591 9.39120496,9.85095229 9.39120496,9.85408806 C9.39120496,10.061247 9.22563696,10.22907 9.0213232,10.22907 C8.95852427,10.22907 8.89943798,10.2130737 8.84761899,10.1850899 L8.84754,10.1851296 L7.07973033,9.29155556 L7.08206061,9.28885642 C6.36524438,8.95487756 5.87944133,8.32105601 5.8725295,7.59228825 C5.8724505,7.59197071 5.87205554,7.5920104 5.87205554,7.59161347 C5.87205554,7.04563305 5.78595386,6.41089856 4.91573446,5.65760038 C3.20314046,4.17545506 0.437578214,1.75392969 0.14052742,1.49378024 C0.133220626,1.48790564 0.126229802,1.4816738 0.119396962,1.47528319 C0.116118779,1.47238559 0.113906992,1.47048031 0.113906992,1.47048031 L0.114025481,1.47032154 C0.0438802595,1.40204918 0,1.30619002 0,1.19981216 C0,0.992653173 0.165568,0.824830183 0.369763267,0.824830183 C0.437222748,0.824830183 0.500298153,0.84344631 0.554763389,0.875439056 L0.554881878,0.875240589 L8.16441401,4.79566183 C8.18708482,4.80685
25532 8.20940017,4.81848544 8.23159702,4.83027433 L8.26027125,4.84504021 C8.26027125,4.84504021 8.25995528,4.84539745 8.25991578,4.84543714 C8.94031653,5.21748181 9.39013856,5.85916262 9.39013856,6.58888301 C9.39013856,6.59412252 9.38970411,6.59924295 9.38966461,6.60448246 L9.39013856,6.60392675 C9.39013856,6.60392675 9.39013856,7.81560238 9.39013856,8.75974562 C9.39013856,9.47057204 9.39065201,9.79137275 9.3907705,9.84479984 Z M7.53431857,14.7455202 C3.55890924,14.6059985 0.437604872,11.2422351 0.576433956,7.24703185 C0.583108811,7.05447997 0.592627391,6.86419061 0.614903238,6.67604469 C0.626238643,6.5803443 0.774902276,5.85483139 1.42366658,5.94136264 C1.91002258,6.00626108 2.06393921,6.43383658 2.02799768,6.75971802 C2.02108585,6.82235395 2.00698571,6.9880335 2.00698571,6.9880335 C1.99805957,7.0901245 1.99174018,7.19296966 1.98810654,7.296569 C1.87645083,10.5094981 4.38663075,13.2146316 7.58357031,13.3268443 C10.7804309,13.4390571 13.4722142,10.9164331 13.58387,7.70354372 C13.6955257,4.49049559 11.1853457,1.78536206 7.98852467,1.67314929 C7.62634467,1.66044746 7.27060255,1.68180242 6.924458,1.73395933 C6.924458,1.73395933 6.08816582,1.8731238 5.90186232,1.30555026 C5.72160174,0.756354691 6.14271005,0.438650054 6.4277935,0.379070511 C6.94780024,0.279003871 7.48672566,0.235103155 8.03781591,0.254473453 C12.0131067,0.393995167 15.1343716,3.75771881 14.9955425,7.75308087 C14.8567529,11.7482842 11.5095699,14.8850419 7.53431857,14.7455202 Z" id="path-1"></path>\n                                </svg>\n                            </div>\n                        </a>\n                        \n                        <a href="').concat(l(s,"edit-widget"),'" target="_blank"> \n                            <div class="eapps-widget-toolbar-panel-edit">\n                                <div class="eapps-widget-toolbar-panel-edit-icon">\n                                    <svg width="15px" height="15px" viewBox="0 0 15 15">\n                                        <path d="M11.8409658,5.0838519 C11.9103036,5.1860702 12.0261968,5.24949902 12.1508333,5.25 L12.25,5.25 C13.2164983,5.25 14,6.03350169 14,7 C14,7.96649831 13.2164983,8.75 12.25,8.75 L12.1998265,8.74999536 C12.0487015,8.7505981 11.9123649,8.84088722 11.8528316,8.97979334 C11.7877518,9.12733583 11.817782,9.29295657 11.9216456,9.39918771 L11.9564161,9.43395833 C12.2850259,9.76220278 12.4696678,10.2076171 12.4696678,10.6720833 C12.4696678,11.1365495 12.2850259,11.5819639 11.956875,11.9097495 C11.6286306,12.2383593 11.1832162,12.4230011 10.71875,12.4230011 C10.2542838,12.4230011 9.80886945,12.2383593 9.48085438,11.909979 L9.45042877,11.8795032 C9.33962324,11.7711153 9.1740025,11.7410852 9.02646001,11.8061649 C8.88755388,11.8656983 8.79726477,12.0020348 8.79666667,12.1508333 L8.79666667,12.25 C8.79666667,13.2164983 8.01316498,14 7.04666667,14 C6.08016835,14 5.29666667,13.2164983 5.29666667,12.25 C5.2931854,12.0554921 5.19476641,11.9178878 5.01447022,11.8503365 C4.87266417,11.7877518 4.70704343,11.817782 4.60081229,11.9216456 L4.56604167,11.9564161 C4.23779722,12.2850259 3.79238285,12.4696678 3.32791667,12.4696678 C2.86345048,12.4696678 2.41803612,12.2850259 2.09025055,11.956875 C1.76164072,11.6286306 1.5769989,11.1832162 1.5769989,10.71875 C1.5769989,10.2542838 1.76164072,9.80886945 2.09002104,9.48085438 L2.12049683,9.45042877 C2.22888469,9.33962324 2.25891482,9.1740025 2.1938351,9.02646001 C2.13430173,8.88755388 1.99796517,8.79726477 1.84916667,8.79666667 L1.75,8.79666667 C0.783501688,8.79666667 1.94289029e-16,8.01316498 0,7.04666667 C-1.2952602e-16,6.08016835 0.783501688,5.29666667 1.75,5.29666667 C1.94450787,5.2931854 2.0821122,5.19476641 2.14966349,5.01447022 C2.21224816,4.87266417 2.18221802,4.70704343 2.07835438,4.60081229 L2.04358388,4.56604167 C1.71497406,4.23779722 1.53033223,3.79238285 1.53033223,3.32791667 C1.53033223,2.86345048 1.71497406,2.41803612 2.043125,2.09025055 C2.37136945,1.76164072 2.81678382,1.5769989 3.28125,1.5769989 C3.74571618,1.5769989 4.19113055,1.76164072 4.51914562,2.09002104 L4.54957123,2.12049683 C4.66037676,2.22888469 4.8259975,2.25891482 4.96780355,2.19633016 C5.00517877,2.17983498 5.04407976,2.16735698 5.0838519,2.15903418 C5.1860702,2.08969644 5.24949902,1.97380324 5.25,1.84916667 L5.25,1.75 C5.25,0.783501688 6.03350169,1.94289029e-16 7,0 C7.96649831,0 8.75,0.783501688 8.75,1.75 L8.74999536,1.80017349 C8.7505981,1.9512985 8.84088722,2.08763507 8.98552978,2.14966349 C9.12733583,2.21224816 9.29295657,2.18221802 9.39918771,2.07835438 L9.43395833,2.04358388 C9.76220278,1.714974
2506 10.2076171,1.53033223 10.6720833,1.53033223 C11.1365495,1.53033223 11.5819639,1.71497406 11.9097495,2.043125 C12.2383593,2.37136945 12.4230011,2.81678382 12.4230011,3.28125 C12.4230011,3.74571618 12.2383593,4.19113055 11.909979,4.51914562 L11.8795032,4.54957123 C11.7711153,4.66037676 11.7410852,4.8259975 11.8036698,4.96780355 C11.820165,5.00517877 11.832643,5.04407976 11.8409658,5.0838519 Z M5.32570846,3.30839955 C4.77441872,3.50165553 4.15603406,3.36755835 3.72918771,2.94997896 L3.69395833,2.91474945 C3.58454352,2.80521284 3.43607206,2.74366557 3.28125,2.74366557 C3.12642794,2.74366557 2.97795648,2.80521284 2.86808278,2.91520833 C2.75854618,3.02462315 2.6969989,3.17309461 2.6969989,3.32791667 C2.6969989,3.48273873 2.75854618,3.63121018 2.86831229,3.74085438 L2.90783651,3.78042877 C3.3497255,4.23217443 3.47215604,4.90739742 3.23081273,5.45135564 C3.01171177,6.04708399 2.45070951,6.44833064 1.8025,6.46333333 L1.75,6.46333333 C1.4278339,6.46333333 1.16666667,6.72450056 1.16666667,7.04666667 C1.16666667,7.36883277 1.4278339,7.63 1.75,7.63 L1.85149318,7.63000464 C2.46761824,7.63246196 3.02345194,8.00056374 3.26366984,8.56113688 C3.51882271,9.13926925 3.39639217,9.81449224 2.94997896,10.2708123 L2.91474945,10.3060417 C2.80521284,10.4154565 2.74366557,10.5639279 2.74366557,10.71875 C2.74366557,10.8735721 2.80521284,11.0220435 2.91520833,11.1319172 C3.02462315,11.2414538 3.17309461,11.3030011 3.32791667,11.3030011 C3.48273873,11.3030011 3.63121018,11.2414538 3.74085438,11.1316877 L3.78042877,11.0921635 C4.23217443,10.6502745 4.90739742,10.527844 5.45135564,10.7691873 C6.04708399,10.9882882 6.44833064,11.5492905 6.46333333,12.1975 L6.46333333,12.25 C6.46333333,12.5721661 6.72450056,12.8333333 7.04666667,12.8333333 C7.36883277,12.8333333 7.63,12.5721661 7.63,12.25 L7.63000464,12.1485068 C7.63246196,11.5323818 8.00056374,10.9765481 8.56113688,10.7363302 C9.13926925,10.4811773 9.81449224,10.6036078 10.2708123,11.050021 L10.3060417,11.0852505 C10.4154565,11.1947872 10.5639279,11.2563344 10.71875,11.2563344 C10.8735721,11.2563344 11.0220435,11.1947872 11.1319172,11.0847917 C11.2414538,10.9753769 11.3030011,10.8269054 11.3030011,10.6720833 C11.3030011,10.5172613 11.2414538,10.3687898 11.1316877,10.2591456 L11.0921635,10.2195712 C10.6502745,9.76782557 10.527844,9.09260258 10.7829968,8.51447022 C11.0232147,7.95389707 11.5790484,7.58579529 12.1975,7.58333333 L12.25,7.58333333 C12.5721661,7.58333333 12.8333333,7.3221661 12.8333333,7 C12.8333333,6.6778339 12.5721661,6.41666667 12.25,6.41666667 L12.1485068,6.41666203 C11.5323818,6.41420471 10.9765481,6.04610293 10.7338351,5.47979334 C10.7127093,5.43050161 10.6985296,5.37864558 10.6916004,5.32570846 C10.4983445,4.77441872 10.6324417,4.15603406 11.050021,3.72918771 L11.0852505,3.69395833 C11.1947872,3.58454352 11.2563344,3.43607206 11.2563344,3.28125 C11.2563344,3.12642794 11.1947872,2.97795648 11.0847917,2.86808278 C10.9753769,2.75854618 10.8269054,2.6969989 10.6720833,2.6969989 C10.5172613,2.6969989 10.3687898,2.75854618 10.2591456,2.86831229 L10.2195712,2.90783651 C9.76782557,3.3497255 9.09260258,3.47215604 8.52020666,3.21949823 C7.95389707,2.97678527 7.58579529,2.42095158 7.58333333,1.8025 L7.58333333,1.75 C7.58333333,1.4278339 7.3221661,1.16666667 7,1.16666667 C6.6778339,1.16666667 6.41666667,1.4278339 6.41666667,1.75 L6.41666203,1.85149318 C6.41420471,2.46761824 6.04610293,3.02345194 5.47979334,3.2661649 C5.43050161,3.2872907 5.37864558,3.3014704 5.32570846,3.30839955 Z M7,9.33333333 C5.71133558,9.33333333 4.66666667,8.28866442 4.66666667,7 C4.66666667,5.71133558 5.71133558,4.66666667 7,4.66666667 C8.28866442,4.66666667 9.33333333,5.71133558 9.33333333,7 C9.33333333,8.28866442 8.28866442,9.33333333 7,9.33333333 Z M7,8.16666667 C7.64433221,8.16666667 8.16666667,7.64433221 8.16666667,7 C8.16666667,6.35566779 7.64433221,5.83333333 7,5.83333333 C6.35566779,5.83333333 5.83333333,6.35566779 5.83333333,7 C5.83333333,7.64433221 6.35566779,8.16666667 7,8.16666667 Z"></path>\n                                    </svg>\n                                </div>\n                                \n                                <div class="eapps-widget-toolbar-panel-edit-label">Edit widget</div>\n                            </div>\n                        </a>\n                        \n                        <div class="eapps-widget-toolbar-panel-views eapps-widget-toolbar-panel-views-').concat(t.usageStatus(),'">\n                            <div class="eapps-widget-toolbar-panel-views-label">Views</div>\n                            \n                            <div class="eapps-widget-toolbar-panel-views-bar">\n                                <div class="eapps-widget-toolbar-panel-views-bar-inner" style="width:').concat(i,'%"></div>\n                            </div>\n                            \n                            <div class="eapps-widget-toolbar-panel-views-percent">').concat(Math.round(i),'%</div>\n                        </div>\n                        \n                        <a href="').concat(l(a,"extend-limits"),'" target="_blank" style="display:').concat(i>=90?"block":"none",'">\n                            <div class="eapps-widget-toolbar-panel-views-get-more">\n                                Extend Limit\n                            </div>\n                        </a>\n                    </div>\n                    \n                    <div class="eapps-widget-toolbar-panel-share" style="display:').concat(i<90?"inline-flex":"none",'">\n                        <div class="eapps-widget-toolbar-panel-share-button">\n                            <svg width="12px" height="12px" viewBox="0 0 24 24">\n                                <path id="XMLID_31_" d="M12.7,15.3c-4.5,0.1-8.4,2.5-10.7,6c-0.2,0.3-0.6,0.5-0.9,0.5c-0.1,0-0.2,0-0.3,0c-0.5-0.1-0.8-0.6-0.8-1c0,0,0-0.1,0-0.1c0-7.1,5.7-12.9,12.7-13V5.5c0-0.5,0.3-0.9,0.7-1.1c0.2-0.1,0.4-0.1,0.6-0.1c0.3,0,0.5,0.1,0.7,0.2l8.8,6c0.3,0.2,0.5,0.6,0.5,0.9c0,0.4-0.2,0.7-0.5,1l-8.8,6.1c-0.2,0.2-0.5,0.2-0.7,0.2c-0.2,0-0.4,0-0.6-0.1c-0.4-0.2-0.7-0.7-0.7-1.1V15.3z"></path>\n                            </svg>
25\n                            \n                            <span>Share</span>\n                        </div>\n                        \n                        <div class="eapps-widget-toolbar-panel-share-block">\n                            <div class="eapps-widget-toolbar-panel-share-block-text">\n                                <div class="eapps-widget-toolbar-panel-share-block-text-icon">🔥</div>\n                                Tell your customers about<br>new website functionality!\n                            </div>\n                            \n                            <div class="eapps-widget-toolbar-panel-share-block-actions">\n                                <div class="eapps-widget-toolbar-panel-share-block-actions-item-facebook eapps-widget-toolbar-panel-share-block-actions-item">\n                                    <a href="javascript:void(0)"\n                                       onclick="window.open(\'http://www.facebook.com/sharer.php?u=').concat(encodeURIComponent(t.websiteUrl),'\', \'facebook\', \'width=555,height=640,toolbar=0,status=0\'); return false;"\n                                       target="_blank" title="Share on Facebook">\n                                       \n                                        <svg class="eapps-widget-toolbar-panel-share-block-actions-item-icon" viewBox="0 0 1024 1024">\n                                            <path d="M234.747 554.565V346.624h152.512v-81.02C387.259 125.893 492.2.068 621.186.068h168.068v207.918H621.186c-18.412 0-39.85 22.329-39.85 55.801v82.826h207.918v207.929H581.336v469.39H387.247V554.564H234.746z"></path>\n                                        </svg>\n                                    </a>\n                                </div>\n                                \n                                <div class="eapps-widget-toolbar-panel-share-block-actions-item-twitter eapps-widget-toolbar-panel-share-block-actions-item">\n                                    <a href="https://twitter.com/share?url=').concat(encodeURIComponent(t.websiteUrl),'&via=elfsight&text=Now my site is cool as ever with a widget by Elfsight from https://elfsight.com/"\n                                       onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600\');return false;"\n                                       target="_blank" title="Share on Twitter">\n                                       \n                                        <svg class="eapps-widget-toolbar-panel-share-block-actions-item-icon" viewBox="0 0 1024 1024">\n                                            <path d="M912.964 321.322c13.032 289.559-202.954 612.433-585.152 612.433-116.254 0-224.521-34.104-315.596-92.559 109.203 12.898 218.206-17.38 304.798-85.227-90.111-1.646-166.12-61.158-192.344-142.973 32.258 6.181 64.008 4.388 92.974-3.532-98.995-19.869-167.378-109.096-165.13-204.452 27.789 15.427 59.512 24.699 93.255 25.742-91.676-61.278-117.633-182.336-63.713-274.868C183.633 280.463 335.317 362.425 506.4 370.988c-29.983-128.778 67.66-252.779 200.585-252.779 59.204 0 112.682 25.006 150.238 65.011 46.882-9.232 90.927-26.384 130.744-49.959-15.386 48.059-48.046 88.438-90.526 113.926 41.61-4.977 81.307-16.069 118.208-32.445-27.562 41.316-62.456 77.574-102.688 106.581z"></path>\n                                        </svg>\n                                    </a>\n                                </div>\n                                \n                                <div class="eapps-widget-toolbar-panel-share-block-actions-item-google eapps-widget-toolbar-panel-share-block-actions-item">\n                                    <a href="https://plus.google.com/share?url=').concat(encodeURIComponent(t.websiteUrl),'"\n                                       onclick="javascript:window.open(this.href, \'google+\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=350,width=480\');return false;"\n                                       target="_blank" title="Share on Google+">\n                                       \n                                        <svg class="eapps-widget-toolbar-panel-share-block-actions-item-icon" viewB
25ox="0 0 1024 1024">\n                                            <path d="M327.072 448.23v127.536s123.72-.164 174.097-.164c-27.28 82.677-69.698 127.7-174.097 127.7-105.651 0-188.112-85.65-188.112-191.302s82.461-191.302 188.112-191.302c55.861 0 91.937 19.633 125.029 47.001 26.49-26.49 24.274-30.264 91.669-93.908-57.209-52.071-133.245-83.815-216.695-83.815C149.223 189.976 5.051 334.151 5.051 512s144.175 322.024 322.024 322.024c265.837 0 330.813-231.474 309.271-385.793H327.072zm580.285 6.38V343.018h-79.709V454.61H712.866v79.709h114.782v114.782h79.709V534.319h111.592V454.61H907.357z"></path>\n                                        </svg>\n                                    </a>\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>');var c=r.body.children[0];e.classList.add("eapps-widget","eapps-widget-show-toolbar"),e.appendChild(c)},t.initWidgetsFromBuffer=function(){r&&r.length&&r.forEach(function(e){e.initialized||(e.initialized=!0,t.initWidget(e.element,e.config))})},t.initialize(),t.getAttributeSettings=function(e){var t={},n="elfsightApp";for(var i in e.dataset)if(i.startsWith(n)){var r="attribute".concat(i.replace(n,""));t[r]=e.dataset[i]}return t}};e.exports=i},function(e,t){function n(e,t){return s(e)||a(e,t)||r(e,t)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function a(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}function s(e){if(Array.isArray(e))return e}function l(e){return c[e]?c[e]:p[e]?p[e]:void 0}var c={instashow:"instagram-feed",yottie:"youtube-gallery","events-calendar":"event-calendar","social-icons":"social-media-icons","g2crowd-reviews":"g2-reviews","appleappstore-reviews":"apple-app-store-reviews","ali-express-reviews":"aliexpress-reviews","google-play-store-reviews":"google-play-reviews","dealer-rater-reviews":"dealerrater-reviews","ed-munds-reviews":"edmunds-reviews","open-table-reviews":"opentable-reviews"},p=Object.fromEntries(Object.entries(c).map(function(e){var t=n(e,2),i=t[0],r=t[1];return[r,i]}));e.exports={LEGACY_ALIAS_MAP:c,LEGACY_ALIAS_MAP_VICE_VERSA:p,findLegacyOrModernAlias:l}},function(e,t,n){var i=n(15);"string"==typeof i&&(i=[[e.id,i,""]]);n(17)(i,{});i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(16)(),t.push([e.id,'div.eapps-widget{position:relative}div.eapps-widget.eapps-widget-show-toolbar:before{position:absolute;content:"";display:block;bottom:0;top:0;left:0;right:0;pointer-events:none;border:1px solid transparent;transition:border .3s ease;z-index:1}.eapps-widget-toolbar{position:absolute;top:-32px;left:0;right:0;display:block;z-index:99999;padding-bottom:4px;transition:all .3s ease;pointer-events:none;opacity:0}.eapps-widget:hover .eapps-widget-toolbar{opacity:1;pointer-events:auto}.eapps-widget-toolbar a{text-decoration:none;box-shadow:none!important}.eapps-widget-toolbar-panel{border-radius:6px;background-color:#222;color:#fff;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;top:0;position:relative;transition:all .3s ease;opacity:0;overflow:hidden;-webkit-backface-visibility:hidden;backface-visibility:hidden;box-shadow:0 0 0 1px hsla(0,0%,100%,.2);height:28px}.eapps-widget:hover .eapps-widget-toolbar-panel{opacity:1}.eapps-widget-toolbar-panel-wrapper{width:100%;position:relative}.eapps-widget-toolbar-panel-only-you{position:absolute;top:-24px;font-size:11px;line-height:14px;color:#9c9c9c;padding:5px 4px}.eapps-widget-toolbar-panel-logo{width:28px;height:28px;border-right:1px solid hsla(0,0%,100%,.2);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.eapps-widget-toolbar-panel-logo svg{display:block;width:15px;height:15px;fill:#f93262}.eapps-widget-toolbar-panel-edit{font-size:12px;font-weight:400;line-height:14px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;padding:9px;border-right:1px solid hsla(0,0%,100%,.2);color:#fff;text-decoration:none}.eapps-widget-toolbar-panel-edit-icon{width:14px;
25height:14px;margin-right:8px}.eapps-widget-toolbar-panel-edit-icon svg{display:block;width:100%;height:100%;fill:#fff}.eapps-widget-toolbar-panel-views{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.eapps-widget-toolbar-panel-views-label{font-size:12px;font-weight:400;line-height:14px;margin-left:8px}.eapps-widget-toolbar-panel-views-bar{display:-ms-inline-flexbox;display:inline-flex;width:70px;height:3px;border-radius:2px;margin-left:8px;background-color:hsla(0,0%,100%,.3)}.eapps-widget-toolbar-panel-views-bar-inner{border-radius:2px;background-color:#4ad504}.eapps-widget-toolbar-panel-views-green .eapps-widget-toolbar-panel-views-bar-inner{background-color:#4ad504}.eapps-widget-toolbar-panel-views-red .eapps-widget-toolbar-panel-views-bar-inner{background-color:#ff4734}.eapps-widget-toolbar-panel-views-orange .eapps-widget-toolbar-panel-views-bar-inner{background-color:#ffb400}.eapps-widget-toolbar-panel-views-percent{display:-ms-inline-flexbox;display:inline-flex;margin-left:8px;margin-right:8px;font-size:12px;font-weight:400;line-height:14px}.eapps-widget-toolbar-panel-views-get-more{padding:9px 16px;background-color:#f93262;color:#fff;font-size:12px;font-weight:400;border-radius:0 6px 6px 0}.eapps-widget-toolbar-panel-share{position:absolute;top:0;display:inline-block;margin-left:8px;width:83px;height:28px;padding-bottom:4px;box-sizing:content-box!important}.eapps-widget-toolbar-panel-share:hover .eapps-widget-toolbar-panel-share-block{opacity:1;pointer-events:all}.eapps-widget-toolbar-panel-share-button{padding:0 18px;height:28px;background-color:#1c91ff;color:#fff;font-size:12px;font-weight:400;border-radius:6px;position:absolute;top:0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;cursor:default;-ms-flex-align:center;align-items:center}.eapps-widget-toolbar-panel-share-button svg{display:inline-block;margin-right:6px;fill:#fff;position:relative;top:-1px}.eapps-widget-toolbar-panel-share-block{position:absolute;background:#fff;border:1px solid hsla(0,0%,7%,.1);border-radius:10px;width:209px;top:32px;transform:translateX(-63px);opacity:0;pointer-events:none;transition:all .3s ease;box-shadow:0 4px 6px rgba(0,0,0,.05)}.eapps-widget-toolbar-panel-share-block:hover{opacity:1;pointer-events:all}.eapps-widget-toolbar-panel-share-block-text{color:#111;font-size:15px;font-weight:400;padding:12px 0;text-align:center}.eapps-widget-toolbar-panel-share-block-text-icon{padding-bottom:4px}.eapps-widget-toolbar-panel-share-block-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;border-top:1px solid hsla(0,0%,7%,.1)}.eapps-widget-toolbar-panel-share-block-actions-item{width:33.333333%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:39px;transition:all .3s ease;background-color:transparent}.eapps-widget-toolbar-panel-share-block-actions-item:hover{background-color:#fafafa}.eapps-widget-toolbar-panel-share-block-actions-item a{width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.eapps-widget-toolbar-panel-share-block-actions-item-icon{width:16px;height:16px;display:block}.eapps-widget-toolbar-panel-share-block-actions-item-facebook .eapps-widget-toolbar-panel-share-block-actions-item-icon{fill:#3c5a9b}.eapps-widget-toolbar-panel-share-block-actions-item-twitter .eapps-widget-toolbar-panel-share-block-actions-item-icon{fill:#1ab2e8}.eapps-widget-toolbar-panel-share-block-actions-item-google .eapps-widget-toolbar-panel-share-block-actions-item-icon{fill:#dd4b39}.eapps-widget-toolbar-panel-share-block-actions-item:not(:last-child){border-right:1px solid hsla(0,0%,7%,.1)}',""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},r=0;r<this.length;r++){var o=this[r][0];"number"==typeof o&&(i[o]=!0)}for(r=0;r<t.length;r++){var a=t[r];"number"==typeof a[0]&&i[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(e,t,n){function i(e,t){for(var n=0;n<e.length;n++){var i=e[n],r=f[i.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](i.parts[o]);for(;o<i.parts.length;o++)r.parts.push(c(i.parts[o],t))}else{for(var a=[],o=0;o<i.parts.length;o++)a.push(c(i.parts[o],t));f[i.id]={id:i.id,refs:1,parts:a}}}}function r(e){for(var t=[],n={},i=0;i<e.length;i++){var r=e[i],o=r[0],a=r[1],s=r[2],l=r[3],c={css:a,media:s,sourceMap:l};n[o]?n[o].parts.push(c):t.push(n[o]={id:o,parts:[c]})}return t}function o(e,t){var n=h(),i=w[w.length-1];if("top"===e.insertAt)i?i.nextSibling?n.insertBefore(t,i.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),w.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=w.indexOf(e);t>=0&&w.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function c(e,t){var n,i,r;if(t.singleton){var o=m++;n=v||(v=s(t)),i=p.bind(null,n,o,!1),r=p.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),i=u.bind(null,n),r=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),i=d.bind(null,n),r=function(){a(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}function p(e,t,n,i){var r=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=y(t,r);else{var o=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function d(e,t){
26var n=t.css,i=t.media;if(i&&e.setAttribute("media",i),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function u(e,t){var n=t.css,i=t.sourceMap;i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var r=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(r),o&&URL.revokeObjectURL(o)}var f={},g=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},b=g(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),h=g(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,m=0,w=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=b()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=r(e);return i(n,t),function(e){for(var o=[],a=0;a<n.length;a++){var s=n[a],l=f[s.id];l.refs--,o.push(l)}if(e){var c=r(e);i(c,t)}for(var a=0;a<o.length;a++){var l=o[a];if(0===l.refs){for(var p=0;p<l.parts.length;p++)l.parts[p]();
26delete f[l.id]}}}};var y=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()}]);;
27( () => {
28					const lazyloadRunObserver = () => {
29						const lazyloadBackgrounds = document.querySelectorAll( `.e-con.e-parent:not(.e-lazyloaded)` );
30						const lazyloadBackgroundObserver = new IntersectionObserver( ( entries ) => {
31							entries.forEach( ( entry ) => {
32								if ( entry.isIntersecting ) {
33									let lazyloadBackground = entry.target;
34									if( lazyloadBackground ) {
35										lazyloadBackground.classList.add( 'e-lazyloaded' );
36									}
37									lazyloadBackgroundObserver.unobserve( entry.target );
38								}
39							});
40						}, { rootMargin: '200px 0px 200px 0px' } );
41						lazyloadBackgrounds.forEach( ( lazyloadBackground ) => {
42							lazyloadBackgroundObserver.observe( lazyloadBackground );
43						} );
44					};
45					const events = [
46						'DOMContentLoaded',
47						'elementor/lazyload/observe',
48					];
49					events.forEach( ( event ) => {
50						document.addEventListener( event, lazyloadRunObserver );
51					} );
52				} )();;
53!function(){var t=jQuery;t(window).on("load",function(){var o,n,e,a,i,l,s,r,c;(o=wpfront_scroll_top_data.data).data.hide_iframe&&t(window).attr("self")!==t(window).attr("top")||(null!==o.css&&t("<style>").text(o.css).appendTo("head"),t("body").append(o.html),n=o.data,e=t("#wpfront-scroll-top-container"),a=!1,i=0,l=function(){clearTimeout(i),e.is(":visible")&&e.stop().fadeTo(n.button_fade_duration,0,function(){e.removeClass("show"),a=!1})},s=function(){n.auto_hide&&(clearTimeout(i),i=setTimeout(function(){l()},1e3*n.auto_hide_after))},r=!1,c=function(){r||(r=!0,t(window).scrollTop()>n.scroll_offset?(e.stop().css("opacity",a?1:n.button_opacity).addClass("show"),a||s()):l(),r=!1)},t(window).on("scroll",c),c(),e.on("mouseenter",function(){clearTimeout(i),a=!0,t(this).css("opacity",1)}).on("mouseleave",function(){t(this).css("opacity",n.button_opacity),a=!1,s()}).on("click",function(o){if("url"===n.button_action)return!0;if("element"===n.button_action){o.preventDefault();var e=t(n.button_action_element_selector).first(),a=t(n.button_action_container_selector),i=e.offset();if(null==i)return!1;var l=a.last().offset();if(null==l)return!1;n.button_action_element_offset=parseInt(n.button_action_element_offset),isNaN(n.button_action_element_offset)&&(n.button_action_element_offset=0);var s=i.top-l.top-n.button_action_element_offset;return a.animate({scrollTop:s},n.scroll_duration),!1}return o.preventDefault(),t("html, body").animate({scrollTop:0},n.scroll_duration),!1}))})}();;
54/* Elementor bundles are self-contained; this file exists for the elementor-webpack-runtime handle. */
55;
56"use strict";(function(){var __esmMin=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},__commonJSMin=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),e=__commonJSMin(((e,t)=>{function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t.exports=_interopRequireDefault,t.exports.__esModule=!0,t.exports.default=t.exports})),t=__commonJSMin(((e,t)=>{var check=function(e){return e&&e.Math===Math&&e};t.exports=check(typeof globalThis==`object`&&globalThis)||check(typeof window==`object`&&window)||check(typeof self==`object`&&self)||check(typeof global==`object`&&global)||check(typeof e==`object`&&e)||(function(){return this})()||Function(`return this`)()})),n=__commonJSMin(((e,t)=>{t.exports=function(e){try{return!!e()}catch(e){return!0}}})),r=__commonJSMin(((e,t)=>{t.exports=!n()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})})),i=__commonJSMin(((e,t)=>{t.exports=!n()(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})})),a=__commonJSMin(((e,t)=>{var n=i(),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}})),o=__commonJSMin((e=>{var t={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor;e.f=n&&!t.call({1:2},1)?function propertyIsEnumerable(e){var t=n(this,e);return!!t&&t.enumerable}:t})),s=__commonJSMin(((e,t)=>{t.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}})),c=__commonJSMin(((e,t)=>{var n=i(),r=Function.prototype,a=r.call,o=n&&r.bind.bind(a,a);t.exports=n?o:function(e){return function(){return a.apply(e,arguments)}}})),l=__commonJSMin(((e,t)=>{var n=c(),r=n({}.toString),i=n(``.slice);t.exports=function(e){return i(r(e),8,-1)}})),u=__commonJSMin(((e,t)=>{var r=c(),i=n(),a=l(),o=Object,s=r(``.split);t.exports=i(function(){return!o(`z`).propertyIsEnumerable(0)})?function(e){return a(e)===`String`?s(e,``):o(e)}:o})),d=__commonJSMin(((e,t)=>{t.exports=function(e){return e==null}}
vendor: 18,334 bytes, line 56
56)),f=__commonJSMin(((e,t)=>{var n=d(),r=TypeError;t.exports=function(e){if(n(e))throw new r(`Can't call method on `+e);return e}})),p=__commonJSMin(((e,t)=>{var n=u(),r=f();t.exports=function(e){return n(r(e))}})),m=__commonJSMin(((e,t)=>{var n=typeof document==`object`&&document.all;t.exports=n===void 0&&n!==void 0?function(e){return typeof e==`function`||e===n}:function(e){return typeof e==`function`}})),h=__commonJSMin(((e,t)=>{var n=m();t.exports=function(e){return typeof e==`object`?e!==null:n(e)}})),g=__commonJSMin(((e,n)=>{var r=t(),i=m(),aFunction=function(e){return i(e)?e:void 0};n.exports=function(e,t){return arguments.length<2?aFunction(r[e]):r[e]&&r[e][t]}})),_=__commonJSMin(((e,t)=>{t.exports=c()({}.isPrototypeOf)})),v=__commonJSMin(((e,n)=>{var r=t().navigator,i=r&&r.userAgent;n.exports=i?String(i):``})),y=__commonJSMin(((e,n)=>{var r=t(),i=v(),a=r.process,o=r.Deno,s=a&&a.versions||o&&o.version,c=s&&s.v8,l,u;c&&(l=c.split(`.`),u=l[0]>0&&l[0]<4?1:+(l[0]+l[1])),!u&&i&&(l=i.match(/Edge\/(\d+)/),(!l||l[1]>=74)&&(l=i.match(/Chrome\/(\d+)/),l&&(u=+l[1]))),n.exports=u})),b=__commonJSMin(((e,r)=>{var i=y(),a=n(),o=t().String;r.exports=!!Object.getOwnPropertySymbols&&!a(function(){var e=Symbol(`symbol detection`);return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41})})),x=__commonJSMin(((e,t)=>{t.exports=b()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`})),S=__commonJSMin(((e,t)=>{var n=g(),r=m(),i=_(),a=x(),o=Object;t.exports=a?function(e){return typeof e==`symbol`}:function(e){var t=n(`Symbol`);return r(t)&&i(t.prototype,o(e))}})),C=__commonJSMin(((e,t)=>{var n=String;t.exports=function(e){try{return n(e)}catch(e){return`Object`}}})),w=__commonJSMin(((e,t)=>{var n=m(),r=C(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a function`)}})),T=__commonJSMin(((e,t)=>{var n=w(),r=d();t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}})),E=__commonJSMin(((e,t)=>{var n=a(),r=m(),i=h(),o=TypeError;t.exports=function(e,t){var a,s;if(t===`string`&&r(a=e.toString)&&!i(s=n(a,e))||r(a=e.valueOf)&&!i(s=n(a,e))||t!==`string`&&r(a=e.toString)&&!i(s=n(a,e)))return s;throw new o(`Can't convert object to primitive value`)}})),D=__commonJSMin(((e,t)=>{t.exports=!1})),O=__commonJSMin(((e,n)=>{var r=t(),i=Object.defineProperty;n.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}})),k=__commonJSMin(((e,n)=>{var r=D(),i=t(),a=O(),o=`__core-js_shared__`,s=n.exports=i[o]||a(o,{});(s.versions||(s.versions=[])).push({version:`3.46.0`,mode:r?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)`,license:`https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE`,source:`https://github.com/zloirock/core-js`})})),ee=__commonJSMin(((e,t)=>{var n=k();t.exports=function(e,t){return n[e]||(n[e]=t||{})}})),A=__commonJSMin(((e,t)=>{var n=f(),r=Object;t.exports=function(e){return r(n(e))}})),j=__commonJSMin(((e,t)=>{var n=c(),r=A(),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(e,t){return i(r(e),t)}})),te=__commonJSMin(((e,t)=>{var n=c(),r=0,i=Math.random(),a=n(1.1.toString);t.exports=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+a(++r+i,36)}})),M=__commonJSMin(((e,n)=>{var r=t(),i=ee(),a=j(),o=te(),s=b(),c=x(),l=r.Symbol,u=i(`wks`),d=c?l.for||l:l&&l.withoutSetter||o;n.exports=function(e){return a(u,e)||(u[e]=s&&a(l,e)?l[e]:d(`Symbol.`+e)),u[e]}})),ne=__commonJSMin(((e,t)=>{var n=a(),r=h(),i=S(),o=T(),s=E(),c=M(),l=TypeError,u=c(`toPrimitive`);t.exports=function(e,t){if(!r(e)||i(e))return e;var a=o(e,u),c;if(a){if(t===void 0&&(t=`default`),c=n(a,e,t),!r(c)||i(c))return c;throw new l(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),s(e,t)}})),re=__commonJSMin(((e,t)=>{var n=ne(),r=S();t.exports=function(e){var t=n(e,`string`);return r(t)?t:t+``}})),ie=__commonJSMin(((e,n)=>{var r=t(),i=h(),a=r.document,o=i(a)&&i(a.createElement);n.exports=function(e){return o?a.createElement(e):{}}})),ae=__commonJSMin(((e,t)=>{var i=r(),a=n(),o=ie();t.exports=!i&&!a(function(){return Object.defineProperty(o(`div`),"a",{get:function(){return 7}}).a!==7})})),oe=__commonJSMin((e=>{var t=r(),n=a(),i=o(),c=s(),l=p(),u=re(),d=j(),f=ae(),m=Object.getOwnPropertyDescriptor;e.f=t?m:function getOwnPropertyDescriptor(e,t){if(e=l(e),t=u(t),f)try{return m(e,t)}catch(e){}if(d(e,t))return c(!n(i.f,e,t),e[t])}})),se=__commonJSMin(((e,t)=>{var i=r(),a=n();t.exports=i&&a(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})})),N=__commonJSMin(((e,t)=>{var n=h(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not an object`)}})),P=__commonJSMin((e=>{var t=r(),n=ae(),i=se(),a=N(),o=re(),s=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=`enumerable`,d=`configurable`,f=`writable`;e.f=t?i?function defineProperty(e,t,n){if(a(e),t=o(t),a(n),typeof e==`function`&&t===`prototype`&&`value`in n&&f in n&&!n[f]){var r=l(e,t);r&&r[f]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:u in n?n[u]:r[u],writable:!1})}return c(e,t,n)}:c:function defineProperty(e,t,r){if(a(e),t=o(t),a(r),n)try{return c(e,t,r)}catch(e){}if(`get`in r||`set`in r)throw new s(`Accessors not supported`);return`value`in r&&(e[t]=r.value),e}})),I=__commonJSMin(((e,t)=>{var n=r(),i=P(),a=s();t.exports=n?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}})),ce=__commonJSMin(((e,t)=>{var n=r(),i=j(),a=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,s=i(a,`name`);t.exports={EXISTS:s,PROPER:s&&(function something(){}).name===`something`,CONFIGURABLE:s&&(!n||n&&o(a,`name`).configurable)}})),le=__commonJSMin(((e,t)=>{var n=c(),r=m(),i=k(),a=n(Function.toString);r(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),t.exports=i.inspectSource})),ue=__commonJSMin(((e,n)=>{var r=t(),i=m(),a=r.WeakMap;n.exports=i(a)&&/native code/.test(String(a))})),L=__commonJSMin(((e,t)=>{var n=ee(),r=te(),i=n(`keys`);t.exports=function(e){return i[e]||(i[e]=r(e))}})),R=__commonJSMin(((e,t)=>{t.exports={}})),de=__commonJSMin(((e,n)=>{var r=ue(),i=t(),a=h(),o=I(),s=j(),c=k(),l=L(),u=R(),d=`Object already initialized`,f=i.TypeError,p=i.WeakMap,set,get,has,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(e){return function(t){var n;if(!a(t)||(n=get(t)).type!==e)throw new f(`Incompatible receiver, `+e+` required`);return n}};if(r||c.state){var m=c.state||(c.state=new p);m.get=m.get,m.has=m.has,m.set=m.set,set=function(e,t){if(m.has(e))throw new f(d);return t.facade=e,m.set(e,t),t},get=function(e){return m.get(e)||{}},has=function(e){return m.has(e)}}else{var g=l(`state`);u[g]=!0,set=function(e,t){if(s(e,g))throw new f(d);return t.facade=e,o(e,g,t),t},get=function(e){return s(e,g)?e[g]:{}},has=function(e){return s(e,g)}}n.exports={set,get,has,enforce,getterFor}})),fe=__commonJSMin(((e,t)=>{var i=c(),a=n(),o=m(),s=j(),l=r(),u=ce().CONFIGURABLE,d=le(),f=de(),p=f.enforce,h=f.get,g=String,_=Object.defineProperty,v=i(``.slice),y=i(``.replace),b=i([].join),x=l&&!a(function(){return _(function(){},`length`,{value:8}).length!==8}),S=String(String).split(`String`),C=t.exports=function(e,t,n){v(g(t),0,7)===`Symbol(`&&(t=`[`+y(g(t),/^Symbol\(([^)]*)\).*$/,`$1`)+`]`),n&&n.getter&&(t=`get `+t),n&&n.setter&&(t=`set `+t),(!s(e,`name`)||u&&e.name!==t)&&(l?_(e,`name`,{value:t,configurable:!0}):e.name=t),x&&n&&s(n,`arity`)&&e.length!==n.arity&&_(e,`length`,{value:n.arity});try{n&&s(n,`constructor`)&&n.constructor?l&&_(e,`prototype`,{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=p(e);return s(r,`source`)||(r.source=b(S,typeof t==`string`?t:``)),e};Function.prototype.toString=C(function toString(){return o(this)&&h(this).source||d(this)},`toString`)})),z=__commonJSMin(((e,t)=>{var n=m(),r=P(),i=fe(),a=O();t.exports=function(e,t,o,s){s||(s={});var c=s.enumerable,l=s.name===void 0?t:s.name;if(n(o)&&i(o,l,s),s.global)c?e[t]=o:a(t,o);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=o:r.f(e,t,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}})),pe=__commonJSMin(((e,t)=>{var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function trunc(e){var t=+e;return(t>0?r:n)(t)}})),me=__commonJSMin(((e,t)=>{var n=pe();t.exports=function(e){var t=+e;return t!==t||t===0?0:n(t)}})),he=__commonJSMin(((e,t)=>{var n=me(),r=Math.max,i=Math.min;t.exports=function(e,t){var a=n(e);return a<0?r(a+t,0):i(a,t)}})),ge=__commonJSMin(((e,t)=>{var n=me(),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}})),B=__commonJSMin(((e,t)=>{var n=ge();t.exports=function(e){return n(e.length)}})),_e=__commonJSMin(((e,t)=>{var n=p(),r=he(),i=B(),createMethod=function(e){return function(t,a,o){var s=n(t),c=i(s);if(c===0)return!e&&-1;var l=r(o,c),u;if(e&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===a)return e||l||0;return!e&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}})),ve=__commonJSMin(((e,t)=>{var n=c(),r=j(),i=p(),a=_e().indexOf,o=R(),s=n([].push);t.exports=function(e,t){var n=i(e),c=0,l=[],u;for(u in n)!r(o,u)&&r(n,u)&&s(l,u);for(;t.length>c;)r(n,u=t[c++])&&(~a(l,u)||s(l,u));return l}})),V=__commonJSMin(((e,t)=>{t.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]})),ye=__commonJSMin((e=>{var t=ve(),n=V().concat(`length`,`prototype`);e.f=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return t(e,n)}})),be=__commonJSMin((e=>{e.f=Object.getOwnPropertySymbols})),xe=__commonJSMin(((e,t)=>{var n=g(),r=c(),i=ye(),a=be(),o=N(),s=r([].concat);t.exports=n(`Reflect`,`ownKeys`)||function ownKeys(e){var t=i.f(o(e)),n=a.f;return n?s(t,n(e)):t}})),Se=__commonJSMin(((e,t)=>{var n=j(),r=xe(),i=oe(),a=P();t.exports=function(e,t,o){for(var s=r(t),c=a.f,l=i.f,u=0;u<s.length;u++){var d=s[u];!n(e,d)&&!(o&&n(o,d))&&c(e,d,l(t,d))}}})),Ce=__commonJSMin(((e,t)=>{var r=n(),i=m(),a=/#|\.prototype\./,isForced=function(e,t){var n=s[o(e)];return n===l?!0:n===c?!1:i(t)?r(t):!!t},o=isForced.normalize=function(e){return String(e).replace(a,`.`).toLowerCase()},s=isForced.data={},c=isForced.NATIVE=`N`,l=isForced.POLYFILL=`P`;t.exports=isForced})),H=__commonJSMin(((e,n)=>{var r=t(),i=oe().f,a=I(),o=z(),s=O(),c=Se(),l=Ce();n.exports=function(e,t){var n=e.target,u=e.global,d=e.stat,f,p=u?r:d?r[n]||s(n,{}):r[n]&&r[n].prototype,m,h,g,_;if(p)for(m in t){if(g=t[m],e.dontCallGetSet?(_=i(p,m),h=_&&_.value):h=p[m],f=l(u?m:n+(d?`.`:`#`)+m,e.forced),!f&&h!==void 0){if(typeof g==typeof h)continue;c(g,h)}(e.sham||h&&h.sham)&&a(g,`sham`,!0),o(p,m,g,e)}}})),we=__commonJSMin(((e,t)=>{var n=l();t.exports=Array.isArray||function isArray(e){return n(e)===`Array`}})),Te=__commonJSMin(((e,t)=>{var n=r(),i=we(),a=TypeError,o=Object.getOwnPropertyDescriptor;t.exports=n&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(i(e)&&!o(e,`length`).writable)throw new a(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t}})),Ee=__commonJSMin(((e,t)=>{var n=TypeError,r=9007199254740991;t.exports=function(e){if(e>r)throw n(`Maximum allowed index exceeded`);return e}})),U=__commonJSMin((()=>{var e=H(),t=A(),r=B(),i=Te(),a=Ee(),o=n()(function(){return[].push.call({length:4294967296},1)!==4294967297}),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}};e({target:`Array`,proto:!0,arity:1,forced:o||!properErrorOnNonWritableLength()},{push:function push(e){var n=t(this),o=r(n),s=arguments.length;a(o+s);for(var c=0;c<s;c++)n[o]=arguments[c],o++;return i(n,o),o}})})),De=__commonJSMin(((e,t)=>{var n=_(),r=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new r(`Incorrect invocation`)}})),Oe=__commonJSMin(((e,t)=>{t.exports=!n()(function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})})),ke=__commonJSMin(((e,t)=>{var n=j(),r=m(),i=A(),a=L(),o=Oe(),s=a(`IE_PROTO`),c=Object,l=c.prototype;t.exports=o?c.getPrototypeOf:function(e){var t=i(e);if(n(t,s))return t[s];var a=t.constructor;return r(a)&&t instanceof a?a.prototype:t instanceof c?l:null}})),Ae=__commonJSMin(((e,t)=>{var n=fe(),r=P();t.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),r.f(e,t,i)}})),je=__commonJSMin(((e,t)=>{var n=r(),i=P(),a=s();t.exports=function(e,t,r){n?i.f(e,t,a(0,r)):e[t]=r}})),Me=__commonJSMin(((e,t)=>{var n=ve(),r=V();t.exports=Object.keys||function keys(e){return n(e,r)}})),Ne=__commonJSMin((e=>{var t=r(),n=se(),i=P(),a=N(),o=p(),s=Me();e.f=t&&!n?Object.defineProperties:function defineProperties(e,t){a(e);for(var n=o(t),r=s(t),c=r.length,l=0,u;c>l;)i.f(e,u=r[l++],n[u]);return e}})),Pe=__commonJSMin(((e,t)=>{t.exports=g()(`document`,`documentElement`)})),W=__commonJSMin(((e,t)=>{var n=N(),r=Ne(),i=V(),a=R(),o=Pe(),s=ie(),c=L(),l=`>`,u=`<`,d=`prototype`,f=`script`,p=c(`IE_PROTO`),EmptyConstructor=function(){},scriptTag=function(e){return u+f+l+e+u+`/`+f+l},NullProtoObjectViaActiveX=function(e){e.write(scriptTag(``)),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=s(`iframe`),t=`java`+f+`:`,n;return e.style.display=`none`,o.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(scriptTag(`document.F=Object`)),n.close(),n.F},m,NullProtoObject=function(){try{m=new ActiveXObject(`htmlfile`)}catch(e){}NullProtoObject=typeof document<`u`?document.domain&&m?NullProtoObjectViaActiveX(m):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(m);for(var e=i.length;e--;)delete NullProtoObject[d][i[e]];return NullProtoObject()};a[p]=!0,t.exports=Object.create||function create(e,t){var i;return e===null?i=NullProtoObject():(EmptyConstructor[d]=n(e),i=new EmptyConstructor,EmptyConstructor[d]=null,i[p]=e),t===void 0?i:r.f(i,t)}})),Fe=__commonJSMin(((e,t)=>{var r=n(),i=m(),a=h(),o=W(),s=ke(),c=z(),l=M(),u=D(),d=l(`iterator`),f=!1,p,g,_;[].keys&&(_=[].keys(),`next`in _?(g=s(s(_)),g!==Object.prototype&&(p=g)):f=!0),!a(p)||r(function(){var e={};return p[d].call(e)!==e})?p={}:u&&(p=o(p)),i(p[d])||c(p,d,function(){return this}),t.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:f}})),Ie=__commonJSMin((()=>{var e=H(),i=t(),a=De(),o=N(),s=m(),c=ke(),l=Ae(),u=je(),d=n(),f=j(),p=M(),h=Fe().IteratorPrototype,g=r(),_=D(),v=`constructor`,y=`Iterator`,b=p(`toStringTag`),x=TypeError,S=i[y],C=_||!s(S)||S.prototype!==h||!d(function(){S({})}),w=function Iterator(){if(a(this,h),c(this)===h)throw new x(`Abstract class Iterator not directly constructable`)},defineIteratorPrototypeAccessor=function(e,t){g?l(h,e,{configurable:!0,get:function(){return t},set:function(t){if(o(this),this===h)throw new x(`You can't redefine this property`);f(this,e)?this[e]=t:u(this,e,t)}}):h[e]=t};f(h,b)||defineIteratorPrototypeAccessor(b,y),(C||!f(h,v)||h[v]===Object)&&defineIteratorPrototypeAccessor(v,w),w.prototype=h,e({global:!0,constructor:!0,forced:C},{Iterator:w})})),G=__commonJSMin((()=>{Ie()})),K=__commonJSMin(((e,t)=>{t.exports=function(e){return{iterator:e,next:e.next,done:!1}}})),Le=__commonJSMin(((e,t)=>{var n=z();t.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}})),Re=__commonJSMin(((e,t)=>{t.exports=function(e,t){return{value:e,done:t}}})),q=__commonJSMin(((e,t)=>{var n=a(),r=N(),i=T();t.exports=function(e,t,a){var o,s;r(e);try{if(o=i(e,`return`),!o){if(t===`throw`)throw a;return a}o=n(o,e)}catch(e){s=!0,o=e}if(t===`throw`)throw a;if(s)throw o;return r(o),a}})),ze=__commonJSMin(((e,t)=>{var n=q();t.exports=function(e,t,r){for(var i=e.length-1;i>=0;i--)if(e[i]!==void 0)try{r=n(e[i].iterator,t,r)}catch(e){t=`throw`,r=e}if(t===`throw`)throw r;return r}})),Be=__commonJSMin(((e,t)=>{var n=a(),r=W(),i=I(),o=Le(),s=M(),c=de(),l=T(),u=Fe().IteratorPrototype,d=Re(),f=q(),p=ze(),m=s(`toStringTag`),h=`IteratorHelper`,g=`WrapForValidIterator`,_=`normal`,v=`throw`,y=c.set,createIteratorProxyPrototype=function(e){var t=c.getterFor(e?g:h);return o(r(u),{next:function next(){var n=t(this);if(e)return n.nextHandler();if(n.done)return d(void 0,!0);try{var r=n.nextHandler();return n.returnHandlerResult?r:d(r,n.done)}catch(e){throw n.done=!0,e}},return:function(){var r=t(this),i=r.iterator;if(r.done=!0,e){var a=l(i,`return`);return a?n(a,i):d(void 0,!0)}if(r.inner)try{f(r.inner.iterator,_)}catch(e){return f(i,v,e)}if(r.openIters)try{p(r.openIters,_)}catch(e){return f(i,v,e)}return i&&f(i,_),d(void 0,!0)}})},b=createIteratorProxyPrototype(!0),x=createIteratorProxyPrototype(!1);i(x,m,`Iterator Helper`),t.exports=function(e,t,n){var r=function Iterator(r,i){i?(i.iterator=r.iterator,i.next=r.next):i=r,i.type=t?g:h,i.returnHandlerResult=!!n,i.nextHandler=e,i.counter=0,i.done=!1,y(this,i)};return r.prototype=t?b:x,r}})),Ve=__commonJSMin(((e,t)=>{var n=N(),r=q();t.exports=function(e,t,i,a){try{return a?t(n(i)[0],i[1]):t(i)}catch(t){r(e,`throw`,t)}}})),He=__commonJSMin(((e,t)=>{t.exports=function(e,t){var n=typeof Iterator==`function`&&Iterator.prototype[e];if(n)try{n.call({next:null},t).next()}catch(e){return!0}}})),J=__commonJSMin(((e,n)=>{var r=t();n.exports=function(e,t){var n=r.Iterator,i=n&&n.prototype,a=i&&i[e],o=!1;if(a)try{a.call({next:function(){return{done:!0}},return:function(){o=!0}},-1)}catch(e){e instanceof t||(o=!1)}if(!o)return a}})),Ue=__commonJSMin((()=>{var e=H(),t=a(),n=w(),r=N(),i=K(),o=Be(),s=Ve(),c=D(),l=q(),u=He(),d=J(),f=!c&&!u(`filter`,function(){}),p=!c&&!f&&d(`filter`,TypeError),m=c||f||p,h=o(function(){for(var e=this.iterator,n=this.predicate,i=this.next,a,o,c;;){if(a=r(t(i,e)),o=this.done=!!a.done,o)return;if(c=a.value,s(e,n,[c,this.counter++],!0))return c}});e({target:`Iterator`,proto:!0,real:!0,forced:m},{filter:function filter(e){r(this);try{n(e)}catch(e){l(this,`throw`,e)}return p?t(p,this,e):new h(i(this),{predicate:e})}})})),Y=__commonJSMin((()=>{Ue()})),We=__commonJSMin(((e,t)=>{var n=l(),r=c();t.exports=function(e){if(n(e)===`Function`)return r(e)}})),Ge=__commonJSMin(((e,t)=>{var n=We(),r=w(),a=i(),o=n(n.bind);t.exports=function(e,t){return r(e),t===void 0?e:a?o(e,t):function(){return e.apply(t,arguments)}}}
56)),Ke=__commonJSMin(((e,t)=>{t.exports={}})),qe=__commonJSMin(((e,t)=>{var n=M(),r=Ke(),i=n(`iterator`),a=Array.prototype;t.exports=function(e){return e!==void 0&&(r.Array===e||a[i]===e)}})),Je=__commonJSMin(((e,t)=>{var n=M()(`toStringTag`),r={};r[n]=`z`,t.exports=String(r)===`[object z]`})),Ye=__commonJSMin(((e,t)=>{var n=Je(),r=m(),i=l(),a=M()(`toStringTag`),o=Object,s=i(function(){return arguments}())===`Arguments`,tryGet=function(e,t){try{return e[t]}catch(e){}};t.exports=n?i:function(e){var t,n,c;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=tryGet(t=o(e),a))==`string`?n:s?i(t):(c=i(t))===`Object`&&r(t.callee)?`Arguments`:c}})),Xe=__commonJSMin(((e,t)=>{var n=Ye(),r=T(),i=d(),a=Ke(),o=M()(`iterator`);t.exports=function(e){if(!i(e))return r(e,o)||r(e,`@@iterator`)||a[n(e)]}})),Ze=__commonJSMin(((e,t)=>{var n=a(),r=w(),i=N(),o=C(),s=Xe(),c=TypeError;t.exports=function(e,t){var a=arguments.length<2?s(e):t;if(r(a))return i(n(a,e));throw new c(o(e)+` is not iterable`)}})),Qe=__commonJSMin(((e,t)=>{var n=Ge(),r=a(),i=N(),o=C(),s=qe(),c=B(),l=_(),u=Ze(),d=Xe(),f=q(),p=TypeError,Result=function(e,t){this.stopped=e,this.result=t},m=Result.prototype;t.exports=function(e,t,a){var h=a&&a.that,g=!!(a&&a.AS_ENTRIES),_=!!(a&&a.IS_RECORD),v=!!(a&&a.IS_ITERATOR),y=!!(a&&a.INTERRUPTED),b=n(t,h),x,S,C,w,T,E,D,stop=function(e){return x&&f(x,`normal`),new Result(!0,e)},callFn=function(e){return g?(i(e),y?b(e[0],e[1],stop):b(e[0],e[1])):y?b(e,stop):b(e)};if(_)x=e.iterator;else if(v)x=e;else{if(S=d(e),!S)throw new p(o(e)+` is not iterable`);if(s(S)){for(C=0,w=c(e);w>C;C++)if(T=callFn(e[C]),T&&l(m,T))return T;return new Result(!1)}x=u(e,S)}for(E=_?e.next:x.next;!(D=r(E,x)).done;){try{T=callFn(D.value)}catch(e){f(x,`throw`,e)}if(typeof T==`object`&&T&&l(m,T))return T}return new Result(!1)}})),$e=__commonJSMin((()=>{var e=H(),t=a(),n=Qe(),r=w(),i=N(),o=K(),s=q(),c=J()(`forEach`,TypeError);e({target:`Iterator`,proto:!0,real:!0,forced:c},{forEach:function forEach(e){i(this);try{r(e)}catch(e){s(this,`throw`,e)}if(c)return t(c,this,e);var a=o(this),l=0;n(a,function(t){e(t,l++)},{IS_RECORD:!0})}})})),X=__commonJSMin((()=>{$e()})),et=__commonJSMin(((e,t)=>{U(),G(),Y(),X();var Module=function(){let e=jQuery,t=arguments,n=this,r={},i,ensureClosureMethods=function(){e.each(n,function(e){let t=n[e];typeof t==`function`&&(n[e]=function(){return t.apply(n,arguments)})})},initSettings=function(){i=n.getDefaultSettings();let r=t[0];r&&e.extend(!0,i,r)},init=function(){n.__construct.apply(n,t),ensureClosureMethods(),initSettings(),n.trigger(`init`)};this.getItems=function(e,t){if(t){let n=t.split(`.`),r=n.splice(0,1);return n.length?e[r]?this.getItems(e[r],n.join(`.`)):void 0:e[r]}return e},this.getSettings=function(e){return this.getItems(i,e)},this.setSettings=function(t,r,a){if(a||(a=i),typeof t==`object`)return e.extend(a,t),n;let o=t.split(`.`),s=o.splice(0,1);return o.length?(a[s]||(a[s]={}),n.setSettings(o.join(`.`),r,a[s])):(a[s]=r,n)},this.getErrorMessage=function(e,t){let n;switch(e){case`forceMethodImplementation`:n=`The method '${t}' must to be implemented in the inheritor child.`;break;default:n=`An error occurs`}return n},this.forceMethodImplementation=function(e){throw Error(this.getErrorMessage(`forceMethodImplementation`,e))},this.on=function(t,i){return typeof t==`object`?(e.each(t,function(e){n.on(e,this)}),n):(t.split(` `).forEach(function(e){r[e]||(r[e]=[]),r[e].push(i)}),n)},this.off=function(e,t){if(!r[e])return n;if(!t)return delete r[e],n;let i=r[e].indexOf(t);return i!==-1&&(delete r[e][i],r[e]=r[e].filter(e=>e)),n},this.trigger=function(t){let i=`on`+t[0].toUpperCase()+t.slice(1),a=Array.prototype.slice.call(arguments,1);n[i]&&n[i].apply(n,a);let o=r[t];return o&&e.each(o,function(e,t){t.apply(n,a)}),n},init()};Module.prototype.__construct=function(){},Module.prototype.getDefaultSettings=function(){return{}},Module.prototype.getConstructorID=function(){return this.constructor.name},Module.extend=function(e){let t=jQuery,n=this,child=function(){return n.apply(this,arguments)};return t.extend(child,n),child.prototype=Object.create(t.extend({},n.prototype,e)),child.prototype.constructor=child,child.__super__=n.prototype,child},t.exports=Module})),tt=__commonJSMin((t=>{var n=e();
56Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=n(et()).default.extend({elements:null,getDefaultElements(){return{}},bindEvents(){},onInit(){this.initElements(),this.bindEvents()},initElements(){this.elements=this.getDefaultElements()}})})),nt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,U(),G(),X(),e.default=class InstanceType{static[Symbol.hasInstance](e){let t=super[Symbol.hasInstance](e);if(e&&!e.constructor.getInstanceType)return t;if(e&&(e.instanceTypes||(e.instanceTypes=[]),t||this.getInstanceType()===e.constructor.getInstanceType()&&(t=!0),t)){let t=this.getInstanceType===InstanceType.getInstanceType?`BaseInstanceType`:this.getInstanceType();e.instanceTypes.indexOf(t)===-1&&e.instanceTypes.push(t)}return!t&&e&&(t=e.instanceTypes&&Array.isArray(e.instanceTypes)&&e.instanceTypes.indexOf(this.getInstanceType())!==-1),t}static getInstanceType(){elementorModules.ForceMethodImplementation()}constructor(){let e=new.target,t=[];for(;e.__proto__&&e.__proto__.name;)t.push(e.__proto__),e=e.__proto__;t.reverse().forEach(e=>this instanceof e)}}})),rt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var _default=(e,t)=>{t=Array.isArray(t)?t:[t];for(let n of t)if(e.constructor.name===n.prototype[Symbol.toStringTag])return!0;return!1};e.default=_default})),it=__commonJSMin((t=>{var n=e();Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(nt()),i=n(rt()),ArgsObject=class extends r.default{static getInstanceType(){return`ArgsObject`}constructor(e){super(),this.args=e}requireArgument(e,t=this.args){if(!Object.prototype.hasOwnProperty.call(t,e))throw Error(`${e} is required.`)}requireArgumentType(e,t,n=this.args){if(this.requireArgument(e,n),typeof n[e]!==t)throw Error(`${e} invalid type: ${t}.`)}requireArgumentInstance(e,t,n=this.args){if(this.requireArgument(e,n),!(n[e]instanceof t)&&!(0,i.default)(n[e],t))throw Error(`${e} invalid instance.`)}requireArgumentConstructor(e,t,n=this.args){if(this.requireArgument(e,n),n[e].constructor.toString()!==t.prototype.constructor.toString())throw Error(`${e} invalid constructor type.`)}};t.default=ArgsObject})),at=__commonJSMin((t=>{var n=e();Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,U(),t.default=n(tt()).default.extend({getDefaultSettings(){return{container:null,items:null,columnsCount:3,verticalSpaceBetween:30}},getDefaultElements(){return{$container:jQuery(this.getSettings(`container`)),$items:jQuery(this.getSettings(`items`))}},run(){var e=[],t=this.elements.$container.position().top,n=this.getSettings(),r=n.columnsCount;t+=parseInt(this.elements.$container.css(`margin-top`),10),this.elements.$items.each(function(i){var a=Math.floor(i/r),o=jQuery(this),s=o[0].getBoundingClientRect().height+n.verticalSpaceBetween;if(a){var c=o.position(),l=i%r,u=c.top-t-e[l];u-=parseInt(o.css(`margin-top`),10),u*=-1,o.css(`margin-top`,u+`px`),e[l]+=s}else e.push(s)})}})})),ot=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,U();var Scroll=class{static scrollObserver(e){let t=0,buildThresholds=(e=0)=>{let t=[];if(e>0&&e<=100){let n=100/e;for(let e=0;e<=100;e+=n)t.push(e/100)}else t.push(0);return t},n={root:e.root||null,rootMargin:e.offset||`0px`,threshold:buildThresholds(e.sensitivity)};function handleIntersect(n){let r=n[0].boundingClientRect.y,i=n[0].isIntersecting,a=r<t?`down`:`up`,o=Math.abs(parseFloat((n[0].intersectionRatio*100).toFixed(2)));e.callback({sensitivity:e.sensitivity,isInViewport:i,scrollPercentage:o,intersectionScrollDirection:a}),t=r}return new IntersectionObserver(handleIntersect,n)}static getElementViewportPercentage(e,t={}){let n=e[0].getBoundingClientRect(),r=t.start||0,i=t.end||0,a=window.innerHeight*r/100,o=window.innerHeight*i/100,s=n.top-window.innerHeight,c=n.top+a+e.height(),l=0-s+a,u=c-s+o,d=Math.max(0,Math.min(l/u,1));return parseFloat((d*100).toFixed(2))}static getPageScrollPercentage(e={},t){let n=e.start||0,r=e.end||0,i=t||document.documentElement.scrollHeight-document.documentElement.clientHeight,a=i*n/100,o=i+a+i*r/100;return(document.documentElement.scrollTop+document.body.scrollTop+a)/o*100}};e.default=Scroll})),st=__commonJSMin(((e,t)=>{var n=M(),r=W(),i=P().f,a=n(`unscopables`),o=Array.prototype;o[a]===void 0&&i(o,a,{configurable:!0,value:r(null)}),t.exports=function(e){o[a][e]=!0}})),ct=__commonJSMin((()=>{var e=H(),t=_e().includes,r=n(),i=st();e({target:`Array`,proto:!0,forced:r(function(){return![,].includes()})},{includes:function includes(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),i(`includes`)})),lt=__commonJSMin((e=>
56{Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ForceMethodImplementation=void 0,ct();var t=class ForceMethodImplementation extends Error{constructor(e={},t={}){super(`${e.isStatic?`static `:``}${e.fullName}() should be implemented, please provide '${e.functionName||e.fullName}' functionality.`,t),Object.keys(t).length&&console.error(t),Error.captureStackTrace(this,ForceMethodImplementation)}};e.ForceMethodImplementation=t;var _default=e=>{let n=Error().stack.split(`
57`)[2].trim(),r=n.startsWith(`at new`)?`constructor`:n.split(` `)[1],i={};if(i.functionName=r,i.fullName=r,i.functionName.includes(`.`)){let e=i.functionName.split(`.`);i.className=e[0],i.functionName=e[1]}else i.isStatic=!0;throw new t(i,e)};e.default=_default}));function _typeof(e){"@babel/helpers - typeof";return _typeof=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_typeof(e)}var ut=__esmMin((()=>{}));function toPrimitive(e,t){if(_typeof(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_typeof(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var dt=__esmMin((()=>{ut()}));function toPropertyKey(e){var t=toPrimitive(e,`string`);return _typeof(t)==`symbol`?t:t+``}var ft=__esmMin((()=>{ut(),dt()}));function _defineProperty(e,t,n){return(t=toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pt=__esmMin((()=>{ft()}));function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var mt=__esmMin((()=>{pt()})),ht=__commonJSMin((e=>{mt(),Object.defineProperty(e,"__esModule",{value:!0}),e.createGetInitialState=createGetInitialState;function createGetInitialState(e,t={}){return(n,r)=>{let i=r;if(n.hasOwnProperty(`uploadedData`)){var a;i=!1;let t=n.uploadedData.manifest.templates,r=((a=elementorAppConfig)==null||(a=a[`import-export-customization`])==null?void 0:a.exportGroups)||{};for(let n in t)if(r[t[n].doc_type]===e){i=!0;break}}return _objectSpread2({enabled:i},t)}}}));function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var gt=__esmMin((()=>{}));function _objectWithoutProperties(e,t){if(e==null)return{};var n,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var _t=__esmMin((()=>{gt()})),vt=__commonJSMin((()=>{var e=H(),t=a(),n=w(),r=N(),i=K(),o=Be(),s=Ve(),c=q(),l=He(),u=J(),d=D(),f=!d&&!l(`map`,function(){}),p=!d&&!f&&u(`map`,TypeError),m=d||f||p,h=o(function(){var e=this.iterator,n=r(t(this.next,e));if(!(this.done=!!n.done))return s(e,this.mapper,[n.value,this.counter++],!0)});e({target:`Iterator`,proto:!0,real:!0,forced:m},{map:function map(e){r(this);try{n(e)}catch(e){c(this,`throw`,e)}return p?t(p,this,e):new h(i(this),{mapper:e})}})})),yt=__commonJSMin((()=>{vt()})),bt=__commonJSMin((e=>{_t(),mt();var t=[`children`];Object.defineProperty(e,"__esModule",{value:!0}),e.BaseRegistry=void 0,G(),Y(),X(),yt();var BaseRegistry=class{constructor(){this.sections=new Map}register(e){if(!e.key||!e.title)throw Error(`Template type must have key and title`);let t=this.get(e.key)||this.formatSection(e);if(e.children)if(t.children){let n=new Map(t.children.map(e=>[e.key,e]));
57e.children.forEach(e=>{let t=this.formatSection(e);n.set(e.key,t)}),t.children=Array.from(n.values())}else t.children=e.children.map(e=>this.formatSection(e));this.sections.set(e.key,t)}formatSection(e){let{children:n}=e,r=_objectWithoutProperties(e,t);return _objectSpread2({key:r.key,title:r.title,description:r.description||``,useParentDefault:r.useParentDefault!==!1,getInitialState:r.getInitialState||null,component:r.component||null,order:r.order||10,isAvailable:r.isAvailable||(()=>!0)},r)}getAll(){return Array.from(this.sections.values()).filter(e=>e.isAvailable()).map(e=>e.children?_objectSpread2(_objectSpread2({},e),{},{children:[...e.children].sort((e,t)=>e.order-t.order)}):e).sort((e,t)=>e.order-t.order)}get(e){return this.sections.get(e)}};e.BaseRegistry=BaseRegistry})),xt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.customizationDialogsRegistry=void 0,e.customizationDialogsRegistry=new(bt()).BaseRegistry})),St=__commonJSMin((t=>{var n=e();Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(et()),i=n(tt()),a=n(it()),o=n(at()),s=n(ot()),c=n(lt()),l=ht(),u=xt(),d={Module:r.default,ViewModule:i.default,ArgsObject:a.default,ForceMethodImplementation:c.default,utils:{Masonry:o.default,Scroll:s.default},importExport:{createGetInitialState:l.createGetInitialState,customizationDialogsRegistry:u.customizationDialogsRegistry}};window.elementorModules?Object.assign(window.elementorModules,d):window.elementorModules=d,t.default=window.elementorModules})),Ct=__commonJSMin((()=>{var e=H(),t=a(),n=Qe(),r=w(),i=N(),o=K(),s=q(),c=J()(`find`,TypeError);e({target:`Iterator`,proto:!0,real:!0,forced:c},{find:function find(e){i(this);try{r(e)}catch(e){s(this,`throw`,e)}if(c)return t(c,this,e);var a=o(this),l=0;return n(a,function(t,n){if(e(t,l++))return n(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})})),Z=__commonJSMin((()=>{Ct()})),wt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,G(),Z();var _default=class extends elementorModules.ViewModule{getDefaultSettings(){return{selectors:{elements:`.elementor-element`,nestedDocumentElements:`.elementor .elementor-element`},classes:{editMode:`elementor-edit-mode`}}}getDefaultElements(){let e=this.getSettings(`selectors`);return{$elements:this.$element.find(e.elements).not(this.$element.find(e.nestedDocumentElements))}}getDocumentSettings(e){let t;if(this.isEdit){t={};let e=elementor.settings.page.model;jQuery.each(e.getActiveControls(),n=>{t[n]=e.attributes[n]})}else t=this.$element.data(`elementor-settings`)||{};return this.getItems(t,e)}runElementsHandlers(){this.elements.$elements.each((e,t)=>setTimeout(()=>elementorFrontend.elementsHandler.runReadyTrigger(t)))}onInit(){this.$element=this.getSettings(`$element`),super.onInit(),this.isEdit=this.$element.hasClass(this.getSettings(`classes.editMode`)),this.isEdit?elementor.on(`document:loaded`,()=>{elementor.settings.page.model.on(`change`,this.onSettingsChange.bind(this))}):this.runElementsHandlers()}onSettingsChange(){}};e.default=_default})),Tt=__commonJSMin(((e,t)=>{t.exports=elementorModules.ViewModule.extend({getDefaultSettings(){return{element:null,direction:elementorFrontend.config.is_rtl?`right`:`left`,selectors:{container:window},considerScrollbar:!1,cssOutput:`inline`}},getDefaultElements(){return{$element:jQuery(this.getSettings(`element`))}},stretch(){let e=this.getSettings(),t;try{t=jQuery(e.selectors.container)}catch(e){}(!t||!t.length)&&(t=jQuery(this.getDefaultSettings().selectors.container)),this.reset();var n=this.elements.$element,r=t.innerWidth(),i=n.offset().left,a=n.css(`position`)===`fixed`,o=a?0:i,s=window===t[0];if(!s){var c=t.offset().left;a&&(o=c),i>c&&(o=i-c)}if(e.considerScrollbar&&s){let e=window.innerWidth-r;o-=e}a||(elementorFrontend.config.is_rtl&&(o=r-(n.outerWidth()+o)),o=-o),e.margin&&(o+=e.margin);var l={};let u=r;if(e.margin&&(u-=e.margin*2),l.width=u+`px`,l[e.direction]=o+`px`,e.cssOutput===`variables`){this.applyCssVariables(n,l);return}n.css(l)},reset(){let e={},t=this.getSettings(),n=this.elements.$element;if(t.cssOutput===`variables`){this.resetCssVariables(n);return}e.width=``,e[t.direction]=``,n.css(e)},applyCssVariables(e,t){e.css(`--stretch-width`,t.width),t.left?e.css(`--stretch-left`,t.left):e.css(`--stretch-right`,t.right)},resetCssVariables(e){e.css({"--stretch-width":``,"--stretch-left":``,"--stretch-right":``})}})})),Q=__commonJSMin(((e,t)=>{U(),G(),Y(),Z(),X(),t.exports=elementorModules.ViewModule.extend({$element:null,editorListeners:null,onElementChange:null,onEditSettingsChange:null,onPageSettingsChange:null,isEdit:null,__c
57onstruct(e){this.isActive(e)&&(this.$element=e.$element,this.isEdit=this.$element.hasClass(`elementor-element-edit-mode`),this.isEdit&&this.addEditorListeners())},isActive(){return!0},isElementInTheCurrentDocument(){return elementorFrontend.isEditMode()?elementor.documents.currentDocument.id.toString()===this.$element[0].closest(`.elementor`).dataset.elementorId:!1},findElement(e){var t=this.$element;return t.find(e).filter(function(){return jQuery(this).parent().closest(`.elementor-element`).is(t)})},getUniqueHandlerID(e,t){return e||(e=this.getModelCID()),t||(t=this.$element),e+t.attr(`data-element_type`)+this.getConstructorID()},initEditorListeners(){var e=this;if(e.editorListeners=[{event:`element:destroy`,to:elementor.channels.data,callback(t){t.cid===e.getModelCID()&&e.onDestroy()}}],e.onElementChange){let t=e.getWidgetType()||e.getElementType(),n=`change`;t!==`global`&&(n+=`:`+t),e.editorListeners.push({event:n,to:elementor.channels.editor,callback(t,n){e.getUniqueHandlerID(n.model.cid,n.$el)===e.getUniqueHandlerID()&&e.onElementChange(t.model.get(`name`),t,n)}})}e.onEditSettingsChange&&e.editorListeners.push({event:`change:editSettings`,to:elementor.channels.editor,callback(t,n){if(n.model.cid!==e.getModelCID())return;let r=Object.keys(t.changed)[0];e.onEditSettingsChange(r,t.changed[r])}}),[`page`].forEach(function(t){var n=`on`+t[0].toUpperCase()+t.slice(1)+`SettingsChange`;e[n]&&e.editorListeners.push({event:`change`,to:elementor.settings[t].model,callback(t){e[n](t.changed)}})})},getEditorListeners(){return this.editorListeners||this.initEditorListeners(),this.editorListeners},addEditorListeners(){var e=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(t){elementorFrontend.addListenerOnce(e,t.event,t.callback,t.to)})},removeEditorListeners(){var e=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(t){elementorFrontend.removeListeners(e,t.event,null,t.to)})},getElementType(){return this.$element.data(`element_type`)},getWidgetType(){let e=this.$element.data(`widget_type`);if(e)return e.split(`.`)[0]},getID(){return this.$element.data(`id`)},getModelCID(){return this.$element.data(`model-cid`)},getElementSettings(e){let t={},n=this.getModelCID();if(this.isEdit&&n){let e=elementorFrontend.config.elements.data[n],r=e.attributes,i=r.widgetType||r.elType;r.isInner&&(i=`inner-`+i);let a=elementorFrontend.config.elements.keys[i];a||(a=elementorFrontend.config.elements.keys[i]=[],jQuery.each(e.controls,(e,t)=>{(t.frontend_available||t.editor_available)&&a.push(e)})),jQuery.each(e.getActiveControls(),function(e){if(a.indexOf(e)!==-1){let n=r[e];n.toJSON&&(n=n.toJSON()),t[e]=n}})}else t=this.$element.data(`settings`)||{};return this.getItems(t,e)},getEditSettings(e){var t={};return this.isEdit&&(t=elementorFrontend.config.elements.editSettings[this.getModelCID()].attributes),this.getItems(t,e)},getCurrentDeviceSetting(e){return elementorFrontend.getCurrentDeviceSetting(this.getElementSettings(),e)},onInit(){this.isActive(this.getSettings())&&elementorModules.ViewModule.prototype.onInit.apply(this,arguments)},onDestroy(){this.isEdit&&this.removeEditorListeners(),this.unbindEvents&&this.unbindEvents()}})})),Et=__commonJSMin((t=>{var n=e();Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,G(),Z();var r=n(Q()),StretchedElement=class extends r.default{getStretchedClass(){return`e-stretched`}getStretchSettingName(){return`stretch_element`}getStretchActiveValue(){return`yes`}bindEvents(){let e=this.getUniqueHandlerID();elementorFrontend.addListenerOnce(e,`resize`,this.stretch),elementorFrontend.addListenerOnce(e,`sticky:stick`,this.stretch,this.$element),elementorFrontend.addListenerOnce(e,`sticky:unstick`,this.stretch,this.$element),elementorFrontend.isEditMode()&&(this.onKitChangeStretchContainerChange=this.onKitChangeStretchContainerChange.bind(this),elementor.channels.editor.on(`kit:change:stretchContainer`,this.onKitChangeStretchContainerChange))}unbindEvents(){elementorFrontend.removeListeners(this.getUniqueHandlerID(),`resize`,this.stretch),elementorFrontend.isEditMode()&&elementor.channels.editor.off(`kit:change:stretchContainer`,this.onKitChangeStretchContainerChange)}isActive(e){return elementorFrontend.isEditMode()||e.$element.hasClass(this.getStretchedClass())}getStretchElementForConfig(e=null){return e?this.$element.find(e):this.$element}getStretchElementConfig(){return{element:this.getStretchElementForConfig(),selectors:{container:this.getStretchContainer()},considerScrollbar:elementorFrontend.isEditMode()&&elementorFrontend.config.is_rtl}}initStretch(){this.stretch=this.stretch.bind(this),this.stretchElement=new elementorModules.frontend.tools.StretchElement(this.getStretchElementConfig())}getStretchContainer(){return elementorFrontend.getKitSettings(`stretched_section_container`)||window}isStretchSettingEnabled(){return this.getElementSettings(this.getStretchSettingName())===this.getStretchActiveValue()}stretch(){this.isStretchSettingEnabled()&&this.stretchElement.stretch()}onInit(...e){this.isActive(this.getSettings())&&(this.initStretch(),super.onInit(...e),this.stretch())}
57onElementChange(e){this.getStretchSettingName()===e&&(this.isStretchSettingEnabled()?this.stretch():this.stretchElement.reset())}onKitChangeStretchContainerChange(){this.stretchElement.setSettings(`selectors.container`,this.getStretchContainer()),this.stretch()}};t.default=StretchedElement})),Dt=__commonJSMin((t=>{var n=e();Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(Q()),SwiperHandlerBase=class extends r.default{getInitialSlide(){let e=this.getEditSettings();return e.activeItemIndex?e.activeItemIndex-1:0}getSlidesCount(){return this.elements.$slides.length}togglePauseOnHover(e){e?this.elements.$swiperContainer.on({mouseenter:()=>{this.swiper.autoplay.stop()},mouseleave:()=>{this.swiper.autoplay.start()}}):this.elements.$swiperContainer.off(`mouseenter mouseleave`)}handleKenBurns(){let e=this.getSettings();this.$activeImageBg&&this.$activeImageBg.removeClass(e.classes.kenBurnsActive),this.activeItemIndex=this.swiper?this.swiper.activeIndex:this.getInitialSlide(),this.swiper?this.$activeImageBg=jQuery(this.swiper.slides[this.activeItemIndex]).children(`.`+e.classes.slideBackground):this.$activeImageBg=jQuery(this.elements.$slides[0]).children(`.`+e.classes.slideBackground),this.$activeImageBg.addClass(e.classes.kenBurnsActive)}};t.default=SwiperHandlerBase}));function asyncGeneratorStep(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function _next(e){asyncGeneratorStep(a,r,i,_next,_throw,`next`,e)}function _throw(e){asyncGeneratorStep(a,r,i,_next,_throw,`throw`,e)}_next(void 0)})}}var Ot=__esmMin((()=>{})),kt=__commonJSMin((t=>{Ot();var n=e();Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,G(),Z(),X();var r=n(Dt()),CarouselHandlerBase=class extends r.default{getDefaultSettings(){return{selectors:{carousel:`.swiper`,swiperWrapper:`.swiper-wrapper`,slideContent:`.swiper-slide`,swiperArrow:`.elementor-swiper-button`,paginationWrapper:`.swiper-pagination`,paginationBullet:`.swiper-pagination-bullet`,paginationBulletWrapper:`.swiper-pagination-bullets`}}}getDefaultElements(){let e=this.getSettings(`selectors`),t={$swiperContainer:this.$element.find(e.carousel),$swiperWrapper:this.$element.find(e.swiperWrapper),$swiperArrows:this.$element.find(e.swiperArrow),$paginationWrapper:this.$element.find(e.paginationWrapper),$paginationBullets:this.$element.find(e.paginationBullet),$paginationBulletWrapper:this.$element.find(e.paginationBulletWrapper)};return t.$slides=t.$swiperContainer.find(e.slideContent),t}getSwiperSettings(){let e=this.getElementSettings(),t=+e.slides_to_show||3,n=t===1,r=elementorFrontend.config.responsive.activeBreakpoints,i={mobile:1,tablet:n?1:2},a={slidesPerView:t,loop:e.infinite===`yes`,speed:e.speed,handleElementorBreakpoints:!0};a.breakpoints={};let o=t;Object.keys(r).reverse().forEach(t=>
57{let n=i[t]?i[t]:o;a.breakpoints[r[t].value]={slidesPerView:+e[`slides_to_show_`+t]||n,slidesPerGroup:+e[`slides_to_scroll_`+t]||1},e.image_spacing_custom&&(a.breakpoints[r[t].value].spaceBetween=this.getSpaceBetween(t)),o=+e[`slides_to_show_`+t]||n}),e.autoplay===`yes`&&(a.autoplay={delay:e.autoplay_speed,disableOnInteraction:e.pause_on_interaction===`yes`}),n?(a.effect=e.effect,e.effect===`fade`&&(a.fadeEffect={crossFade:!0})):a.slidesPerGroup=+e.slides_to_scroll||1,e.image_spacing_custom&&(a.spaceBetween=this.getSpaceBetween());let s=e.navigation===`arrows`||e.navigation===`both`,c=e.navigation===`dots`||e.navigation===`both`||e.pagination;return s&&(a.navigation={prevEl:`.elementor-swiper-button-prev`,nextEl:`.elementor-swiper-button-next`}),c&&(a.pagination={el:`.elementor-element-${this.getID()} .swiper-pagination`,type:e.pagination?e.pagination:`bullets`,clickable:!0,renderBullet:(e,t)=>`<span class="${t}" role="button" tabindex="0" data-bullet-index="${e}" aria-label="${elementorFrontend.config.i18n.a11yCarouselPaginationBulletMessage} ${e+1}"></span>`}),e.lazyload===`yes`&&(a.lazy={loadPrevNext:!0,loadPrevNextAmount:1}),a.a11y={enabled:!0,prevSlideMessage:elementorFrontend.config.i18n.a11yCarouselPrevSlideMessage,nextSlideMessage:elementorFrontend.config.i18n.a11yCarouselNextSlideMessage,firstSlideMessage:elementorFrontend.config.i18n.a11yCarouselFirstSlideMessage,lastSlideMessage:elementorFrontend.config.i18n.a11yCarouselLastSlideMessage},a.on={slideChange:()=>{this.a11ySetPaginationTabindex(),this.handleElementHandlers(),this.a11ySetSlideAriaHidden()},init:()=>{this.a11ySetPaginationTabindex(),this.a11ySetSlideAriaHidden(`initialisation`)}},this.applyOffsetSettings(e,a,t),a}getOffsetWidth(){let e=elementorFrontend.getCurrentDeviceMode();return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),`offset_width`,`size`,e)||0}applyOffsetSettings(e,t,n){let r=e.offset_sides;if(!(elementorFrontend.isEditMode()&&this.constructor.name===`NestedCarousel`||!r||r===`none`))switch(r){case`right`:this.forceSliderToShowNextSlideWhenOnLast(t,n),this.addClassToSwiperContainer(`offset-right`);break;case`left`:this.addClassToSwiperContainer(`offset-left`);break;case`both`:this.forceSliderToShowNextSlideWhenOnLast(t,n),this.addClassToSwiperContainer(`offset-both`);break}}forceSliderToShowNextSlideWhenOnLast(e,t){e.slidesPerView=t+.001}addClassToSwiperContainer(e){this.getDefaultElements().$swiperContainer[0].classList.add(e)}onInit(...e){var _superprop_getOnInit=()=>super.onInit,t=this;return _asyncToGenerator(function*(){_superprop_getOnInit().call(t,...e),!(!t.elements.$swiperContainer.length||2>t.elements.$slides.length)&&(yield t.initSwiper(),t.getElementSettings().pause_on_hover===`yes`&&t.togglePauseOnHover(!0))})()}initSwiper(){var e=this;return _asyncToGenerator(function*(){let t=elementorFrontend.utils.swiper;e.swiper=yield new t(e.elements.$swiperContainer,e.getSwiperSettings()),e.elements.$swiperContainer.data(`swiper`,e.swiper)})()}bindEvents(){this.elements.$swiperArrows.on(`keydown`,this.onDirectionArrowKeydown.bind(this)),this.elements.$paginationWrapper.on(`keydown`,`.swiper-pagination-bullet`,this.onDirectionArrowKeydown.bind(this)),this.elements.$swiperContainer.on(`keydown`,`.swiper-slide`,this.onDirectionArrowKeydown.bind(this)),this.$element.find(`:focusable`).on(`focus`,this.onFocusDisableAutoplay.bind(this)),elementorFrontend.elements.$window.on(`resize`,this.getSwiperSettings.bind(this))}unbindEvents(){this.elements.$swiperArrows.off(),this.elements.$paginationWrapper.off(),this.elements.$swiperContainer.off(),this.$element.find(`:focusable`).off(),elementorFrontend.elements.$window.off(`resize`)}onDirectionArrowKeydown(e){let t=elementorFrontend.config.is_rtl,n=[`ArrowLeft`,`ArrowRight`],r=e.originalEvent.code,i=n.indexOf(r)!==-1,a=t?`ArrowRight`:`ArrowLeft`,o=t?`ArrowLeft`:`ArrowRight`;if(i)a===r?this.swiper.slidePrev():o===r&&this.swiper.slideNext();else return!0}onFocusDisableAutoplay(){this.swiper.autoplay.stop()}updateSwiperOption(e){let t=this.getElementSettings()[e],n=this.swiper.params;switch(e){case`autoplay_speed`:n.autoplay.delay=t;break;case`speed`:n.speed=t;break}
57this.swiper.update()}getChangeableProperties(){return{pause_on_hover:`pauseOnHover`,autoplay_speed:`delay`,speed:`speed`,arrows_position:`arrows_position`}}onElementChange(e){if(e.indexOf(`image_spacing_custom`)===0){this.updateSpaceBetween(e);return}if(this.getChangeableProperties()[e])if(e===`pause_on_hover`){let e=this.getElementSettings(`pause_on_hover`);this.togglePauseOnHover(e===`yes`)}else this.updateSwiperOption(e)}onEditSettingsChange(e){e===`activeItemIndex`&&this.swiper.slideToLoop(this.getEditSettings(`activeItemIndex`)-1)}getSpaceBetween(e=null){let t=elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),`image_spacing_custom`,`size`,e);return Number(t)||0}updateSpaceBetween(e){let t=e.match(`image_spacing_custom_(.*)`),n=t?t[1]:`desktop`,r=this.getSpaceBetween(n);n!==`desktop`&&(this.swiper.params.breakpoints[elementorFrontend.config.responsive.activeBreakpoints[n].value].spaceBetween=r),this.swiper.params.spaceBetween=r,this.swiper.update()}getPaginationBullets(e=`array`){let t=this.$element.find(this.getSettings(`selectors`).paginationBullet);return e===`array`?Array.from(t):t}a11ySetPaginationTabindex(){var e,t,n,r,i;let a=(e=this.swiper)==null||(e=e.params)==null?void 0:e.pagination.bulletClass,o=(t=this.swiper)==null||(t=t.params)==null?void 0:t.pagination.bulletActiveClass;this.getPaginationBullets().forEach(e=>{var t;(t=e.classList)!=null&&t.contains(o)||e.removeAttribute(`tabindex`)});let s=((n=event)==null?void 0:n.code)===`ArrowLeft`||((r=event)==null?void 0:r.code)===`ArrowRight`;(i=event)!=null&&(i=i.target)!=null&&(i=i.classList)!=null&&i.contains(a)&&s&&this.$element.find(`.${o}`).trigger(`focus`)}getSwiperWrapperTranformXValue(){var e;let t=(e=this.elements.$swiperWrapper[0])==null?void 0:e.style.transform;return t=t.replace(`translate3d(`,``),t=t.split(`,`),t=parseInt(t[0].replace(`px`,``)),t||0}a11ySetSlideAriaHidden(e=``){var t;if(typeof(e===`initialisation`?0:(t=this.swiper)==null?void 0:t.activeIndex)!=`number`)return;let n=this.getSwiperWrapperTranformXValue(),r=this.elements.$swiperWrapper[0].clientWidth;this.elements.$swiperContainer.find(this.getSettings(`selectors`).slideContent).each((e,t)=>{0<=t.offsetLeft+n&&r>t.offsetLeft+n?(t.removeAttribute(`aria-hidden`),t.removeAttribute(`inert`)):(t.setAttribute(`aria-hidden`,!0),t.setAttribute(`inert`,``))})}handleElementHandlers(){}};
vendor: 6,837 bytes, lines 57-72
57t.default=CarouselHandlerBase})),$=e(),At=$(St()),jt=$(wt()),Mt=$(Tt()),Nt=$(Et()),Pt=$(Q()),Ft=$(Dt()),It=$(kt());At.default.frontend={Document:jt.default,tools:{StretchElement:Mt.default},handlers:{Base:Pt.default,StretchedElement:Nt.default,SwiperBase:Ft.default,CarouselBase:It.default}}})();;
58jQuery.uiBackCompat = true;
59;
60/*! jQuery UI - v1.14.2 - 2026-07-15
61* https://jqueryui.com
62* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js
63* Copyright OpenJS Foundation and other contributors; Licensed MIT */
64!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";x.ui=x.ui||{};x.ui.version="1.14.2";
65/*!
66 * jQuery UI Widget 1.14.2
67 * https://jqueryui.com
68 *
69 * Copyright OpenJS Foundation and other contributors
70 * Released under the MIT license.
71 * https://jquery.org/license
72 */var o,n,W,C,s,r,l,a,h,i,f=0,c=Array.prototype.hasOwnProperty,u=Array.prototype.slice;x.cleanData=(o=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");o(t)}),x.widget=function(t,i,e){var n,o,s,r,l={},a=t.split(".")[0];return"__proto__"===(t=t.split(".")[1])||"constructor"===t?x.error("Invalid widget name: "+t):(r=a+"-"+t,e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[r.toLowerCase()]=function(t){return!!x.data(t,r)},x[a]=x[a]||{},n=x[a][t],o=x[a][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}l[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},l,{constructor:o,namespace:a,widgetName:t,widgetFullName:r}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o)},x.widget.extend=function(t){for(var e,i,n=u.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],c.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=u.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=f++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))}
vendor: 11,811 bytes, lines 72-110
72,_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}}),x.widget;function E(t,e,i){return[parseFloat(t[0])*(h.test(t[0])?e/100:1),parseFloat(t[1])*(h.test(t[1])?i/100:1)]}function P(t,e){return parseInt(x.css(t,e),10)||0}function H(t){return null!=t&&t===t.window}
73/*!
74 * jQuery UI Position 1.14.2
75 * https://jqueryui.com
76 *
77 * Copyright OpenJS Foundation and other contributors
78 * Released under the MIT license.
79 * https://jquery.org/license
80 *
81 * https://api.jqueryui.com/position/
82 */
83W=Math.max,C=Math.abs,s=/left|center|right/,r=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,a=/^\w+/,h=/%$/,i=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=H(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(c){var u,d,p,g,m,v,w,y,b,_,t,e;return c&&c.of?(v="string"==typeof(c=x.extend({},c)).of?x(document).find(c.of):x(c.of),w=x.position.getWithinInfo(c.within),y=x.position.getScrollInfo(w),b=(c.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:H(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(c.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(c[this]||"").split(" ");(i=1===i.length?s.test(i[0])?i.concat(["center"]):r.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=s.test(i[0])?i[0]:"center",i[1]=r.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],c[this]=[a.exec(i[0])[0],a.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===c.at[0]?m.left+=d:"center"===c.at[0]&&(m.left+=d/2),"bottom"===c.at[1]?m.top+=p:"center"===c.at[1]&&(m.top+=p/2),u=E(_.at,d,p),m.left+=u[0],m.top+=u[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=P(this,"marginLeft"),n=P(this,"marginTop"),o=l+e+P(this,"marginRight")+y.width,s=a+n+P(this,"marginBottom")+y.height,h=x.extend({},m),f=E(_.my,r.outerWidth(),r.outerHeight());"right"===c.my[0]?h.left-=l:"center"===c.my[0]&&(h.left-=l/2),"bottom"===c.my[1]?h.top-=a:"center"===c.my[1]&&(h.top-=a/2),h.left+=f[0],h.top+=f[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[u[0]+f[0],u[1]+f[1]],my:c.my,at:c.at,within:w,elem:r})}),c.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",c.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):i.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}};var t,e;
84/*!
85 * jQuery UI :data 1.14.2
86 * https://jqueryui.com
87 *
88 * Copyright OpenJS Foundation and other contributors
89 * Released under the MIT license.
90 * https://jquery.org/license
91 */x.ui.position,x.extend(x.expr.pseudos,{data:x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}})}),x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
92/*!
93 * jQuery UI Focusable 1.14.2
94 * https://jqueryui.com
95 *
96 * Copyright OpenJS Foundation and other contributors
97 * Released under the MIT license.
98 * https://jquery.org/license
99 */
100x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&"visible"===x(t).css("visibility"))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.ui.focusable,x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=x(this.element.prop("form")),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},
101/*!
102 * jQuery UI Legacy jQuery Core patches 1.14.2
103 * https://jqueryui.com
104 *
105 * Copyright OpenJS Foundation and other contributors
106 * Released under the MIT license.
107 * https://jquery.org/license
108 *
109 */
110x.escapeSelector||(x.escapeSelector=function(t){return CSS.escape(t+"")}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),x.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},x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+CSS.escape(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),x.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
110)&&x(this).removeAttr("id")})}});x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}}});;
111"use strict";(function(){var __esmMin=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},__commonJSMin=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),e=__commonJSMin(((e,t)=>{function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t.exports=_interopRequireDefault,t.exports.__esModule=!0,t.exports.default=t.exports})),t=__commonJSMin(((e,t)=>{var check=function(e){return e&&e.Math===Math&&e};t.exports=check(typeof globalThis==`object`&&globalThis)||check(typeof window==`object`&&window)||check(typeof self==`object`&&self)||check(typeof global==`object`&&global)||check(typeof e==`object`&&e)||(function(){return this})()||Function(`return this`)()})),n=__commonJSMin(((e,t)=>{t.exports=function(e){try{return!!e()}catch(e){return!0}}})),r=__commonJSMin(((e,t)=>{t.exports=!n()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})})),i=__commonJSMin(((e,t)=>{t.exports=!n()(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})})),a=__commonJSMin(((e,t)=>{var n=i(),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}})),o=__commonJSMin((e=>{var t={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor;e.f=n&&!t.call({1:2},1)?function propertyIsEnumerable(e){var t=n(this,e);return!!t&&t.enumerable}:t})),s=__commonJSMin(((e,t)=>{t.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}})),c=__commonJSMin(((e,t)=>{var n=i(),r=Function.prototype,a=r.call,o=n&&r.bind.bind(a,a);t.exports=n?o:function(e){return function(){return a.apply(e,arguments)}}})),l=__commonJSMin(((e,t)=>{var n=c(),r=n({}.toString),i=n(``.slice);t.exports=function(e){return i(r(e),8,-1)}})),u=__commonJSMin(((e,t)=>{var r=c(),i=n(),a=l(),o=Object,s=r(``.split);t.exports=i(function(){return!o(`z`).propertyIsEnumerable(0)})?function(e){return a(e)===`String`?s(e,``):o(e)}:o})),d=__commonJSMin(((e,t)=>{t.exports=function(e){return e==null}})),f=__commonJSMin(((e,t)=>{var n=d(),r=TypeError;t.exports=function(e){if(n(e))throw new r(`Can't call method on `+e);return e}})),p=__commonJSMin(((e,t)=>{var n=u(),r=f();t.exports=function(e){return n(r(e))}})),m=__commonJSMin(((e,t)=>{var n=typeof document==`object`&&document.all;t.exports=n===void 0&&n!==void 0?function(e){return typeof e==`function`||e===n}:function(e){return typeof e==`function`}})),h=__commonJSMin(((e,t)=>{var n=m();t.exports=function(e){return typeof e==`object`?e!==null:n(e)}})),g=__commonJSMin(((e,n)=>{var r=t(),i=m(),aFunction=function(e){return i(e)?e:void 0};n.exports=function(e,t){return arguments.length<2?aFunction(r[e]):r[e]&&r[e][t]}})),_=__commonJSMin(((e,t)=>{t.exports=c()({}.isPrototypeOf)})),v=__commonJSMin(((e,n)=>{var r=t().navigator,i=r&&r.userAgent;n.exports=i?String(i):``})),y=__commonJSMin(((e,n)=>{var r=t(),i=v(),a=r.process,o=r.Deno,s=a&&a.versions||o&&o.version,c=s&&s.v8,l,u;c&&(l=c.split(`.`),u=l[0]>0&&l[0]<4?1:+(l[0]+l[1])),!u&&i&&(l=i.match(/Edge\/(\d+)/),(!l||l[1]>=74)&&(l=i.match(/Chrome\/(\d+)/),l&&(u=+l[1]))),n.exports=u})),b=__commonJSMin(((e,r)=>{var i=y(),a=n(),o=t().String;r.exports=!!Object.getOwnPropertySymbols&&!a(function(){var e=Symbol(`symbol detection`);return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41})})),x=__commonJSMin(((e,t)=>{t.exports=b()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`})),S=__commonJSMin(((e,t)=>{var n=g(),r=m(),i=_(),a=x(),o=Object;t.exports=a?function(e){return typeof e==`symbol`}:function(e){var t=n(`Symbol`);return r(t)&&i(t.prototype,o(e))}})),C=__commonJSMin(((e,t)=>{var n=String;t.exports=function(e){try{return n(e)}catch(e){return`Object`}}})),w=__commonJSMin(((e,t)=>{var n=m(),r=C(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a function`)}})),T=__commonJSMin(((e,t)=>{var n=w(),r=d();t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}})),E=__commonJSMin(((e,t)=>{var n=a(),r=m(),i=h(),o=TypeError;t.exports=function(e,t){var a,s;if(t===`string`&&r(a=e.toString)&&!i(s=n(a,e))||r(a=e.valueOf)&&!i(s=n(a,e))||t!==`string`&&r(a=e.toString)&&!i(s=n(a,e)))return s;throw new o(`Can't convert object to primitive value`)}}
vendor: 15,227 bytes, line 111
111)),D=__commonJSMin(((e,t)=>{t.exports=!1})),O=__commonJSMin(((e,n)=>{var r=t(),i=Object.defineProperty;n.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}})),k=__commonJSMin(((e,n)=>{var r=D(),i=t(),a=O(),o=`__core-js_shared__`,s=n.exports=i[o]||a(o,{});(s.versions||(s.versions=[])).push({version:`3.46.0`,mode:r?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)`,license:`https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE`,source:`https://github.com/zloirock/core-js`})})),A=__commonJSMin(((e,t)=>{var n=k();t.exports=function(e,t){return n[e]||(n[e]=t||{})}})),j=__commonJSMin(((e,t)=>{var n=f(),r=Object;t.exports=function(e){return r(n(e))}})),M=__commonJSMin(((e,t)=>{var n=c(),r=j(),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(e,t){return i(r(e),t)}})),N=__commonJSMin(((e,t)=>{var n=c(),r=0,i=Math.random(),a=n(1.1.toString);t.exports=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+a(++r+i,36)}})),P=__commonJSMin(((e,n)=>{var r=t(),i=A(),a=M(),o=N(),s=b(),c=x(),l=r.Symbol,u=i(`wks`),d=c?l.for||l:l&&l.withoutSetter||o;n.exports=function(e){return a(u,e)||(u[e]=s&&a(l,e)?l[e]:d(`Symbol.`+e)),u[e]}})),ee=__commonJSMin(((e,t)=>{var n=a(),r=h(),i=S(),o=T(),s=E(),c=P(),l=TypeError,u=c(`toPrimitive`);t.exports=function(e,t){if(!r(e)||i(e))return e;var a=o(e,u),c;if(a){if(t===void 0&&(t=`default`),c=n(a,e,t),!r(c)||i(c))return c;throw new l(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),s(e,t)}})),te=__commonJSMin(((e,t)=>{var n=ee(),r=S();t.exports=function(e){var t=n(e,`string`);return r(t)?t:t+``}})),ne=__commonJSMin(((e,n)=>{var r=t(),i=h(),a=r.document,o=i(a)&&i(a.createElement);n.exports=function(e){return o?a.createElement(e):{}}})),re=__commonJSMin(((e,t)=>{var i=r(),a=n(),o=ne();t.exports=!i&&!a(function(){return Object.defineProperty(o(`div`),"a",{get:function(){return 7}}).a!==7})})),ie=__commonJSMin((e=>{var t=r(),n=a(),i=o(),c=s(),l=p(),u=te(),d=M(),f=re(),m=Object.getOwnPropertyDescriptor;e.f=t?m:function getOwnPropertyDescriptor(e,t){if(e=l(e),t=u(t),f)try{return m(e,t)}catch(e){}if(d(e,t))return c(!n(i.f,e,t),e[t])}})),ae=__commonJSMin(((e,t)=>{var i=r(),a=n();t.exports=i&&a(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})})),I=__commonJSMin(((e,t)=>{var n=h(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not an object`)}})),L=__commonJSMin((e=>{var t=r(),n=re(),i=ae(),a=I(),o=te(),s=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=`enumerable`,d=`configurable`,f=`writable`;e.f=t?i?function defineProperty(e,t,n){if(a(e),t=o(t),a(n),typeof e==`function`&&t===`prototype`&&`value`in n&&f in n&&!n[f]){var r=l(e,t);r&&r[f]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:u in n?n[u]:r[u],writable:!1})}return c(e,t,n)}:c:function defineProperty(e,t,r){if(a(e),t=o(t),a(r),n)try{return c(e,t,r)}catch(e){}if(`get`in r||`set`in r)throw new s(`Accessors not supported`);return`value`in r&&(e[t]=r.value),e}})),R=__commonJSMin(((e,t)=>{var n=r(),i=L(),a=s();t.exports=n?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}})),oe=__commonJSMin(((e,t)=>{var n=r(),i=M(),a=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,s=i(a,`name`);t.exports={EXISTS:s,PROPER:s&&(function something(){}).name===`something`,CONFIGURABLE:s&&(!n||n&&o(a,`name`).configurable)}})),se=__commonJSMin(((e,t)=>{var n=c(),r=m(),i=k(),a=n(Function.toString);r(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),t.exports=i.inspectSource})),ce=__commonJSMin(((e,n)=>{var r=t(),i=m(),a=r.WeakMap;n.exports=i(a)&&/native code/.test(String(a))})),z=__commonJSMin(((e,t)=>{var n=A(),r=N(),i=n(`keys`);t.exports=function(e){return i[e]||(i[e]=r(e))}})),B=__commonJSMin(((e,t)=>{t.exports={}})),le=__commonJSMin(((e,n)=>{var r=ce(),i=t(),a=h(),o=R(),s=M(),c=k(),l=z(),u=B(),d=`Object already initialized`,f=i.TypeError,p=i.WeakMap,set,get,has,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(e){return function(t){var n;if(!a(t)||(n=get(t)).type!==e)throw new f(`Incompatible receiver, `+e+` required`);return n}};if(r||c.state){var m=c.state||(c.state=new p);m.get=m.get,m.has=m.has,m.set=m.set,set=function(e,t){if(m.has(e))throw new f(d);return t.facade=e,m.set(e,t),t},get=function(e){return m.get(e)||{}},has=function(e){return m.has(e)}}else{var g=l(`state`);u[g]=!0,set=function(e,t){if(s(e,g))throw new f(d);return t.facade=e,o(e,g,t),t},get=function(e){return s(e,g)?e[g]:{}},has=function(e){return s(e,g)}}n.exports={set,get,has,enforce,getterFor}})),ue=__commonJSMin(((e,t)=>{var i=c(),a=n(),o=m(),s=M(),l=r(),u=oe().CONFIGURABLE,d=se(),f=le(),p=f.enforce,h=f.get,g=String,_=Object.defineProperty,v=i(``.slice),y=i(``.replace),b=i([].join),x=l&&!a(function(){return _(function(){},`length`,{value:8}).length!==8}),S=String(String).split(`String`),C=t.exports=function(e,t,n){v(g(t),0,7)===`Symbol(`&&(t=`[`+y(g(t),/^Symbol\(([^)]*)\).*$/,`$1`)+`]`),n&&n.getter&&(t=`get `+t),n&&n.setter&&(t=`set `+t),(!s(e,`name`)||u&&e.name!==t)&&(l?_(e,`name`,{value:t,configurable:!0}):e.name=t),x&&n&&s(n,`arity`)&&e.length!==n.arity&&_(e,`length`,{value:n.arity});try{n&&s(n,`constructor`)&&n.constructor?l&&_(e,`prototype`,{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=p(e);return s(r,`source`)||(r.source=b(S,typeof t==`string`?t:``)),e};Function.prototype.toString=C(function toString(){return o(this)&&h(this).source||d(this)},`toString`)})),V=__commonJSMin(((e,t)=>{var n=m(),r=L(),i=ue(),a=O();t.exports=function(e,t,o,s){s||(s={});var c=s.enumerable,l=s.name===void 0?t:s.name;if(n(o)&&i(o,l,s),s.global)c?e[t]=o:a(t,o);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=o:r.f(e,t,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}})),de=__commonJSMin(((e,t)=>{var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function trunc(e){var t=+e;return(t>0?r:n)(t)}})),fe=__commonJSMin(((e,t)=>{var n=de();t.exports=function(e){var t=+e;return t!==t||t===0?0:n(t)}})),pe=__commonJSMin(((e,t)=>{var n=fe(),r=Math.max,i=Math.min;t.exports=function(e,t){var a=n(e);return a<0?r(a+t,0):i(a,t)}})),me=__commonJSMin(((e,t)=>{var n=fe(),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}})),H=__commonJSMin(((e,t)=>{var n=me();t.exports=function(e){return n(e.length)}})),he=__commonJSMin(((e,t)=>{var n=p(),r=pe(),i=H(),createMethod=function(e){return function(t,a,o){var s=n(t),c=i(s);if(c===0)return!e&&-1;var l=r(o,c),u;if(e&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===a)return e||l||0;return!e&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}})),ge=__commonJSMin(((e,t)=>{var n=c(),r=M(),i=p(),a=he().indexOf,o=B(),s=n([].push);t.exports=function(e,t){var n=i(e),c=0,l=[],u;for(u in n)!r(o,u)&&r(n,u)&&s(l,u);for(;t.length>c;)r(n,u=t[c++])&&(~a(l,u)||s(l,u));return l}})),U=__commonJSMin(((e,t)=>{t.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]})),_e=__commonJSMin((e=>{var t=ge(),n=U().concat(`length`,`prototype`);e.f=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return t(e,n)}})),ve=__commonJSMin((e=>{e.f=Object.getOwnPropertySymbols})),ye=__commonJSMin(((e,t)=>{var n=g(),r=c(),i=_e(),a=ve(),o=I(),s=r([].concat);t.exports=n(`Reflect`,`ownKeys`)||function ownKeys(e){var t=i.f(o(e)),n=a.f;return n?s(t,n(e)):t}})),be=__commonJSMin(((e,t)=>{var n=M(),r=ye(),i=ie(),a=L();t.exports=function(e,t,o){for(var s=r(t),c=a.f,l=i.f,u=0;u<s.length;u++){var d=s[u];!n(e,d)&&!(o&&n(o,d))&&c(e,d,l(t,d))}}})),xe=__commonJSMin(((e,t)=>{var r=n(),i=m(),a=/#|\.prototype\./,isForced=function(e,t){var n=s[o(e)];return n===l?!0:n===c?!1:i(t)?r(t):!!t},o=isForced.normalize=function(e){return String(e).replace(a,`.`).toLowerCase()},s=isForced.data={},c=isForced.NATIVE=`N`,l=isForced.POLYFILL=`P`;t.exports=isForced})),W=__commonJSMin(((e,n)=>{var r=t(),i=ie().f,a=R(),o=V(),s=O(),c=be(),l=xe();n.exports=function(e,t){var n=e.target,u=e.global,d=e.stat,f,p=u?r:d?r[n]||s(n,{}):r[n]&&r[n].prototype,m,h,g,_;if(p)for(m in t){if(g=t[m],e.dontCallGetSet?(_=i(p,m),h=_&&_.value):h=p[m],f=l(u?m:n+(d?`.`:`#`)+m,e.forced),!f&&h!==void 0){if(typeof g==typeof h)continue;c(g,h)}(e.sham||h&&h.sham)&&a(g,`sham`,!0),o(p,m,g,e)}}})),Se=__commonJSMin(((e,t)=>{var n=_(),r=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new r(`Incorrect invocation`)}})),Ce=__commonJSMin(((e,t)=>{t.exports=!n()(function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})})),we=__commonJSMin(((e,t)=>{var n=M(),r=m(),i=j(),a=z(),o=Ce(),s=a(`IE_PROTO`),c=Object,l=c.prototype;t.exports=o?c.getPrototypeOf:function(e){var t=i(e);if(n(t,s))return t[s];var a=t.constructor;return r(a)&&t instanceof a?a.prototype:t instanceof c?l:null}})),Te=__commonJSMin(((e,t)=>{var n=ue(),r=L();t.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),r.f(e,t,i)}})),Ee=__commonJSMin(((e,t)=>{var n=r(),i=L(),a=s();t.exports=function(e,t,r){n?i.f(e,t,a(0,r)):e[t]=r}})),De=__commonJSMin(((e,t)=>{var n=ge(),r=U();t.exports=Object.keys||function keys(e){return n(e,r)}})),Oe=__commonJSMin((e=>{var t=r(),n=ae(),i=L(),a=I(),o=p(),s=De();e.f=t&&!n?Object.defineProperties:function defineProperties(e,t){a(e);for(var n=o(t),r=s(t),c=r.length,l=0,u;c>l;)i.f(e,u=r[l++],n[u]);return e}})),ke=__commonJSMin(((e,t)=>{t.exports=g()(`document`,`documentElement`)})),Ae=__commonJSMin(((e,t)=>{var n=I(),r=Oe(),i=U(),a=B(),o=ke(),s=ne(),c=z(),l=`>`,u=`<`,d=`prototype`,f=`script`,p=c(`IE_PROTO`),EmptyConstructor=function(){},scriptTag=function(e){return u+f+l+e+u+`/`+f+l},NullProtoObjectViaActiveX=function(e){e.write(scriptTag(``)),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=s(`iframe`),t=`java`+f+`:`,n;return e.style.display=`none`,o.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(scriptTag(`document.F=Object`)),n.close(),n.F},m,NullProtoObject=function(){try{m=new ActiveXObject(`htmlfile`)}catch(e){}NullProtoObject=typeof document<`u`?document.domain&&m?NullProtoObjectViaActiveX(m):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(m);for(var e=i.length;e--;)delete NullProtoObject[d][i[e]];return NullProtoObject()};a[p]=!0,t.exports=Object.create||function create(e,t){var i;return e===null?i=NullProtoObject():(EmptyConstructor[d]=n(e),i=new EmptyConstructor,EmptyConstructor[d]=null,i[p]=e),t===void 0?i:r.f(i,t)}})),je=__commonJSMin(((e,t)=>{var r=n(),i=m(),a=h(),o=Ae(),s=we(),c=V(),l=P(),u=D(),d=l(`iterator`),f=!1,p,g,_;[].keys&&(_=[].keys(),`next`in _?(g=s(s(_)),g!==Object.prototype&&(p=g)):f=!0),!a(p)||r(function(){var e={};return p[d].call(e)!==e})?p={}:u&&(p=o(p)),i(p[d])||c(p,d,function(){return this}),t.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:f}})),Me=__commonJSMin((()=>{var e=W(),i=t(),a=Se(),o=I(),s=m(),c=we(),l=Te(),u=Ee(),d=n(),f=M(),p=P(),h=je().IteratorPrototype,g=r(),_=D(),v=`constructor`,y=`Iterator`,b=p(`toStringTag`),x=TypeError,S=i[y],C=_||!s(S)||S.prototype!==h||!d(function(){S({})}),w=function Iterator(){if(a(this,h),c(this)===h)throw new x(`Abstract class Iterator not directly constructable`)},defineIteratorPrototypeAccessor=function(e,t){g?l(h,e,{configurable:!0,get:function(){return t},set:function(t){if(o(this),this===h)throw new x(`You can't redefine this property`);f(this,e)?this[e]=t:u(this,e,t)}}):h[e]=t};f(h,b)||defineIteratorPrototypeAccessor(b,y),(C||!f(h,v)||h[v]===Object)&&defineIteratorPrototypeAccessor(v,w),w.prototype=h,e({global:!0,constructor:!0,forced:C},{Iterator:w})})),G=__commonJSMin((()=>{Me()})),Ne=__commonJSMin(((e,t)=>{var n=l(),r=c();t.exports=function(e){if(n(e)===`Function`)return r(e)}})),Pe=__commonJSMin(((e,t)=>{var n=Ne(),r=w(),a=i(),o=n(n.bind);t.exports=function(e,t){return r(e),t===void 0?e:a?o(e,t):function(){return e.apply(t,arguments)}}})),K=__commonJSMin(((e,t)=>{t.exports={}})),Fe=__commonJSMin(((e,t)=>{var n=P(),r=K(),i=n(`iterator`),a=Array.prototype;t.exports=function(e){return e!==void 0&&(r.Array===e||a[i]===e)}})),Ie=__commonJSMin(((e,t)=>{var n=P()(`toStringTag`),r={};r[n]=`z`,t.exports=String(r)===`[object z]`})),Le=__commonJSMin(((e,t)=>{var n=Ie(),r=m(),i=l(),a=P()(`toStringTag`),o=Object,s=i(function(){return arguments}())===`Arguments`,tryGet=function(e,t){try{return e[t]}catch(e){}};t.exports=n?i:function(e){var t,n,c;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=tryGet(t=o(e),a))==`string`?n:s?i(t):(c=i(t))===`Object`&&r(t.callee)?`Arguments`:c}})),Re=__commonJSMin(((e,t)=>{var n=Le(),r=T(),i=d(),a=K(),o=P()(`iterator`);t.exports=function(e){if(!i(e))return r(e,o)||r(e,`@@iterator`)||a[n(e)]}})),ze=__commonJSMin(((e,t)=>{var n=a(),r=w(),i=I(),o=C(),s=Re(),c=TypeError;t.exports=function(e,t){var a=arguments.length<2?s(e):t;if(r(a))return i(n(a,e));throw new c(o(e)+` is not iterable`)}})),q=__commonJSMin(((e,t)=>{var n=a(),r=I(),i=T();t.exports=function(e,t,a){var o,s;r(e);try{if(o=i(e,`return`),!o){if(t===`throw`)throw a;return a}o=n(o,e)}catch(e){s=!0,o=e}if(t===`throw`)throw a;if(s)throw o;return r(o),a}})),Be=__commonJSMin(((e,t)=>{var n=Pe(),r=a(),i=I(),o=C(),s=Fe(),c=H(),l=_(),u=ze(),d=Re(),f=q(),p=TypeError,Result=function(e,t){this.stopped=e,this.result=t},m=Result.prototype;t.exports=function(e,t,a){var h=a&&a.that,g=!!(a&&a.AS_ENTRIES),_=!!(a&&a.IS_RECORD),v=!!(a&&a.IS_ITERATOR),y=!!(a&&a.INTERRUPTED),b=n(t,h),x,S,C,w,T,E,D,stop=function(e){return x&&f(x,`normal`),new Result(!0,e)},callFn=function(e){return g?(i(e),y?b(e[0],e[1],stop):b(e[0],e[1])):y?b(e,stop):b(e)};if(_)x=e.iterator;else if(v)x=e;else{if(S=d(e),!S)throw new p(o(e)+` is not iterable`);if(s(S)){for(C=0,w=c(e);w>C;C++)if(T=callFn(e[C]),T&&l(m,T))return T;return new Result(!1)}x=u(e,S)}for(E=_?e.next:x.next;!(D=r(E,x)).done;){try{T=callFn(D.value)}catch(e){f(x,`throw`,e)}if(typeof T==`object`&&T&&l(m,T))return T}return new Result(!1)}})),J=__commonJSMin(((e,t)=>{t.exports=function(e){return{iterator:e,next:e.next,done:!1}}})),Y=__commonJSMin(((e,n)=>{var r=t();n.exports=function(e,t){var n=r.Iterator,i=n&&n.prototype,a=i&&i[e],o=!1;if(a)try{a.call({next:function(){return{done:!0}},return:function(){o=!0}},-1)}catch(e){e instanceof t||(o=!1)}if(!o)return a}})),Ve=__commonJSMin((()=>{var e=W(),t=a(),n=Be(),r=w(),i=I(),o=J(),s=q(),c=Y()(`find`,TypeError);e({target:`Iterator`,proto:!0,real:!0,forced:c},{find:function find(e){i(this);try{r(e)}catch(e){s(this,`throw`,e)}if(c)return t(c,this,e);var a=o(this),l=0;return n(a,function(t,n){if(e(t,l++))return n(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})})),X=__commonJSMin((()=>{Ve()})),He=__commonJSMin((()=>{var e=W(),t=a(),n=Be(),r=w(),i=I(),o=J(),s=q(),c=Y()(`forEach`,TypeError);e({target:`Iterator`,proto:!0,real:!0,forced:c},{forEach:function forEach(e){i(this);try{r(e)}catch(e){s(this,`throw`,e)}if(c)return t(c,this,e);var a=o(this),l=0;n(a,function(t){e(t,l++)},{IS_RECORD:!0})}})})),Z=__commonJSMin((()=>{He()}
111)),Ue=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),We=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.loadChunk=loadChunk;function chunkUrl(e){var t;let n=window.elementorFrontendConfig||{},r=((t=n.urls)==null?void 0:t.assets)||``,i=n.version?`?ver=`+encodeURIComponent(n.version):``;return r+`js/chunks/`+e+`.min.js`+i}var t=window.__elementorChunks=window.__elementorChunks||{},n=new Map;function appendChunkScript(e){return new Promise((n,r)=>{let i=document.createElement(`script`);i.src=chunkUrl(e),i.async=!0,i.onload=()=>{t[e]?n(t[e]):r(Error(`[elementor] chunk "${e}" loaded but did not register`))},i.onerror=()=>r(Error(`[elementor] failed to load chunk "${e}" from ${i.src}`)),document.head.appendChild(i)})}function loadChunk(e){return t[e]?Promise.resolve(t[e]):(n.has(e)||n.set(e,appendChunkScript(e)),n.get(e))}window.__elementorLoadChunk=loadChunk})),Ge=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,G(),X();var _default=class extends elementorModules.ViewModule{getDefaultSettings(){return{selectors:{elements:`.elementor-element`,nestedDocumentElements:`.elementor .elementor-element`},classes:{editMode:`elementor-edit-mode`}}}getDefaultElements(){let e=this.getSettings(`selectors`);return{$elements:this.$element.find(e.elements).not(this.$element.find(e.nestedDocumentElements))}}getDocumentSettings(e){let t;if(this.isEdit){t={};let e=elementor.settings.page.model;jQuery.each(e.getActiveControls(),n=>{t[n]=e.attributes[n]})}else t=this.$element.data(`elementor-settings`)||{};return this.getItems(t,e)}runElementsHandlers(){this.elements.$elements.each((e,t)=>setTimeout(()=>elementorFrontend.elementsHandler.runReadyTrigger(t)))}onInit(){this.$element=this.getSettings(`$element`),super.onInit(),this.isEdit=this.$element.hasClass(this.getSettings(`classes.editMode`)),this.isEdit?elementor.on(`document:loaded`,()=>{elementor.settings.page.model.on(`change`,this.onSettingsChange.bind(this))}):this.runElementsHandlers()}onSettingsChange(){}};e.default=_default})),Ke=__commonJSMin((t=>{var n=e();Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(Ge()),_default=class extends elementorModules.ViewModule{constructor(...e){super(...e),this.documents={},this.initDocumentClasses(),this.attachDocumentsClasses()}getDefaultSettings(){return{selectors:{document:`.elementor`}}}getDefaultElements(){let e=this.getSettings(`selectors`);return{$documents:jQuery(e.document)}}initDocumentClasses(){this.documentClasses={base:r.default},elementorFrontend.hooks.doAction(`elementor/frontend/documents-manager/init-classes`,this)}addDocumentClass(e,t){this.documentClasses[e]=t}attachDocumentsClasses(){this.elements.$documents.each((e,t)=>this.attachDocumentClass(jQuery(t)))}attachDocumentClass(e){let t=e.data(),n=t.elementorId,r=t.elementorType,i=this.documentClasses[r]||this.documentClasses.base;this.documents[n]=new i({$element:e,id:n})}};t.default=_default})),qe=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,G(),Z();var _default=class extends elementorModules.Module{get(e,t){t=t||{};let n;try{n=t.session?sessionStorage:localStorage}catch(t){return e?void 0:{}}let r=n.getItem(`elementor`);r=r?JSON.parse(r):{},r.__expiration||(r.__expiration={});let i=r.__expiration,a=[];e?i[e]&&(a=[e]):a=Object.keys(i);let o=!1;return a.forEach(e=>{new Date(i[e])<new Date&&(delete r[e],delete i[e],o=!0)}),o&&this.save(r,t.session),e?r[e]:r}set(e,t,n){n=n||{};let r=this.get(null,n);if(r[e]=t,n.lifetimeInSeconds){let t=new Date;t.setTime(t.getTime()+n.lifetimeInSeconds*1e3),r.__expiration[e]=t.getTime()}this.save(r,n.session)}save(e,t){let n;try{n=t?sessionStorage:localStorage}catch(e){return}n.setItem(`elementor`,JSON.stringify(e))}};e.default=_default})),Je=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var matchUserAgent=e=>t.indexOf(e)>=0,t=navigator.userAgent,n=!!window.opr&&!!opr.addons||!!window.opera||matchUserAgent(` OPR/`),r=matchUserAgent(`Firefox`),i=/^((?!chrome|android).)*safari/i.test(t)||/constructor/i.test(window.HTMLElement)||(e=>e.toString()===`[object SafariRemoteNotification]`)(!window.safari||typeof safari<`u`&&safari.pushNotification),a=/Trident|MSIE/.test(t)&&!!document.documentMode,o=!a&&!!window.StyleMedia||matchUserAgent(`Edg`),s=!!window.chrome&&matchUserAgent(`Chrome`)&&!(o||n),c=matchUserAgent(`Chrome`)&&!!window.CSS,l=matchUserAgent(`AppleWebKit`)&&!c;e.default={isTouchDevice:`ontouchstart`in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>
1110,appleWebkit:l,blink:c,chrome:s,edge:o,firefox:r,ie:a,mac:matchUserAgent(`Macintosh`),opera:n,safari:i,webkit:matchUserAgent(`AppleWebKit`)}})),Q=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var BaseLoader=class extends elementorModules.ViewModule{getDefaultSettings(){return{isInserted:!1,selectors:{firstScript:`script:first`}}}getDefaultElements(){return{$firstScript:jQuery(this.getSettings(`selectors.firstScript`))}}insertAPI(){this.elements.$firstScript.before(jQuery(`<script>`,{src:this.getApiURL()})),this.setSettings(`isInserted`,!0)}getVideoIDFromURL(e){let t=e.match(this.getURLRegex());return t&&t[1]}onApiReady(e){this.getSettings(`isInserted`)||this.insertAPI(),this.isApiLoaded()?e(this.getApiObject()):setTimeout(()=>{this.onApiReady(e)},350)}getAutoplayURL(e){return e.replace(`&autoplay=0`,``)+`&autoplay=1`}};e.default=BaseLoader})),Ye=__commonJSMin((t=>{var n=e();Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(Q()),YoutubeLoader=class extends r.default{getApiURL(){return`https://www.youtube.com/iframe_api`}getURLRegex(){return/^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?vi?=|(?:embed|v|vi|user|shorts)\/))([^?&"'>]+)/}isApiLoaded(){return window.YT&&YT.loaded}getApiObject(){return YT}};t.default=YoutubeLoader})),Xe=__commonJSMin((t=>{var n=e();Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(Q()),VimeoLoader=class extends r.default{getApiURL(){return`https://player.vimeo.com/api/player.js`}getURLRegex(){return/^(?:https?:\/\/)?(?:www|player\.)?(?:vimeo\.com\/)?(?:video\/|external\/)?(\d+)([^.?&#"'>]?)/}isApiLoaded(){return window.Vimeo}getApiObject(){return Vimeo}getAutoplayURL(e){let t=e.match(/#t=[^&]*/);return e.replace(t[0],``)+t}};t.default=VimeoLoader}));function asyncGeneratorStep(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function _next(e){asyncGeneratorStep(a,r,i,_next,_throw,`next`,e)}function _throw(e){asyncGeneratorStep(a,r,i,_next,_throw,`throw`,e)}_next(void 0)})}}var Ze=__esmMin((()=>{})),Qe=__commonJSMin(((e,t)=>{var n=c(),r=w();t.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(e){}}})),$e=__commonJSMin(((e,t)=>{var n=h();t.exports=function(e){return n(e)||e===null}})),et=__commonJSMin(((e,t)=>{var n=$e(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(`Can't set `+r(e)+` as a prototype`)}})),tt=__commonJSMin(((e,t)=>{var n=Qe(),r=h(),i=f(),a=et();
vendor: 1,882 bytes, line 111
111t.exports=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},o;try{o=n(Object.prototype,`__proto__`,`set`),o(t,[]),e=t instanceof Array}catch(e){}return function setPrototypeOf(t,n){return i(t),a(n),r(t)&&(e?o(t,n):t.__proto__=n),t}}():void 0)})),nt=__commonJSMin(((e,t)=>{var n=m(),r=h(),i=tt();t.exports=function(e,t,a){var o,s;return i&&n(o=t.constructor)&&o!==a&&r(s=o.prototype)&&s!==a.prototype&&i(e,s),e}})),rt=__commonJSMin(((e,t)=>{var n=Le(),r=String;t.exports=function(e){if(n(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return r(e)}})),it=__commonJSMin(((e,t)=>{var n=rt();t.exports=function(e,t){return e===void 0?arguments.length<2?``:t:n(e)}})),at=__commonJSMin(((e,t)=>{t.exports={IndexSizeError:{s:`INDEX_SIZE_ERR`,c:1,m:1},DOMStringSizeError:{s:`DOMSTRING_SIZE_ERR`,c:2,m:0},HierarchyRequestError:{s:`HIERARCHY_REQUEST_ERR`,c:3,m:1},WrongDocumentError:{s:`WRONG_DOCUMENT_ERR`,c:4,m:1},InvalidCharacterError:{s:`INVALID_CHARACTER_ERR`,c:5,m:1},NoDataAllowedError:{s:`NO_DATA_ALLOWED_ERR`,c:6,m:0},NoModificationAllowedError:{s:`NO_MODIFICATION_ALLOWED_ERR`,c:7,m:1},NotFoundError:{s:`NOT_FOUND_ERR`,c:8,m:1},NotSupportedError:{s:`NOT_SUPPORTED_ERR`,c:9,m:1},InUseAttributeError:{s:`INUSE_ATTRIBUTE_ERR`,c:10,m:1},InvalidStateError:{s:`INVALID_STATE_ERR`,c:11,m:1},SyntaxError:{s:`SYNTAX_ERR`,c:12,m:1},InvalidModificationError:{s:`INVALID_MODIFICATION_ERR`,c:13,m:1},NamespaceError:{s:`NAMESPACE_ERR`,c:14,m:1},InvalidAccessError:{s:`INVALID_ACCESS_ERR`,c:15,m:1},ValidationError:{s:`VALIDATION_ERR`,c:16,m:0},TypeMismatchError:{s:`TYPE_MISMATCH_ERR`,c:17,m:1},SecurityError:{s:`SECURITY_ERR`,c:18,m:1},NetworkError:{s:`NETWORK_ERR`,c:19,m:1},AbortError:{s:`ABORT_ERR`,c:20,m:1},URLMismatchError:{s:`URL_MISMATCH_ERR`,c:21,m:1},QuotaExceededError:{s:`QUOTA_EXCEEDED_ERR`,c:22,m:1},TimeoutError:{s:`TIMEOUT_ERR`,c:23,m:1}
111,InvalidNodeTypeError:{s:`INVALID_NODE_TYPE_ERR`,c:24,m:1},DataCloneError:{s:`DATA_CLONE_ERR`,c:25,m:1}}})),ot=__commonJSMin(((e,t)=>{var n=c(),r=Error,i=n(``.replace),a=(function(e){return String(new r(e).stack)})(`zxcasd`),o=/\n\s*at [^:]*:[^\n]*/,s=o.test(a);t.exports=function(e,t){if(s&&typeof e==`string`&&!r.prepareStackTrace)for(;t--;)e=i(e,o,``);return e}})),st=__commonJSMin((()=>{var e=W(),n=t(),i=g(),a=s(),o=L().f,c=M(),l=Se(),u=nt(),d=it(),f=at(),p=ot(),m=r(),h=D(),_=`DOMException`,v=i(`Error`),y=i(_),b=function DOMException(){l(this,x);var e=arguments.length,t=d(e<1?void 0:arguments[0]),n=new y(t,d(e<2?void 0:arguments[1],`Error`)),r=new v(t);return r.name=_,o(n,`stack`,a(1,p(r.stack,1))),u(n,this,b),n},x=b.prototype=y.prototype,S=`stack`in new v(_),C=`stack`in new y(1,2),w=y&&m&&Object.getOwnPropertyDescriptor(n,_),T=!!w&&!(w.writable&&w.configurable),E=S&&!T&&!C;e({global:!0,constructor:!0,forced:h||E},{DOMException:E?b:y});var O=i(_),k=O.prototype;if(k.constructor!==O){for(var A in h||o(k,`constructor`,a(1,O)),f)if(c(f,A)){var j=f[A],N=j.s;c(O,N)||o(O,N,a(6,j.c))}}})),ct=__commonJSMin((e=>{Ze(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,st();var _default=class extends elementorModules.ViewModule{getDefaultSettings(){return{selectors:{links:`a[href^="%23elementor-action"], a[href^="#elementor-action"]`}}}bindEvents(){elementorFrontend.elements.$document.on(`click`,this.getSettings(`selectors.links`),this.runLinkAction.bind(this))}initActions(){this.actions={lightbox:function(){var e=_asyncToGenerator(function*(e){let t=yield elementorFrontend.utils.lightbox;e.slideshow?t.openSlideshow(e.slideshow,e.url):(e.id&&(e.type=`image`),t.showModal(e))});return function lightbox(t){return e.apply(this,arguments)}}()}}addAction(e,t){this.actions[e]=t}runAction(e,...t){e=decodeURI(e),e=decodeURIComponent(e);let n=e.match(/action=(.+?)&/);if(!n)return;let r=this.actions[n[1]];if(!r)return;let i={},a=e.match(/settings=(.+)/);a&&(i=JSON.parse(atob(a[1]))),i.previousEvent=event,r(i,...t)}runLinkAction(e){e.preventDefault(),this.runAction(jQuery(e.currentTarget).attr(`href`),e)}runHashAction(){if(!location.hash)return;let e=document.querySelector(`[data-e-action-hash="${location.hash}"], a[href*="${location.hash}"]`);e&&this.runAction(e.getAttribute(`data-e-action-hash`))}createActionHash(e,t){return encodeURIComponent(`#elementor-action:action=${e}&settings=${btoa(JSON.stringify(t))}`)}onInit(){super.onInit(),this.initActions(),elementorFrontend.on(`components:init`,this.runHashAction.bind(this))}};e.default=_default})),lt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,G(),Z();var SwiperHandler=class{constructor(e,t){var n,r;return this.config=t,this.config.breakpoints&&(this.config=this.adjustConfig(t)),e instanceof jQuery&&(e=e[0]),(n=e.closest(`.elementor-widget-wrap`))==null||n.classList.add(`e-swiper-container`),(r=e.closest(`.elementor-widget`))==null||r.classList.add(`e-widget-swiper`),new Promise(t=>{if(typeof Swiper>`u`){elementorFrontend.utils.assetsLoader.load(`script`,`swiper`).then(()=>t(this.createSwiperInstance(e,this.config)));return}typeof Swiper==`function`&&window.Swiper===void 0&&(window.Swiper=Swiper),t(this.createSwiperInstance(e,this.config))})}createSwiperInstance(e,t){let n=window.Swiper;return n.prototype.adjustConfig=this.adjustConfig,t=this.applyMotionPreferences(t),new n(e,t)}adjustConfig(e){if(!e.handleElementorBreakpoints)return e;let t=elementorFrontend.config.responsive.activeBreakpoints,n=elementorFrontend.breakpoints.getBreakpointValues();return Object.keys(e.breakpoints).forEach(r=>{let i=parseInt(r),a;if(i===t.mobile.value||i+1===t.mobile.value)a=0;else if(t.widescreen&&(i===t.widescreen.value||i+1===t.widescreen.value))a=i;else{let e=n.findIndex(e=>i===e||i+1===e);a=n[e-1]}e.breakpoints[a]=e.breakpoints[r],e.breakpoints[r]={slidesPerView:e.slidesPerView,slidesPerGroup:e.slidesPerGroup?e.slidesPerGroup:1}}),e}applyMotionPreferences(e){return window.matchMedia(`(prefers-reduced-motion: reduce)`).matches?Object.assign({},e,{speed:0,autoplay:!1}):e}};e.default=SwiperHandler})),ut=__commonJSMin((e=>
111{Ze(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,G(),X(),e.default=class LightboxManager extends elementorModules.ViewModule{static getLightbox(){let e=new Promise(e=>{__elementorLoadChunk(`lightbox-lightbox`).then(({default:t})=>e(new t))}),t=elementorFrontend.utils.assetsLoader.load(`script`,`dialog`),n=elementorFrontend.utils.assetsLoader.load(`style`,`dialog`),r=elementorFrontend.utils.assetsLoader.load(`script`,`share-link`),i=elementorFrontend.utils.assetsLoader.load(`style`,`swiper`),a=elementorFrontend.utils.assetsLoader.load(`style`,`e-lightbox`);return Promise.all([e,t,n,r,i,a]).then(()=>e)}getDefaultSettings(){return{selectors:{links:`a, [data-elementor-lightbox]`,slideshow:`[data-elementor-lightbox-slideshow]`}}}getDefaultElements(){return{$links:jQuery(this.getSettings(`selectors.links`)),$slideshow:jQuery(this.getSettings(`selectors.slideshow`))}}isLightboxLink(e){if(e.tagName.toLowerCase()===`a`&&(e.hasAttribute(`download`)||!/^[^?]+\.(png|jpe?g|gif|svg|webp|avif)(\?.*)?$/i.test(e.href))&&!e.dataset.elementorLightboxVideo)return!1;let t=elementorFrontend.getKitSettings(`global_image_lightbox`),n=e.dataset.elementorOpenLightbox;return n===`yes`||t&&n!==`no`}isLightboxSlideshow(){return this.elements.$slideshow.length!==0}onLinkClick(e){var t=this;return _asyncToGenerator(function*(){let n=e.currentTarget,r=jQuery(e.target),i=elementorFrontend.isEditMode(),a=i&&elementor.$previewContents.find(`body`).hasClass(`elementor-editor__ui-state__color-picker`),o=!!r.closest(`.elementor-edit-area`).length;if(!t.isLightboxLink(n)){i&&o&&e.preventDefault();return}e.preventDefault(),!(i&&!elementor.getPreferences(`lightbox_in_editor`))&&(a||(yield LightboxManager.getLightbox()).createLightbox(n))})()}bindEvents(){elementorFrontend.elements.$document.on(`click`,this.getSettings(`selectors.links`),e=>this.onLinkClick(e))}onInit(...e){super.onInit(...e),!elementorFrontend.isEditMode()&&this.maybeActivateLightboxOnLink()}maybeActivateLightboxOnLink(){this.elements.$links.each((e,t)=>{if(this.isLightboxLink(t))return LightboxManager.getLightbox(),!1})}}})),dt=__commonJSMin((e=>{var t;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=class AssetsLoader{getScriptElement(e){let t=document.createElement(`script`);return t.src=e,t}getStyleElement(e){let t=document.createElement(`link`);return t.rel=`stylesheet`,t.href=e,t}
111load(e,t){let n=AssetsLoader.assets[e][t];return n.loader||(n.loader=this.isAssetLoaded(n,e)?Promise.resolve(!0):this.loadAsset(n,e)),n.loader}isAssetLoaded(e,t){var n;let r=t===`script`?`script[src="${e.src}"]`:`link[href="${e.src}"]`;return!!((n=document.querySelectorAll(r))!=null&&n.length)}loadAsset(e,t){return new Promise(n=>{let r=t===`style`?this.getStyleElement(e.src):this.getScriptElement(e.src);r.onload=()=>n(!0),this.appendAsset(e,r)})}appendAsset(e,t){let n=document.querySelector(e.before);if(n){n.insertAdjacentElement(`beforebegin`,t);return}let r=e.parent===`head`?e.parent:`body`;document[r].appendChild(t)}};e.default=n;var r=elementorFrontendConfig.urls.assets,i=elementorFrontendConfig.environmentMode.isScriptDebug?``:`.min`,a=elementorFrontendConfig.version;n.assets={script:{dialog:{src:`${r}lib/dialog/dialog${i}.js?ver=4.9.3`},"share-link":{src:`${r}lib/share-link/share-link${i}.js?ver=${a}`},swiper:{src:`${r}lib/swiper/v8/swiper${i}.js?ver=8.4.5`}},style:{swiper:{src:`${r}lib/swiper/v8/css/swiper${i}.css?ver=8.4.5`,parent:`head`},"e-lightbox":{src:(t=elementorFrontendConfig)!=null&&(t=t.responsive)!=null&&t.hasCu
111stomBreakpoints?`${elementorFrontendConfig.urls.uploadUrl}/elementor/css/custom-lightbox.min.css?ver=${a}`:`${r}css/conditionals/lightbox${i}.css?ver=${a}`},dialog:{src:`${r}css/conditionals/dialog${i}.css?ver=${a}`,parent:`head`,before:`#elementor-frontend-css`}}}}));function _typeof(e){"@babel/helpers - typeof";return _typeof=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_typeof(e)}var ft=__esmMin((()=>{}));function toPrimitive(e,t){if(_typeof(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_typeof(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var pt=__esmMin((()=>{ft()}));function toPropertyKey(e){var t=toPrimitive(e,`string`);return _typeof(t)==`symbol`?t:t+``}var mt=__esmMin((()=>{ft(),pt()}));function _defineProperty(e,t,n){return(t=toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ht=__esmMin((()=>{mt()}));function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var gt=__esmMin((()=>{ht()})),_t=__commonJSMin(((e,t)=>{var n=l();t.exports=Array.isArray||function isArray(e){return n(e)===`Array`}})),vt=__commonJSMin(((e,t)=>{var n=r(),i=_t(),a=TypeError,o=Object.getOwnPropertyDescriptor;t.exports=n&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(i(e)&&!o(e,`length`).writable)throw new a(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t}})),yt=__commonJSMin(((e,t)=>{var n=TypeError,r=9007199254740991;t.exports=function(e){if(e>r)throw n(`Maximum allowed index exceeded`);return e}})),$=__commonJSMin((()=>{var e=W(),t=j(),r=H(),i=vt(),a=yt(),o=n()(function(){return[].push.call({length:4294967296},1)!==4294967297}),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}};e({target:`Array`,proto:!0,arity:1,forced:o||!properErrorOnNonWritableLength()},{push:function push(e){var n=t(this),o=r(n),s=arguments.length;a(o+s);for(var c=0;c<s;c++)n[o]=arguments[c],o++;return i(n,o),o}})})),bt=__commonJSMin(((e,t)=>{var n=V();t.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}})),xt=__commonJSMin(((e,t)=>{t.exports=function(e,t){return{value:e,done:t}}})),St=__commonJSMin(((e,t)=>{var n=q();t.exports=function(e,t,r){for(var i=e.length-1;i>=0;i--)if(e[i]!==void 0)try{r=n(e[i].iterator,t,r)}catch(e){t=`throw`,r=e}if(t===`throw`)throw r;return r}})),Ct=__commonJSMin(((e,t)=>{var n=a(),r=Ae(),i=R(),o=bt(),s=P(),c=le(),l=T(),u=je().IteratorPrototype,d=xt(),f=q(),p=St(),m=s(`toStringTag`),h=`IteratorHelper`,g=`WrapForValidIterator`,_=`normal`,v=`throw`,y=c.set,createIteratorProxyPrototype=function(e){var t=c.getterFor(e?g:h);return o(r(u),{next:function next(){var n=t(this);if(e)return n.nextHandler();if(n.done)return d(void 0,!0);try{var r=n.nextHandler();return n.returnHandlerResult?r:d(r,n.done)}catch(e){throw n.done=!0,e}},return:function(){var r=t(this),i=r.iterator;if(r.done=!0,e){var a=l(i,`return`);return a?n(a,i):d(void 0,!0)}if(r.inner)try{f(r.inner.iterator,_)}catch(e){return f(i,v,e)}if(r.openIters)try{p(r.openIters,_)}catch(e){return f(i,v,e)}return i&&f(i,_),d(void 0,!0)}})},b=createIteratorProxyPrototype(!0),x=createIteratorProxyPrototype(!1);
111i(x,m,`Iterator Helper`),t.exports=function(e,t,n){var r=function Iterator(r,i){i?(i.iterator=r.iterator,i.next=r.next):i=r,i.type=t?g:h,i.returnHandlerResult=!!n,i.nextHandler=e,i.counter=0,i.done=!1,y(this,i)};return r.prototype=t?b:x,r}})),wt=__commonJSMin(((e,t)=>{var n=I(),r=q();t.exports=function(e,t,i,a){try{return a?t(n(i)[0],i[1]):t(i)}catch(t){r(e,`throw`,t)}}})),Tt=__commonJSMin(((e,t)=>{t.exports=function(e,t){var n=typeof Iterator==`function`&&Iterator.prototype[e];if(n)try{n.call({next:null},t).next()}catch(e){return!0}}})),Et=__commonJSMin((()=>{var e=W(),t=a(),n=w(),r=I(),i=J(),o=Ct(),s=wt(),c=q(),l=Tt(),u=Y(),d=D(),f=!d&&!l(`map`,function(){}),p=!d&&!f&&u(`map`,TypeError),m=d||f||p,h=o(function(){var e=this.iterator,n=r(t(this.next,e));if(!(this.done=!!n.done))return s(e,this.mapper,[n.value,this.counter++],!0)});e({target:`Iterator`,proto:!0,real:!0,forced:m},{map:function map(e){r(this);try{n(e)}catch(e){c(this,`throw`,e)}return p?t(p,this,e):new h(i(this),{mapper:e})}})})),Dt=__commonJSMin((()=>{Et()})),Ot=__commonJSMin((e=>{gt(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,$(),G(),Z(),Dt();var Breakpoints=class extends elementorModules.Module{constructor(e){super(),this.responsiveConfig=e}getActiveBreakpointsList(e={}){e=_objectSpread2(_objectSpread2({},{largeToSmall:!1,withDesktop:!1}),e);let t=Object.keys(this.responsiveConfig.activeBreakpoints);if(e.withDesktop){let e=t.indexOf(`widescreen`)===-1?t.length:t.length-1;t.splice(e,0,`desktop`)}return e.largeToSmall&&t.reverse(),t}getBreakpointValues(){let{activeBreakpoints:e}=this.responsiveConfig,t=[];return Object.values(e).forEach(e=>{t.push(e.value)}),t}getDesktopPreviousDeviceKey(){let e=``,{activeBreakpoints:t}=this.responsiveConfig,n=Object.keys(t),r=n.length;return e=t[n[r-1]].direction===`min`?n[r-2]:n[r-1],e}getDesktopMinPoint(){let{activeBreakpoints:e}=this.responsiveConfig;return e[this.getDesktopPreviousDeviceKey()].value+1}getDeviceMinBreakpoint(e){if(e===`desktop`)return this.getDesktopMinPoint();let{activeBreakpoints:t}=this.responsiveConfig,n=Object.keys(t),r;return r=n[0]===e?320:e===`widescreen`?t[e]?t[e].value:this.responsiveConfig.breakpoints.widescreen:t[n[n.indexOf(e)-1]].value+1,r}getActiveMatchRegex(){return RegExp(this.getActiveBreakpointsList().map(e=>`_`+e).join(`|`)+`$`)}};e.default=Breakpoints})),kt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Events=void 0;var Events=class{static dispatch(e,t,n=null,r=null){e=e instanceof jQuery?e[0]:e,r&&e.dispatchEvent(new CustomEvent(r,{detail:n})),e.dispatchEvent(new CustomEvent(t,{detail:n}))}};e.Events=Events,e.default=Events})),At=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var _default=class extends elementorModules.Module{constructor(){super(),elementorFrontend.elementsHandler.attachHandler(`text-path`,()=>__elementorLoadChunk(`text-path`))}};e.default=_default})),jt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var Controls=class{getControlValue(e,t,n){let r;return r=typeof e[t]==`object`&&n?e[t][n]:e[t],r}getResponsiveControlValue(e,t,n=``,r=null){let i=r||elementorFrontend.getCurrentDeviceMode(),a=this.getControlValue(e,t,n);if(i===`widescreen`){let r=this.getControlValue(e,`${t}_widescreen`,n);return r||r===0?r:a}let o=elementorFrontend.breakpoints.getActiveBreakpointsList({withDesktop:!0}),s=i,c=o.indexOf(i),l=``;for(;c<=o.length;){if(s===`desktop`){l=a;break}let r=`${t}_${s}`,i=this.getControlValue(e,r,n);if(i||i===0){l=i;break}c++,s=o[c]}return l}};e.default=Controls})),Mt=__commonJSMin((()=>{var e=W(),t=a(),n=w(),r=I(),i=J(),o=Ct(),s=wt(),c=D(),l=q(),u=Tt(),d=Y(),f=!c&&!u(`filter`,function(){}),p=!c&&!f&&d(`filter`,TypeError),m=c||f||p,h=o(function(){for(var e=this.iterator,n=this.predicate,i=this.next,a,o,c;;){if(a=r(t(i,e)),o=this.done=!!a.done,o)return;if(c=a.value,s(e,n,[c,this.counter++],!0))return c}});e({target:`Iterator`,proto:!0,real:!0,forced:m},{filter:function filter(e){r(this);try{n(e)}catch(e){l(this,`throw`,e)}return p?t(p,this,e):new h(i(this),{predicate:e})}})})),Nt=__commonJSMin((()=>{Mt()})),Pt=__commonJSMin((e=>
111{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,$(),G(),Nt(),Z();var _default=class extends elementorModules.ViewModule{getDefaultSettings(){return{selectors:{links:`.elementor-element a[href*="#"]`,stickyElements:`.elementor-element.elementor-sticky`}}}onInit(){this.observeStickyElements(()=>{this.initializeStickyAndAnchorTracking()})}observeStickyElements(e){new MutationObserver(t=>{for(let n of t)(n.type===`childList`||n.type===`attributes`&&n.target.classList.contains(`elementor-sticky`))&&e()}).observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`class`,`style`]})}initializeStickyAndAnchorTracking(){let e=this.getAllAnchorLinks(),t=this.getAllStickyElements(),n=[];!t.length>0&&!e.length>0||(this.trackStickyElements(t,n),this.trackAnchorLinks(e,n),this.organizeStickyAndAnchors(n))}trackAnchorLinks(e,t){e.forEach(e=>{let n=this.getAnchorTarget(e),r=this.getScrollPosition(n);t.push({element:n,type:`anchor`,scrollPosition:r})})}trackStickyElements(e,t){e.forEach(e=>{let n=this.getElementSettings(e);if(!n||!n.sticky_anchor_link_offset)return;let{sticky_anchor_link_offset:r}=n;if(r===0)return;let i=this.getScrollPosition(e);t.push({scrollMarginTop:r,type:`sticky`,scrollPosition:i})})}
111organizeStickyAndAnchors(e){let t=this.filterAndSortElementsByType(e,`sticky`),n=this.filterAndSortElementsByType(e,`anchor`);t.forEach((e,r)=>{this.defineCurrentStickyRange(e,r,t,n)})}defineCurrentStickyRange(e,t,n,r){let i=t+1<n.length?n[t+1].scrollPosition:1/0;e.anchor=r.filter(t=>{let n=t.scrollPosition>e.scrollPosition&&t.scrollPosition<i;return n&&(t.element.style.scrollMarginTop=`${e.scrollMarginTop}px`),n})}getScrollPosition(e){let t=0;for(;e;)t+=e.offsetTop,e=e.offsetParent;return t}getAllStickyElements(){let e=document.querySelectorAll(this.getSettings(`selectors.stickyElements`));return Array.from(e).filter((e,t,n)=>t===n.findIndex(t=>t.getAttribute(`data-id`)===e.getAttribute(`data-id`)))}getAllAnchorLinks(){let e=document.querySelectorAll(this.getSettings(`selectors.links`));return Array.from(e).filter((e,t,n)=>t===n.findIndex(t=>t.getAttribute(`href`)===e.getAttribute(`href`)))}filterAndSortElementsByType(e,t){return e.filter(e=>t===e.type).sort((e,t)=>e.scrollPosition-t.scrollPosition)}isValidSelector(e){return/^#[A-Za-z_][\w-]*$/.test(e)}getAnchorTarget(e){let t=e==null?void 0:e.hash;return this.isValidSelector(t)?document.querySelector(t):null}getElementSettings(e){return JSON.parse(e.getAttribute(`data-settings`))}};e.default=_default})),Ft=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isScrollSnapActive=e.escapeHTML=void 0;var escapeHTML=e=>{let t={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,"'":`&#39;`,'"':`&quot;`};return e.replace(/[&<>'"]/g,e=>t[e]||e)};e.escapeHTML=escapeHTML;var isScrollSnapActive=()=>{var e,t;return(elementorFrontend.isEditMode()?(e=elementor.settings.page.model.attributes)==null?void 0:e.scroll_snap:(t=elementorFrontend.config.settings.page)==null?void 0:t.scroll_snap)===`yes`};e.isScrollSnapActive=isScrollSnapActive})),It=__commonJSMin(((e,t)=>{$();var EventManager=function(){var e=Array.prototype.slice,t,n={actions:{},filters:{}};function _removeHook(e,t,r,i){var a,o,s;if(n[e][t])if(!r)n[e][t]=[];else if(a=n[e][t],i)for(s=a.length;s--;)o=a[s],o.callback===r&&o.context===i&&a.splice(s,1);else for(s=a.length;s--;)a[s].callback===r&&a.splice(s,1)}function _hookInsertSort(e){for(var t,n,r,i=1,a=e.length;i<a;i++){for(t=e[i],n=i;(r=e[n-1])&&r.priority>t.priority;)e[n]=e[n-1],--n;e[n]=t}return e}function _addHook(e,t,r,i,a){var o={callback:r,priority:i,context:a},s=n[e][t];if(s){var c=!1;if(jQuery.each(s,function(){if(this.callback===r)return c=!0,!1}),c)return;s.push(o),s=_hookInsertSort(s)}else s=[o];n[e][t]=s}function _runHook(e,t,r){var i=n[e][t],a,o;if(!i)return e===`filters`&&r[0];if(o=i.length,e===`filters`)for(a=0;a<o;a++)r[0]=i[a].callback.apply(i[a].context,r);else for(a=0;a<o;a++)i[a].callback.apply(i[a].context,r);return e!==`filters`||r[0]}function addAction(e,n,r,i){return typeof e==`string`&&typeof n==`function`&&(r=parseInt(r||10,10),_addHook(`actions`,e,n,r,i)),t}function doAction(){var n=e.call(arguments),r=n.shift();return typeof r==`string`&&_runHook(`actions`,r,n),t}function removeAction(e,n){return typeof e==`string`&&_removeHook(`actions`,e,n),t}function addFilter(e,n,r,i){return typeof e==`string`&&typeof n==`function`&&(r=parseInt(r||10,10),_addHook(`filters`,e,n,r,i)),t}function applyFilters(){var n=e.call(arguments),r=n.shift();return typeof r==`string`?_runHook(`filters`,r,n):t}function removeFilter(e,n){return typeof e==`string`&&_removeHook(`filters`,e,n),t}return t={removeFilter,applyFilters,addFilter,removeAction,doAction,addAction},t};t.exports=EventManager})),Lt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var GlobalHandler=class extends elementorModules.frontend.handlers.Base{getWidgetType(){return`global`}animate(){let e=this.$element,t=this.getAnimation();if(t===`none`){e.removeClass(`elementor-invisible`);return}let n=this.getElementSettings(),r=n._animation_delay||n.animation_delay||0;e.removeClass(t),this.currentAnimation&&e.removeClass(this.currentAnimation),this.currentAnimation=t,setTimeout(()=>{e.removeClass(`elementor-invisible`).addClass(`animated `+t)},r)}getAnimation(){return this.getCurrentDeviceSetting(`animation`)||this.getCurrentDeviceSetting(`_animation`)}onInit(...e){if(super.onInit(...e),this.getAnimation()){let e=elementorModules.utils.Scroll.
111scrollObserver({callback:t=>{t.isInViewport&&(this.animate(),e.unobserve(this.$element[0]))}});e.observe(this.$element[0])}}onElementChange(e){/^_?animation/.test(e)&&this.animate()}},_default=e=>{elementorFrontend.elementsHandler.addHandler(GlobalHandler,{$element:e})};e.default=_default})),Rt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createEditorHandler=createEditorHandler;function createEditorHandler(e){return()=>new Promise(t=>{elementorFrontend.isEditMode()&&e().then(t)})}})),zt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Rt();e.default=[()=>__elementorLoadChunk(`background-slideshow`),()=>__elementorLoadChunk(`background-video`),(0,t.createEditorHandler)(()=>__elementorLoadChunk(`handles-position`)),(0,t.createEditorHandler)(()=>__elementorLoadChunk(`container-shapes`)),(0,t.createEditorHandler)(()=>__elementorLoadChunk(`container-grid-container`))]})),Bt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Rt();e.default=[()=>__elementorLoadChunk(`section-stretched-section`),()=>__elementorLoadChunk(`background-slideshow`),()=>__elementorLoadChunk(`background-video`),(0,t.createEditorHandler)(()=>__elementorLoadChunk(`handles-position`)),(0,t.createEditorHandler)(()=>__elementorLoadChunk(`section-shapes`))]})),Vt=__commonJSMin((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=[()=>__elementorLoadChunk(`background-slideshow`)]})),Ht=__commonJSMin(((t,n)=>{var r=e();G(),Z();var i=r(Lt()),a=r(zt()),o=r(Bt()),s=r(Vt());n.exports=function(e){let t={};this.elementsHandlers={"accordion.default":()=>__elementorLoadChunk(`accordion`),"alert.default":()=>__elementorLoadChunk(`alert`),"counter.default":()=>__elementorLoadChunk(`counter`),"progress.default":()=>__elementorLoadChunk(`progress`),"tabs.default":()=>__elementorLoadChunk(`tabs`),"toggle.default":()=>__elementorLoadChunk(`toggle`),"video.default":()=>__elementorLoadChunk(`video`),"image-carousel.default":()=>__elementorLoadChunk(`image-carousel`),"text-editor.default":()=>__elementorLoadChunk(`text-editor`),"wp-widget-media_audio.default":()=>__elementorLoadChunk(`wp-audio`),container:a.default,section:o.default,column:s.default},elementorFrontendConfig.experimentalFeatures.container&&(this.elementsHandlers[`nested-tabs.default`]=()=>__elementorLoadChunk(`nested-tabs`),this.elementsHandlers[`nested-accordion.default`]=()=>__elementorLoadChunk(`nested-accordion`)),elementorFrontendConfig.experimentalFeatures.container&&(this.elementsHandlers[`contact-buttons.default`]=()=>__elementorLoadChunk(`contact-buttons`),this.elementsHandlers[`floating-bars-var-1.default`]=()=>__elementorLoadChunk(`floating-bars`));let addGlobalHandlers=()=>elementorFrontend.hooks.addAction(`frontend/element_ready/global`,i.default),addElementsHandlers=()=>{e.each(this.elementsHandlers,(e,t)=>{let n=e.split(`.`);e=n[0];let r=n[1]||null;this.attachHandler(e,t,r)})},isClassHandler=e=>{var t;return(t=e.prototype)==null?void 0:t.getUniqueHandlerID},addHandlerWithHook=(e,t,n=`default`)=>{n=n?`.`+n:``;let r=e+n;elementorFrontend.hooks.addAction(`frontend/element_ready/${r}`,e=>{if(isClassHandler(t))this.addHandler(t,{$element:e,elementName:r},!0);else{let n=t();if(!n)return;n instanceof Promise?n.then(({default:t})=>{this.addHandler(t,{$element:e,elementName:r},!0)}):this.addHandler(n,{$element:e,elementName:r},!0)}})};this.addHandler=function(n,r){let i=r.$element.data(`model-cid`),a;if(i){a=n.prototype.getConstructorID(),t[i]||(t[i]={});let e=t[i][a];e&&e.onDestroy()}let o=new n(r);elementorFrontend.hooks.doAction(`frontend/element_handler_ready/${r.elementName}`,r.$element,e),i&&(t[i][a]=o)},this.attachHandler=(e,t,n)=>{Array.isArray(t)||(t=[t]),t.forEach(t=>addHandlerWithHook(e,t,n))},this.getHandler=function(e){let t=this.elementsHandlers[e];return isClassHandler(t)?t:new Promise(e=>{t().then(({default:t})=>{e(t)})})},this.getHandlers=function(e){return elementorDevTools.deprecation.deprecated(`getHandlers`,`3.1.0`,`elementorFrontend.elementsHandler.getHandler`),e?this.getHandler(e):this.elementsHandlers},this.runReadyTrigger=function(t){let n=!!t.closest(`[data-delay-child-handlers="true"]`)&&t.closest(`[data-delay-child-handlers="true"]`).length!==0;if(elementorFrontend.config.is_static||n)return;let r=jQuery(t),i=r.attr(`data-element_type`);if(i&&(elementorFrontend.hooks.doAction(`frontend/element_ready/global`,r,e),elementorFrontend.hooks.doAction(`frontend/element_ready/${i}`,r,e),i===`widget`)){let t=r.attr(`data-widget_type`);elementorFrontend.hooks.doAction(`frontend/element_ready/${t}`,r,e)}},this.init=()=>{addGlobalHandlers(),addElementsHandlers()}}}));return __commonJSMin((t=>{var n=e();
111Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,G(),X(),Z(),Ue(),We();var r=n(Ke()),i=n(qe()),a=n(Je()),o=n(Ye()),s=n(Xe()),c=n(Q()),l=n(ct()),u=n(lt()),d=n(ut()),f=n(dt()),p=n(Ot()),m=n(kt()),h=n(At()),g=n(jt()),_=n(Pt()),v=Ft(),y=It(),b=Ht(),Frontend=class extends elementorModules.ViewModule{constructor(...e){super(...e),this.config=elementorFrontendConfig,this.config.legacyMode={get elementWrappers(){return elementorFrontend.isEditMode()&&window.top.elementorDevTools.deprecation.deprecated(`elementorFrontend.config.legacyMode.elementWrappers`,`3.1.0`),!1}},this.populateActiveBreakpointsConfig()}get Module(){return this.isEditMode()&&parent.elementorDevTools.deprecation.deprecated(`elementorFrontend.Module`,`2.5.0`,`elementorModules.frontend.handlers.Base`),elementorModules.frontend.handlers.Base}getDefaultSettings(){return{selectors:{elementor:`.elementor`,adminBar:`#wpadminbar`}}}getDefaultElements(){let e={window,$window:jQuery(window),$document:jQuery(document),$head:jQuery(document.head),$body:jQuery(document.body),$deviceMode:jQuery(`<span>`,{id:`elementor-device-mode`,class:`elementor-screen-only`})};return e.$body.append(e.$deviceMode),e}bindEvents(){this.elements.$window.on(`resize`,()=>this.setDeviceModeData())}getElements(e){return this.getItems(this.elements,e)}getPageSettings(e){let t=this.isEditMode()?elementor.settings.page.model.attributes:this.config.settings.page;return this.getItems(t,e)}getGeneralSettings(e){return this.isEditMode()&&parent.elementorDevTools.deprecation.deprecated(`getGeneralSettings()`,`3.0.0`,"getKitSettings() and remove the `elementor_` prefix"),this.getKitSettings(`elementor_${e}`)}getKitSettings(e){return this.getItems(this.config.kit,e)}getCurrentDeviceMode(){return getComputedStyle(this.elements.$deviceMode[0],`:after`).content.replace(/"/g,``)}getDeviceSetting(e,t,n){if(e===`widescreen`)return this.getWidescreenSetting(t,n);let r=elementorFrontend.breakpoints.getActiveBreakpointsList({largeToSmall:!0,withDesktop:!0}),i=r.indexOf(e);for(;i>0;){let e=r[i],a=t[n+`_`+e];if(a||a===0)return a;i--}return t[n]}getWidescreenSetting(e,t){let n=t+`_widescreen`,r;return r=e[n]?e[n]:e[t],r}getCurrentDeviceSetting(e,t){return this.getDeviceSetting(elementorFrontend.getCurrentDeviceMode(),e,t)}isEditMode(){return this.config.environmentMode.edit}isWPPreviewMode(){return this.config.environmentMode.wpPreview}initDialogsManager(){let e;this.getDialogsManager=()=>(e||(e=new DialogsManager.Instance),e)}initOnReadyComponents(){this.utils={youtube:new o.default,vimeo:new s.default,baseVideoLoader:new c.default,get lightbox(){return d.default.getLightbox()},urlActions:new l.default,swiper:u.default,environment:a.default,assetsLoader:new f.default,escapeHTML:v.escapeHTML,events:m.default,controls:new g.default,anchor_scroll_margin:new _.default},this.modules={StretchElement:elementorModules.frontend.tools.StretchElement,Masonry:elementorModules.utils.Masonry},this.elementsHandler.init(),this.isEditMode()?elementor.once(`document:loaded`,()=>this.onDocumentLoaded()):this.onDocumentLoaded()}initOnReadyElements(){this.elements.$wpAdminBar=this.elements.$document.find(this.getSettings(`selectors.adminBar`))}addUserAgentClasses(){for(let[e,t]of Object.entries(a.default))t&&this.elements.$body.addClass(`e--ua-`+e)}setDeviceModeData(){this.elements.$body.attr(`data-elementor-device-mode`,this.getCurrentDeviceMode())}addListenerOnce(e,t,n,r){if(r||(r=this.elements.$window),!this.isEditMode()){r.on(t,n);return}if(this.removeListeners(e,t,r),r instanceof jQuery){let i=t+`.`+e;r.on(i,n)}else r.on(t,n,e)}removeListeners(e,t,n,r){if(r||(r=this.elements.$window),r instanceof jQuery){let i=t+`.`+e;r.off(i,n)}else r.off(t,n,e)}debounce(e,t){let n;return function(){let r=this,i=arguments,later=()=>{n=null,e.apply(r,i)},a=!n;clearTimeout(n),n=setTimeout(later,t),a&&e.apply(r,i)}}muteMigrationTraces(){jQuery.migrateMute=!0,jQuery.migrateTrace=!1}initModules(){let e={shapes:h.default};elementorFrontend.trigger(`elementor/modules/init:before`),elementorFrontend.trigger(`elementor/modules/init/before`),Object.entries(e).forEach(([e,t])=>{this.modulesHandlers[e]=new t})}populateActiveBreakpointsConfig(){this.config.responsive.activeBreakpoints={}
111,Object.entries(this.config.responsive.breakpoints).forEach(([e,t])=>{t.is_enabled&&(this.config.responsive.activeBreakpoints[e]=t)})}init(){this.hooks=new y,this.breakpoints=new p.default(this.config.responsive),this.storage=new i.default,this.elementsHandler=new b(jQuery),this.modulesHandlers={},this.addUserAgentClasses(),this.setDeviceModeData(),this.initDialogsManager(),this.isEditMode()&&this.muteMigrationTraces(),m.default.dispatch(this.elements.$window,`elementor/frontend/init`),this.initModules(),this.initOnReadyElements(),this.initOnReadyComponents()}onDocumentLoaded(){this.documentsManager=new r.default,this.trigger(`components:init`),new d.default}};t.default=Frontend,window.elementorFrontend=new Frontend,elementorFrontend.isEditMode()||jQuery(()=>elementorFrontend.init())}))()})();;
112/** Abstract base class for collection plugins v1.0.1.
113	Written by Keith Wood (kbwood{at}iinet.com.au) December 2013.
114	Licensed under the MIT (http://keith-wood.name/licence.html) license. */
115(function(){var j=false;window.JQClass=function(){};JQClass.classes={};JQClass.extend=function extender(f){var g=this.prototype;j=true;var h=new this();j=false;for(var i in f){h[i]=typeof f[i]=='function'&&typeof g[i]=='function'?(function(d,e){return function(){var b=this._super;this._super=function(a){return g[d].apply(this,a||[])};var c=e.apply(this,arguments);this._super=b;return c}})(i,f[i]):f[i]}function JQClass(){if(!j&&this._init){this._init.apply(this,arguments)}}JQClass.prototype=h;JQClass.prototype.constructor=JQClass;JQClass.extend=extender;return JQClass}})();(function($){JQClass.classes.JQPlugin=JQClass.extend({name:'plugin',defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return'is-'+this.name},_init:function(){$.extend(this.defaultOptions,(this.regionalOptions&&this.regionalOptions[''])||{});var c=camelCase(this.name);$[c]=this;$.fn[c]=function(a){var b=Array.prototype.slice.call(arguments,1);if($[c]._isNotChained(a,b)){return $[c][a].apply($[c],[this[0]].concat(b))}return this.each(function(){if(typeof a==='string'){if(a[0]==='_'||!$[c][a]){throw'Unknown method: '+a;}$[c][a].apply($[c],[this].concat(b))}else{$[c]._attach(this,a)}})}},setDefaults:function(a){$.extend(this.defaultOptions,a||{})},_isNotChained:function(a,b){if(a==='option'&&(b.length===0||(b.length===1&&typeof b[0]==='string'))){return true}return $.inArray(a,this._getters)>-1},_attach:function(a,b){a=$(a);if(a.hasClass(this._getMarker())){return}a.addClass(this._getMarker());b=$.extend({},this.defaultOptions,this._getMetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instSettings(a,b));a.data(this.name,c);this._postAttach(a,c);this.option(a,b)},_instSettings:function(a,b){return{}},_postAttach:function(a,b){},_getMetadata:function(d){try{var f=d.data(this.name.toLowerCase())||'';f=f.replace(/'/g,'"');f=f.replace(/([a-zA-Z0-9]+):/g,function(a,b,i){var c=f.substring(0,i).match(/"/g);return(!c||c.length%2===0?'"'+b+'":':b+':')});f=$.parseJSON('{'+f+'}');for(var g in f){var h=f[g];if(typeof h==='string'&&h.match(/^new Date\((.*)\)$/)){f[g]=eval(h)}}return f}catch(e){return{}}},_getInst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name);if(!b||(typeof b==='string'&&c==null)){var e=(d||{}).options;return(e&&b?e[b]:e)}if(!a.hasClass(this._getMarker())){return}var e=b||{};if(typeof b==='string'){e={};e[b]=c}this._optionsChanged(a,d,e);$.extend(d.options,e)},_optionsChanged:function(a,b,c){},destroy:function(a){a=$(a);if(!a.hasClass(this._getMarker())){return}this._preDestroy(a,this._getInst(a));a.removeData(this.name).removeClass(this._getMarker())},_preDestroy:function(a,b){}});function camelCase(c){return c.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()})}$.JQPlugin={createPlugin:function(a,b){if(typeof a==='object'){b=a;a='JQPlugin'}a=camelCase(a);var c=camelCase(b.name);JQClass.classes[c]=JQClass.classes[a].extend(b);new JQClass.classes[c]()}}})(jQuery);;
116var hb_months_name = ["January","February","March","April","May","June","July","August","September","October","November","December"];
117var hb_day_names = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
117ay","Saturday"];
118var hb_day_names_min = ["Su","Mo","Tu","We","Th","Fr","Sa"];
119var hb_date_format = "mm/dd/yyyy";
120var hb_first_day = "1";
121var hb_is_rtl = "false";
122var hb_accom_data_2131 = {"min_date":"2026-10-06","max_date":"2027-10-06"};
123;
124/* http://keith-wood.name/datepick.html
125   Date picker for jQuery v5.0.1.
126   Written by Keith Wood (kbwood{at}iinet.com.au) February 2010.
127   Licensed under the MIT (http://keith-wood.name/licence.html) licence. 
128   Please attribute the author if you use it. */
129(function($){var E='datepick';$.JQPlugin.createPlugin({name:E,defaultRenderer:{picker:'<div class="datepick">'+'<div class="datepick-nav">{link:prev}{link:today}{link:next}</div>{months}'+'{popup:start}<div class="datepick-ctrl">{link:clear}{link:close}</div>{popup:end}'+'<div class="datepick-clear-fix"></div></div>',monthRow:'<div class="datepick-month-row">{months}</div>',month:'<div class="datepick-month"><div class="datepick-month-header">{monthHeader}</div>'+'<table><thead>{weekHeader}</thead><tbody>{weeks}</tbody></table></div>',weekHeader:'<tr>{days}</tr>',dayHeader:'<th>{day}</th>',week:'<tr>{days}</tr>',day:'<td>{day}</td>',monthSelector:'.datepick-month',daySelector:'td',rtlClass:'datepick-rtl',multiClass:'datepick-multi',defaultClass:'',selectedClass:'datepick-selected',highlightedClass:'datepick-highlight',todayClass:'datepick-today',otherMonthClass:'datepick-other-month',weekendClass:'datepick-weekend',commandClass:'datepick-cmd',commandButtonClass:'',commandLinkClass:'',disabledClass:'datepick-disabled'},commands:{prev:{text:'prevText',status:'prevStatus',keystroke:{keyCode:33},enabled:function(a){var b=a.curMinDate();return(!b||F.add(F.day(F._applyMonthsOffset(F.add(F.newDate(a.drawDate),1-a.options.monthsToStep,'m'),a),1),-1,'d').getTime()>=b.getTime())},date:function(a){return F.day(F._applyMonthsOffset(F.add(F.newDate(a.drawDate),-a.options.monthsToStep,'m'),a),1)},action:function(a){F.changeMonth(this,-a.options.monthsToStep)}},prevJump:{text:'prevJumpText',status:'prevJumpStatus',keystroke:{keyCode:33,ctrlKey:true},enabled:function(a){var b=a.curMinDate();return(!b||F.add(F.day(F._applyMonthsOffset(F.add(F.newDate(a.drawDate),1-a.options.monthsToJump,'m'),a),1),-1,'d').getTime()>=b.getTime())},date:function(a){return F.day(F._applyMonthsOffset(F.add(F.newDate(a.drawDate),-a.options.monthsToJump,'m'),a),1)},action:function(a){F.changeMonth(this,-a.options.monthsToJump)}},next:{text:'nextText',status:'nextStatus',keystroke:{keyCode:34},enabled:function(a){var b=a.get('maxDate');return(!b||F.day(F._applyMonthsOffset(F.add(F.newDate(a.drawDate),a.options.monthsToStep,'m'),a),1).getTime()<=b.getTime())},date:function(a){return F.day(F._applyMonthsOffset(F.add(F.newDate(a.drawDate),a.options.monthsToStep,'m'),a),1)},action:function(a){F.changeMonth(this,a.options.monthsToStep)}},nextJump:{text:'nextJumpText',status:'nextJumpStatus',keystroke:{keyCode:34,ctrlKey:true},enabled:function(a){var b=a.get('maxDate');return(!b||F.day(F._applyMonthsOffset(F.add(F.newDate(a.drawDate),a.options.monthsToJump,'m'),a),1).getTime()<=b.getTime())},date:function(a){return F.day(F._applyMonthsOffset(F.add(F.newDate(a.drawDate),a.options.monthsToJump,'m'),a),1)},action:function(a){F.changeMonth(this,a.options.monthsToJump)}},current:{text:'currentText',status:'currentStatus',keystroke:{keyCode:36,ctrlKey:true},enabled:function(a){var b=a.curMinDate();var c=a.get('maxDate');var d=a.selectedDates[0]||F.today();return(!b||d.getTime()>=b.getTime())&&(!c||d.getTime()<=c.getTime())},date:function(a){return a.selectedDates[0]||F.today()},action:function(a){var b=a.selectedDates[0]||F.today();F.showMonth(this,b.getFullYear(),b.getMonth()+1)}},today:{text:'todayText',status:'todayStatus',keystroke:{keyCode:36,ctrlKey:true},enabled:function(a){var b=a.curMinDate();var c=a.get('maxDate');return(!b||F.today().getTime()>=b.getTime())&&(!c||F.today().getTime()<=c.getTime())},date:function(a){return F.today()},action:function(a){F.showMonth(this)}},clear:{text:'clearText',status:'clearStatus',keystroke:{keyCode:35,ctrlKey:true},enabled:function(a){return true},date:function(a){return null},action:function(a){F.clear(this)}},close:{text:'closeText',status:'closeStatus',keystroke:{keyCode:27},enabled:function(a){return true},date:function(a){return null},action:function(a){F.hide(this)}},prevWeek:{text:'prevWeekText',status:'prevWeekStatus',keystroke:{keyCode:38,ctrlKey:true},enabled:function(a){var b=a.curMinDate();return(!b||F.add(F.newDate(a.drawDate),-7,'d').getTime()>=b.getTime())},date:function(a){return F.add(F.newDate(a.drawDate),-7,'d')},action:function(a){F.changeDay(this,-7)}},prevDay:{text:'prevDayText',status:'prevDayStatus',keystroke:{keyCode:37,ctrlKey:true},enabled:function(a){var b=a.curMinDate();return(!b||F.add(F.newDate(a.drawDate),-1,'d').getTime()>=b.getTime())},date:function(a){return F.add(F.newDate(a.drawDate),-1,'d')},action:function(a){F.changeDay(this,-1)}},nextDay:{text:'nextDayText',status:'nextDayStatus',keystroke:{keyCode:39,ctrlKey:true},enabled:function(a){var b=a.get('maxDate');return(!b||F.add(F.newDate(a.drawDate),1,'d').getTime()<=b.getTime())},date:function(a){return F.add(F.newDate(a.drawDate),1,'d')},action:function(a){F.changeDay(this,1)}},nextWeek:{text:'nextWeekText',status:'nextWeekStatus',keystroke:{keyCode:40,ctrlKey:true},enabled:function(a){var b=a.get('maxDate');return(!b||F.add(F.newDate(a.drawDate),7,'d').getTime()<=b.getTime())},date:function(a){return F.add(F.newDate(a.drawDate),7,'d')},action:function(a){F.changeDay(this,7)}}},defaultOptions:{pickerClass:'',showOnFocus:true,showTrigger:null,showAnim
129:'show',showOptions:{},showSpeed:'normal',popupContainer:null,alignment:'bottom',fixedWeeks:false,firstDay:0,calculateWeek:null,monthsToShow:1,monthsOffset:0,monthsToStep:1,monthsToJump:12,useMouseWheel:true,changeMonth:true,yearRange:'c-10:c+10',shortYearCutoff:'+10',showOtherMonths:false,selectOtherMonths:false,defaultDate:null,selectDefaultDate:false,minDate:null,maxDate:null,dateFormat:'mm/dd/yyyy',autoSize:false,rangeSelect:false,rangeSeparator:' - ',multiSelect:0,multiSeparator:',',onDate:null,onShow:null,onChangeMonthYear:null,onSelect:null,onClose:null,altField:null,altFormat:null,constrainInput:true,commandsAsDateFormat:false,commands:{}},regionalOptions:{'':{monthNames:['January','February','March','April','May','June','July','August','September','October','November','December'],monthNamesShort:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],dayNames:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dayNamesShort:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],dayNamesMin:['Su','Mo','Tu','We','Th','Fr','Sa'],dateFormat:'mm/dd/yyyy',firstDay:0,renderer:{},prevText:'&lt;Prev',prevStatus:'Show the previous month',prevJumpText:'&lt;&lt;',prevJumpStatus:'Show the previous year',nextText:'Next&gt;',nextStatus:'Show the next month',nextJumpText:'&gt;&gt;',nextJumpStatus:'Show the next year',currentText:'Current',currentStatus:'Show the current month',todayText:'Today',todayStatus:'Show today\'s month',clearText:'Clear',clearStatus:'Clear all the dates',closeText:'Close',closeStatus:'Close the datepicker',yearStatus:'Change the year',earlierText:'&#160;&#160;',laterText:'&#160;&#160;',monthStatus:'Change the month',weekText:'Wk',weekStatus:'Week of the year',dayStatus:'Select DD, M d, yyyy',defaultStatus:'Select a date',isRTL:false}},_getters:['getDate','isDisabled','isSelectable','retrieveDate'],_disabled:[],_popupClass:E+'-popup',_triggerClass:E+'-trigger',_disableClass:E+'-disable',_monthYearClass:E+'-month-year',_curMonthClass:E+'-month-',_anyYearClass:E+'-any-year',_curDoWClass:E+'-dow-',_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),_msPerDay:24*60*60*1000,ATOM:'yyyy-mm-dd',COOKIE:'D, dd M yyyy',FULL:'DD, MM d, yyyy',ISO_8601:'yyyy-mm-dd',JULIAN:'J',RFC_822:'D, d M yy',RFC_850:'DD, dd-M-yy',RFC_1036:'D, d M yy',RFC_1123:'D, d M yyyy',RFC_2822:'D, d M yyyy',RSS:'D, d M yy',TICKS:'!',TIMESTAMP:'@',W3C:'yyyy-mm-dd',formatDate:function(f,g,h){if(typeof f!=='string'){h=g;g=f;f=''}if(!g){return''}f=f||this.defaultOptions.dateFormat;h=h||{};var i=h.dayNamesShort||this.defaultOptions.dayNamesShort;var j=h.dayNames||this.defaultOptions.dayNames;var k=h.monthNamesShort||this.defaultOptions.monthNamesShort;var l=h.monthNames||this.defaultOptions.monthNames;var m=h.calculateWeek||this.defaultOptions.calculateWeek;var n=function(a,b){var c=1;while(s+c<f.length&&f.charAt(s+c)===a){c++}s+=c-1;return Math.floor(c/(b||1))>1};var o=function(a,b,c,d){var e=''+b;if(n(a,d)){while(e.length<c){e='0'+e}}return e};var p=function(a,b,c,d){return(n(a)?d[b]:c[b])};var q='';var r=false;for(var s=0;s<f.length;s++){if(r){if(f.charAt(s)==="'"&&!n("'")){r=false}else{q+=f.charAt(s)}}else{switch(f.charAt(s)){case'd':q+=o('d',g.getDate(),2);break;case'D':q+=p('D',g.getDay(),i,j);break;case'o':q+=o('o',this.dayOfYear(g),3);break;case'w':q+=o('w',m(g),2);break;case'm':q+=o('m',g.getMonth()+1,2);break;case'M':q+=p('M',g.getMonth(),k,l);break;case'y':q+=(n('y',2)?g.getFullYear():(g.getFullYear()%100<10?'0':'')+g.getFullYear()%100);break;case'@':q+=Math.floor(g.getTime()/1000);break;case'!':q+=g.getTime()*10000+this._ticksTo1970;break;case"'":if(n("'")){q+="'"}else{r=true}break;default:q+=f.charAt(s)}}}return q},parseDate:function(g,h,j){if(h==null){throw'Invalid arguments';}h=(typeof h==='object'?h.toString():h+'');if(h===''){return null}g=g||this.defaultOptions.dateFormat;j=j||{};var k=j.shortYearCutoff||this.defaultOptions.shortYearCutoff;k=(typeof k!=='string'?k:this.today().getFullYear()%100+parseInt(k,10));var l=j.dayNamesShort||this.defaultOptions.dayNamesShort;var m=j.dayNames||this.defaultOptions.dayNames;var n=j.monthNamesShort||this.defaultOptions.monthNamesShort;var o=j.monthNames||this.defaultOptions.monthNames;var p=-1;var q=-1;var r=-1;var s=-1;var t=false;var u=false;var v=function(a,b){var c=1;while(A+c<g.length&&g.charAt(A+c)===a){c++}A+=c-1;return Math.floor(c/(b||1))>1};var w=function(a,b){var c=v(a,b);var d=[2,3,c?4:2,11,20]['oy@!'.indexOf(a)+1];var e=new RegExp('^-?\\d{1,'+d+'}');var f=h.substring(z).match(e);if(!f){throw'Missing number at position {0}'.replace(/\{0\}/,z);}z+=f[0].length;return parseInt(f[0],10);};var x=function(a,b,c,d){var e=(v(a,d)?c:b);for(var i=0;i<e.length;i++){if(h.substr(z,e[i].length).toLowerCase()===e[i].toLowerCase()){z+=e[i].length;return i+1;}}throw'Unknown name at position {0}'.replace(/\{0\}/,z);};var y=function(){if(h.charAt(z)!==g.charAt(A)){throw'Unexpected literal at position {0}'.replace(/\{0\}/,z);}z++;};var z=0;for(var A=0;A<g.length;A++){if(u){if(g.charAt(A)==="'"&&!v("'")){u=false;}else{y();}}else{switch(g.charAt(A)){case'd':r=w('d');break;case'D':x('D',l,m);break;case'o':s=w('o');break;case'w':w('w');break;case'm':q=w('m');break;case'M':q=x('M',n,o);break;case'y':var B=A;t=!v('y',2);A=B;p=w('y',2);break;case'@':var C=this._normaliseDate(new Date(w('@')*1000));p=C.getFullYear();q=C.getMonth()+1;r=C.getDate();break;case'!':var C=this._normaliseDate(new Date((w('!')-this._ticksTo1970)/10000));p=C.getFullYear();q=C.getMonth()+1;r=C.getDate();break;case'*':z=h.length;break;case"'":if(v("'")){y();}else{u=true;}break;default:y();}}}if(z<h.length){throw'Additional text found at end';}if(p===-1){p=this.today().getFullYear();}else if(p<100&&t){p+=(k===-1?1900:this.today().getFullYear()-this.today().getFullYear()%100-(p<=k?0:100));}if(s>-1){q=1;r=s;for(var D=this.daysInMonth(p,q);r>D;D=this.daysInMonth(p,q)){q++;r-=D;}}var C=this.newDate(p,q,r);
129if(C.getFullYear()!==p||C.getMonth()+1!==q||C.getDate()!==r){throw'Invalid date';}return C;},determineDate:function(f,g,h,i,j){if(h&&typeof h!=='object'){j=i;i=h;h=null;}if(typeof i!=='string'){j=i;i='';}var k=function(a){try{return F.parseDate(i,a,j);}catch(e){}a=a.toLowerCase();var b=(a.match(/^c/)&&h?F.newDate(h):null)||F.today();var c=/([+-]?[0-9]+)\s*(d|w|m|y)?/g;var d=null;while(d=c.exec(a)){b=F.add(b,parseInt(d[1],10),d[2]||'d');}return b;};g=(g?F.newDate(g):null);f=(f==null?g:(typeof f==='string'?k(f):(typeof f==='number'?(isNaN(f)||f===Infinity||f===-Infinity?g:F.add(F.today(),f,'d')):F.newDate(f))));return f;},daysInMonth:function(a,b){b=(a.getFullYear?a.getMonth()+1:b);a=(a.getFullYear?a.getFullYear():a);return this.newDate(a,b+1,0).getDate();},dayOfYear:function(a,b,c){var d=(a.getFullYear?a:F.newDate(a,b,c));var e=F.newDate(d.getFullYear(),1,1);return Math.floor((d.getTime()-e.getTime())/F._msPerDay)+1;},iso8601Week:function(a,b,c){var d=(a.getFullYear?new Date(a.getTime()):F.newDate(a,b,c));d.setDate(d.getDate()+4-(d.getDay()||7));var e=d.getTime();d.setMonth(0,1);return Math.floor(Math.round((e-d)/F._msPerDay)/7)+1;},today:function(){return this._normaliseDate(new Date());},newDate:function(a,b,c){return(!a?null:(a.getFullYear?this._normaliseDate(new Date(a.getTime())):new Date(a,b-1,c,12)));},_normaliseDate:function(a){if(a){a.setHours(12,0,0,0);}return a;},year:function(a,b){a.setFullYear(b);return this._normaliseDate(a);},month:function(a,b){a.setMonth(b-1);return this._normaliseDate(a);},day:function(a,b){a.setDate(b);return this._normaliseDate(a);},add:function(a,b,c){if(c==='d'||c==='w'){this._normaliseDate(a);a.setDate(a.getDate()+b*(c==='w'?7:1));}else{var d=a.getFullYear()+(c==='y'?b:0);var e=a.getMonth()+(c==='m'?b:0);a.setTime(F.newDate(d,e+1,Math.min(a.getDate(),this.daysInMonth(d,e+1))).getTime());}return a;},_applyMonthsOffset:function(a,b){var c=b.options.monthsOffset;if($.isFunction(c)){c=c.apply(b.elem[0],[a]);}return F.add(a,-c,'m');},_init:function(){this.defaultOptions.commands=this.commands;this.defaultOptions.calculateWeek=this.iso8601Week;this.regionalOptions[''].renderer=this.defaultRenderer;this._super();},_instSettings:function(b,c){return{selectedDates:[],drawDate:null,pickingRange:false,inline:($.inArray(b[0].nodeName.toLowerCase(),['div','span'])>-1),get:function(a){if($.inArray(a,['defaultDate','minDate','maxDate'])>-1){return F.determineDate(this.options[a],null,this.selectedDates[0],this.options.dateFormat,this.getConfig());}return this.options[a];},curMinDate:function(){return(this.pickingRange?this.selectedDates[0]:this.get('minDate'));},getConfig:function(){return{dayNamesShort:this.options.dayNamesShort,dayNames:this.options.dayNames,monthNamesShort:this.options.monthNamesShort,monthNames:this.options.monthNames,calculateWeek:this.options.calculateWeek,shortYearCutoff:this.options.shortYearCutoff};}};},_postAttach:function(a,b){if(b.inline){b.drawDate=F._checkMinMax(F.newDate(b.selectedDates[0]||b.get('defaultDate')||F.today()),b);b.prevDate=F.newDate(b.drawDate);this._update(a[0]);if($.fn.mousewheel){a.mousewheel(this._doMouseWheel);}}else{this._attachments(a,b);a.on('keydown.'+b.name,this._keyDown).on('keypress.'+b.name,this._keyPress).on('keyup.'+b.name,this._keyUp);if(a.attr('disabled')){this.disable(a[0]);}}},_optionsChanged:function(b,c,d){if(d.calendar&&d.calendar!==c.options.calendar){var e=function(a){return(typeof c.options[a]==='object'?null:c.options[a]);};d=$.extend({defaultDate:e('defaultDate'),minDate:e('minDate'),maxDate:e('maxDate')},d);c.selectedDates=[];c.drawDate=null;}var f=c.selectedDates;$.extend(c.options,d);this.setDate(b[0],f,null,false,true);c.pickingRange=false;c.drawDate=F.newDate(this._checkMinMax((c.options.defaultDate?c.get('defaultDate'):c.drawDate)||c.get('defaultDate')||F.today(),c));if(!c.inline){this._attachments(b,c);}if(c.inline||c.div){this._update(b[0]);}},_attachments:function(a,b){a.off('focus.'+b.name);if(b.options.showOnFocus){a.on('focus.'+b.name,this.show);}if(b.trigger){b.trigger.remove();}var c=b.options.showTrigger;b.trigger=(!c?$([]):$(c).clone().removeAttr('id').addClass(this._triggerClass)[b.options.isRTL?'insertBefore':'insertAfter'](a).click(function(){if(!F.isDisabled(a[0])){F[F.curInst===b?'hide':'show'](a[0]);}}));this._autoSize(a,b);var d=this._extractDates(b,a.val());if(d){this.setDate(a[0],d,null,true);}var e=b.get('defaultDate');
129if(b.options.selectDefaultDate&&e&&b.selectedDates.length===0){this.setDate(a[0],F.newDate(e||F.today()));}},_autoSize:function(d,e){if(e.options.autoSize&&!e.inline){var f=F.newDate(2009,10,20);var g=e.options.dateFormat;if(g.match(/[DM]/)){var h=function(a){var b=0;var c=0;for(var i=0;i<a.length;i++){if(a[i].length>b){b=a[i].length;c=i;}}return c;};f.setMonth(h(e.options[g.match(/MM/)?'monthNames':'monthNamesShort']));f.setDate(h(e.options[g.match(/DD/)?'dayNames':'dayNamesShort'])+20-f.getDay());}e.elem.attr('size',F.formatDate(g,f,e.getConfig()).length);}},_preDestroy:function(a,b){if(b.trigger){b.trigger.remove();}a.empty().off('.'+b.name);if(b.inline&&$.fn.mousewheel){a.unmousewheel();}if(!b.inline&&b.options.autoSize){a.removeAttr('size');}},multipleEvents:function(b){var c=arguments;return function(a){for(var i=0;i<c.length;i++){c[i].apply(this,arguments);}};},enable:function(b){b=$(b);if(!b.hasClass(this._getMarker())){return;}var c=this._getInst(b);if(c.inline){b.children('.'+this._disableClass).remove().end().find('button,select').prop('disabled',false).end().find('a').attr('href','javascript:void(0)');}else{b.prop('disabled',false);c.trigger.filter('button.'+this._triggerClass).prop('disabled',false).end().filter('img.'+this._triggerClass).css({opacity:'1.0',cursor:''});}this._disabled=$.map(this._disabled,function(a){return(a===b[0]?null:a);});},disable:function(b){b=$(b);if(!b.hasClass(this._getMarker())){return;}var c=this._getInst(b);if(c.inline){var d=b.children(':last');var e=d.offset();var f={left:0,top:0};d.parents().each(function(){if($(this).css('position')==='relative'){f=$(this).offset();return false;}});var g=b.css('zIndex');g=(g==='auto'?0:parseInt(g,10))+1;b.prepend('<div class="'+this._disableClass+'" style="'+'width: '+d.outerWidth()+'px; height: '+d.outerHeight()+'px; left: '+(e.left-f.left)+'px; top: '+(e.top-f.top)+'px; z-index: '+g+'"></div>').find('button,select').prop('disabled',true).end().find('a').removeAttr('href');}else{b.prop('disabled',true);c.trigger.filter('button.'+this._triggerClass).prop('disabled',true).end().filter('img.'+this._triggerClass).css({opacity:'0.5',cursor:'default'});}this._disabled=$.map(this._disabled,function(a){return(a===b[0]?null:a);});this._disabled.push(b[0]);},isDisabled:function(a){return(a&&$.inArray(a,this._disabled)>-1);},show:function(a){a=$(a.target||a);var b=F._getInst(a);if(F.curInst===b){return;}if(F.curInst){F.hide(F.curInst,true);}if(!$.isEmptyObject(b)){b.lastVal=null;b.selectedDates=F._extractDates(b,a.val());b.pickingRange=false;b.drawDate=F._checkMinMax(F.newDate(b.selectedDates[0]||b.get('defaultDate')||F.today()),b);b.prevDate=F.newDate(b.drawDate);F.curInst=b;F._update(a[0],true);var c=F._checkOffset(b);b.div.css({left:c.left,top:c.top});var d=b.options.showAnim;var e=b.options.showSpeed;e=(e==='normal'&&$.ui&&parseInt($.ui.version.substring(2))>=8?'_default':e);if($.effects&&($.effects[d]||($.effects.effect&&$.effects.effect[d]))){var f=b.div.data();for(var g in f){if(g.match(/^ec\.storage\./)){f[g]=b._mainDiv.css(g.replace(/ec\.storage\./,''));}}b.div.data(f).show(d,b.options.showOptions,e);}else{b.div[d||'show'](d?e:0);}}},_extractDates:function(a,b){if(b===a.lastVal){return;}a.lastVal=b;b=b.split(a.options.multiSelect?a.options.multiSeparator:(a.options.rangeSelect?a.options.rangeSeparator:'\x00'));var c=[];for(var i=0;i<b.length;i++){try{var d=F.parseDate(a.options.dateFormat,b[i],a.getConfig());if(d){var f=false;for(var j=0;j<c.length;j++){if(c[j].getTime()===d.getTime()){f=true;break;}}if(!f){c.push(d);}}}catch(e){}}c.splice(a.options.multiSelect||(a.options.rangeSelect?2:1),c.length);if(a.options.rangeSelect&&c.length===1){c[1]=c[0];}return c;},_update:function(a,b){a=$(a.target||a);var c=F._getInst(a);if(!$.isEmptyObject(c)){if(c.inline||F.curInst===c){if($.isFunction(c.options.onChangeMonthYear)&&(!c.prevDate||c.prevDate.getFullYear()!==c.drawDate.getFullYear()||c.prevDate.getMonth()!==c.drawDate.getMonth())){c.options.onChangeMonthYear.apply(a[0],[c.drawDate.getFullYear(),c.drawDate.getMonth()+1]);}}if(c.inline){var d=$('a, :input',a).index($(':focus',a));
129a.html(this._generateContent(a[0],c));}else if(F.curInst===c){if(!c.div){c.div=$('<div></div>').addClass(this._popupClass).css({display:(b?'none':'static'),position:'absolute',left:a.offset().left,top:a.offset().top+a.outerHeight()}).appendTo($(c.options.popupContainer||'body'));if($.fn.mousewheel){c.div.mousewheel(this._doMouseWheel);}}c.div.html(this._generateContent(a[0],c));a.focus();}}},_updateInput:function(a,b){var c=this._getInst(a);if(!$.isEmptyObject(c)){var d='';var e='';var f=(c.options.multiSelect?c.options.multiSeparator:c.options.rangeSeparator);var g=c.options.altFormat||c.options.dateFormat;for(var i=0;i<c.selectedDates.length;i++){d+=(b?'':(i>0?f:'')+F.formatDate(c.options.dateFormat,c.selectedDates[i],c.getConfig()));e+=(i>0?f:'')+F.formatDate(g,c.selectedDates[i],c.getConfig());}if(!c.inline&&!b){$(a).val(d);}$(c.options.altField).val(e);if($.isFunction(c.options.onSelect)&&!b&&!c.inSelect){c.inSelect=true;c.options.onSelect.apply(a,[c.selectedDates]);c.inSelect=false;}}},_getBorders:function(b){var c=function(a){return{thin:1,medium:3,thick:5}[a]||a;};return[parseFloat(c(b.css('border-left-width'))),parseFloat(c(b.css('border-top-width')))];},_checkOffset:function(a){var b=(a.elem.is(':hidden')&&a.trigger?a.trigger:a.elem);var c=b.offset();var d=$(window).width();var e=$(window).height();if(d===0){return c;}var f=false;$(a.elem).parents().each(function(){f|=$(this).css('position')==='fixed';return!f;});var g=document.documentElement.scrollLeft||document.body.scrollLeft;var h=document.documentElement.scrollTop||document.body.scrollTop;var i=c.top-(f?h:0)-a.div.outerHeight();var j=c.top-(f?h:0)+b.outerHeight();var k=c.left-(f?g:0);var l=c.left-(f?g:0)+b.outerWidth()-a.div.outerWidth();var m=(c.left-g+a.div.outerWidth())>d;var n=(c.top-h+a.elem.outerHeight()+a.div.outerHeight())>e;a.div.css('position',f?'fixed':'absolute');var o=a.options.alignment;if(o==='topLeft'){c={left:k,top:i};}else if(o==='topRight'){c={left:l,top:i};}else if(o==='bottomLeft'){c={left:k,top:j};}else if(o==='bottomRight'){c={left:l,top:j};}else if(o==='top'){c={left:(a.options.isRTL||m?l:k),top:i};}else{c={left:(a.options.isRTL||m?l:k),top:(n?i:j)};}c.left=Math.max((f?0:g),c.left);
129c.top=Math.max((f?0:h),c.top);return c;},_checkExternalClick:function(a){if(!F.curInst){return;}var b=$(a.target);if(b.closest('.'+F._popupClass+',.'+F._triggerClass).length===0&&!b.hasClass(F._getMarker())){F.hide(F.curInst);}},hide:function(a,b){if(!a){return;}var c=this._getInst(a);if($.isEmptyObject(c)){c=a;}if(c&&c===F.curInst){var d=(b?'':c.options.showAnim);var e=c.options.showSpeed;e=(e==='normal'&&$.ui&&parseInt($.ui.version.substring(2))>=8?'_default':e);var f=function(){if(!c.div){return;}c.div.remove();c.div=null;F.curInst=null;if($.isFunction(c.options.onClose)){c.options.onClose.apply(a,[c.selectedDates]);}};c.div.stop();if($.effects&&($.effects[d]||($.effects.effect&&$.effects.effect[d]))){c.div.hide(d,c.options.showOptions,e,f);}else{var g=(d==='slideDown'?'slideUp':(d==='fadeIn'?'fadeOut':'hide'));c.div[g]((d?e:''),f);}if(!d){f();}}},_keyDown:function(a){var b=(a.data&&a.data.elem)||a.target;var c=F._getInst(b);var d=false;if(c.inline||c.div){if(a.keyCode===9){F.hide(b);}else if(a.keyCode===13){F.selectDate(b,$('a.'+c.options.renderer.highlightedClass,c.div)[0]);d=true;}else{var e=c.options.commands;for(var f in e){var g=e[f];if(g.keystroke.keyCode===a.keyCode&&!!g.keystroke.ctrlKey===!!(a.ctrlKey||a.metaKey)&&!!g.keystroke.altKey===a.altKey&&!!g.keystroke.shiftKey===a.shiftKey){F.performAction(b,f);d=true;break;}}}}else{var g=c.options.commands.current;if(g.keystroke.keyCode===a.keyCode&&!!g.keystroke.ctrlKey===!!(a.ctrlKey||a.metaKey)&&!!g.keystroke.altKey===a.altKey&&!!g.keystroke.shiftKey===a.shiftKey){F.show(b);d=true;}}c.ctrlKey=((a.keyCode<48&&a.keyCode!==32)||a.ctrlKey||a.metaKey);if(d){a.preventDefault();a.stopPropagation();}return!d;},_keyPress:function(a){var b=F._getInst((a.data&&a.data.elem)||a.target);if(!$.isEmptyObject(b)&&b.options.constrainInput){var c=String.fromCharCode(a.keyCode||a.charCode);var d=F._allowedChars(b);return(a.metaKey||b.ctrlKey||c<' '||!d||d.indexOf(c)>-1);}return true;},_allowedChars:function(a){var b=(a.options.multiSelect?a.options.multiSeparator:(a.options.rangeSelect?a.options.rangeSeparator:''));var c=false;var d=false;var e=a.options.dateFormat;for(var i=0;i<e.length;i++){var f=e.charAt(i);if(c){if(f==="'"&&e.charAt(i+1)!=="'"){c=false;}else{b+=f;}}else{switch(f){case'd':case'm':case'o':case'w':b+=(d?'':'0123456789');d=true;break;case'y':case'@':case'!':b+=(d?'':'0123456789')+'-';d=true;break;case'J':b+=(d?'':'0123456789')+'-.';d=true;break;case'D':case'M':case'Y':return null;case"'":if(e.charAt(i+1)==="'"){b+="'";}else{c=true;}break;default:b+=f;}}}return b;},_keyUp:function(a){var b=(a.data&&a.data.elem)||a.target;var c=F._getInst(b);if(!$.isEmptyObject(c)&&!c.ctrlKey&&c.lastVal!==c.elem.val()){try{var d=F._extractDates(c,c.elem.val());if(d.length>0){F.setDate(b,d,null,true);}}catch(a){}}return true;},_doMouseWheel:function(a,b){var c=(F.curInst&&F.curInst.elem[0])||$(a.target).closest('.'+F._getMarker())[0];if(F.isDisabled(c)){return;}var d=F._getInst(c);if(d.options.useMouseWheel){b=(b<0?-1:+1);F.changeMonth(c,-d.options[a.ctrlKey?'monthsToJump':'monthsToStep']*b);a.preventDefault();}},clear:function(a){var b=this._getInst(a);if(!$.isEmptyObject(b)){b.selectedDates=[];this.hide(a);var c=b.get('defaultDate');if(b.options.selectDefaultDate&&c){this.setDate(a,F.newDate(c||F.today()));}else{this._updateInput(a);}}},getDate:function(a){var b=this._getInst(a);return(!$.isEmptyObject(b)?b.selectedDates:[]);},setDate:function(a,b,c,d,e){var f=this._getInst(a);if(!$.isEmptyObject(f)){if(!$.isArray(b)){b=[b];if(c){b.push(c);}}var g=f.get('minDate');var h=f.get('maxDate');var k=f.selectedDates[0];f.selectedDates=[];for(var i=0;i<b.length;i++){var l=F.determineDate(b[i],null,k,f.options.dateFormat,f.getConfig());if(l){if((!g||l.getTime()>=g.getTime())&&(!h||l.getTime()<=h.getTime())){var m=false;for(var j=0;j<f.selectedDates.length;j++){if(f.selectedDates[j].getTime()===l.getTime()){m=true;break;}}if(!m){f.selectedDates.push(l);}}}}f.selectedDates.splice(f.options.multiSelect||(f.options.rangeSelect?2:1),f.selectedDates.length);if(f.options.rangeSelect){switch(f.selectedDates.length){case 1:f.selectedDates[1]=f.selectedDates[0];break;case 2:f.selectedDates[1]=(f.selectedDates[0].getTime()>f.selectedDates[1].getTime()?f.selectedDates[0]:f.selectedDates[1]);break;}f.pickingRange=false;}f.prevDate=(f.drawDate?F.newDate(f.drawDate):null);f.drawDate=this._checkMinMax(F.newDate(f.selectedDates[0]||f.get('defaultDate')||F.today()),f);if(!e){this._update(a);this._updateInput(a,d);}}},isSelectable:function(a,b){var c=this._getInst(a);if($.isEmptyObject(c)){return false;}b=F.determineDate(b,c.selectedDates[0]||this.today(),null,c.options.dateFormat,c.getConfig());return this._isSelectable(a,b,c.options.onDate,c.get('minDate'),c.get('maxDate'));},_isSelectable:function(a,b,c,d,e){var f=(typeof c==='boolean'?{selectable:c}:(!$.isFunction(c)?{}:c.apply(a,[b,true])));return(f.selectable!==false)&&(!d||b.getTime()>=d.getTime())&&(!e||b.getTime()<=e.getTime());},performAction:function(a,b){var c=this._getInst(a);if(!$.isEmptyObject(c)&&!this.isDisabled(a)){var d=c.options.commands;if(d[b]&&d[b].enabled.apply(a,[c])){d[b].action.apply(a,[c]);}}},showMonth:function(a,b,c,d){var e=this._getInst(a);if(!$.isEmptyObject(e)&&(d!=null||(e.drawDate.getFullYear()!==b||e.drawDate.getMonth()+1!==c))){e.prevDate=F.newDate(e.drawDate);var f=this._checkMinMax((b!=null?F.newDate(b,c,1):F.today()),e);e.drawDate=F.newDate(f.getFullYear(),f.getMonth()+1,(d!=null?d:Math.min(e.drawDate.getDate(),F.daysInMonth(f.getFullYear(),f.getMonth()+1))));this._update(a);}},changeMonth:function(a,b){var c=this._getInst(a);if(!$.isEmptyObject(c)){var d=F.add(F.newDate(c.drawDate),b,'m');this.showMonth(a,d.getFullYear(),d.getMonth()+1);}},changeDay:function(a,b){var c=this._getInst(a);if(!$.isEmptyObject(c)){var d=F.add(F.newDate(c.drawDate),b,'d');this.showMonth(a,d.getFullYear(),d.getMonth()+1,d.getDate());}},_checkMinMax:function(a,b){var c=b.get('minDate');var d=b.get('maxDate');
129a=(c&&a.getTime()<c.getTime()?F.newDate(c):a);a=(d&&a.getTime()>d.getTime()?F.newDate(d):a);return a;},retrieveDate:function(a,b){var c=this._getInst(a);return($.isEmptyObject(c)?null:this._normaliseDate(new Date(parseInt(b.className.replace(/^.*dp(-?\d+).*$/,'$1'),10))));},selectDate:function(a,b){var c=this._getInst(a);if(!$.isEmptyObject(c)&&!this.isDisabled(a)){var d=this.retrieveDate(a,b);if(c.options.multiSelect){var e=false;for(var i=0;i<c.selectedDates.length;i++){if(d.getTime()===c.selectedDates[i].getTime()){c.selectedDates.splice(i,1);e=true;break;}}if(!e&&c.selectedDates.length<c.options.multiSelect){c.selectedDates.push(d);}}else if(c.options.rangeSelect){if(c.pickingRange){c.selectedDates[1]=d;}else{c.selectedDates=[d,d];}c.pickingRange=!c.pickingRange;}else{c.selectedDates=[d];}c.prevDate=c.drawDate=F.newDate(d);this._updateInput(a);if(c.inline||c.pickingRange||c.selectedDates.length<(c.options.multiSelect||(c.options.rangeSelect?2:1))){this._update(a);}else{this.hide(a);}}},_generateContent:function(h,i){var j=i.options.monthsToShow;j=($.isArray(j)?j:[1,j]);i.drawDate=this._checkMinMax(i.drawDate||i.get('defaultDate')||F.today(),i);var k=F._applyMonthsOffset(F.newDate(i.drawDate),i);var l='';for(var m=0;m<j[0];m++){var n='';for(var o=0;o<j[1];o++){n+=this._generateMonth(h,i,k.getFullYear(),k.getMonth()+1,i.options.renderer,(m===0&&o===0));F.add(k,1,'m');}l+=this._prepare(i.options.renderer.monthRow,i).replace(/\{months\}/,n);}var p=this._prepare(i.options.renderer.picker,i).replace(/\{months\}/,l).replace(/\{weekHeader\}/g,this._generateDayHeaders(i,i.options.renderer));var q=function(a,b,c,d,e){if(p.indexOf('{'+a+':'+d+'}')===-1){return;}var f=i.options.commands[d];var g=(i.options.commandsAsDateFormat?f.date.apply(h,[i]):null);p=p.replace(new RegExp('\\{'+a+':'+d+'\\}','g'),'<'+b+(f.status?' title="'+i.options[f.status]+'"':'')+' class="'+i.options.renderer.commandClass+' '+i.options.renderer.commandClass+'-'+d+' '+e+(f.enabled(i)?'':' '+i.options.renderer.disabledClass)+'">'+(g?F.formatDate(i.options[f.text],g,i.getConfig()):i.options[f.text])+'</'+c+'>');};for(var r in i.options.commands){q('button','button type="button"','button',r,i.options.renderer.commandButtonClass);q('link','a href="javascript:void(0)"','a',r,i.options.renderer.commandLinkClass);}p=$(p);if(j[1]>1){var s=0;$(i.options.renderer.monthSelector,p).each(function(){var a=++s%j[1];$(this).addClass(a===1?'first':(a===0?'last':''));});}var t=this;function removeHighlight(){(i.inline?$(this).closest('.'+t._getMarker()):i.div).find(i.options.renderer.daySelector+' a').removeClass(i.options.renderer.highlightedClass);}p.find(i.options.renderer.daySelector+' a').hover(function(){removeHighlight.apply(this);$(this).addClass(i.options.renderer.highlightedClass);},removeHighlight).click(function(){t.selectDate(h,this);}).end().find('select.'+this._monthYearClass+':not(.'+this._anyYearClass+')').change(function(){var a=$(this).val().split('/');t.showMonth(h,parseInt(a[1],10),parseInt(a[0],10));}).end().find('select.'+this._anyYearClass).click(function(){$(this).css('visibility','hidden').next('input').css({left:this.offsetLeft,top:this.offsetTop,width:this.offsetWidth,height:this.offsetHeight}).show().focus();}).end().find('input.'+t._monthYearClass).change(function(){try{var a=parseInt($(this).val(),10);a=(isNaN(a)?i.drawDate.getFullYear():a);t.showMonth(h,a,i.drawDate.getMonth()+1,i.drawDate.getDate());}catch(e){alert(e);}}).keydown(function(a){if(a.keyCode===13){$(a.elem).change();}else if(a.keyCode===27){$(a.elem).hide().prev('select').css('visibility','visible');i.elem.focus();}});var u={elem:i.elem[0]};p.keydown(u,this._keyDown).keypress(u,this._keyPress).keyup(u,this._keyUp);p.find('.'+i.options.renderer.commandClass).click(function(){if(!$(this).hasClass(i.options.renderer.disabledClass)){var a=this.className.replace(new RegExp('^.*'+i.options.renderer.commandClass+'-([^ ]+).*$'),'$1');F.performAction(h,a);}});if(i.options.isRTL){p.addClass(i.options.renderer.rtlClass);}if(j[0]*j[1]>1){p.addClass(i.options.renderer.multiClass);}if(i.options.pickerClass){p.addClass(i.options.pickerClass);}$('body').append(p);var v=0;p.find(i.options.renderer.monthSelector).each(function(){v+=$(this).outerWidth();});p.width(v/j[0]);if($.isFunction(i.options.onShow)){i.options.onShow.apply(h,[p,i]);}return p;},_generateMonth:function(a,b,c,d,e,f){var g=F.daysInMonth(c,d);var h=b.options.monthsToShow;h=($.isArray(h)?h:[1,h]);var j=b.options.fixedWeeks||(h[0]*h[1]>1);var k=b.options.firstDay;var l=(F.newDate(c,d,1).getDay()-k+7)%7;var m=(j?6:Math.ceil((l+g)/7));var n=b.options.selectOtherMonths&&b.options.showOtherMonths;var o=(b.pickingRange?b.selectedDates[0]:b.get('minDate'));var p=b.get('maxDate');var q=e.week.indexOf('{weekOfYear}')>-1;var r=F.today();var s=F.newDate(c,d,1);F.add(s,-l-(j&&(s.getDay()===k)?7:0),'d');var t=s.getTime();var u='';for(var v=0;v<m;v++){var w=(!q?'':'<span class="dp'+t+'">'+($.isFunction(b.options.calculateWeek)?b.options.calculateWeek(s):0)+'</span>');var x='';for(var y=0;y<7;y++){var z=false;if(b.options.rangeSelect&&b.selectedDates.length>0){z=(s.getTime()>=b.selectedDates[0]&&s.getTime()<=b.selectedDates[1]);}else{for(var i=0;i<b.selectedDates.length;i++){if(b.selectedDates[i].getTime()===s.getTime()){z=true;break;}}}var A=(!$.isFunction(b.options.onDate)?{}
129:b.options.onDate.apply(a,[s,s.getMonth()+1===d]));var B=(n||s.getMonth()+1===d)&&this._isSelectable(a,s,A.selectable,o,p);x+=this._prepare(e.day,b).replace(/\{day\}/g,(B?'<a href="javascript:void(0)"':'<span')+' class="dp'+t+' '+(A.dateClass||'')+(z&&(n||s.getMonth()+1===d)?' '+e.selectedClass:'')+(B?' '+e.defaultClass:'')+((s.getDay()||7)<6?'':' '+e.weekendClass)+(s.getMonth()+1===d?'':' '+e.otherMonthClass)+(s.getTime()===r.getTime()&&(s.getMonth()+1)===d?' '+e.todayClass:'')+(s.getTime()===b.drawDate.getTime()&&(s.getMonth()+1)===d?' '+e.highlightedClass:'')+'"'+(A.title||(b.options.dayStatus&&B)?' title="'+(A.title||F.formatDate(b.options.dayStatus,s,b.getConfig()))+'"':'')+'>'+(b.options.showOtherMonths||(s.getMonth()+1)===d?A.content||s.getDate():'&#160;')+(B?'</a>':'</span>'));F.add(s,1,'d');t=s.getTime();}u+=this._prepare(e.week,b).replace(/\{days\}/g,x).replace(/\{weekOfYear\}/g,w);}var C=this._prepare(e.month,b).match(/\{monthHeader(:[^\}]+)?\}/);C=(C[0].length<=13?'MM yyyy':C[0].substring(13,C[0].length-1));C=(f?this._generateMonthSelection(b,c,d,o,p,C,e):F.formatDate(C,F.newDate(c,d,1),b.getConfig()));var D=this._prepare(e.weekHeader,b).replace(/\{days\}/g,this._generateDayHeaders(b,e));return this._prepare(e.month,b).replace(/\{monthHeader(:[^\}]+)?\}/g,C).replace(/\{weekHeader\}/g,D).replace(/\{weeks\}/g,u);},_generateDayHeaders:function(a,b){var c='';for(var d=0;d<7;d++){var e=(d+a.options.firstDay)%7;c+=this._prepare(b.dayHeader,a).replace(/\{day\}/g,'<span class="'+this._curDoWClass+e+'" title="'+a.options.dayNames[e]+'">'+a.options.dayNamesMin[e]+'</span>');}return c;},_generateMonthSelection:function(b,c,d,e,f,g){if(!b.options.changeMonth){return F.formatDate(g,F.newDate(c,d,1),b.getConfig());}var h=b.options['monthNames'+(g.match(/mm/i)?'':'Short')];var i=g.replace(/m+/i,'\\x2E').replace(/y+/i,'\\x2F');var j='<select class="'+this._monthYearClass+'" title="'+b.options.monthStatus+'">';
129for(var m=1;m<=12;m++){if((!e||F.newDate(c,m,F.daysInMonth(c,m)).getTime()>=e.getTime())&&(!f||F.newDate(c,m,1).getTime()<=f.getTime())){j+='<option value="'+m+'/'+c+'"'+(d===m?' selected="selected"':'')+'>'+h[m-1]+'</option>';}}j+='</select>';i=i.replace(/\\x2E/,j);var k=b.options.yearRange;if(k==='any'){j='<select class="'+this._monthYearClass+' '+this._anyYearClass+'" title="'+b.options.yearStatus+'">'+'<option>'+c+'</option></select>'+'<input class="'+this._monthYearClass+' '+this._curMonthClass+d+'" value="'+c+'">';}else{k=k.split(':');var l=F.today().getFullYear();var n=(k[0].match('c[+-].*')?c+parseInt(k[0].substring(1),10):((k[0].match('[+-].*')?l:0)+parseInt(k[0],10)));var o=(k[1].match('c[+-].*')?c+parseInt(k[1].substring(1),10):((k[1].match('[+-].*')?l:0)+parseInt(k[1],10)));j='<select class="'+this._monthYearClass+'" title="'+b.options.yearStatus+'">';n=F.add(F.newDate(n+1,1,1),-1,'d');o=F.newDate(o,1,1);var p=function(y,a){if(y!==0){j+='<option value="'+d+'/'+y+'"'+(c===y?' selected="selected"':'')+'>'+(a||y)+'</option>';}};if(n.getTime()<o.getTime()){n=(e&&e.getTime()>n.getTime()?e:n).getFullYear();o=(f&&f.getTime()<o.getTime()?f:o).getFullYear();var q=Math.floor((o-n)/2);if(!e||e.getFullYear()<n){p(n-q,b.options.earlierText);}for(var y=n;y<=o;y++){p(y);}if(!f||f.getFullYear()>o){p(o+q,b.options.laterText);}}else{n=(f&&f.getTime()<n.getTime()?f:n).getFullYear();o=(e&&e.getTime()>o.getTime()?e:o).getFullYear();var q=Math.floor((n-o)/2);if(!f||f.getFullYear()>n){p(n+q,b.options.earlierText);}for(var y=n;y>=o;y--){p(y);}if(!e||e.getFullYear()<o){p(o-q,b.options.laterText);}}j+='</select>';}i=i.replace(/\\x2F/,j);return i;},_prepare:function(e,f){var g=function(a,b){while(true){var c=e.indexOf('{'+a+':start}');if(c===-1){return;}var d=e.substring(c).indexOf('{'+a+':end}');if(d>-1){e=e.substring(0,c)+(b?e.substr(c+a.length+8,d-a.length-8):'')+e.substring(c+d+a.length+6);}}};g('inline',f.inline);g('popup',!f.inline);var h=/\{l10n:([^\}]+)\}/;var i=null;while(i=h.exec(e)){e=e.replace(i[0],f.options[i[1]]);}return e;}});var F=$.datepick;$(function(){$(document).on('mousedown.'+E,F._checkExternalClick).on('resize.'+E,function(){F.hide(F.curInst)})})})(jQuery);;
130'use strict';
131
132var hb_datepicker_calendar_options = {
133	changeMonth: false,
134	prevText: '&lsaquo;',
135	nextText: '&rsaquo;',
136	prevStatus: '',
137	nextStatus: '',
138	dayStatus: '',
139	dateFormat: hb_date_format,
140	dayNamesMin: hb_day_names_min,
141	monthNames: hb_months_name,
142	firstDay: parseInt( hb_first_day, 10 ),
143	defaultStatus: '',
144	showAnim: 'fadeIn',
145	useMouseWheel: false,
146	renderer: {
147		picker: '' +
148		'<div class="hb-datepick-wrapper">' +
149			'<div class="hb-dp-cmd-wrapper">{link:prev}{link:next}</div>' +
150			'{months}' +
151		'</div>',
152		monthRow: '<div class="hb-dp-month-row hb-dp-clearfix">{months}</div>',
153		month: '' +
154		'<div class="hb-dp-month">' +
155			'<div class="hb-dp-month-header">{monthHeader}</div>' +
156			'<div class="hb-dp-week-header hb-dp-clearfix">{weekHeader}</div>' +
157			'<div class="hb-dp-weeks">{weeks}</div>' +
158		'</div>',
159		weekHeader: '{days}',
160		dayHeader: '<div>{day}</div>',
161		week: '<div class="hb-dp-week hb-dp-clearfix">{days}</div>',
162		day: '<div class="hb-dp-day">{day}</div>',
163		monthSelector: '.hb-dp-month',
164		daySelector: '.hb-dp-day',
165		rtlClass: 'hb-dp-rtl',
166		multiClass: 'hb-dp-multi',
167		defaultClass: '',
168		selectedClass: 'hb-dp-selected',
169		highlightedClass: 'hb-dp-highlight',
170		todayClass: 'hb-dp-today',
171		otherMonthClass: 'datepick-other-month',
172		weekendClass: 'hb-dp-weekend',
173		commandClass: 'hb-dp-cmd',
174		commandButtonClass: '',
175		commandLinkClass: '',
176		disabledClass: 'hb-dp-disabled'
177	}
178}
179
180if ( hb_is_rtl == 'true' ) {
181	hb_datepicker_calendar_options['isRTL'] = true;
182} else {
183	hb_datepicker_calendar_options['isRTL'] = false;
184}
185
186jQuery(document).ready(function($) {
187
188	if ( ! $( '.hb-check-in-date' ).length ) {
189		return;
190	}
191
192	$( 'body' ).append( '' +
193		'<div class="hb-datepick-popup-wrapper">' +
194			'<div class="hb-datepick-legend">' +
195				'<div class="hb-datepick-selecting-legend">&nbsp;</div>' +
196				'<div class="hb-datepick-custom-legend"></div>' +
197				'<a class="hb-dp-cmd-close" href="#">&times;</a>' +
198			'</div>' +
199			'<div class="hb-datepick-popup hb-datepick-check-in-out"></div>' +
200		'</div>'
201	);
202
203	var hb_check_in_out_datepicker_calendar_options = JSON.parse( JSON.stringify( hb_datepicker_calendar_options ) );
204	hb_check_in_out_datepicker_calendar_options.renderer.picker = '<div class="hb-dp-cmd-wrapper">{link:prev}{link:next}</div>{months}';
205
206	$( '.hb-datepick-popup' ).datepick( hb_check_in_out_datepicker_calendar_options );
207	$( '.hb-datepick-popup' ).datepick( 'option', 'monthsToShow', 2 );
208
209	var is_hb_dp_mobile = false,
210		double_datepick_width,
211		booking_rules,
212		current_date_shown = new Date();
213
214	if ( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( navigator.userAgent ) ) {
215		is_hb_dp_mobile = true;
216		$( '.hb-datepick-check-in-mobile-trigger, .hb-datepick-check-out-mobile-trigger, .hb-dp-cmd-close' ).css( 'display', 'block' );
217		$( '.hb-input-datepicker' ).prop( 'readonly', true );
218	}
219
220	$( '.hb-datepick-popup-wrapper' ).show();
221	double_datepick_width = $( '.hb-datepick-popup-wrapper' ).width();
222	$( '.hb-datepick-popup-wrapper' ).hide();
223
224	$( '.hb-datepick-check-in-out' ).on( 'click', function( e ) {
225		if ( $( e.target ).is( '.hb-dp-cmd-prev' ) && ! $( e.target ).is( '.hb-dp-disabled' ) ) {
226			let nb_days_prev_month = new Date( current_date_shown.getFullYear(), current_date_shown.getMonth(), 0 ).getDate();
227			if ( current_date_shown.getDate() > nb_days_prev_month ) {
228				current_date_shown.setDate( nb_days_prev_month );
229			}
230			current_date_shown.setMonth( current_date_shown.getMonth() - 1 );
231		} else if ( $( e.target ).is( '.hb-dp-cmd-next' ) && ! $( e.target ).is( '.hb-dp-disabled' ) ) {
232			let nb_days_next_month = new Date( current_date_shown.getFullYear(), current_date_shown.getMonth() + 2, 0 ).getDate();
233			if ( current_date_shown.getDate() > nb_days_next_month ) {
234				current_date_shown.setDate( nb_days_next_month );
235			}
236			current_date_shown.setMonth( current_date_shown.getMonth() + 1 );
237		}
238	});
239
240	function show_current_month() {
241		var input_date,
242			$input,
243			months_shown;
244		if ( $( '.hb-check-in-date' ).is( ':focus' ) ) {
245			$input = $( '.hb-check-in-date:focus' );
246		} else if ( $( '.hb-check-out-date' ).is( ':focus' ) ) {
247			$input = $( '.hb-check-out-date:focus' );
248		}
249		try {
250			input_date = $.datepick.parseDate( hb_date_format, $input.val() );
251		} catch( e ) {
252			input_date = false;
253		}
254		if ( input_date ) {
255			var first_month_shown = current_date_shown.getMonth() + 1;
256			if ( double_datepick_width > $( window ).width() ) {
257				months_shown = [ first_month_shown ];
258			} else {
259				months_shown = [ first_month_shown, first_month_shown + 1 ];
260			}
261			if ( months_shown.indexOf( input_date.getMonth() + 1 ) == -1 ) {
262				current_date_shown.setMonth( input_date.getMonth() );
263			}
264		}
265
266		var y = current_date_shown.getFullYear(),
267			m = current_date_shown.getMonth() + 1,
268			d = current_date_shown.getDate();
269		$( '.hb-datepick-popup' ).datepick( 'showMonth', y, m, d );
270		setTimeout( function () {
271			$( '.hb-datepick-popup' ).datepick( 'showMonth', y, m, d );
272		}, 10 );
273	}
274
275	$( window ).resize( debouncer ( function () {
276		if ( $( '.hb-datepick-active-inputs' ).length ) {
277			resize_datepick();
278			reposition_datepick( $( '.hb-datepick-active-inputs' ) );
279		}
280	}));
281
282	function debouncer( func ) {
283		var timeoutID,
284			timeout = 50;
285		return function () {
286			var scope = this,
287				args = arguments;
288			clearTimeout( timeoutID );
289			timeoutID = setTimeout( function () {
290				func.apply( scope, Array.prototype.slice.call( args ) );
291			}, timeout );
292		}
293	}
294
295	function resize_datepick() {
296		if ( double_datepick_width > $( window ).width() ) {
297			$( '.hb-datepick-popup' ).datepick( 'option', 'monthsToShow', 1 );
298		} else {
299			$( '.hb-datepick-popup' ).datepick( 'option', 'monthsToShow', 2 );
300		}
301	}
302
303	function reposition_datepick( $inputs_wrapper ) {
304		var $check_in = $inputs_wrapper.find( '.hb-check-in-date' ),
305			$check_out = $inputs_wrapper.find( '.hb-check-out-date' ),
306			scroll_y = $( window ).scrollTop(),
307			scroll_x = $( window ).scrollLeft(),
308			input_left = $check_in.offset().left,
309			input_right = $check_out.offset().left + $check_out.outerWidth( true ),
310			input_top,
311			input_bottom;
312
313		if ( selecting_check_in ) {
314			input_top = $check_in.offset().top;
315			input_bottom = input_top + $check_in.outerHeight( true );
316		} else {
317			input_top = $check_out.offset().top;
318			input_bottom = input_top + $check_out.outerHeight( true );
319		}
320
321		var available_space_above = input_top - scroll_y,
322			available_space_below = $( window ).height() - input_bottom + scroll_y,
323			available_space_if_align_left = $( window ).width() - input_left + scroll_x,
324			available_space_if_align_right = input_right - scroll_x,
325			datepick_width = $( '.hb-datepick-popup-wrapper' ).outerWidth( true ),
326			datepick_height = $( '.hb-datepick-popup-wrapper' ).outerHeight( true );
327
328		if ( available_space_below > datepick_height ) {
329			$( '.hb-datepick-popup-wrapper' ).css( 'top', input_bottom );
330		} else if ( available_space_above > datepick_height ) {
331			$( '.hb-datepick-popup-wrapper' ).css( 'top', input_top - datepick_height );
332		} else {
333			$( '.hb-datepick-popup-wrapper' ).css( 'top', scroll_y );
334		}
335		if ( available_space_if_align_left > datepick_width ) {
336			$( '.hb-datepick-popup-wrapper' ).css( 'left', input_left );
337		} else if ( available_space_if_align_right > datepick_width ) {
338			$( '.hb-datepick-popup-wrapper' ).css( 'left', input_right - datepick_width );
339		} else {
340			$( '.hb-datepick-popup-wrapper' ).css( 'left', ( $( window ).width() - datepick_width ) / 2 + scroll_x );
341		}
342	}
343
344	var selecting_check_in = true,
345		hb_dp_max_check_out = false,
346		current_form_status_days,
347		current_check_in_date,
348		current_check_out_date;
349
350	$( '.hb-datepick-check-in-mobile-trigger' ).on( 'click', function() {
351		activate_check_in_choice( $( this ).parents( '.hb-search-fields' ) );
352	});
353
354	$( '.hb-datepick-check-out-mobile-trigger' ).on( 'click', function() {
355		activate_check_out_choice( $( this ).parents( '.hb-search-fields' ) );
356	});
357
358	$( '.hb-datepick-check-in-trigger' ).on( 'click', function() {
359		if ( ! $( '.hb-datepick-active-inputs' ).length ) {
360			activate_check_in_choice( $( this ).parents( '.hb-search-fields' ) );
361		} else {
362			close_datepick_popup();
363		}
364	});
365
366	$( '.hb-datepick-check-out-trigger' ).on( 'click', function() {
367		if ( ! $( '.hb-datepick-active-inputs' ).length ) {
368			activate_check_out_choice( $( this ).parents( '.hb-search-fields' ) );
369		} else {
370			close_datepick_popup();
371		}
372	});
373
374	$( '.hb-datepick-check-out-mobile-trigger' ).on( 'click', function() {
375		activate_check_out_choice( $( this ).parents( '.hb-search-fields' ) );
376	});
377
378	$( '.hb-check-in-date' ).on( 'focus', function() {
379		activate_check_in_choice( $( this ).parents( '.hb-search-fields' ) );
380	});
381
382	$( '.hb-check-out-date' ).on( 'focus', function() {
383		activate_check_out_choice( $( this ).parents( '.hb-search-fields' ) );
384	});
385
386	function activate_check_in_choice( $inputs_wrapper ) {
387		selecting_check_in = true;
388		if ( hb_text.legend_select_check_in != '' ) {
389			$( '.hb-datepick-legend' ).show();
390			$( '.hb-datepick-selecting-legend' ).html( hb_text.legend_select_check_in );
391		} else {
392			$( '.hb-datepick-legend' ).hide();
393		}
394		activate_check_in_out_choice( $inputs_wrapper );
395	}
396
397	function activate_check_out_choice( $inputs_wrapper ) {
398		selecting_check_in = false;
399		if ( hb_text.legend_select_check_out != '' ) {
400			$( '.hb-datepick-legend' ).show();
401			$( '.hb-datepick-selecting-legend' ).html( hb_text.legend_select_check_out );
402		} else {
403			$( '.hb-datepick-legend' ).hide();
404		}
405		activate_check_in_out_choice( $inputs_wrapper );
406	}
407
408	function activate_check_in_out_choice( $inputs_wrapper ) {
409		show_current_month();
410		var current_accom_id = 'all';
411		var $hbook_wrapper = $inputs_wrapper.parents( '.hbook-wrapper' );
412		if ( $hbook_wrapper.data( 'page-accom-id' ) ) {
413			current_accom_id = $hbook_wrapper.data( 'page-accom-id' );
414		}
415		current_form_status_days = window[ 'hb_status_days_' + current_accom_id ];
416		if ( ! $inputs_wrapper.hasClass( 'hb-datepick-active-inputs' ) ) {
417			open_datepick_popup( $inputs_wrapper );
418		}
419		reposition_datepick( $inputs_wrapper );
420	}
421
422	$( '.hb-dp-cmd-close' ).on( 'click', function() {
423		close_datepick_popup();
424		return false;
425	});
426
427	$( 'html' ).on( 'click', function( e ) {
428		if ( new Date().getTime() - opening_time < 1000 ) {
429			return;
430		}
431		if ( new Date().getTime() - selecting_time < 100 ) {
432			return;
433		}
434		if (
435			$( '.hb-datepick-active-inputs' ).length &&
436			! $( e.target ).closest( '.hb-datepick-popup' ).length &&
437			! $( e.target ).is( '.hb-datepick-popup-wrapper' ) &&
438			! $( e.target ).is( '.hb-datepick-legend' ) &&
439			! $( e.target ).is( '.hb-dp-cmd' ) &&
440			! $( e.target ).is( '.hb-dp-day-link' ) &&
441			! $( e.target ).is( '.hb-check-in-date' ) &&
442			! $( e.target ).is( '.hb-check-out-date' ) &&
443			! $( e.target ).is( '.hb-day-taken-content' ) &&
444			! $( e.target ).is( '.hb-datepick-check-in-mobile-trigger' ) &&
445			! $( e.target ).is( '.hb-datepick-check-out-mobile-trigger' ) &&
446			! $( e.target ).is( '.hb-datepick-check-in-trigger' ) &&
447			! $( e.target ).is( '.hb-datepick-check-out-trigger' )
448		) {
449			close_datepick_popup();
450		}
451	});
452
453	var opening_time = 0;
454	var selecting_time = 0;
455
456	function open_datepick_popup( $inputs_wrapper ) {
457		opening_time = new Date().getTime();
458		$inputs_wrapper.addClass( 'hb-datepick-active-inputs' );
459		var $check_in = $inputs_wrapper.find( '.hb-check-in-date' );
460		var $check_out = $inputs_wrapper.find( '.hb-check-out-date' );
461		booking_rules = $inputs_wrapper.parents( '.hbook-wrapper' ).data( 'booking-rules' );
462		set_datepick_options( $inputs_wrapper );
463
464		var check_in_date,
465			check_out_date;
466		try {
467			check_in_date = $.datepick.parseDate( hb_date_format, $check_in.val() );
468		} catch( e ) {
469			check_in_date = false;
470		}
471		try {
472			check_out_date = $.datepick.parseDate( hb_date_format, $check_out.val() );
473		} catch( e ) {
474			check_out_date = false;
475		}
476		if ( check_in_date ) {
477			current_check_in_date = new Date( check_in_date.getTime() );
478			current_check_in_date.setHours( 0, 0, 0, 0 );
479		} else {
480			current_check_in_date = null;
481		}
482		if ( check_out_date ) {
483			current_check_out_date = new Date( check_out_date.getTime() );
484			current_check_out_date.setHours( 0, 0, 0, 0 );
485		} else {
486			current_check_out_date = null;
487		}
488		if ( selecting_check_in && check_in_date ) {
489			current_date_shown = new Date( check_in_date.getTime() );
490		} else if ( ! selecting_check_in && check_out_date ) {
491			current_date_shown = new Date( check_out_date.getTime() );
492		}
493		show_current_month();
494		$( '.hb-datepick-popup-wrapper' ).show().css( 'opacity', 0 );
495		resize_datepick();
496		reposition_datepick( $inputs_wrapper );
497		$( '.hb-datepick-popup-wrapper' ).animate({ opacity: 1 });
498	}
499
500	function close_datepick_popup() {
501		$( '.hb-datepick-popup-wrapper' ).fadeOut();
502		$( '.hb-datepick-active-inputs' ).removeClass( 'hb-datepick-active-inputs' );
503	}
504
505	function set_datepick_options( $inputs_wrapper ) {
506		var hb_dp_today = new Date(),
507			hb_dp_min_date = false,
508			hb_dp_max_date = false,
509			hb_dp_allowed_check_in_days = false,
510			hb_dp_allowed_check_out_days = false,
511			hb_dp_seasonal_allowed_check_in_days = booking_rules.seasonal_allowed_check_in_days,
512			hb_dp_seasonal_allowed_check_out_days = booking_rules.seasonal_allowed_check_out_days,
513			current_accom_booking_window;
514
515		hb_dp_today.setHours( 0, 0, 0, 0 );
516
517		var current_accom_id = 0;
518		var $hbook_wrapper = $inputs_wrapper.parents( '.hbook-wrapper' );
519		if ( $hbook_wrapper.data( 'page-accom-id' ) ) {
520			current_accom_id = $hbook_wrapper.data( 'page-accom-id' );
521		}
522		current_accom_booking_window = window[ 'hb_accom_data_' + current_accom_id ];
523
524		if ( hb_booking_form_data.is_admin != 'yes') {
525			if ( current_accom_booking_window != '0' ) {
526				if ( current_accom_booking_window['min_date'] > hb_date_obj_2_str( hb_dp_today ) ) {
527					hb_dp_min_date = hb_date_str_2_obj( current_accom_booking_window['min_date'] );
528					current_date_shown = hb_date_str_2_obj( current_accom_booking_window['min_date'] );
529				}
530				hb_dp_max_date = hb_date_str_2_obj( current_accom_booking_window['max_date'] );
531			}
532		}
533
534		if ( booking_rules.allowed_check_in_days != 'all' ) {
535			hb_dp_allowed_check_in_days = booking_rules.allowed_check_in_days.split( ',' );
536		}
537		if ( booking_rules.allowed_check_out_days != 'all' ) {
538			hb_dp_allowed_check_out_days = booking_rules.allowed_check_out_days.split( ',' );
539		}
540
541		$( '.hb-datepick-check-in-out' ).datepick( 'option', {
542			minDate: hb_dp_min_date,
543			maxDate: hb_dp_max_date,
544
545			onDate: function ( date_noon, date_is_in_current_month ) {
546				var date = new Date( date_noon.getTime() );
547				date.setHours( 0, 0, 0, 0 );
548
549				var day = date.getDate(),
550					hb_dp_season = hb_get_season_id( date ),
551					nb_day,
552					str_date = hb_date_obj_2_str( date ),
553					hb_dp_min_check_out,
554					hb_dp_min_stay_date,
555					hb_dp_max_stay_date,
556					hb_dp_current_min_stay,
557					hb_dp_current_max_stay,
558					on_date_returned = {};
559
560				nb_day = date.getDay();
561				if ( nb_day == 0 ) {
562					nb_day = 6;
563				} else {
564					nb_day = nb_day - 1;
565				}
566				nb_day += '';
567
568				if ( current_check_in_date ) {
569					var chosen_season = hb_get_season_id( current_check_in_date );
570					hb_dp_min_check_out = new Date( current_check_in_date.getTime() );
571					hb_dp_min_check_out.setDate( hb_dp_min_check_out.getDate() + 1 );
572					hb_dp_min_stay_date = new Date( current_check_in_date.getTime() );
573					hb_dp_min_stay_date.setDate( hb_dp_min_stay_date.getDate() + parseInt( booking_rules.minimum_stay ) );
574					hb_dp_current_min_stay = booking_rules.minimum_stay;
575					if ( booking_rules.seasonal_minimum_stay[ chosen_season ] ) {
576						hb_dp_min_stay_date = new Date( current_check_in_date.getTime() );
577						hb_dp_min_stay_date.setDate( hb_dp_min_stay_date.getDate() + parseInt( booking_rules.seasonal_minimum_stay[ chosen_season ] ) );
578						hb_dp_current_min_stay = booking_rules.seasonal_minimum_stay[ chosen_season ];
579					}
580					hb_dp_max_stay_date = new Date( current_check_in_date.getTime() );
581					hb_dp_max_stay_date.setDate( hb_dp_max_stay_date.getDate() + parseInt( booking_rules.maximum_stay ) );
582					hb_dp_current_max_stay = booking_rules.maximum_stay;
583					if ( booking_rules.seasonal_maximum_stay[ chosen_season ] ) {
584						hb_dp_max_stay_date = new Date( current_check_in_date.getTime() );
585						hb_dp_max_stay_date.setDate( hb_dp_max_stay_date.getDate() + parseInt( booking_rules.seasonal_maximum_stay[ chosen_season ] ) );
586						hb_dp_current_max_stay = booking_rules.seasonal_maximum_stay[ chosen_season ];
587					}
588				}
589
590				on_date_returned['selectable'] = true;
591				on_date_returned['dateClass'] = 'hb-dp-day-link hb-dp-date-' + str_date;
592				on_date_returned['title'] = hb_text.legend_available;
593
594				if ( date_is_in_current_month && current_form_status_days[ str_date ] ) {
595
596					if (
597						( current_form_status_days[ str_date ].indexOf( 'hb-day-fully-taken' ) != -1 ) ||
598						( current_form_status_days[ str_date ].indexOf( 'hb-day-taken-end' ) != -1 && ! selecting_check_in )
599					) {
600						on_date_returned['selectable'] = false;
601						on_date_returned['dateClass'] += ' hb-dp-day-not-selectable hb-dp-day-not-selectable-taken';
602					}
603					if (
604						( current_form_status_days[ str_date ].indexOf( 'hb-day-no-check-in-min-stay' ) != -1 && selecting_check_in ) ||
605						( current_form_status_days[ str_date ].indexOf( 'hb-day-taken-start' ) != -1 && selecting_check_in )
606					)
607					{
608						on_date_returned['selectable'] = false;
609						on_date_returned['dateClass'] += ' hb-dp-day-no-check-in';
610					}
611					if (
612						( current_form_status_days[ str_date ].indexOf( 'hb-day-taken-start' ) != -1 && selecting_check_in ) ||
613						( current_form_status_days[ str_date ].indexOf( 'hb-day-no-check-in-min-stay' ) != -1  && selecting_check_in )
614					) {
615						on_date_returned['title'] = hb_text.legend_check_out_only;
616					} else if ( current_form_status_days[ str_date ].indexOf( 'hb-day-fully-taken' ) != -1 ) {
617						on_date_returned['title'] = hb_text.legend_occupied;
618					} else if ( current_form_status_days[ str_date ].indexOf( 'hb-day-taken-end' ) != -1 && ! selecting_check_in ) {
619						on_date_returned['title'] = hb_text.legend_check_in_only;
620					}
621
622					on_date_returned['dateClass'] += ' ' + current_form_status_days[ str_date ];
623					on_date_returned['content'] = ' ' + '<span class="hb-day-taken-content">' + day + '</span>';
624
625					if (
626						! hb_dp_max_check_out &&
627						current_check_in_date &&
628						date > current_check_in_date &&
629						( current_form_status_days[ str_date ].indexOf( 'hb-day-fully-taken' ) != -1 ||
630						current_form_status_days[ str_date ].indexOf( 'hb-day-taken-end' ) != -1 )
631					) {
632						hb_dp_max_check_out = new Date( date.getTime() );
633					}
634				}
635
636				if ( ! date_is_in_current_month ) {
637					on_date_returned['dateClass'] += ' hb-dp-day-not-current-month';
638					on_date_returned['title'] = '';
639				} else if ( date < hb_dp_today ) {
640					on_date_returned['title'] = hb_text.legend_past;
641					if ( hb_booking_form_data.is_admin != 'yes') {
642						on_date_returned['selectable'] = false;
643					}
644					on_date_returned['dateClass'] += ' hb-dp-day-past';
645				} else if ( hb_dp_min_date && date < hb_dp_min_date ) {
646					on_date_returned['title'] = hb_text.legend_closed;
647					on_date_returned['selectable'] = false;
648					on_date_returned['dateClass'] += ' hb-dp-day-closed';
649				} else if ( current_check_in_date && date.getTime() == current_check_in_date.getTime() ) {
650					on_date_returned['title'] = hb_text.legend_check_in;
651					if ( selecting_check_in ) {
652						on_date_returned['selectable'] = true;
653					} else {
654						on_date_returned['selectable'] = false;
655					}
656					on_date_returned['dateClass'] += ' hb-dp-day-check-in';
657				} else if ( current_check_out_date && date.getTime() == current_check_out_date.getTime() ) {
658					on_date_returned['title'] = hb_text.legend_check_out;
659					if ( selecting_check_in ) {
660						on_date_returned['selectable'] = true;
661					} else {
662						on_date_returned['selectable'] = false;
663					}
664					on_date_returned['dateClass'] += ' hb-dp-day-check-out';
665				} else if ( selecting_check_in && hb_dp_allowed_check_in_days && hb_dp_allowed_check_in_days.indexOf( nb_day ) == -1 ) {
666					on_date_returned['title'] = hb_text.legend_no_check_in;
667					on_date_returned['selectable'] = false;
668					on_date_returned['dateClass'] += ' hb-dp-day-not-selectable hb-dp-day-not-selectable-check-in-day-not-allowed';
669				} else if (
670					selecting_check_in &&
671					( undefined !== hb_dp_seasonal_allowed_check_in_days[ hb_dp_season ] ) &&
672					hb_dp_seasonal_allowed_check_in_days[ hb_dp_season ].split( ',' ).indexOf( nb_day ) == -1
673				) {
674					on_date_returned['title'] = hb_text.legend_no_check_in;
675					on_date_returned['selectable'] = false;
676					on_date_returned['dateClass'] += ' hb-dp-day-not-selectable hb-dp-day-not-selectable-check-in-day-not-allowed';
677				} else if (
678					! selecting_check_in &&
679					( undefined !== hb_dp_seasonal_allowed_check_out_days[ hb_dp_season ] ) &&
680 					hb_dp_seasonal_allowed_check_out_days[ hb_dp_season ].split( ',' ).indexOf( nb_day ) == -1
681				) {
682					on_date_returned['title'] = hb_text.legend_no_check_out;
683					on_date_returned['selectable'] = false;
684					on_date_returned['dateClass'] += ' hb-dp-day-not-selectable hb-dp-day-not-selectable-check-out-day-not-allowed';
685				} else if ( ! selecting_check_in && hb_dp_allowed_check_out_days && hb_dp_allowed_check_out_days.indexOf( nb_day ) == -1 ) {
686					on_date_returned['title'] = hb_text.legend_no_check_out;
687					on_date_returned['selectable'] = false;
688					on_date_returned['dateClass'] += ' hb-dp-day-not-selectable hb-dp-day-not-selectable-check-out-day-not-allowed';
689				} else if ( ! selecting_check_in && current_check_in_date && date < hb_dp_min_check_out) {
690					on_date_returned['title'] = hb_text.legend_before_check_in;
691					on_date_returned['selectable'] = false;
692					on_date_returned['dateClass'] += ' hb-dp-day-not-selectable hb-dp-day-not-selectable-min-check-out';
693				} else if ( hb_dp_max_date && date > hb_dp_max_date ) {
694					on_date_returned['title'] = hb_text.legend_closed;
695					on_date_returned['selectable'] = false;
696					on_date_returned['dateClass'] += ' hb-dp-day-closed';
697				} else if ( ! selecting_check_in && hb_dp_max_check_out && date >= hb_dp_max_check_out ) {
698					on_date_returned['title'] = hb_text.legend_no_check_out;
699					on_date_returned['selectable'] = false;
700					on_date_returned['dateClass'] += ' hb-dp-day-not-selectable hb-dp-day-not-selectable-max-check-out';
701				} else if ( ! selecting_check_in && current_check_in_date && date < hb_dp_min_stay_date ) {
702					on_date_returned['title'] = hb_text.legend_no_check_out_min_stay.replace( '%nb_nights', hb_dp_current_min_stay );
703					on_date_returned['selectable'] = false;
704					on_date_returned['dateClass'] += ' hb-dp-day-not-selectable hb-dp-day-not-selectable-min-stay';
705				} else if ( ! selecting_check_in && current_check_in_date && date > hb_dp_max_stay_date ) {
706					on_date_returned['title'] = hb_text.legend_no_check_out_max_stay.replace( '%nb_nights', hb_dp_current_max_stay );
707					on_date_returned['selectable'] = false;
708					on_date_returned['dateClass'] += ' hb-dp-day-not-selectable hb-dp-day-not-selectable-max-stay';
709				} else {
710					on_date_returned['dateClass'] += ' hb-day-available';
711				}
712
713				return on_date_returned;
714
715			},
716
717			onSelect: function( dates ) {
718				var $check_in = $( '.hb-datepick-active-inputs' ).find( '.hb-check-in-date' ),
719					$check_out = $( '.hb-datepick-active-inputs' ).find( '.hb-check-out-date' ),
720					date,
721					str_date,
722					str_date_current_format;
723
724				if ( ! dates[0] || ! $( '.hb-datepick-popup' ).datepick( 'isSelectable', dates[0] ) ) {
725					return;
726				}
727
728				date = new Date( dates[0].getFullYear(), dates[0].getMonth(), dates[0].getDate() );
729				str_date = $.datepick.formatDate( 'yyyy-mm-dd', date ),
730				str_date_current_format = $.datepick.formatDate( hb_date_format, date );
731
732				hb_dp_max_check_out = false;
733
734				if ( selecting_check_in ) {
735					selecting_check_in = false;
736					$check_in.val( str_date_current_format );
737					current_check_in_date = date;
738					show_current_month();
739					if ( current_check_out_date ) {
740						if ( is_valid_check_out_date() ) {
741							close_datepick_popup();
742						} else {
743							current_check_out_date = null;
744							$check_out.val( '' );
745						}
746					}
747					if ( ! current_check_out_date ) {
748						if ( is_hb_dp_mobile ) {
749							activate_check_out_choice( $( '.hb-datepick-active-inputs' ) );
750						} else {
751							$check_out.focus();
752						}
753					}
754				} else {
755					$check_out.val( str_date_current_format );
756					current_check_out_date = date;
757					if ( current_check_in_date ) {
758						close_datepick_popup();
759					} else {
760						if ( is_hb_dp_mobile ) {
761							activate_check_in_choice( $( '.hb-datepick-active-inputs' ) );
762						} else {
763							$check_in.focus();
764						}
765					}
766				}
767				selecting_time = new Date().getTime();
768			}
769		});
770	}
771
772	function is_valid_check_out_date() {
773		var min_check_out_date = new Date( current_check_in_date.getTime() ),
774			max_check_out_date = new Date( current_check_in_date.getTime() );
775		min_check_out_date.setDate( min_check_out_date.getDate() + parseInt( booking_rules.minimum_stay ) );
776		max_check_out_date.setDate( max_check_out_date.getDate() + parseInt( booking_rules.maximum_stay ) );
777		if (
778			( min_check_out_date.getTime() > current_check_out_date.getTime() ) ||
779			( max_check_out_date.getTime() < current_check_out_date.getTime() ) ||
780			( hb_dp_max_check_out && current_check_out_date.getTime() > hb_dp_max_check_out.getTime() )
781		) {
782			return false;
783		} else {
784			return true;
785		}
786	}
787
788	$( '.hb-check-in-date, .hb-check-out-date' ).keyup( function() {
789		if ( $( this ).val() == '' ) {
790			if ( $( this ).hasClass( 'hb-check-in-date' ) ) {
791				current_check_in_date = null;
792			} else {
793				current_check_out_date = null;
794			}
795			show_current_month();
796			return;
797		}
798
799		var input_date;
800		try {
801			input_date = $.datepick.parseDate( hb_date_format, $( this ).val() );
802		} catch( e ) {
803			input_date = false;
804		}
805
806		if ( input_date && $( '.hb-datepick-popup' ).datepick( 'isSelectable', input_date ) ) {
807			input_date.setHours( 0, 0, 0, 0 );
808			if ( selecting_check_in ) {
809				current_check_in_date = new Date( input_date.getTime() );
810				show_current_month();
811				if ( current_check_out_date && ! is_valid_check_out_date() ) {
812					current_check_out_date = null;
813					$check_out.val( '' );
814				}
815			} else {
816				current_check_out_date = new Date( input_date.getTime() );
817			}
818			hb_dp_max_check_out = false;
819			show_current_month();
820		}
821	});
822
823	$( 'select' ).on( 'focus', function() {
824		close_datepick_popup();
825	});
826
827});
828;
829function hb_formatted_date( date ) {
830	if ( ! date || ( date == '0000-00-00' ) ) {
831		return '';
832	} else {
833		var hour = '';
834		if ( ( date.length > 10 ) && ( date.charAt( 10 ) == ' ' ) ) {
835			var splitted_date_hour = date.split( ' ' );
836			date = splitted_date_hour[0];
837			hour = splitted_date_hour[1];
838			if ( hour.length > 5) {
839				hour = hour.substring( 0, 5 );
840			}
841		}
842		date = date.split( '-' );
843		date = new Date( date[0], date[1] - 1, date[2] );
844		var formatted_date = jQuery.datepick.formatDate( hb_date_format, date );
845		if ( hour ) {
846			formatted_date += ' ' + hour;
847		}
848		return formatted_date;
849	}
850}
851
852function hb_db_formatted_date( date ) {
853	try {
854		date = jQuery.datepick.parseDate( hb_date_format, date );
855	} catch( e ) {
856		date = false;
857	}
858	if ( date ) {
859		return  jQuery.datepick.formatDate( 'yyyy-mm-dd', date );
860	} else {
861		return '0000-00-00';
862	}
863};
864'use strict';
865
866function hb_date_str_2_obj( str_date ) {
867	if ( str_date ) {
868		var array_date = str_date.split( '-' );
869		return new Date( array_date[0], array_date[1] - 1, array_date[2] );
870	} else {
871		return false;
872	}
873}
874
875function hb_date_obj_2_str( obj_date ) {
876	if ( obj_date ) {
877		var y = obj_date.getFullYear(),
878			m = obj_date.getMonth() + 1,
879			d = obj_date.getDate();
880		m = m + '';
881		d = d + '';
882		if ( m.length == 1 ) {
883			m = '0' + m;
884		}
885		if ( d.length == 1 ) {
886			d = '0' + d;
887		}
888		return y + '-' + m + '-' + d;
889	} else {
890		return false;
891	}
892}
893
894function hb_format_date() {
895	jQuery( '.hb-format-date' ).each( function() {
896		var str_date = jQuery( this ).html();
897		if ( str_date.indexOf( '-' ) > -1 ) {
898			var date = hb_date_str_2_obj( str_date );
899			jQuery( this ).html( jQuery.datepick.formatDate( hb_date_format, date ) ).removeClass( 'hb-format-date' );
900		}
901	});
902}
903
904function hb_get_season_id( date ) {
905	var seasons = hb_booking_form_data.seasons,
906		nb_day,
907		copied_date = new Date( date.valueOf() );
908
909	copied_date.setHours( 0, 0, 0, 0 );
910
911	nb_day = date.getDay();
912	if ( nb_day == 0 ) {
913		nb_day = 6;
914	} else {
915		nb_day = nb_day - 1;
916	}
917	nb_day += '';
918
919	var priorities = ['high', '', 'low'];
920	for ( var i = 0; i < 3; i++ ) {
921		for ( var j = 0; j < seasons.length; j++ ) {
922			var start = hb_date_str_2_obj( seasons[ j ]['start_date'] );
923			var end = hb_date_str_2_obj( seasons[ j ]['end_date'] );
924			start.setHours( 0, 0, 0, 0 );
925			end.setHours( 0, 0, 0, 0 );
926			if (
927				( seasons[ j ]['priority'] == priorities[ i ] ) &&
928				( copied_date >= start ) &&
929				( copied_date <= end ) &&
930				( seasons[ j ]['days'].indexOf( nb_day ) != -1 )
931			) {
932				return seasons[ j ]['season_id'];
933			}
934		}
935	}
936	return false;
937}
938
939function hb_resize_forms() {
940	jQuery( '.hb-booking-search-form' ).each( function() {
941		var body_class = '';
942		if ( jQuery( this ).attr( 'id' ) != '' ) {
943			body_class = 'hb-' + jQuery( this ).attr('id') + '-is-vertical';
944		}
945		if ( jQuery( this ).width() < hb_booking_form_data.horizontal_form_min_width ) {
946			jQuery( this ).addClass( 'hb-vertical-search-form' );
947			jQuery( this ).removeClass( 'hb-horizontal-search-form' );
948			jQuery( 'body' ).addClass( body_class );
949		} else {
950			jQuery( this ).removeClass( 'hb-vertical-search-form' );
951			jQuery( this ).addClass( 'hb-horizontal-search-form' );
952			jQuery( 'body' ).removeClass( body_class );
953		}
954		if ( jQuery( this ).width() < 400 ) {
955			jQuery( this ).addClass( 'hb-narrow-search-form' );
956		} else {
957			jQuery( this ).removeClass( 'hb-narrow-search-form' );
958		}
959	});
960	jQuery( '.hb-booking-details-form' ).each( function() {
961		if ( jQuery( this ).width() < hb_booking_form_data.details_form_stack_width ) {
962			jQuery( this ).addClass( 'hb-details-form-stacked' );
963		} else {
964			jQuery( this ).removeClass( 'hb-details-form-stacked' );
965		}
966	});
967};
968(function (root, factory) {
969  if (typeof define === 'function' && define.amd) {
970    // AMD. Register as an anonymous module unless amdModuleId is set
971    define(["jquery"], function (a0) {
972      return (factory(a0));
973    });
974  } else if (typeof module === 'object' && module.exports) {
975    // Node. Does not work with strict CommonJS, but
976    // only CommonJS-like environments that support module.exports,
977    // like Node.
978    module.exports = factory(require("jquery"));
979  } else {
980    factory(root["jQuery"]);
981  }
982}(this, function (jQuery) {
983
984/** File generated by Grunt -- do not modify
985 *  JQUERY-FORM-VALIDATOR
986 *
987 *  @version 2.3.79
988 *  @website http://formvalidator.net/
989 *  @author Victor Jonsson, http://victorjonsson.se
990 *  @license MIT
991 */
992/**
993 */
994(function ($, window, undefined) {
995
996  var disableFormSubmit = function () {
997      return false;
998    },
999    lastFormEvent = null,
1000    HaltManager = {
1001      numHalted: 0,
1002      haltValidation: function($form) {
1003        this.numHalted++;
1004        $.formUtils.haltValidation = true;
1005        $form
1006          .unbind('submit', disableFormSubmit)
1007          .bind('submit', disableFormSubmit)
1008          .find('*[type="submit"]')
1009            .addClass('disabled')
1010            .attr('disabled', 'disabled');
1011      },
1012      unHaltValidation: function($form) {
1013        this.numHalted--;
1014        if (this.numHalted === 0) {
1015          $.formUtils.haltValidation = false;
1016          $form
1017            .unbind('submit', disableFormSubmit)
1018            .find('*[type="submit"]')
1019              .removeClass('disabled')
1020              .removeAttr('disabled', 'disabled');
1021        }
1022      }
1023    };
1024
1025  function AsyncValidation($form, $input) {
1026    this.$form = $form;
1027    this.$input = $input;
1028    this.reset();
1029    $input.on('change paste', this.reset.bind(this));
1030  }
1031
1032  AsyncValidation.prototype.reset = function() {
1033    this.haltedFormValidation = false;
1034    this.hasRun = false;
1035    this.isRunning = false;
1036    this.result = undefined;
1037  };
1038
1039  AsyncValidation.prototype.run = function(eventContext, callback) {
1040    if (eventContext === 'keyup') {
1041      return null;
1042    } else if (this.isRunning) {
1043      lastFormEvent = eventContext;
1044      if (!this.haltedFormValidation) {
1045        HaltManager.haltValidation();
1046        this.haltedFormValidation = true;
1047      }
1048      return null; // Waiting for result
1049    } else if(this.hasRun) {
1050      //this.$input.one('keyup change paste', this.reset.bind(this));
1051      return this.result;
1052    } else {
1053      lastFormEvent = eventContext;
1054      HaltManager.haltValidation(this.$form);
1055      this.haltedFormValidation = true;
1056      this.isRunning = true;
1057      this.$input
1058        .attr('disabled', 'disabled')
1059        .addClass('async-validation');
1060      this.$form.addClass('async-validation');
1061
1062      callback(function(result) {
1063        this.done(result);
1064      }.bind(this));
1065
1066      return null;
1067    }
1068  };
1069
1070  AsyncValidation.prototype.done = function(result) {
1071    this.result = result;
1072    this.hasRun = true;
1073    this.isRunning = false;
1074    this.$input
1075      .removeAttr('disabled')
1076      .removeClass('async-validation');
1077    this.$form.removeClass('async-validation');
1078    if (this.haltedFormValidation) {
1079      HaltManager.unHaltValidation(this.$form);
1080      if (lastFormEvent === 'submit') {
1081        this.$form.trigger('submit');
1082      } else {
1083        this.$input.trigger('validation.revalidate');
1084      }
1085    }
1086  };
1087
1088  AsyncValidation.loadInstance = function(validatorName, $input, $form) {
1089    // Return async validator attached to this input element
1090    // or create a new async validator and attach it to the input
1091    var asyncValidation,
1092      input = $input.get(0);
1093
1094    if (!input.asyncValidators) {
1095      input.asyncValidators = {};
1096    }
1097
1098    if (input.asyncValidators[validatorName]) {
1099      asyncValidation = input.asyncValidators[validatorName];
1100    } else {
1101      asyncValidation = new AsyncValidation($form, $input);
1102      input.asyncValidators[validatorName] = asyncValidation;
1103    }
1104
1105    return asyncValidation;
1106  };
1107
1108  $.formUtils = $.extend($.formUtils || {}, {
1109
1110    /**
1111     * @deprecated
1112     * @param validatorName
1113     * @param $input
1114     * @param $form
1115     */
1116    asyncValidation: function(validatorName, $input, $form) {
1117      // @todo: Remove when moving up to version 3.0
1118      this.warn('Use of deprecated function $.formUtils.asyncValidation, use $.formUtils.addAsyncValidator() instead');
1119      return AsyncValidation.loadInstance(validatorName, $input, $form);
1120    },
1121
1122    /**
1123     * @param {Object} asyncValidator
1124     */
1125    addAsyncValidator: function (asyncValidator) {
1126      var validator = $.extend({}, asyncValidator),
1127        originalValidatorFunc = validator.validatorFunction;
1128      validator.async = true;
1129      validator.validatorFunction = function (value, $el, config, language, $form, eventContext) {
1130        var asyncValidation = AsyncValidation.loadInstance(this.name, $el, $form);
1131        return asyncValidation.run(eventContext, function(done) {
1132          originalValidatorFunc.apply(validator, [
1133            done, value, $el, config, language, $form, eventContext
1134          ]);
1135        });
1136      };
1137      this.addValidator(validator);
1138    }
1139  });
1140
1141  // Tag elements having async validators
1142  $(window).bind('validatorsLoaded formValidationSetup', function (evt, $form) {
1143    if (!$form) {
1144      $form = $('form');
1145    }
1146    $form.find('[data-validation]').each(function () {
1147      var $input = $(this);
1148      $input.valAttr('async', false);
1149      $.each($.split($input.attr('data-validation')), function (i, val
1149idatorName) {
1150        var validator = $.formUtils.validators['validate_'+validatorName];
1151        if (validator && validator.async) {
1152          $input.valAttr('async', 'yes');
1153        }
1154      });
1155    });
1156  });
1157
1158})(jQuery, window);
1159
1160/**
1161 * Deprecated functions and attributes
1162 * @todo: Remove in release of 3.0
1163 */
1164(function ($, undefined) {
1165
1166  'use strict';
1167
1168  /**
1169   * @deprecated
1170   * @param language
1171   * @param conf
1172   */
1173  $.fn.validateForm = function (language, conf) {
1174    $.formUtils.warn('Use of deprecated function $.validateForm, use $.isValid instead');
1175    return this.isValid(language, conf, true);
1176  };
1177
1178  $(window)
1179    .on('formValidationPluginInit', function(evt, config) {
1180      convertDeprecatedLangCodeToISO6391(config);
1181      addSupportForCustomErrorMessageCallback(config);
1182      addSupportForElementReferenceInPositionParam(config);
1183    })
1184    .on('validatorsLoaded formValidationSetup', function(evt, $form) {
1185      if( !$form ) {
1186        $form = $('form');
1187      }
1188      addSupportForValidationDependingOnCheckedInput($form);
1189    });
1190
1191
1192  function addSupportForCustomErrorMessageCallback(config) {
1193    if (config &&
1194        config.errorMessagePosition === 'custom' &&
1195        typeof config.errorMessageCustom === 'function') {
1196
1197      $.formUtils.warn('Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead');
1198
1199      config.submitErrorMessageCallback = function($form, errorMessages) {
1200        config.errorMessageCustom(
1201            $form,
1202            config.language.errorTitle,
1203            errorMessages,
1204            config
1205        );
1206      };
1207    }
1208  }
1209
1210  function addSupportForElementReferenceInPositionParam(config) {
1211    if (config.errorMessagePosition && typeof config.errorMessagePosition === 'object') {
1212      $.formUtils.warn('Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead');
1213      var $errorMessageContainer = config.errorMessagePosition;
1214      config.errorMessagePosition = 'top';
1215      config.submitErrorMessageCallback = function() {
1216        return $errorMessageContainer;
1217      };
1218    }
1219  }
1220
1221  function addSupportForValidationDependingOnCheckedInput($form) {
1222    var $inputsDependingOnCheckedInputs = $form.find('[data-validation-if-checked]');
1223    if ($inputsDependingOnCheckedInputs.length) {
1224      $.formUtils.warn(
1225        'Detected use of attribute "data-validation-if-checked" which is '+
1226        'deprecated. Use "data-validation-depends-on" provided by module "logic"'
1227      );
1228    }
1229
1230    $inputsDependingOnCheckedInputs
1231      .on('beforeValidation', function() {
1232
1233        var $elem = $(this),
1234          nameOfDependingInput = $elem.valAttr('if-checked');
1235
1236        // Set the boolean telling us that the validation depends
1237        // on another input being checked
1238        var $dependingInput = $('input[name="' + nameOfDependingInput + '"]', $form),
1239          dependingInputIsChecked = $dependingInput.is(':checked'),
1240          valueOfDependingInput = ($.formUtils.getValue($dependingInput) || '').toString(),
1241          requiredValueOfDependingInput = $elem.valAttr('if-checked-value');
1242
1243        if (!dependingInputIsChecked || !(
1244              !requiredValueOfDependingInput ||
1245              requiredValueOfDependingInput === valueOfDependingInput
1246          )) {
1247          $elem.valAttr('skipped', true);
1248        }
1249
1250      });
1251    }
1252
1253    function convertDeprecatedLangCodeToISO6391(config) {
1254      var deprecatedLangCodes = {
1255        se: 'sv',
1256        cz: 'cs',
1257        dk: 'da'
1258      };
1259
1260      if (config.lang in deprecatedLangCodes) {
1261        var newLangCode = deprecatedLangCodes[config.lang];
1262        $.formUtils.warn(
1263          'Deprecated use of lang code "'+config.lang+'" use "'+newLangCode+'" instead'
1264        );
1265        config.lang = newLangCode;
1266      }
1267    }
1268
1269})(jQuery);
1270
1271/**
1272 * Utility methods used for displaying error messages (attached to $.formUtils)
1273 */
1274(function ($) {
1275
1276  'use strict';
1277
1278  var dialogs = {
1279
1280    resolveErrorMessage: function($elem, validator, validatorName, conf, language) {
1281      var errorMsgAttr = conf.validationErrorMsgAttribute + '-' + validatorName.replace('validate_', ''),
1282        validationErrorMsg = $elem.attr(errorMsgAttr);
1283
1284      if (!validationErrorMsg) {
1285        validationErrorMsg = $elem.attr(conf.validationErrorMsgAttribute);
1286        if (!validationErrorMsg) {
1287          if (typeof validator.errorMessageKey !== 'function') {
1288            validationErrorMsg = language[validator.errorMessageKey];
1289          }
1290          else {
1291            validationErrorMsg = language[validator.errorMessageKey(conf)];
1292          }
1293          if (!validationErrorMsg) {
1294            validationErrorMsg = validator.errorMessage;
1295          }
1296        }
1297      }
1298      return validationErrorMsg;
1299    },
1300    getParentContainer: function ($elem) {
1301      if ($elem.valAttr('error-msg-container')) {
1302        return $($elem.valAttr('error-msg-container'));
1303      } else {
1304        var $parent = $elem.parent();
1305        if($elem.attr('type') === 'checkbox' && $elem.closest('.checkbox').length) {
1306          $parent = $elem.closest('.checkbox').parent();
1307        } else if($elem.attr('type') === 'radio' && $elem.closest('.radio').length) {
1308          $parent = $elem.closest('.radio').parent();
1309        }
1310        if($parent.closest('.input-group').length) {
1311          $parent = $parent.closest('.input-group').parent();
1312        }
1313        return $parent;
1314      }
1315    },
1316    applyInputErrorStyling: function ($input, conf) {
1317      $input
1318        .addClass(conf.errorElementClass)
1319        .removeClass(conf.successElementClass);
1320
1321      this.getParentContainer($input)
1322        .addClass(conf.inputParentClassOnError)
1323        .removeClass(conf.inputParentClassOnSuccess);
1324
1325      if (conf.borderColorOnError !== '') {
1326        $input.css('border-color', conf.borderColorOnError);
1327      }
1328    },
1329    applyInputSuccessStyling: function($input, conf) {
1330      $input.addClass(conf.successElementClass);
1331      this.getParentContainer($input)
1332        .addClass(conf.inputParentClassOnSuccess);
1333    },
1334    removeInputStylingAndMessage: function($input, conf) {
1335
1336      // Reset input css
1337      $input
1338        .removeClass(conf.successElementClass)
1339        .removeClass(conf.errorElementClass)
1340        .css('border-color', '');
1341
1342      var $parentContainer = dialogs.getParentContainer($input);
1343
1344      // Reset parent css
1345      $parentContainer
1346        .removeClass(conf.inputParentClassOnError)
1347        .removeClass(conf.inputParentClassOnSuccess);
1348
1349      // Remove possible error message
1350      if (typeof conf.inlineErrorMessageCallback === 'function') {
1351        var $errorMessage = conf.inlineErrorMessageCallback($input, false, conf);
1352        if ($errorMessage) {
1353          $errorMessage.html('');
1354        }
1355      } else {
1356        $parentContainer
1357          .find('.' + conf.errorMessageClass)
1358          .remove();
1359      }
1360
1361    },
1362    removeAllMessagesAndStyling: function($form, conf) {
1363
1364      // Remove error messages in top of form
1365      if (typeof conf.submitErrorMessageCallback === 'function') {
1366        var $errorMessagesInTopOfForm = conf.submitErrorMessageCallback($form, false, conf);
1367        if ($errorMessagesInTopOfForm) {
1368          $errorMessagesInTopOfForm.html('');
1369        }
1370      } else {
1371        $form.find('.' + conf.errorMessageClass + '.alert').remove();
1372      }
1373
1374      // Remove input css/messages
1375      $form.find('.' + conf.errorElementClass + ',.' + conf.successElementClass).each(function() {
1376        dialogs.removeInputStylingAndMessage($(this), conf);
1377      });
1378    },
1379    setInlineMessage: function ($input, errorMsg, conf) {
1380
1381      this.applyInputErrorStyling($input, conf);
1382
1383      var custom = document.getElementById($input.attr('name') + '_err_msg'),
1384        $messageContainer = false,
1385        setErrorMessage = function ($elem) {
1386          $.formUtils.$win.trigger('validationErrorDisplay', [$input, $elem]);
1387          $elem.html(errorMsg);
1388        },
1389        addErrorToMessageContainer = function() {
1390          var $found = false;
1391          $messageContainer.find('.' + conf.errorMessageClass).each(function () {
1392            if (this.inputReferer === $input[0]) {
1393              $found = $(this);
1394              return false;
1395            }
1396          });
1397          if ($found) {
1398            if (!errorMsg) {
1399              $found.remove();
1400            } else {
1401              setErrorMessage($found);
1402            }
1403          } else if(errorMsg !== '') {
1404            $message = $('<div class="' + conf.errorMessageClass + ' alert"></div>');
1405            setErrorMessage($message);
1406            $message[0].inputReferer = $input[0];
1407            $messageContainer.prepend($message);
1408          }
1409        },
1410        $message;
1411
1412      if (custom) {
1413        // Todo: remove in 3.0
1414        $.formUtils.warn('Using deprecated element reference ' + custom.id);
1415        $messageContainer = $(custom);
1416        addErrorToMessageContainer();
1417      } else if (typeof conf.inlineErrorMessageCallback === 'function') {
1418        $messageContainer = conf.inlineErrorMessageCallback($input, errorMsg, conf);
1419        if (!$messageContainer) {
1420          // Error display taken care of by inlineErrorMessageCallback
1421          return;
1422        }
1423        addErrorToMessageContainer();
1424      } else {
1425        var $parent = this.getParentContainer($input);
1426        $message = $parent.find('.' + conf.errorMessageClass + '.help-block');
1427        if ($message.length === 0) {
1428          $message = $('<span></span>').addClass('help-block').addClass(conf.errorMessageClass);
1429          $message.appendTo($parent);
1430        }
1431        setErrorMessage($message);
1432      }
1433    },
1434    setMessageInTopOfForm: function ($form, errorMessages, conf, lang) {
1435      var view = '<div class="{errorMessageClass} alert alert-danger">'+
1436                    '<strong>{errorTitle}</strong>'+
1437                    '<ul>{fields}</ul>'+
1438                '</div>',
1439          $container = false;
1440
1441      if (typeof conf.submitErrorMessageCallback === 'function') {
1442        $container = conf.submitErrorMessageCallback($form, errorMessages, conf);
1443        if (!$container) {
1444          // message display taken care of by callback
1445          return;
1446        }
1447      }
1448
1449      var viewParams = {
1450            errorTitle: lang.errorTitle,
1451            fields: '',
1452            errorMessageClass: conf.errorMessageClass
1453          };
1454
1455      $.each(errorMessages, function (i, msg) {
1456        viewParams.fields += '<li>'+msg+'</li>';
1457      });
1458
1459      $.each(viewParams, function(param, value) {
1460        view = view.replace('{'+param+'}', value);
1461      });
1462
1463      if ($container) {
1464        $container.html(view);
1465      } else {
1466        $form.children().eq(0).before($(view));
1467      }
1468    }
1469  };
1470
1471  $.formUtils = $.extend($.formUtils || {}, {
1472    dialogs: dialogs
1473  });
1474
1475})(jQuery);
1476
1477/**
1478 * File declaring all methods if this plugin which is applied to $.fn.
1479 */
1480(function($, window, undefined) {
1481
1482  'use strict';
1483
1484  var _helpers = 0;
1485
1486
1487  /**
1488   * Assigns validateInputOnBlur function to elements blur event
1489   *
1490   * @param {Object} language Optional, will override $.formUtils.LANG
1491   * @param {Object} conf Optional, will override the default settings
1492   * @return {jQuery}
1493   */
1494  $.fn.validateOnBlur = function (language, conf) {
1495    var $form = this,
1496        $elems = this.find('*[data-validation]');
1497
1498    $elems.each(function(){
1499      var $this = $(this);
1500      if ($this.is('[type=radio]')){
1501        var $additionals = $form.find('[type=radio][name="' + $this.attr('name') + '"]');
1502        $additionals.bind('blur.validation', function(){
1503          $this.validateInputOnBlur(language, conf, true, 'blur');
1504        });
1505        if (conf.validateCheckboxRadioOnClick) {
1506          $additionals.bind('click.validation', function () {
1507            $this.validateInputOnBlur(language, conf, true, 'click');
1508          });
1509        }
1510      }
1511    });
1512
1513    $elems.bind('blur.validation', function () {
1514      $(this).validateInputOnBlur(language, conf, true, 'blur');
1515    });
1516
1517    if (conf.validateCheckboxRadioOnClick) {
1518      // bind click event to validate on click for radio & checkboxes for nice UX
1519      this.find('input[type=checkbox][data-validation],input[type=radio][data-validation]')
1520        .bind('click.validation', function () {
1521          $(this).validateInputOnBlur(language, conf, true, 'click');
1522        });
1523    }
1524
1525    return this;
1526  };
1527
1528  /*
1529   * Assigns validateInputOnBlur function to elements custom event
1530   * @param {Object} language Optional, will override $.formUtils.LANG
1531   * @param {Object} settings Optional, will override the default settings
1532   * * @return {jQuery}
1533   */
1534  $.fn.validateOnEvent = function (language, config) {
1535    if(this.length === 0) {
1536      return;
1537    }
1538
1539    var $elements = this[0].nodeName === 'FORM' ? this.find('*[data-validation-event]') : this;
1540    $elements
1541      .each(function () {
1542        var $el = $(this),
1543          etype = $el.valAttr('event');
1544        if (etype) {
1545          $el
1546            .unbind(etype + '.validation')
1547            .bind(etype + '.validation', function (evt) {
1548              if( (evt || {}).keyCode !== 9 ) {
1549                $(this).validateInputOnBlur(language, config, true, etype);
1550              }
1551            });
1552        }
1553      });
1554    return this;
1555  };
1556
1557  /**
1558   * fade in help message when input gains focus
1559   * fade out when input loses focus
1560   * <input data-help="The info that I want to display for the user when input is focused" ... />
1561   *
1562   * @param {String} attrName - Optional, default is data-help
1563   * @return {jQuery}
1564   */
1565  $.fn.showHelpOnFocus = function (attrName) {
1566    if (!attrName) {
1567      attrName = 'data-validation-help';
1568    }
1569
1570    // Add help text listeners
1571    this.find('textarea,input').each(function () {
1572      var $elem = $(this),
1573        className = 'jquery_form_help_' + (++_helpers),
1574        help = $elem.attr(attrName);
1575
1576      // Reset
1577      $elem
1578        .removeClass('has-help-text')
1579        .unbind('focus.help')
1580        .unbind('blur.help');
1581
1582      if (help) {
1583        $elem
1584          .addClass('has-help-txt')
1585          .bind('focus.help', function () {
1586            var $help = $elem.parent().find('.' + className);
1587            if ($help.length === 0) {
1588              $help = $('<span />')
1589                .addClass(className)
1590                .addClass('help')
1591                .addClass('help-block') // twitter bs
1592                .text(help)
1593                .hide();
1594
1595              $elem.after($help);
1596            }
1597            $help.fadeIn();
1598          })
1599          .bind('blur.help', function () {
1600            $(this)
1601              .parent()
1602              .find('.' + className)
1603              .fadeOut('slow');
1604          });
1605      }
1606    });
1607
1608    return this;
1609  };
1610
1611  /**
1612   * @param {Function} cb
1613   * @param {Object} [conf]
1614   * @param {Object} [lang]
1615   */
1616  $.fn.validate = function(cb, conf, lang) {
1617    var language = $.extend({}, $.formUtils.LANG, lang || {});
1618    this.each(function() {
1619      var $elem = $(this),
1620        closestFormElem = $elem.closest('form').get(0) || {},
1621        formDefaultConfig = closestFormElem.validationConfig || $.formUtils.defaultConfig();
1622
1623      $elem.one('validation', function(evt, isValid) {
1624        if ( typeof cb === 'function' ) {
1625          cb(isValid, this, evt);
1626        }
1627      });
1628
1629      $elem.validateInputOnBlur(
1630        language,
1631        $.extend({}, formDefaultConfig, conf || {}),
1632        true
1633      );
1634    });
1635  };
1636
1637  /**
1638   * Tells whether or not validation of this input will have to postpone the form submit ()
1639   * @returns {Boolean}
1640   */
1641  $.fn.willPostponeValidation = function() {
1642    return (this.valAttr('suggestion-nr') ||
1643      this.valAttr('postpone') ||
1644      this.hasClass('hasDatepicker')) &&
1645      !window.postponedValidation;
1646  };
1647
1648  /**
1649   * Validate single input when it loses focus
1650   * shows error message in a span element
1651   * that is appended to the parent element
1652   *
1653   * @param {Object} [language] Optional, will override $.formUtils.LANG
1654   * @param {Object} [conf] Optional, will override the default settings
1655   * @param {Boolean} attachKeyupEvent Optional
1656   * @param {String} eventContext
1657   * @return {jQuery}
1658   */
1659  $.fn.validateInputOnBlur = function (language, conf, attachKeyupEvent, eventContext) {
1660
1661    $.formUtils.eventType = eventContext;
1662
1663    if ( this.willPostponeValidation() ) {
1664      // This validation has to be postponed
1665      var _self = this,
1666        postponeTime = this.valAttr('postpone') || 200;
1667
1668      window.postponedValidation = function () {
1669        _self.validateInputOnBlur(language, conf, attachKeyupEvent, eventContext);
1670        window.postponedValidation = false;
1671      };
1672
1673      setTimeout(function () {
1674        if (window.postponedValidation) {
1675          window.postponedValidation();
1676        }
1677      }, postponeTime);
1678
1679      return this;
1680    }
1681
1682    language = $.extend({}, $.formUtils.LANG, language || {});
1683    $.formUtils.dialogs.removeInputStylingAndMessage(this, conf);
1684
1685    var $elem = this,
1686      $form = $elem.closest('form'),
1687      result = $.formUtils.validateInput(
1688        $elem,
1689        language,
1690        conf,
1691        $form,
1692        eventContext
1693      );
1694
1695    var reValidate = function() {
1696      $elem.validateInputOnBlur(language, conf, false, 'blur.revalidated');
1697    };
1698
1699    if (eventContext === 'blur') {
1700      $elem
1701        .unbind('validation.revalidate', reValidate)
1702        .one('validation.revalidate', reValidate);
1703    }
1704
1705    if (attachKeyupEvent) {
1706      $elem.removeKeyUpValidation();
1707    }
1708
1709    if (result.shouldChangeDisplay) {
1710      if (result.isValid) {
1711        $.formUtils.dialogs.applyInputSuccessStyling($elem, conf);
1712      } else {
1713        $.formUtils.dialogs.setInlineMessage($elem, result.errorMsg, conf);
1714      }
1715    }
1716
1717    if (!result.isValid && attachKeyupEvent) {
1718      $elem.validateOnKeyUp(language, conf);
1719    }
1720
1721    return this;
1722  };
1723
1724  /**
1725   * Validate element on keyup-event
1726   */
1727  $.fn.validateOnKeyUp = function(language, conf) {
1728    this.each(function() {
1729      var $input = $(this);
1730      if (!$input.valAttr('has-keyup-event')) {
1731        $input
1732          .valAttr('has-keyup-event', 'true')
1733          .bind('keyup.validation', function (evt) {
1734            if( evt.keyCode !== 9 ) {
1735              $input.validateInputOnBlur(language, conf, false, 'keyup');
1736            }
1737          });
1738      }
1739    });
1740    return this;
1741  };
1742
1743  /**
1744   * Remove validation on keyup
1745   */
1746  $.fn.removeKeyUpValidation = function() {
1747    this.each(function() {
1748      $(this)
1749        .valAttr('has-keyup-event', false)
1750        .unbind('keyup.validation');
1751    });
1752    return this;
1753  };
1754
1755  /**
1756   * Short hand for fetching/adding/removing element attributes
1757   * prefixed with 'data-validation-'
1758   *
1759   * @param {String} name
1760   * @param {String|Boolean} [val]
1761   * @return {String|undefined|jQuery}
1762   * @protected
1763   */
1764  $.fn.valAttr = function (name, val) {
1765    if (val === undefined) {
1766      return this.attr('data-validation-' + name);
1767    } else if (val === false || val === null) {
1768      return this.removeAttr('data-validation-' + name);
1769    } else {
1770      name = ((name.length > 0) ? '-' + name : '');
1771      return this.attr('data-validation' + name, val);
1772    }
1773  };
1774
1775  /**
1776   * Function that validates all inputs in active form
1777   *
1778   * @param {Object} [language]
1779   * @param {Object} [conf]
1780   * @param {Boolean} [displayError] Defaults to true
1781   */
1782  $.fn.isValid = function (language, conf, displayError) {
1783
1784    if ($.formUtils.isLoadingModules) {
1785      var $self = this;
1786      setTimeout(function () {
1787        $self.isValid(language, conf, displayError);
1788      }, 200);
1789      return null;
1790    }
1791
1792    conf = $.extend({}, $.formUtils.defaultConfig(), conf || {});
1793    language = $.extend({}, $.formUtils.LANG, language || {});
1794    displayError = displayError !== false;
1795
1796    if ($.formUtils.errorDisplayPreventedWhenHalted) {
1797      // isValid() was called programmatically with argument displayError set
1798      // to false when the validation was halted by any of the validators
1799      delete $.formUtils.errorDisplayPreventedWhenHalted;
1800      displayError = false;
1801    }
1802
1803    /**
1804     * Adds message to error message stack if not already in the message stack
1805     *
1806     * @param {String} mess
1807     * @para {jQuery} $elem
1808     */
1809    var addErrorMessage = function (mess, $elem) {
1810        if ($.inArray(mess, errorMessages) < 0) {
1811          errorMessages.push(mess);
1812        }
1813        errorInputs.push($elem);
1814        $elem.valAttr('current-error', mess);
1815        if (displayError) {
1816          $.formUtils.dialogs.applyInputErrorStyling($elem, conf);
1817        }
1818      },
1819
1820      /** Holds inputs (of type checkox or radio) already validated, to prevent recheck of mulitple checkboxes & radios */
1821      checkedInputs = [],
1822
1823      /** Error messages for this validation */
1824      errorMessages = [],
1825
1826      /** Input elements which value was not valid */
1827      errorInputs = [],
1828
1829      /** Form instance */
1830      $form = this,
1831
1832      /**
1833       * Tells whether or not to validate element with this name and of this type
1834       *
1835       * @param {String} name
1836       * @param {String} type
1837       * @return {Boolean}
1838       */
1839      ignoreInput = function (name, type) {
1840        if (type === 'submit' || type === 'button' || type === 'reset') {
1841          return true;
1842		}
1843		/*added by ad */
1844		if (
1845			name &&
1846			( $form.find( '[name="' + name + '"]' ).attr( 'type' ) == 'text' ) &&
1847			( $form.find( '[name="' + name + '"]' ).attr( 'data-validation' ) ) &&
1848			( $form.find( '[name="' + name + '"]' ).attr( 'data-validation' ).indexOf( 'required' ) == -1 ) &&
1849			( $form.find( '[name="' + name + '"]' ).val() == '' )
1850		) {
1851			return true;
1852		}
1853		/*added by ad */
1854        return $.inArray(name, conf.ignore || []) > -1;
1855      };
1856
1857    // Reset style and remove error class
1858    if (displayError) {
1859      $.formUtils.dialogs.removeAllMessagesAndStyling($form, conf);
1860    }
1861
1862    // Validate element values
1863    $form.find('input,textarea,select').filter(':not([type="submit"],[type="button"])').each(function () {
1864      var $elem = $(this),
1865        elementType = $elem.attr('type'),
1866        isCheckboxOrRadioBtn = elementType === 'radio' || elementType === 'checkbox',
1867        elementName = $elem.attr('name');
1868
1869      if (!ignoreInput(elementName, elementType) && (!isCheckboxOrRadioBtn || $.inArray(elementName, checkedInputs) < 0)) {
1870        // added by ad
1871        if ( $elem.val() ) {
1872          $elem.val( $elem.val().trim() );
1873        }
1874
1875        if (isCheckboxOrRadioBtn) {
1876          checkedInputs.push(elementName);
1877        }
1878
1879        var result = $.formUtils.validateInput(
1880          $elem,
1881          language,
1882          conf,
1883          $form,
1884          'submit'
1885        );
1886
1887        if (!result.isValid) {
1888          addErrorMessage(result.errorMsg, $elem);
1889        } else if (result.isValid && result.shouldChangeDisplay) {
1890          $elem.valAttr('current-error', false);
1891          $.formUtils.dialogs.applyInputSuccessStyling($elem, conf);
1892        }
1893      }
1894
1895    });
1896
1897    // Run validation callback
1898    if (typeof conf.onValidate === 'function') {
1899      var errors = conf.onValidate($form);
1900      if ($.isArray(errors)) {
1901        $.each(errors, function (i, err) {
1902          addErrorMessage(err.message, err.element);
1903        });
1904      }
1905      else if (errors && errors.element && errors.message) {
1906        addErrorMessage(errors.message, errors.element);
1907      }
1908    }
1909
1910    // Reset form validation flag
1911    $.formUtils.isValidatingEntireForm = false;
1912
1913    // Validation failed
1914    if (errorInputs.length > 0) {
1915      if (displayError) {
1916        if (conf.errorMessagePosition === 'top') {
1917          $.formUtils.dialogs.setMessageInTopOfForm($form, errorMessages, conf, language);
1918        } else {
1919          $.each(errorInputs, function (i, $input) {
1920            $.formUtils.dialogs.setInlineMessage($input, $input.valAttr('current-error'), conf);
1921          });
1922        }
1923        if (conf.scrollToTopOnError) {
1924          $.formUtils.$win.scrollTop($form.offset().top - 20);
1925        }
1926      }
1927    }
1928
1929    if (!displayError && $.formUtils.haltValidation) {
1930      $.formUtils.errorDisplayPreventedWhenHalted = true;
1931    }
1932
1933    return errorInputs.length === 0 && !$.formUtils.haltValidation;
1934  };
1935
1936  /**
1937   * Plugin for displaying input length restriction
1938   */
1939  $.fn.restrictLength = function (maxLengthElement) {
1940    new $.formUtils.lengthRestriction(this, maxLengthElement);
1941    return this;
1942  };
1943
1944  /**
1945   * Add suggestion dropdown to inputs having data-suggestions with a comma
1946   * separated string with suggestions
1947   * @param {Array} [settings]
1948   * @returns {jQuery}
1949   */
1950  $.fn.addSuggestions = function (settings) {
1951    var sugs = false;
1952    this.find('input').each(function () {
1953      var $field = $(this);
1954
1955      sugs = $.split($field.attr('data-suggestions'));
1956
1957      if (sugs.length > 0 && !$field.hasClass('has-suggestions')) {
1958        $.formUtils.suggest($field, sugs, settings);
1959        $field.addClass('has-suggestions');
1960      }
1961    });
1962    return this;
1963  };
1964
1965
1966})(jQuery, window);
1967
1968/**
1969 * Utility methods used for handling loading of modules (attached to $.formUtils)
1970 */
1971(function($) {
1972
1973  'use strict';
1974
1975  $.formUtils = $.extend($.formUtils || {}, {
1976
1977    /**
1978     * @var {Boolean}
1979     */
1980    isLoadingModules: false,
1981
1982    /**
1983     * @var {Object}
1984     */
1985    loadedModules: {},
1986
1987    /**
1988     * @param {String} name
1989     */
1990    registerLoadedModule: function (name) {
1991      this.loadedModules[$.trim(name).toLowerCase()] = true;
1992    },
1993
1994    /**
1995     * @param {String} name
1996     * @return {Boolean}
1997     */
1998    hasLoadedModule: function (name) {
1999      return $.trim(name).toLowerCase() in this.loadedModules;
2000    },
2001
2002    /**
2003     * @example
2004     *  $.formUtils.loadModules('date, security.dev');
2005     *
2006     * Will load the scripts date.js and security.dev.js from the
2007     * directory where this script resides. If you want to load
2008     * the modules from another directory you can use the
2009     * path argument.
2010     *
2011     * The script will be cached by the browser unless the module
2012     * name ends with .dev
2013     *
2014     * @param {String} modules - Comma separated string with module file names (no directory nor file extension)
2015     * @param {String} [path] - Path where the module files are located if their not in the same directory as the core modules
2016     * @param {function} [callback] - Callback invoked when all modules are loaded
2017     */
2018    loadModules: function (modules, path, callback) {
2019
2020      if ($.formUtils.isLoadingModules) {
2021        setTimeout(function () {
2022          $.formUtils.loadModules(modules, path, callback);
2023        }, 100);
2024        return;
2025      }
2026
2027      var loadModuleScripts = function (modules, path) {
2028
2029          var moduleList = $.split(modules),
2030            numModules = moduleList.length,
2031            moduleLoadedCallback = function () {
2032              numModules--;
2033              if (numModules === 0) {
2034                $.formUtils.isLoadingModules = false;
2035                if (typeof callback === 'function') {
2036                    callback();
2037                }
2038              }
2039            };
2040
2041          if (numModules > 0) {
2042            $.formUtils.isLoadingModules = true;
2043          }
2044
2045          var cacheSuffix = '?_=' + ( new Date().getTime() ),
2046            appendToElement = document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0];
2047
2048          $.each(moduleList, function (i, modName) {
2049            modName = $.trim(modName);
2050            if (modName.length === 0 || $.formUtils.hasLoadedModule(modName)) {
2051              moduleLoadedCallback();
2052            } else {
2053              var scriptUrl = path + modName + (modName.slice(-3) === '.js' ? '' : '.js'),
2054                script = document.createElement('SCRIPT');
2055
2056              if (typeof define === 'function' && define.amd) {
2057                require([scriptUrl + ( scriptUrl.slice(-7) === '.dev.js' ? cacheSuffix : '' )], moduleLoadedCallback);
2058              } else {
2059                // Load the script
2060                script.type = 'text/javascript';
2061                script.onload = moduleLoadedCallback;
2062                script.src = scriptUrl + ( scriptUrl.slice(-7) === '.dev.js' ? cacheSuffix : '' );
2063                script.onerror = function() {
2064                  $.formUtils.warn('Unable to load form validation module '+scriptUrl, true);
2065                  moduleLoadedCallback();
2066                };
2067                script.onreadystatechange = function () {
2068                  // IE 7 fix
2069                  if (this.readyState === 'complete' || this.readyState === 'loaded') {
2070                    moduleLoadedCallback();
2071                    // Handle memory leak in IE
2072                    this.onload = null;
2073                    this.onreadystatechange = null;
2074                  }
2075                };
2076                appendToElement.appendChild(script);
2077              }
2078            }
2079          });
2080        };
2081
2082      if (path) {
2083        loadModuleScripts(modules, path);
2084      } else {
2085        var findScriptPathAndLoadModules = function () {
2086          var foundPath = false;
2087          $('script[src*="form-validator"]').each(function () {
2088            var isScriptFromPluginNodeModulesDirectory = this.src.split('form-validator')[1].split('node_modules').length > 1;
2089            if (!isScriptFromPluginNodeModulesDirectory) {
2090              foundPath = this.src.substr(0, this.src.lastIndexOf('/')) + '/';
2091              if (foundPath === '/') {
2092                foundPath = '';
2093              }
2094              return false;
2095            }
2096          });
2097
2098          if (foundPath !== false) {
2099            loadModuleScripts(modules, foundPath);
2100            return true;
2101          }
2102          return false;
2103        };
2104
2105        if (!findScriptPathAndLoadModules()) {
2106          $(function () {
2107            var hasLoadedModuleScripts = findScriptPathAndLoadModules();
2108            if (!hasLoadedModuleScripts) {
2109              // The modules may have been inserted via a minified script
2110              if (typeof callback === 'function') {
2111                callback();
2112              }
2113            }
2114          });
2115        }
2116      }
2117    }
2118
2119  });
2120
2121})(jQuery);
2122
2123/**
2124 * Setup function for the plugin
2125 */
2126(function ($) {
2127
2128  'use strict';
2129
2130
2131  /**
2132   * A bit smarter split function
2133   * delimiter can be space, comma, dash or pipe
2134   * @param {String} val
2135   * @param {Function|String} [callback]
2136   * @param {Boolean}
2136 [allowSpaceAsDelimiter]
2137   * @returns {Array|void}
2138   */
2139  $.split = function (val, callback, allowSpaceAsDelimiter) {
2140    // default to true
2141    allowSpaceAsDelimiter = allowSpaceAsDelimiter === undefined || allowSpaceAsDelimiter === true;
2142    var pattern = '[,|'+(allowSpaceAsDelimiter ? '\\s':'')+'-]\\s*',
2143      regex = new RegExp(pattern, 'g');
2144    if (typeof callback !== 'function') {
2145      // return array
2146      if (!val) {
2147        return [];
2148      }
2149      var values = [];
2150      $.each(val.split(callback ? callback : regex),
2151        function (i, str) {
2152          str = $.trim(str);
2153          if (str.length) {
2154            values.push(str);
2155          }
2156        }
2157      );
2158      return values;
2159    } else if (val) {
2160      // exec callback func on each
2161      $.each(val.split(regex),
2162        function (i, str) {
2163          str = $.trim(str);
2164          if (str.length) {
2165            return callback(str, i);
2166          }
2167        }
2168      );
2169    }
2170  };
2171
2172  /**
2173   * Short hand function that makes the validation setup require less code
2174   * @param conf
2175   */
2176  $.validate = function (conf) {
2177
2178    var defaultConf = $.extend($.formUtils.defaultConfig(), {
2179      form: 'form',
2180      validateOnEvent: false,
2181      validateOnBlur: true,
2182      validateCheckboxRadioOnClick: true,
2183      showHelpOnFocus: true,
2184      addSuggestions: true,
2185      modules: '',
2186      onModulesLoaded: null,
2187      language: false,
2188      onSuccess: false,
2189      onError: false,
2190      onElementValidate: false
2191    });
2192
2193    conf = $.extend(defaultConf, conf || {});
2194
2195    $(window).trigger('formValidationPluginInit', [conf]);
2196
2197    if( conf.lang && conf.lang !== 'en' ) {
2198      var langModule = 'lang/'+conf.lang+'.js';
2199      conf.modules += conf.modules.length ? ','+langModule : langModule;
2200    }
2201
2202    // Add validation to forms
2203    $(conf.form).each(function (i, form) {
2204
2205      // Make a reference to the config for this form
2206      form.validationConfig = conf;
2207
2208      // Trigger jQuery event that we're about to setup validation
2209      var $form = $(form);
2210      $form.trigger('formValidationSetup', [$form, conf]);
2211
2212      // Remove classes and event handlers that might have been
2213      // added by a previous call to $.validate
2214      $form.find('.has-help-txt')
2215          .unbind('focus.validation')
2216          .unbind('blur.validation');
2217
2218      $form
2219        .removeClass('has-validation-callback')
2220        .unbind('submit.validation')
2221        .unbind('reset.validation')
2222        .find('input[data-validation],textarea[data-validation]')
2223          .unbind('blur.validation');
2224
2225      // Validate when submitted
2226      $form.bind('submit.validation', function (evt) {
2227
2228        var $form = $(this),
2229          stop = function() {
2230            evt.stopImmediatePropagation();
2231            return false;
2232          };
2233
2234        if ($.formUtils.haltValidation) {
2235          // pressing several times on submit button while validation is halted
2236          return stop();
2237        }
2238
2239        if ($.formUtils.isLoadingModules) {
2240          setTimeout(function () {
2241            $form.trigger('submit.validation');
2242          }, 200);
2243          return stop();
2244        }
2245
2246        var valid = $form.isValid(conf.language, conf);
2247        if ($.formUtils.haltValidation) {
2248          // Validation got halted by one of the validators
2249          return stop();
2250        } else {
2251          if (valid && typeof conf.onSuccess === 'function') {
2252            var callbackResponse = conf.onSuccess($form);
2253            if (callbackResponse === false) {
2254              return stop();
2255            }
2256          } else if (!valid && typeof conf.onError === 'function') {
2257            conf.onError($form);
2258            return stop();
2259          } else {
2260            return valid ? true : stop();
2261          }
2262        }
2263      })
2264      .bind('reset.validation', function () {
2265        $.formUtils.dialogs.removeAllMessagesAndStyling($form, conf);
2266      })
2267      .addClass('has-validation-callback');
2268
2269      if (conf.showHelpOnFocus) {
2270        $form.showHelpOnFocus();
2271      }
2272      if (conf.addSuggestions) {
2273        $form.addSuggestions();
2274      }
2275      if (conf.validateOnBlur) {
2276        $form.validateOnBlur(conf.language, conf);
2277        $form.bind('html5ValidationAttrsFound', function () {
2278          $form.validateOnBlur(conf.language, conf);
2279        });
2280      }
2281      if (conf.validateOnEvent) {
2282        $form.validateOnEvent(conf.language, conf);
2283      }
2284    });
2285
2286    if (conf.modules !== '') {
2287      $.formUtils.loadModules(conf.modules, null, function() {
2288        if (typeof conf.onModulesLoaded === 'function') {
2289          conf.onModulesLoaded();
2290        }
2291        var $form = typeof conf.form === 'string' ? $(conf.form) : conf.form;
2292        $.formUtils.$win.trigger('validatorsLoaded', [$form, conf]);
2293      });
2294    }
2295  };
2296
2297})(jQuery);
2298
2299/**
2300 * Utility methods and properties attached to $.formUtils
2301 */
2302(function($, window) {
2303
2304  'use strict';
2305
2306  var $win = $(window);
2307
2308  $.formUtils = $.extend($.formUtils || {}, {
2309
2310    $win: $win,
2311
2312    /**
2313     * Default config for $(...).isValid();
2314     */
2315    defaultConfig: function () {
2316      return {
2317        ignore: [], // Names of inputs not to be validated even though `validationRuleAttribute` containing the validation rules tells us to
2318        errorElementClass: 'error', // Class that will be put on elements which value is invalid
2319        successElementClass: 'valid', // Class that will be put on elements that has been validated with success
2320        borderColorOnError: '#b94a48', // Border color of elements which value is invalid, empty string to not change border color
2321        errorMessageClass: 'form-error', // class name of div containing error messages when validation fails
2322        validationRuleAttribute: 'data-validation', // name of the attribute holding the validation rules
2323        validationErrorMsgAttribute: 'data-validation-error-msg', // define custom err msg inline with element
2324        errorMessagePosition: 'inline', // Can be either "top" or "inline"
2325        errorMessageTemplate: {
2326          container: '<div class="{errorMessageClass} alert alert-danger">{messages}</div>',
2327          messages: '<strong>{errorTitle}</strong><ul>{fields}</ul>',
2328          field: '<li>{msg}</li>'
2329        },
2330        scrollToTopOnError: true,
2331        dateFormat: 'yyyy-mm-dd',
2332        addValidClassOnAll: false, // whether or not to apply class="valid" even if the input wasn't validated
2333        decimalSeparator: '.',
2334        inputParentClassOnError: 'has-error', // twitter-bootstrap default class name
2335        inputParentClassOnSuccess: 'has-success', // twitter-bootstrap default class name
2336        validateHiddenInputs: false, // whether or not hidden inputs should be validated
2337        inlineErrorMessageCallback: false,
2338        submitErrorMessageCallback: false
2339      };
2340    },
2341
2342    /**
2343     * Available validators
2344     */
2345    validators: {},
2346
2347    /**
2348     * Available sanitizers
2349     */
2350    sanitizers: {},
2351
2352    /**
2353     * Events triggered by form validator
2354     */
2355    _events: {load: [], valid: [], invalid: []},
2356
2357    /**
2358     * Setting this property to true during validation will
2359     * stop further validation from taking place and form will
2360     * not be sent
2361     */
2362    haltValidation: false,
2363
2364    /**
2365     * Function for adding a validator
2366     * @see $.formUtils.addAsyncValidator (async.js)
2367     * @param {Object} validator
2368     */
2369    addValidator: function (validator) {
2370      // prefix with "validate_" for backward compatibility reasons
2371      var name = validator.name.indexOf('validate_') === 0 ? validator.name : 'validate_' + validator.name;
2372      if (validator.validateOnKeyUp === undefined) {
2373        validator.validateOnKeyUp = true;
2374      }
2375      this.validators[name] = validator;
2376    },
2377
2378    /**
2379     * Function for adding a sanitizer
2380     * @param {Object} sanitizer
2381     */
2382    addSanitizer: function (sanitizer) {
2383      this.sanitizers[sanitizer.name] = sanitizer;
2384    },
2385
2386    /**
2387     * Warn user via the console if available
2388     */
2389    warn: function(msg, fallbackOnAlert) {
2390      if( 'console' in window ) {
2391        if( typeof window.console.warn === 'function' ) {
2392          window.console.warn(msg);
2393        } else if( typeof window.console.log === 'function' ) {
2394          window.console.log(msg);
2395        }
2396      } else if (fallbackOnAlert) {
2397        // This is for some old IE version...
2398        alert(msg);
2399      }
2400    },
2401
2402    /**
2403     * Same as input $.fn.val() but also supporting input of typ radio or checkbox
2404     * @example
2405     *
2406     *  $.formUtils.getValue('.myRadioButtons', $('#some-form'));
2407     *  $.formUtils.getValue($('#some-form').find('.check-boxes'));
2408     *
2409     * @param query
2410     * @param $parent
2411     * @returns {String|Boolean}
2412     */
2413    getValue: function(query, $parent) {
2414      var $inputs = $parent ? $parent.find(query) : query;
2415      if ($inputs.length > 0 ) {
2416        var type = $inputs.eq(0).attr('type');
2417        if (type === 'radio' || type === 'checkbox') {
2418          return $inputs.filter(':checked').val() || '';
2419        } else {
2420          return $inputs.val() || '';
2421        }
2422      }
2423      return false;
2424    },
2425
2426    /**
2427     * Validate the value of given element according to the validation rules
2428     * found in the attribute data-validation. Will return an object representing
2429     * a validation result, having the props shouldChangeDisplay, isValid and errorMsg
2430     * @param {jQuery} $elem
2431     * @param {Object} language ($.formUtils.LANG)
2432     * @param {Object} conf
2433     * @param {jQuery} $form
2434     * @param {String} [eventContext]
2435     * @return {Object}
2436     */
2437    validateInput: function ($elem, language, conf, $form, eventContext) {
2438
2439      conf = conf || $.formUtils.defaultConfig();
2440      language = language || $.formUtils.LANG;
2441
2442      if (!$form.length) {
2443        $form = $elem.parent();
2444      }
2445
2446      var value = this.getValue($elem);
2447
2448      $elem
2449        .valAttr('skipped', false)
2450        .one('beforeValidation', function() {
2451          // Skip input because its hidden or disabled
2452          // Doing this in a callback makes it possible for others to prevent the default
2453          // behaviour by binding to the same event and call evt.stopImmediatePropagation()
2454          if ($elem.attr('disabled') || (!$elem.is(':visible') && !conf.validateHiddenInputs)) {
2455            $elem.valAttr('skipped', 1);
2456          }
2457        })
2458        .trigger('beforeValidation', [value, language, conf]);
2459
2460      var inputIsOptional = $elem.valAttr('optional') === 'true',
2461          skipBecauseItsEmpty = !value && inputIsOptional,
2462          validationRules = $elem.attr(conf.validationRuleAttribute),
2463          isValid = true,
2464          errorMsg = '',
2465          result = {isValid: true, shouldChangeDisplay:true, errorMsg:''};
2466
2467      // For input type="number", browsers attempt to parse the entered value into a number.
2468      // If the input is not numeric, browsers handle the situation differently:
2469      // Chrome 48 simply disallows non-numeric input; FF 44 clears out the input box on blur;
2470      // Safari 5 parses the entered string to find a leading number.
2471      // If the input fails browser validation, the browser sets the input value equal to an empty string.
2472      // Therefore, we cannot distinguish (apart from hacks) between an empty input type="text" and one with a
2473      // value that can't be parsed by the browser.
2474
2475      if (!validationRules || skipBecauseItsEmpty || $elem.valAttr('skipped')) {
2476        result.shouldChangeDisplay = conf.addValidClassOnAll;
2477        return result;
2478      }
2479
2480      // Filter out specified characters
2481      var ignore = $elem.valAttr('ignore');
2482      if (ignore) {
2483        $.each(ignore.split(''), function(i, character) {
2484          value = value.replace(new RegExp('\\'+character, 'g'), '');
2485        });
2486      }
2487
2488      $.split(validationRules, function (rule) {
2489
2490        if (rule.indexOf('validate_') !== 0) {
2491          rule = 'validate_' + rule;
2492        }
2493
2494        var validator = $.formUtils.validators[rule];
2495
2496        if (validator) {
2497
2498          // special change of element for checkbox_group rule
2499          if (rule === 'validate_checkbox_group') {
2500            // set element to first in group, so error msg attr doesn't need to be set on all elements in group
2501            $elem = $form.find('[name="' + $elem.attr('name') + '"]:eq(0)');
2502          }
2503
2504          if (eventContext !== 'keyup' || validator.validateOnKeyUp) {
2505            // A validator can prevent itself from getting triggered on keyup
2506            isValid = validator.validatorFunction(value, $elem, conf, language, $form, eventContext);
2507          }
2508
2509          if (!isValid) {
2510            if (conf.validateOnBlur) {
2511              $elem.validateOnKeyUp(language, conf);
2512            }
2513            errorMsg = $.formUtils.dialogs.resolveErrorMessage($elem, validator, rule, conf, language);
2514            return false; // break iteration
2515          }
2516
2517        } else {
2518
2519          // todo: Add some validator lookup function and tell immediately which module is missing
2520          throw new Error('Using undefined validator "' + rule +
2521            '". Maybe you have forgotten to load the module that "' + rule +'" belongs to?');
2522
2523        }
2524
2525      });
2526
2527
2528      if (isValid === false) {
2529        $elem.trigger('validation', false);
2530        result.errorMsg = errorMsg;
2531        result.isValid = false;
2532        result.shouldChangeDisplay = true;
2533      } else if (isValid === null) {
2534        // A validatorFunction returning null means that it's not able to validate
2535        // the input at this time. Most probably some async stuff need to gets finished
2536        // first and then the validator will re-trigger the validation.
2537        result.shouldChangeDisplay = false;
2538      } else {
2539        $elem.trigger('validation', true);
2540        result.shouldChangeDisplay = true;
2541      }
2542
2543      // Run element validation callback
2544      if (typeof conf.onElementValidate === 'function' && errorMsg !== null) {
2545        conf.onElementValidate(result.isValid, $elem, $form, errorMsg);
2546      }
2547
2548      $elem.trigger('afterValidation', [result, eventContext]);
2549
2550      return result;
2551    },
2552
2553    /**
2554     * Is it a correct date according to given dateFormat. Will return false if not, otherwise
2555     * an array 0=>year 1=>month 2=>day
2556     *
2557     * @param {String} val
2558     * @param {String} dateFormat
2559     * @param {Boolean} [addMissingLeadingZeros]
2560     * @return {Array}|{Boolean}
2561     */
2562    parseDate: function (val, dateFormat, addMissingLeadingZeros) {
2563      var divider = dateFormat.replace(/[a-zA-Z]/gi, '').substring(0, 1),
2564        regexp = '^',
2565        formatParts = dateFormat.split(divider || null),
2566        matches, day, month, year;
2567
2568      $.each(formatParts, function (i, part) {
2569        regexp += (i > 0 ? '\\' + divider : '') + '(\\d{' + part.length + '})';
2570      });
2571
2572      regexp += '$';
2573
2574      if (addMissingLeadingZeros) {
2575        var newValueParts = [];
2576        $.each(val.split(divider), function(i, part) {
2577          if(part.length === 1) {
2578            part = '0'+part;
2579          }
2580          newValueParts.push(part);
2581        });
2582        val = newValueParts.join(divider);
2583      }
2584
2585      matches = val.match(new RegExp(regexp));
2586      if (matches === null) {
2587        return false;
2588      }
2589
2590      var findDateUnit = function (unit, formatParts, matches) {
2591        for (var i = 0; i < formatParts.length; i++) {
2592          if (formatParts[i].substring(0, 1) === unit) {
2593            return $.formUtils.parseDateInt(matches[i + 1]);
2594          }
2595        }
2596        return -1;
2597      };
2598
2599      month = findDateUnit('m', formatParts, matches);
2600      day = findDateUnit('d', formatParts, matches);
2601      year = findDateUnit('y', formatParts, matches);
2602
2603      if ((month === 2 && day > 28 && (year % 4 !== 0 || year % 100 === 0 && year % 400 !== 0)) ||
2604        (month === 2 && day > 29 && (year % 4 === 0 || year % 100 !== 0 && year % 400 === 0)) ||
2605        month > 12 || month === 0) {
2606        return false;
2607      }
2608      if ((this.isShortMonth(month) && day > 30) || (!this.isShortMonth(month) && day > 31) || day === 0) {
2609        return false;
2610      }
2611
2612      return [year, month, day];
2613    },
2614
2615    /**
2616     * skum fix. är talet 05 eller lägre ger parseInt rätt int annars får man 0 när man kör parseInt?
2617     *
2618     * @param {String} val
2619     * @return {Number}
2620     */
2621    parseDateInt: function (val) {
2622      if (val.indexOf('0') === 0) {
2623        val = val.replace('0', '');
2624      }
2625      return parseInt(val, 10);
2626    },
2627
2628    /**
2629     * Has month only 30 days?
2630     *
2631     * @param {Number} m
2632     * @return {Boolean}
2633     */
2634    isShortMonth: function (m) {
2635      return (m % 2 === 0 && m < 7) || (m % 2 !== 0 && m > 7);
2636    },
2637
2638    /**
2639     * Restrict input length
2640     *
2641     * @param {jQuery} $inputElement Jquery Html object
2642     * @param {jQuery} $maxLengthElement jQuery Html Object
2643     * @return void
2644     */
2645    lengthRestriction: function ($inputElement, $maxLengthElement) {
2646      // read maxChars from counter display initial text value
2647      var maxChars = parseInt($maxLengthElement.text(), 10),
2648        charsLeft = 0,
2649
2650      // internal function does the counting and sets display value
2651        countCharacters = function () {
2652          var numChars = $inputElement.val().length;
2653          if (numChars > maxChars) {
2654            // get current scroll bar position
2655            var currScrollTopPos = $inputElement.scrollTop();
2656            // trim value to max length
2657            $inputElement.val($inputElement.val().substring(0, maxChars));
2658            $inputElement.scrollTop(currScrollTopPos);
2659          }
2660          charsLeft = maxChars - numChars;
2661          if (charsLeft < 0) {
2662            charsLeft = 0;
2663          }
2664
2665          // set counter text
2666          $maxLengthElement.text(charsLeft);
2667        };
2668
2669      // bind events to this element
2670      // setTimeout is needed, cut or paste fires before val is available
2671      $($inputElement).bind('keydown keyup keypress focus blur', countCharacters)
2672        .bind('cut paste', function () {
2673          setTimeout(countCharacters, 100);
2674        });
2675
2676      // count chars on pageload, if there are prefilled input-values
2677      $(document).bind('ready', countCharacters);
2678    },
2679
2680    /**
2681     * Test numeric against allowed range
2682     *
2683     * @param $value int
2684     * @param $rangeAllowed str; (1-2, min1, max2, 10)
2685     * @return array
2686     */
2687    numericRangeCheck: function (value, rangeAllowed) {
2688      // split by dash
2689      var range = $.split(rangeAllowed),
2690      // min or max
2691        minmax = parseInt(rangeAllowed.substr(3), 10);
2692
2693      if( range.length === 1 && rangeAllowed.indexOf('min') === -1 && rangeAllowed.indexOf('max') === -1 ) {
2694        range = [rangeAllowed, rangeAllowed]; // only a number, checking agains an exact number of characters
2695      }
2696
2697      // range ?
2698      if (range.length === 2 && (value < parseInt(range[0], 10) || value > parseInt(range[1], 10) )) {
2699        return [ 'out', range[0], range[1] ];
2700      } // value is out of range
2701      else if (rangeAllowed.indexOf('min') === 0 && (value < minmax )) // min
2702      {
2703        return ['min', minmax];
2704      } // value is below min
2705      else if (rangeAllowed.indexOf('max') === 0 && (value > minmax )) // max
2706      {
2707        return ['max', minmax];
2708      } // value is above max
2709      // since no other returns executed, value is in allowed range
2710      return [ 'ok' ];
2711    },
2712
2713
2714    _numSuggestionElements: 0,
2715    _selectedSuggestion: null,
2716    _previousTypedVal: null,
2717
2718    /**
2719     * Utility function that can be used to create plugins that gives
2720     * suggestions when inputs is typed into
2721     * @param {jQuery} $elem
2722     * @param {Array} suggestions
2723     * @param {Object} settings - Optional
2724     * @return {jQuery}
2725     */
2726    suggest: function ($elem, suggestions, settings) {
2727      var conf = {
2728          css: {
2729            maxHeight: '150px',
2730            background: '#FFF',
2731            lineHeight: '150%',
2732            textDecoration: 'underline',
2733            overflowX: 'hidden',
2734            overflowY: 'auto',
2735            border: '#CCC solid 1px',
2736            borderTop: 'none',
2737            cursor: 'pointer'
2738          },
2739          activeSuggestionCSS: {
2740            background: '#E9E9E9'
2741          }
2742        },
2743        setSuggsetionPosition = function ($suggestionContainer, $input) {
2744          var offset = $input.offset();
2745          $suggestionContainer.css({
2746            width: $input.outerWidth(),
2747            left: offset.left + 'px',
2748            top: (offset.top + $input.outerHeight()) + 'px'
2749          });
2750        };
2751
2752      if (settings) {
2753        $.extend(conf, settings);
2754      }
2755
2756      conf.css.position = 'absolute';
2757      conf.css['z-index'] = 9999;
2758      $elem.attr('autocomplete', 'off');
2759
2760      if (this._numSuggestionElements === 0) {
2761        // Re-position suggestion container if window size changes
2762        $win.bind('resize', function () {
2763          $('.jquery-form-suggestions').each(function () {
2764            var $container = $(this),
2765              suggestID = $container.attr('data-suggest-container');
2766            setSuggsetionPosition($container, $('.suggestions-' + suggestID).eq(0));
2767          });
2768        });
2769      }
2770
2771      this._numSuggestionElements++;
2772
2773      var onSelectSuggestion = function ($el) {
2774        var suggestionId = $el.valAttr('suggestion-nr');
2775        $.formUtils._selectedSuggestion = null;
2776        $.formUtils._previousTypedVal = null;
2777        $('.jquery-form-suggestion-' + suggestionId).fadeOut('fast');
2778      };
2779
2780      $elem
2781        .data('suggestions', suggestions)
2782        .valAttr('suggestion-nr', this._numSuggestionElements)
2783        .unbind('focus.suggest')
2784        .bind('focus.suggest', function () {
2785          $(this).trigger('keyup');
2786          $.formUtils._selectedSuggestion = null;
2787        })
2788        .unbind('keyup.suggest')
2789        .bind('keyup.suggest', function () {
2790          var $input = $(this),
2791            foundSuggestions = [],
2792            val = $.trim($input.val()).toLocaleLowerCase();
2793
2794          if (val === $.formUtils._previousTypedVal) {
2795            return;
2796          }
2797          else {
2798            $.formUtils._previousTypedVal = val;
2799          }
2800
2801          var hasTypedSuggestion = false,
2802            suggestionId = $input.valAttr('suggestion-nr'),
2803            $suggestionContainer = $('.jquery-form-suggestion-' + suggestionId);
2804
2805          $suggestionContainer.scrollTop(0);
2806
2807          // Find the right suggestions
2808          if (val !== '') {
2809            var findPartial = val.length > 2;
2810            $.each($input.data('suggestions'), function (i, suggestion) {
2811              var lowerCaseVal = suggestion.toLocaleLowerCase();
2812              if (lowerCaseVal === val) {
2813                foundSuggestions.push('<strong>' + suggestion + '</strong>');
2814                hasTypedSuggestion = true;
2815                return false;
2816              } else if (lowerCaseVal.indexOf(val) === 0 || (findPartial && lowerCaseVal.indexOf(val) > -1)) {
2817                foundSuggestions.push(suggestion.replace(new RegExp(val, 'gi'), '<strong>$&</strong>'));
2818              }
2819            });
2820          }
2821
2822          // Hide suggestion container
2823          if (hasTypedSuggestion || (foundSuggestions.length === 0 && $suggestionContainer.length > 0)) {
2824            $suggestionContainer.hide();
2825          }
2826
2827          // Create suggestion container if not already exists
2828          else if (foundSuggestions.length > 0 && $suggestionContainer.length === 0) {
2829            $suggestionContainer = $('<div></div>').css(conf.css).appendTo('body');
2830            $elem.addClass('suggestions-' + suggestionId);
2831            $suggestionContainer
2832              .attr('data-suggest-container', suggestionId)
2833              .addClass('jquery-form-suggestions')
2834              .addClass('jquery-form-suggestion-' + suggestionId);
2835          }
2836
2837          // Show hidden container
2838          else if (foundSuggestions.length > 0 && !$suggestionContainer.is(':visible')) {
2839            $suggestionContainer.show();
2840          }
2841
2842          // add suggestions
2843          if (foundSuggestions.length > 0 && val.length !== foundSuggestions[0].length) {
2844
2845            // put container in place every time, just in case
2846            setSuggsetionPosition($suggestionContainer, $input);
2847
2848            // Add suggestions HTML to container
2849            $suggestionContainer.html('');
2850            $.each(foundSuggestions, function (i, text) {
2851              $('<div></div>')
2852                .append(text)
2853                .css({
2854                  overflow: 'hidden',
2855                  textOverflow: 'ellipsis',
2856                  whiteSpace: 'nowrap',
2857                  padding: '5px'
2858                })
2859                .addClass('form-suggest-element')
2860                .appendTo($suggestionContainer)
2861                .click(function () {
2862                  $input.focus();
2863                  $input.val($(this).text());
2864                  $input.trigger('change');
2865                  onSelectSuggestion($input);
2866                });
2867            });
2868          }
2869        })
2870        .unbind('keydown.validation')
2871        .bind('keydown.validation', function (e) {
2872          var code = (e.keyCode ? e.keyCode : e.which),
2873            suggestionId,
2874            $suggestionContainer,
2875            $input = $(this);
2876
2877          if (code === 13 && $.formUtils._selectedSuggestion !== null) {
2878            suggestionId = $input.valAttr('suggestion-nr');
2879            $suggestionContainer = $('.jquery-form-suggestion-' + suggestionId);
2880            if ($suggestionContainer.length > 0) {
2881              var newText = $suggestionContainer.find('div').eq($.formUtils._selectedSuggestion).text();
2882              $input.val(newText);
2883              $input.trigger('change');
2884              onSelectSuggestion($input);
2885              e.preventDefault();
2886            }
2887          }
2888          else {
2889            suggestionId = $input.valAttr('suggestion-nr');
2890            $suggestionContainer = $('.jquery-form-suggestion-' + suggestionId);
2891            var $suggestions = $suggestionContainer.children();
2892            if ($suggestions.length > 0 && $.inArray(code, [38, 40]) > -1) {
2893              if (code === 38) { // key up
2894                if ($.formUtils._selectedSuggestion === null) {
2895                  $.formUtils._selectedSuggestion = $suggestions.length - 1;
2896                }
2897                else{
2898                  $.formUtils._selectedSuggestion--;
2899                }
2900                if ($.formUtils._selectedSuggestion < 0) {
2901                  $.formUtils._selectedSuggestion = $suggestions.length - 1;
2902                }
2903              }
2904              else if (code === 40) { // key down
2905                if ($.formUtils._selectedSuggestion === null) {
2906                  $.formUtils._selectedSuggestion = 0;
2907                }
2908                else {
2909                  $.formUtils._selectedSuggestion++;
2910                }
2911                if ($.formUtils._selectedSuggestion > ($suggestions.length - 1)) {
2912                  $.formUtils._selectedSuggestion = 0;
2913                }
2914              }
2915
2916              // Scroll in suggestion window
2917              var containerInnerHeight = $suggestionContainer.innerHeight(),
2918                containerScrollTop = $suggestionContainer.scrollTop(),
2919                suggestionHeight = $suggestionContainer.children().eq(0).outerHeight(),
2920                activeSuggestionPosY = suggestionHeight * ($.formUtils._selectedSuggestion);
2921
2922              if (activeSuggestionPosY < containerScrollTop || activeSuggestionPosY > (containerScrollTop + containerInnerHeight)) {
2923                $suggestionContainer.scrollTop(activeSuggestionPosY);
2924              }
2925
2926              $suggestions
2927                .removeClass('active-suggestion')
2928                .css('background', 'none')
2929                .eq($.formUtils._selectedSuggestion)
2930                .addClass('active-suggestion')
2931                .css(conf.activeSuggestionCSS);
2932
2933              e.preventDefault();
2934              return false;
2935            }
2936          }
2937        })
2938        .unbind('blur.suggest')
2939        .bind('blur.suggest', function () {
2940          onSelectSuggestion($(this));
2941        });
2942
2943      return $elem;
2944    },
2945
2946    /**
2947     * Error dialogs
2948     *
2949     * @var {Object}
2950     */
2951    LANG: {
2952      errorTitle: 'Form submission failed!',
2953      requiredField: 'This is a required field',
2954      requiredFields: 'You have not answered all required fields',
2955      badTime: 'You have not given a correct time',
2956      badEmail: 'You have not given a correct e-mail address',
2957      badTelephone: 'You have not given a correct phone number',
2958      badSecurityAnswer: 'You have not given a correct answer to the security question',
2959      badDate: 'You have not given a correct date',
2960      lengthBadStart: 'The input value must be between ',
2961      lengthBadEnd: ' characters',
2962      lengthTooLongStart: 'The input value is longer than ',
2963      lengthTooShortStart: 'The input value is shorter than ',
2964      notConfirmed: 'Input values could not be confirmed',
2965      badDomain: 'Incorrect domain value',
2966      badUrl: 'The input value is not a correct URL',
2967      badCustomVal: 'The input value is incorrect',
2968      andSpaces: ' and spaces ',
2969      badInt: 'The input value was not a correct number',
2970      badSecurityNumber: 'Your social security number was incorrect',
2971      badUKVatAnswer: 'Incorrect UK VAT Number',
2972      badUKNin: 'Incorrect UK NIN',
2973      badUKUtr: 'Incorrect UK UTR Number',
2974      badStrength: 'The password isn\'t strong enough',
2975      badNumberOfSelectedOptionsStart: 'You have to choose at least ',
2976      badNumberOfSelectedOptionsEnd: ' answers',
2977      badAlphaNumeric: 'The input value can only contain alphanumeric characters ',
2978      badAlphaNumericExtra: ' and ',
2979      wrongFileSize: 'The file you are trying to upload is too large (max %s)',
2980      wrongFileType: 'Only files of type %s is allowed',
2981      groupCheckedRangeStart: 'Please choose between ',
2982      groupCheckedTooFewStart: 'Please choose at least ',
2983      groupCheckedTooManyStart: 'Please choose a maximum of ',
2984      groupCheckedEnd: ' item(s)',
2985      badCreditCard: 'The credit card number is not correct',
2986      badCVV: 'The CVV number was not correct',
2987      wrongFileDim : 'Incorrect image dimensions,',
2988      imageTooTall : 'the image can not be taller than',
2989      imageTooWide : 'the image can not be wider than',
2990      imageTooSmall : 'the image was too small',
2991      min : 'min',
2992      max : 'max',
2993      imageRatioNotAccepted : 'Image ratio is not be accepted',
2994      badBrazilTelephoneAnswer: 'The phone number entered is invalid',
2995      badBrazilCEPAnswer: 'The CEP entered is invalid',
2996      badBrazilCPFAnswer: 'The CPF entered is invalid',
2997      badPlPesel: 'The PESEL entered is invalid',
2998      badPlNip: 'The NIP entered is invalid',
2999      badPlRegon: 'The REGON entered is invalid',
3000      badreCaptcha: 'Please confirm that you are not a bot',
3001      passwordComplexityStart: 'Password must contain at least ',
3002      passwordComplexitySeparator: ', ',
3003      passwordComplexityUppercaseInfo: ' uppercase letter(s)',
3004      passwordComplexityLowercaseInfo: ' lowercase letter(s)',
3005      passwordComplexitySpecialCharsInfo: ' special character(s)',
3006      passwordComplexityNumericCharsInfo: ' numeric character(s)',
3007      passwordComplexityEnd: '.'
3008    }
3009  });
3010
3011})(jQuery, window);
3012
3013/**
3014 * File declaring all default validators.
3015 */
3016(function($) {
3017
3018  /*
3019   * Validate email
3020   */
3021  $.formUtils.addValidator({
3022    name: 'email',
3023    validatorFunction: function (email) {
3024
3025      var emailParts = email.toLowerCase().split('@'),
3026        localPart = emailParts[0],
3027        domain = emailParts[1];
3028
3029      if (localPart && domain) {
3030
3031        if( localPart.indexOf('"') === 0 ) {
3032          var len = localPart.length;
3033          localPart = localPart.replace(/\"/g, '');
3034          if( localPart.length !== (len-2) ) {
3035            return false; // It was not allowed to have more than two apostrophes
3036          }
3037        }
3038
3039        return $.formUtils.validators.validate_domain.validatorFunction(emailParts[1]) &&
3040          localPart.indexOf('.') !== 0 &&
3041          localPart.substring(localPart.length-1, localPart.length) !== '.' &&
3042          localPart.indexOf('..') === -1 &&
3043          !(/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(localPart));
3044      }
3045
3046      return false;
3047    },
3048    errorMessage: '',
3049    errorMessageKey: 'badEmail'
3050  });
3051
3052  /*
3053   * Validate domain name
3054   */
3055  $.formUtils.addValidator({
3056    name: 'domain',
3057    validatorFunction: function (val) {
3058      return val.length > 0 &&
3059        val.length <= 253 && // Including sub domains
3060        !(/[^a-zA-Z0-9]/.test(val.slice(-2))) && !(/[^a-zA-Z0-9]/.test(val.substr(0, 1))) && !(/[^a-zA-Z0-9\.\-]/.test(val)) &&
3061        val.split('..').length === 1 &&
3062        val.split('.').length > 1;
3063    },
3064    errorMessage: '',
3065    errorMessageKey: 'badDomain'
3066  });
3067
3068  /*
3069   * Validate required
3070   */
3071  $.formUtils.addValidator({
3072    name: 'required',
3073    validatorFunction: function (val, $el, config, language, $form) {
3074      switch ($el.attr('type')) {
3075        case 'checkbox':
3076          return $el.is(':checked');
3077        case 'radio':
3078          return $form.find('input[name="' + $el.attr('name') + '"]').filter(':checked').length > 0;
3079        default:
3080          return $.trim(val) !== '';
3081      }
3082    },
3083    errorMessage: '',
3084    errorMessageKey: function(config) {
3085      if (config.errorMessagePosition === 'top' || typeof config.errorMessagePosition === 'function') {
3086        return 'requiredFields';
3087      }
3088      else {
3089        return 'requiredField';
3090      }
3091    }
3092  });
3093
3094  /*
3095   * Validate length range
3096   */
3097  $.formUtils.addValidator({
3098    name: 'length',
3099    validatorFunction: function (val, $el, conf, lang) {
3100      var lengthAllowed = $el.valAttr('length'),
3101        type = $el.attr('type');
3102
3103      if (lengthAllowed === undefined) {
3104        alert('Please add attribute "data-validation-length" to ' + $el[0].nodeName + ' named ' + $el.attr('name'));
3105        return true;
3106      }
3107
3108      // check if length is above min, below max or within range.
3109      var len = type === 'file' && $el.get(0).files !== undefined ? $el.get(0).files.length : val.length,
3110        lengthCheckResults = $.formUtils.numericRangeCheck(len, lengthAllowed),
3111        checkResult;
3112
3113      switch (lengthCheckResults[0]) {   // outside of allowed range
3114        case 'out':
3115          this.errorMessage = lang.lengthBadStart + lengthAllowed + lang.lengthBadEnd;
3116          checkResult = false;
3117          break;
3118        // too short
3119        case 'min':
3120          this.errorMessage = lang.lengthTooShortStart + lengthCheckResults[1] + lang.lengthBadEnd;
3121          checkResult = false;
3122          break;
3123        // too long
3124        case 'max':
3125          this.errorMessage = lang.lengthTooLongStart + lengthCheckResults[1] + lang.lengthBadEnd;
3126          checkResult = false;
3127          break;
3128        // ok
3129        default:
3130          checkResult = true;
3131      }
3132
3133      return checkResult;
3134    },
3135    errorMessage: '',
3136    errorMessageKey: ''
3137  });
3138
3139  /*
3140   * Validate url
3141   */
3142  $.formUtils.addValidator({
3143    name: 'url',
3144    validatorFunction: function (url) {
3145      // written by Scott Gonzalez: http://projects.scottsplayground.com/iri/
3146      // - Victor Jonsson added support for arrays in the url ?arg[]=sdfsdf
3147      // - General improvements made by Stéphane Moureau <https://github.com/TraderStf>
3148
3149      var urlFilter = /^(https?|ftp):\/\/((((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|\[|\]|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;
3150      if (urlFilter.test(url)) {
3151        var domain = url.split('://')[1],
3152          domainSlashPos = domain.indexOf('/');
3153
3154        if (domainSlashPos > -1) {
3155          domain = domain.substr(0, domainSlashPos);
3156        }
3157
3158        return $.formUtils.validators.validate_domain.validatorFunction(domain); // todo: add support for IP-addresses
3159      }
3160      return false;
3161    },
3162    errorMessage: '',
3163    errorMessageKey: 'badUrl'
3164  });
3165
3166  /*
3167   * Validate number (floating or integer)
3168   */
3169  $.formUtils.addValidator({
3170    name: 'number',
3171    validatorFunction: function (val, $el, conf) {
3172      if (val !== '') {
3173        var allowing = $el.valAttr('allowing') || '',
3174          decimalSeparator = $el.valAttr('decimal-separator') || conf.decimalSeparator,
3175          allowsRange = false,
3176          begin, end,
3177          steps = $el.valAttr('step') || '',
3178          allowsSteps = false,
3179          sanitize = $el.attr('data-sanitize') || '',
3180          isFormattedWithNumeral = sanitize.match(/(^|[\s])numberFormat([\s]|$)/i);
3181
3182        if (isFormattedWithNumeral) {
3183          if (!window.numeral) {
3184            throw new ReferenceError('The data-sanitize value numberFormat cannot be used without the numeral' +
3185              ' library. Please see Data Validation in http://www.formvalidator.net for more information.');
3186          }
3187          //Unformat input first, then convert back to String
3188          if (val.length) {
3189            val = String(numeral().unformat(val));
3190          }
3191        }
3192
3193        if (allowing.indexOf('number') === -1) {
3194          allowing += ',number';
3195        }
3196
3197        if (allowing.indexOf('negative') === -1 && val.indexOf('-') === 0) {
3198          return false;
3199        }
3200
3201        if (allowing.indexOf('range') > -1) {
3202          begin = parseFloat(allowing.substring(allowing.indexOf('[') + 1, allowing.indexOf(';')));
3203          end = parseFloat(allowing.substring(allowing.indexOf(';') + 1, allowing.indexOf(']')));
3204          allowsRange = true;
3205        }
3206
3207        if (steps !== '') {
3208          allowsSteps = true;
3209        }
3210
3211        if (decimalSeparator === ',') {
3212          if (val.indexOf('.') > -1) {
3213            return false;
3214          }
3215          // Fix for checking range with floats using ,
3216          val = val.replace(',', '.');
3217        }
3218        if (val.replace(/[0-9-]/g, '') === '' && (!allowsRange || (val >= begin && val <= end)) && (!allowsSteps || (val % steps === 0))) {
3219          return true;
3220        }
3221
3222        if (allowing.indexOf('float') > -1 && val.match(new RegExp('^([0-9-]+)\\.([0-9]+)$')) !== null && (!allowsRange || (val >= begin && val <= end)) && (!allowsSteps || (val % steps === 0))) {
3223          return true;
3224        }
3225      }
3226      return false;
3227    },
3228    errorMessage: '',
3229    errorMessageKey: 'badInt'
3230  });
3231
3232  /*
3233   * Validate alpha numeric
3234   */
3235  $.formUtils.addValidator({
3236    name: 'alphanumeric',
3237    validatorFunction: function (val, $el, conf, language) {
3238      var patternStart = '^([a-zA-Z0-9',
3239        patternEnd = ']+)$',
3240        additionalChars = $el.valAttr('allowing'),
3241        pattern = '',
3242        hasSpaces = false;
3243
3244      if (additionalChars) {
3245        pattern = patternStart + additionalChars + patternEnd;
3246        var extra = additionalChars.replace(/\\/g, '');
3247        if (extra.indexOf(' ') > -1) {
3248          hasSpaces = true;
3249          extra = extra.replace(' ', '');
3250          extra += language.andSpaces || $.formUtils.LANG.andSpaces;
3251        }
3252
3253        if(language.badAlphaNumericAndExtraAndSpaces && language.badAlphaNumericAndExtra) {
3254          if(hasSpaces) {
3255            this.errorMessage = language.badAlphaNumericAndExtraAndSpaces + extra;
3256          } else {
3257            this.errorMessage = language.badAlphaNumericAndExtra + extra + language.badAlphaNumericExtra;
3258          }
3259        } else {
3260          this.errorMessage = language.badAlphaNumeric + language.badAlphaNumericExtra + extra;
3261        }
3262      } else {
3263        pattern = patternStart + patternEnd;
3264        this.errorMessage = language.badAlphaNumeric;
3265      }
3266
3267      return new RegExp(pattern).test(val);
3268    },
3269    errorMessage: '',
3270    errorMessageKey: ''
3271  });
3272
3273  /*
3274   * Validate against regexp
3275   */
3276  $.formUtils.addValidator({
3277    name: 'custom',
3278    validatorFunction: function (val, $el) {
3279      var regexp = new RegExp($el.valAttr('regexp'));
3280      return regexp.test(val);
3281    },
3282    errorMessage: '',
3283    errorMessageKey: 'badCustomVal'
3284  });
3285
3286  /*
3287   * Validate date
3288   */
3289  $.formUtils.addValidator({
3290    name: 'date',
3291    validatorFunction: function (date, $el, conf) {
3292      var dateFormat = $el.valAttr('format') || conf.dateFormat || 'yyyy-mm-dd',
3293        addMissingLeadingZeros = $el.valAttr('require-leading-zero') === 'false';
3294      return $.formUtils.parseDate(date, dateFormat, addMissingLeadingZeros) !== false;
3295    },
3296    errorMessage: '',
3297    errorMessageKey: 'badDate'
3298  });
3299
3300
3301  /*
3302   * Validate group of checkboxes, validate qty required is checked
3303   * written by Steve Wasiura : http://stevewasiura.waztech.com
3304   * element attrs
3305   *    data-validation="checkbox_group"
3306   *    data-validation-qty="1-2"  // min 1 max 2
3307   *    data-validation-error-msg="chose min 1, max of 2 checkboxes"
3308   */
3309  $.formUtils.addValidator({
3310    name: 'checkbox_group',
3311    validatorFunction: function (val, $el, conf, lang, $form) {
3312      // preset return var
3313      var isValid = true,
3314      // get name of element. since it is a checkbox group, all checkboxes will have same name
3315        elname = $el.attr('name'),
3316      // get checkboxes and count the checked ones
3317        $checkBoxes = $('input[type=checkbox][name^="' + elname + '"]', $form),
3318        checkedCount = $checkBoxes.filter(':checked').length,
3319      // get el attr that specs qty required / allowed
3320        qtyAllowed = $el.valAttr('qty');
3321
3322      if (qtyAllowed === undefined) {
3323        var elementType = $el.get(0).nodeName;
3324        alert('Attribute "data-validation-qty" is missing from ' + elementType + ' named ' + $el.attr('name'));
3325      }
3326
3327      // call Utility function to check if count is above min, below max, within range etc.
3328      var qtyCheckResults = $.formUtils.numericRangeCheck(checkedCount, qtyAllowed);
3329
3330      // results will be array, [0]=result str, [1]=qty int
3331      switch (qtyCheckResults[0]) {
3332        // outside allowed range
3333        case 'out':
3334          this.errorMessage = lang.groupCheckedRangeStart + qtyAllowed + lang.groupCheckedEnd;
3335          isValid = false;
vendor: 63,030 bytes, lines 3336-3411
3336          break;
3337        // below min qty
3338        case 'min':
3339          this.errorMessage = lang.groupCheckedTooFewStart + qtyCheckResults[1] + (lang.groupCheckedTooFewEnd || lang.groupCheckedEnd);
3340          isValid = false;
3341          break;
3342        // above max qty
3343        case 'max':
3344          this.errorMessage = lang.groupCheckedTooManyStart + qtyCheckResults[1] + (lang.groupCheckedTooManyEnd || lang.groupCheckedEnd);
3345          isValid = false;
3346          break;
3347        // ok
3348        default:
3349          isValid = true;
3350      }
3351
3352      if( !isValid ) {
3353        var _triggerOnBlur = function() {
3354          $checkBoxes.unbind('click', _triggerOnBlur);
3355          $checkBoxes.filter('*[data-validation]').validateInputOnBlur(lang, conf, false, 'blur');
3356        };
3357        $checkBoxes.bind('click', _triggerOnBlur);
3358      }
3359
3360      return isValid;
3361    }
3362    //   errorMessage : '', // set above in switch statement
3363    //   errorMessageKey: '' // not used
3364  });
3365
3366})(jQuery);
3367
3368
3369}));
3370;
3371/**
3372 * Selectize (v0.15.2)
3373 * https://selectize.dev
3374 *
3375 * Copyright (c) 2013-2015 Brian Reavis & contributors
3376 * Copyright (c) 2020-2023 Selectize Team & contributors
3377 *
3378 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
3379 * file except in compliance with the License. You may obtain a copy of the License at:
3380 * http://www.apache.org/licenses/LICENSE-2.0
3381 *
3382 * Unless required by applicable law or agreed to in writing, software distributed under
3383 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
3384 * ANY KIND, either express or implied. See the License for the specific language
3385 * governing permissions and limitations under the License.
3386 *
3387 * @author Brian Reavis <[email protected]>
3388 * @author Ris Adams <[email protected]>
3389 */
3390(function (root, factory) {
3391  if (typeof define === 'function' && define.amd) {
3392    define(['jquery'], factory);
3393  } else if (typeof module === 'object' && typeof module.exports === 'object') {
3394    module.exports = factory(require('jquery'));
3395  } else {
3396    root.Selectize = factory(root.jQuery);
3397  }
3398}(this, function ($) {
3399  'use strict';
3400var highlight=function(t,e){var r,a;if("string"!=typeof e||e.length)return r="string"==typeof e?new RegExp(e,"i"):e,a=function(t){var e=0;if(3===t.nodeType){var n,i,o=t.data.search(r);0<=o&&0<t.data.length&&(i=t.data.match(r),(n=document.createElement("span")).className="highlight",(o=t.splitText(o)).splitText(i[0].length),i=o.cloneNode(!0),n.appendChild(i),o.parentNode.replaceChild(n,o),e=1)}else if(1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName)&&("highlight"!==t.className||"SPAN"!==t.tagName))for(var s=0;s<t.childNodes.length;++s)s+=a(t.childNodes[s]);return e},t.each(function(){a(this)})},MicroEvent=($.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;var t=this.parentNode;t.replaceChild(this.firstChild,this),t.normalize()}).end()},function(){}),MicroPlugin=(MicroEvent.prototype={on:function(t,e){this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e)},off:function(t,e){var n=arguments.length;return 0===n?delete this._events:1===n?delete this._events[t]:(this._events=this._events||{},void(t in this._events!=!1&&this._events[t].splice(this._events[t].indexOf(e),1)))},trigger:function(t){var e=this._events=this._events||{};if(t in e!=!1)for(var n=0;n<e[t].length;n++)e[t][n].apply(this,Array.prototype.slice.call(arguments,1))}},MicroEvent.mixin=function(t){for(var e=["on","off","trigger"],n=0;n<e.length;n++)t.prototype[e[n]]=MicroEvent.prototype[e[n]]},{});MicroPlugin.mixin=function(o){o.plugins={},o.prototype.initializePlugins=function(t){var e,n,i,o=this,s=[];if(o.plugins={names:[],settings:{},requested:{},loaded:{}},isArray(t))for(e=0,n=t.length;e<n;e++)"string"==typeof t[e]?s.push(t[e]):(o.plugins.settings[t[e].name]=t[e].options,s.push(t[e].name));else if(t)for(i in t)t.hasOwnProperty(i)&&(o.plugins.settings[i]=t[i],s.push(i));for(;s.length;)o.require(s.shift())},o.prototype.loadPlugin=function(t){var e=this,n=e.plugins,i=o.plugins[t];if(!o.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');n.requested[t]=!0,n.loaded[t]=i.fn.apply(e,[e.plugins.settings[t]||{}]),n.names.push(t)},o.prototype.require=function(t){var e=this,n=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(n.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return n.loaded[t]},o.define=function(t,e){o.plugins[t]={name:t,fn:e}}};const nanoid=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((t,e)=>t+((e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():62<e?"-":"_"),"");var Sifter=function(t,e){this.items=t,this.settings=e||{diacritics:!0}},cmp=(Sifter.prototype.tokenize=function(t,e){if(!(t=trim(String(t||"").toLowerCase()))||!t.length)return[];for(var n,i,o=[],s=t.split(/ +/),r=0,a=s.length;r<a;r++){if(n=escape_regex(s[r]),this.settings.diacritics)for(i in DIACRITICS)DIACRITICS.hasOwnProperty(i)&&(n=n.replace(new RegExp(i,"g"),DIACRITICS[i]));e&&(n="\\b"+n),o.push({string:s[r],regex:new RegExp(n,"i")})}return o},Sifter.prototype.iterator=function(t,e){var n=is_array(t)?Array.prototype.forEach||function(t){for(var e=0,n=this.length;e<n;e++)t(this[e],e,this)}:function(t){for(var e in this)this.hasOwnProperty(e)&&t(this[e],e,this)};n.apply(t,[e])},Sifter.prototype.getScoreFunction=function(t,e){function o(t,e){var n;return!t||-1===(n=(t=String(t||"")).search(e.regex))?0:(e=e.string.length/t.length,0===n&&(e+=.5),e)}var s,r=(t=this.prepareSearch(t,e)).tokens,a=t.options.fields,l=r.length,p=t.options.nesting,c=(s=a.length)?1===s?function(t,e){return o(getattr(e,a[0],p),t)}:function(t,e){for(var n=0,i=0;n<s;n++)i+=o(getattr(e,a[n],p),t);return i/s}:function(){return 0};return l?1===l?function(t){return c(r[0],t)}:"and"===t.options.conjunction?function(t){for(var e,n=0,i=0;n<l;n++){if((e=c(r[n],t))<=0)return 0;i+=e}return i/l}:function(t){for(var e=0,n=0;e<l;e++)n+=c(r[e],t);return n/l}:function(){return 0}},Sifter.prototype.getSortFunction=function(t,n){var e,i,o,s,r,a,l,p=this,c=!(t=p.prepareSearch(t,n)).query&&n.sort_empty||n.sort,d=function(t,e){return"$score"===t?e.score:getattr(p.items[e.id],t,n.nesting)},u=[];if(c)for(e=0,i=c.length;e<i;e++)!t.query&&"$score"===c[e].field||u.push(c[e]);if(t.query){for(l=!0,e=0,i=u.length;e<i;e++)if("$score"===u[e].field){l=!1;break}l&&u.unshift({field:"$score",direction:"desc"})}else for(e=0,i=u.length;e<i;e++)if("$score"===u[e].field){u.splice(e,1);break}for(a=[],e=0,i=u.length;e<i;e++)a.push("desc"===u[e].direction?-1:1);return(s=u.length)?1===s?(o=u[0].field,r=a[0],function(t,e){return r*cmp(d(o,t),d(o,e))}):function(t,e){for(var n,i=0;i<s;i++)if(n=u[i].field,n=a[i]*cmp(d(n,t),d(n,e)))return n;return 0}:null},Sifter.prototype.prepareSearch=function(t,e){var n,i,o;return"object"==typeof t?t:(n=(e=extend({},e)).fields,i=e.sort,o=e.sort_empty,n&&!is_array(n)&&(e.fields=[n]),i&&!is_array(i)&&(e.sort=[i]),o&&!is_array(o)&&(e.sort_empty=[o]),{options:e,query:String(t||"").toLowerCase(),tokens:this.tokenize(t,e.respect_word_boundaries),total:0,items:[]})},Sifter.prototype.search=function(t,n){var i,o,e=this,s=this.prepareSearch(t,n);return n=s.options,t=s.query,o=n.score||e.getScoreFunction(s),t.length?e.iterator(e.items,function(t,e){i=o(t),(!1===n.filter||0<i)&&s.items.push({score:i,id:e})}):e.iterator(e.items,function(t,e){s.items.push({score:1,id:e})}),(t=e.getSortFunction(s,n))&&s.items.sort(t),s.total=s.items.length,"number"==typeof n.limit&&(s.items=s.items.slice(0,n.limit)),s},function(t,e){return"number"==typeof t&&"number"==typeof e?e<t?1:t<e?-1:0:(t=asciifold(String(t||"")),(e=asciifold(String(e||"")))<t?1:t<e?-1:0)}),extend=function(t,e){for(var n,i,o=1,s=arguments.length;o<s;o++)if(i=arguments[o])for(n in i)i.hasOwnProperty(n)&&(t[n]=i[n]);return t},getattr=function(t,e,n){if(t&&e){if(!n)return t[e];for(var i=e.split(".");i.length&&(t=t[i.shift()]););return t}},trim=function(t){return(t+"").replace(/^\s+|\s+$|/g,"")},escape_regex=function(t){return(t+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},is_array=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},DIACRITICS={a:"[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]",b:"[b␢βΒB฿𐌁ᛒ]",c:"[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄCc]",d:"[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅDdð]",e:"[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇEeɘǝƏƐε]",f:"[fƑƒḞḟ]",g:"[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]",h:"[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]",i:"[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪIi]",j:"[jȷĴĵɈɉʝɟʲ]",k:"[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]",l:"[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟLl]",n:"[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴNnŊŋ]",o:"[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]",p:"[pṔṕṖṗⱣᵽƤƥᵱ]",q:"[qꝖꝗʠɊɋꝘꝙq̃]",r:"[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]",s:"[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]",t:"[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]",u:"[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]",v:"[vṼṽṾṿƲʋꝞꝟⱱʋ]",w:"[wẂẃẀẁŴŵẄẅẆẇẈẉ]",x:"[xẌẍẊẋχ]",y:"[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]",z:"[zŹźẐẑŽžŻżẒẓẔẕƵƶ]"},asciifold=function(){var t,e,n,i,o="",s={};for(n in DIACRITICS)if(DIACRITICS.hasOwnProperty(n))for(o+=i=DIACRITICS[n].substring(2,DIACRITICS[n].length-1),t=0,e=i.length;t<e;t++)s[i.charAt(t)]=n;var r=new RegExp("["+o+"]","g");return function(t){return t.replace(r,function(t){return s[t]}).toLowerCase()}}(),IS_MAC=uaDetect("macOS",/Mac/),KEY_A=65,KEY_COMMA=188,KEY_RETURN=13,KEY_ESC=27,KEY_LEFT=37,KEY_UP=38,KEY_P=80,KEY_RIGHT=39,KEY_DOWN=40,KEY_N=78,KEY_BACKSPACE=8,KEY_DELETE=46,KEY_SHIFT=16,KEY_CMD=IS_MAC?91:17,KEY_CTRL=IS_MAC?18:17,KEY_TAB=9,TAG_SELECT=1,TAG_INPUT=2,SUPPORTS_VALIDITY_API=!uaDetect("Android",/android/i)&&!!document.createElement("input").validity,isset=function(t){return void 0!==t},isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},hash_key=function(t){return null==t?null:"boolean"==typeof t?t?"1":"0":t+""},escape_html=function(t){return(t+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},escape_replace=function(t){return(t+"").replace(/\$/g,"$$$$")},hook={before:function(t,e,n){var i=t[e];t[e]=function(){return n.apply(t,arguments),i.apply(t,arguments)}},after:function(e,t,n){var i=e[t];e[t]=function(){var t=i.apply(e,arguments);return n.apply(e,arguments),t}}},once=function(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}},debounce=function(n,i){var o;return function(){var t=this,e=arguments;window.clearTimeout(o),o=window.setTimeout(function(){n.apply(t,e)},i)}},debounce_events=function(e,n,t){var i,o=e.trigger,s={};for(i in e.trigger=function(){var t=arguments[0];if(-1===n.indexOf(t))return o.apply(e,arguments);s[t]=arguments},t.apply(e,[]),e.trigger=o,s)s.hasOwnProperty(i)&&o.apply(e,s[i])},watchChildEvent=function(n,t,e,i){n.on(t,e,function(t){for(var e=t.target;e&&e.parentNode!==n[0];)e=e.parentNode;return t.currentTarget=e,i.apply(this,[t])})},getInputSelection=function(t){var e,n,i={};return void 0===t?console.warn("WARN getInputSelection cannot locate input control"):"selectionStart"in t?(i.start=t.selectionStart,i.length=t.selectionEnd-i.start):document.selection&&(t.focus(),e=document.selection.createRange(),n=document.selection.createRange().text.length,e.moveStart("character",-t.value.length),i.start=e.text.length-n,i.length=n),i},transferStyles=function(t,e,n){var i,o,s={};if(n)for(i=0,o=n.length;i<o;i++)s[n[i]]=t.css(n[i]);else s=t.css();e.css(s)},measureString=function(t,e){return t?(Selectize.$testInput||(Selectize.$testInput=$("<span />").css({position:"absolute",width:"auto",padding:0,whiteSpace:"pre"}),$("<div />").css({position:"absolute",width:0,height:0,overflow:"hidden"}).attr({"aria-hidden":!0}).append(Selectize.$testInput).appendTo("body")),Selectize.$testInput.text(t),transferStyles(e,Selectize.$testInput,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]),Selectize.$testInput.width()):0},autoGrow=function(s){function t(t,e){var n,i,o;e=e||{},(t=t||window.event||{}).metaKey||t.altKey||!e.force&&!1===s.data("grow")||(e=s.val(),t.type&&"keydown"===t.type.toLowerCase()&&(i=48<=(o=t.keyCode)&&o<=57||65<=o&&o<=90||96<=o&&o<=111||186<=o&&o<=222||32===o,o===KEY_DELETE||o===KEY_BACKSPACE?(n=getInputSelection(s[0])).length?e=e.substring(0,n.start)+e.substring(n.start+n.length):o===KEY_BACKSPACE&&n.start?e=e.substring(0,n.start-1)+e.substring(n.start+1):o===KEY_DELETE&&void 0!==n.start&&(e=e.substring(0,n.start)+e.substring(n.start+1)):i&&(o=t.shiftKey,n=String.fromCharCode(t.keyCode),e+=n=o?n.toUpperCase():n.toLowerCase())),i=s.attr("readonly")?0:4,o=(t=s.attr("placeholder"))?measureString(t,s)+i:0,(i=Math.max(measureString(e,s),o)+i)===r)||(r=i,s.width(i),s.triggerHandler("resize"))}var r=null;s.on("keydown keyup update blur",t),t()},domToString=function(t){var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML},logError=function(t,e){e=e||{};console.error("Selectize: "+t),e.explanation&&(console.group&&console.group(),console.error(e.explanation),console.group)&&console.groupEnd()},isJSON=function(t){try{JSON.parse(t)}catch(t){return!1}return!0};function uaDetect(t,e){return navigator.userAgentData?t===navigator.userAgentData.platform:e.test(navigator.userAgent)}var Selectize=function(t,e){var n,i,o=this,s=t[0],r=(s.selectize=o,window.getComputedStyle&&window.getComputedStyle(s,null));if(r=(r?r.getPropertyValue("direction"):s.currentStyle&&s.currentStyle.direction)||t.parents("[dir]:first").attr("dir")||"",o.settings={},$.extend(o,{order:0,settings:e,$input:t,tabIndex:t.attr("tabindex")||"",tagType:"select"===s.tagName.toLowerCase()?TAG_SELECT:TAG_INPUT,rtl:/rtl/i.test(r),eventNS:".selectize"+ ++Selectize.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:t.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",lastValidValue:"",lastOpenTarget:!1,caretPos:0,loading:0,loadedSearches:{},isDropdownClosing:!1,$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===e.loadThrottle?o.onSearchChange:debounce(o.onSearchChange,e.loadThrottle)}),o.sifter=new Sifter(this.options,{diacritics:e.diacritics}),o.settings.options){for(n=0,i=o.settings.options.length;n<i;n++)o.registerOption(o.settings.options[n]);delete o.settings.options}if(o.settings.optgroups){for(n=0,i=o.settings.optgroups.length;n<i;n++)o.registerOptionGroup(o.settings.optgroups[n]);delete o.settings.optgroups}o.settings.mode=o.settings.mode||(1===o.settings.maxItems?"single":"multi"),"boolean"!=typeof o.settings.hideSelected&&(o.settings.hideSelected="multi"===o.settings.mode),o.initializePlugins(o.settings.plugins),o.setupCallbacks(),o.setupTemplates(),o.setup()};MicroEvent.mixin(Selectize),MicroPlugin.mixin(Selectize),$.extend(Selectize.prototype,{setup:function(){var e=this,t=e.settings,n=e.eventNS,i=$(window),o=$(document),s=e.$input,r=e.settings.mode,a=s.attr("class")||"",l=t.showArrow?"":" no-arrow",p=$("<div>").addClass(t.wrapperClass).addClass(a+" selectize-control").addClass(r),l=$("<div>").addClass(t.inputClass+l+" selectize-input items").appendTo(p),c=$('<input type="text" autocomplete="new-password" autofill="no" />').appendTo(l).attr("tabindex",s.is(":disabled")?"-1":e.tabIndex),d=$(t.dropdownParent||p),r=$("<div>").addClass(t.dropdownClass).addClass(r+" selectize-dropdown").hide().appendTo(d),d=$("<div>").addClass(t.dropdownContentClass+" selectize-dropdown-content").attr("tabindex","-1").appendTo(r),u=((u=s.attr("id"))&&(c.attr("id",u+"-selectized"),$("label[for='"+u+"']").attr("for",u+"-selectized")),e.settings.copyClassesToDropdown&&r.addClass(a),p.css({width:s[0].style.width}),e.plugins.names.length&&(u="plugin-"+e.plugins.names.join(" plugin-"),p.addClass(u),r.addClass(u)),(null===t.maxItems||1<t.maxItems)&&e.tagType===TAG_SELECT&&s.attr("multiple","multiple"),e.settings.placeholder&&c.attr("placeholder",t.placeholder),e.settings.search||(c.attr("readonly",!0),c.attr("inputmode","none"),l.css("cursor","pointer")),!e.settings.splitOn&&e.settings.delimiter&&(a=e.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),e.settings.splitOn=new RegExp("\\s*"+a+"+\\s*")),s.attr("autocorrect")&&c.attr("autocorrect",s.attr("autocorrect")),s.attr("autocapitalize")&&c.attr("autocapitalize",s.attr("autocapitalize")),s.is("input")&&(c[0].type=s[0].type),e.$wrapper=p,e.$control=l,e.$control_input=c,e.$dropdown=r,e.$dropdown_content=d,r.on("mouseenter mousedown mouseup click","[data-disabled]>[data-selectable]",function(t){t.stopImmediatePropagation()}),r.on("mouseenter","[data-selectable]",function(){return e.onOptionHover.apply(e,arguments)}),r.on("mouseup click","[data-selectable]",function(){return e.onOptionSelect.apply(e,arguments)}),watchChildEvent(l,"mouseup","*:not(input)",function(){return e.onItemSelect.apply(e,arguments)}),autoGrow(c),l.on({mousedown:function(){return e.onMouseDown.apply(e,arguments)},click:function(){return e.onClick.apply(e,arguments)}}),c.on({mousedown:function(t){""===e.$control_input.val()&&!e.settings.openOnFocus||t.stopPropagation()},keydown:function(){return e.onKeyDown.apply(e,arguments)},keypress:function(){return e.onKeyPress.apply(e,arguments)},input:function(){return e.onInput.apply(e,arguments)},resize:function(){e.positionDropdown.apply(e,[])},blur:function(){return e.onBlur.apply(e,arguments)},focus:function(){return e.onFocus.apply(e,arguments)},paste:function(){return e.onPaste.apply(e,arguments)}}),o.on("keydown"+n,function(t){e.isCmdDown=t[IS_MAC?"metaKey":"ctrlKey"],e.isCtrlDown=t[IS_MAC?"altKey":"ctrlKey"],e.isShiftDown=t.shiftKey}),o.on("keyup"+n,function(t){t.keyCode===KEY_CTRL&&(e.isCtrlDown=!1),t.keyCode===KEY_SHIFT&&(e.isShiftDown=!1),t.keyCode===KEY_CMD&&(e.isCmdDown=!1)}),o.on("mousedown"+n,function(t){if(e.isFocused){if(t.target===e.$dropdown[0]||e.$dropdown.has(t.target).length)return!1;t.target!==e.$control[0]&&e.blur(t.target)}}),i.on(["scroll"+n,"resize"+n].join(" "),function(){e.isOpen&&e.positionDropdown.apply(e,arguments)}),i.on("mousemove"+n,function(){e.ignoreHover=e.settings.ignoreHover}),$("<div></div>")),a=s.children().detach();s.replaceWith(u),u.replaceWith(s),this.revertSettings={$children:a,tabindex:s.attr("tabindex")},s.attr("tabindex",-1).hide().after(e.$wrapper),Array.isArray(t.items)&&(e.lastValidValue=t.items,e.setValue(t.items),delete t.items),SUPPORTS_VALIDITY_API&&s.on("invalid"+n,function(t){t.preventDefault(),e.isInvalid=!0,e.refreshState()}),e.updateOriginalInput(),e.refreshItems(),e.refreshState(),e.updatePlaceholder(),e.isSetup=!0,s.is(":disabled")&&e.disable(),e.on("change",this.onChange),s.data("selectize",e),s.addClass("selectized"),e.trigger("initialize"),!0===t.preload&&e.onSearchChange("")},setupTemplates:function(){var t=this,i=t.settings.labelField,o=t.settings.valueField,n=t.settings.optgroupLabelField;t.settings.render=$.extend({},{optgroup:function(t){return'<div class="optgroup">'+t.html+"</div>"},optgroup_header:function(t,e){return'<div class="optgroup-header">'+e(t[n])+"</div>"},option:function(t,e){var n=t.classes?" "+t.classes:"";return n+=""===t[o]?" selectize-dropdown-emptyoptionlabel":"","<div"+(t.styles?' style="'+t.styles+'"':"")+' class="option'+n+'">'+e(t[i])+"</div>"},item:function(t,e){return'<div class="item">'+e(t[i])+"</div>"},option_create:function(t,e){return'<div class="create">Add <strong>'+e(t.input)+"</strong>&#x2026;</div>"}},t.settings.render)},setupCallbacks:function(){var t,e,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur",dropdown_item_activate:"onDropdownItemActivate",dropdown_item_deactivate:"onDropdownItemDeactivate"};for(t in n)n.hasOwnProperty(t)&&(e=this.settings[n[t]])&&this.on(t,e)},onClick:function(t){this.isDropdownClosing||this.isFocused&&this.isOpen||(this.focus(),t.preventDefault())},onMouseDown:function(t){var e=this,n=t.isDefaultPrevented(),t=$(t.target);if(e.isFocused||n||window.setTimeout(function(){e.isOpen||e.focus()},0),t!==e.$control_input[0]||""===e.$control_input.val())return"single"===e.settings.mode?e.isOpen?e.close():e.open():(n||e.setActiveItem(null),e.settings.openOnFocus||(e.isOpen&&t===e.lastOpenTarget?(e.close(),e.lastOpenTarget=!1):(e.isOpen||(e.refreshOptions(),e.open()),e.lastOpenTarget=t))),!1},onChange:function(){""!==this.getValue()&&(this.lastValidValue=this.getValue()),this.$input.trigger("input"),this.$input.trigger("change")},onPaste:function(t){var o=this;o.isFull()||o.isInputHidden||o.isLocked?t.preventDefault():o.settings.splitOn&&setTimeout(function(){var t=o.$control_input.val();if(t.match(o.settings.splitOn))for(var e=t.trim().split(o.settings.splitOn),n=0,i=e.length;n<i;n++)o.createItem(e[n])},0)},onKeyPress:function(t){var e;return this.isLocked?t&&t.preventDefault():(e=String.fromCharCode(t.keyCode||t.which),this.settings.create&&"multi"===this.settings.mode&&e===this.settings.delimiter?(this.createItem(),t.preventDefault(),!1):void 0)},onKeyDown:function(t){t.target,this.$control_input[0];var e,n=this;if(n.isLocked)t.keyCode!==KEY_TAB&&t.preventDefault();else{switch(t.keyCode){case KEY_A:if(n.isCmdDown)return void n.selectAll();break;case KEY_ESC:return void(n.isOpen&&(t.preventDefault(),t.stopPropagation(),n.close()));case KEY_N:if(!t.ctrlKey||t.altKey)break;case KEY_DOWN:return!n.isOpen&&n.hasOptions?n.open():n.$activeOption&&(n.ignoreHover=!0,(e=n.getAdjacentOption(n.$activeOption,1)).length)&&n.setActiveOption(e,!0,!0),void t.preventDefault();case KEY_P:if(!t.ctrlKey||t.altKey)break;case KEY_UP:return n.$activeOption&&(n.ignoreHover=!0,(e=n.getAdjacentOption(n.$activeOption,-1)).length)&&n.setActiveOption(e,!0,!0),void t.preventDefault();case KEY_RETURN:return void(n.isOpen&&n.$activeOption&&(n.onOptionSelect({currentTarget:n.$activeOption}),t.preventDefault()));case KEY_LEFT:return void n.advanceSelection(-1,t);case KEY_RIGHT:return void n.advanceSelection(1,t);case KEY_TAB:return n.settings.selectOnTab&&n.isOpen&&n.$activeOption&&(n.onOptionSelect({currentTarget:n.$activeOption}),n.isFull()||t.preventDefault()),void(n.settings.create&&n.createItem()&&n.settings.showAddOptionOnCreate&&t.preventDefault());case KEY_BACKSPACE:case KEY_DELETE:return void n.deleteSelection(t)}!n.isFull()&&!n.isInputHidden||(IS_MAC?t.metaKey:t.ctrlKey)||t.preventDefault()}},onInput:function(t){var e=this,n=e.$control_input.val()||"";e.lastValue!==n&&(e.lastValue=n,e.onSearchChange(n),e.refreshOptions(),e.trigger("type",n))},onSearchChange:function(e){var n=this,i=n.settings.load;i&&!n.loadedSearches.hasOwnProperty(e)&&(n.loadedSearches[e]=!0,n.load(function(t){i.apply(n,[e,t])}))},onFocus:function(t){var e=this,n=e.isFocused;if(e.isDisabled)return e.blur(),t&&t.preventDefault(),!1;e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.onSearchChange(""),n||e.trigger("focus"),e.$activeItems.length||(e.showInput(),e.setActiveItem(null),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())},onBlur:function(t,e){var n,i=this;i.isFocused&&(i.isFocused=!1,i.ignoreFocus||(n=function(){i.close(),i.setTextboxValue(""),i.setActiveItem(null),i.setActiveOption(null),i.setCaret(i.items.length),i.refreshState(),e&&e.focus&&e.focus(),i.isBlurring=!1,i.ignoreFocus=!1,i.trigger("blur")},i.isBlurring=!0,i.ignoreFocus=!0,i.settings.create&&i.settings.createOnBlur?i.createItem(null,!1,n):n()))},onOptionHover:function(t){this.ignoreHover||this.setActiveOption(t.currentTarget,!1)},onOptionSelect:function(t){var e,n=this;t.preventDefault&&(t.preventDefault(),t.stopPropagation()),(e=$(t.currentTarget)).hasClass("create")?n.createItem(null,function(){n.settings.closeAfterSelect&&n.close()}):void 0!==(e=e.attr("data-value"))&&(n.lastQuery=null,n.setTextboxValue(""),n.addItem(e),n.settings.closeAfterSelect?n.close():!n.settings.hideSelected&&t.type&&/mouse/.test(t.type)&&n.setActiveOption(n.getOption(e)))},onItemSelect:function(t){this.isLocked||"multi"===this.settings.mode&&(t.preventDefault(),this.setActiveItem(t.currentTarget,t))},load:function(t){var e=this,n=e.$wrapper.addClass(e.settings.loadingClass);e.loading++,t.apply(e,[function(t){e.loading=Math.max(e.loading-1,0),t&&t.length&&(e.addOption(t),e.refreshOptions(e.isFocused&&!e.isInputHidden)),e.loading||n.removeClass(e.settings.loadingClass),e.trigger("load",t)}])},getTextboxValue:function(){return this.$control_input.val()},setTextboxValue:function(t){var e=this.$control_input;e.val()!==t&&(e.val(t).triggerHandler("update"),this.lastValue=t)},getValue:function(){return this.tagType===TAG_SELECT&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(t,e){(Array.isArray(t)?t:[t]).join("")!==this.items.join("")&&debounce_events(this,e?[]:["change"],function(){this.clear(e),this.addItems(t,e)})},setMaxItems:function(t){this.settings.maxItems=t=0===t?null:t,this.settings.mode=this.settings.mode||(1===this.settings.maxItems?"single":"multi"),this.refreshState()},setActiveItem:function(t,e){var n,i,o,s,r,a,l=this;if("single"!==l.settings.mode)if((t=$(t)).length){if("mousedown"===(n=e&&e.type.toLowerCase())&&l.isShiftDown&&l.$activeItems.length){for(a=l.$control.children(".active:last"),a=Array.prototype.indexOf.apply(l.$control[0].childNodes,[a[0]]),(o=Array.prototype.indexOf.apply(l.$control[0].childNodes,[t[0]]))<a&&(r=a,a=o,o=r),i=a;i<=o;i++)s=l.$control[0].childNodes[i],-1===l.$activeItems.indexOf(s)&&($(s).addClass("active"),l.$activeItems.push(s));e.preventDefault()}else"mousedown"===n&&l.isCtrlDown||"keydown"===n&&this.isShiftDown?t.hasClass("active")?(r=l.$activeItems.indexOf(t[0]),l.$activeItems.splice(r,1),t.removeClass("active")):l.$activeItems.push(t.addClass("active")[0]):($(l.$activeItems).removeClass("active"),l.$activeItems=[t.addClass("active")[0]]);l.hideInput(),this.isFocused||l.focus()}else $(l.$activeItems).removeClass("active"),l.$activeItems=[],l.isFocused&&l.showInput()},setActiveOption:function(t,e,n){var i,o,s,r,a=this;a.$activeOption&&(a.$activeOption.removeClass("active"),a.trigger("dropdown_item_deactivate",a.$activeOption.attr("data-value"))),a.$activeOption=null,(t=$(t)).length&&(a.$activeOption=t.addClass("active"),a.isOpen&&a.trigger("dropdown_item_activate",a.$activeOption.attr("data-value")),!e&&isset(e)||(t=a.$dropdown_content.height(),i=a.$activeOption.outerHeight(!0),e=a.$dropdown_content.scrollTop()||0,r=(s=o=a.$activeOption.offset().top-a.$dropdown_content.offset().top+e)-t+i,t+e<o+i?a.$dropdown_content.stop().animate({scrollTop:r},n?a.settings.scrollDuration:0):o<e&&a.$dropdown_content.stop().animate({scrollTop:s},n?a.settings.scrollDuration:0)))},selectAll:function(){var t=this;"single"!==t.settings.mode&&(t.$activeItems=Array.prototype.slice.apply(t.$control.children(":not(input)").addClass("active")),t.$activeItems.length&&(t.hideInput(),t.close()),t.focus())},hideInput:function(){this.setTextboxValue(""),this.$control_input.css({opacity:0,position:"absolute",left:this.rtl?1e4:0}),this.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var t=this;return t.isDisabled||(t.ignoreFocus=!0,t.$control_input[0].focus(),window.setTimeout(function(){t.ignoreFocus=!1,t.onFocus()},0)),t},blur:function(t){return this.$control_input[0].blur(),this.onBlur(null,t),this},getScoreFunction:function(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())},getSearchOptions:function(){var t=this.settings,e=t.sortField;return{fields:t.searchField,conjunction:t.searchConjunction,sort:e="string"==typeof e?[{field:e}]:e,nesting:t.nesting,filter:t.filter,respect_word_boundaries:t.respect_word_boundaries}},search:function(t){var e,n,i,o=this,s=o.settings,r=this.getSearchOptions();if(s.score&&"function"!=typeof(i=o.settings.score.apply(this,[t])))throw new Error('Selectize "score" setting must be a function that returns a function');if(t!==o.lastQuery?(s.normalize&&(t=t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),o.lastQuery=t,n=o.sifter.search(t,$.extend(r,{score:i})),o.currentResults=n):n=$.extend(!0,{},o.currentResults),s.hideSelected)for(e=n.items.length-1;0<=e;e--)-1!==o.items.indexOf(hash_key(n.items[e].id))&&n.items.splice(e,1);return n},refreshOptions:function(t){void 0===t&&(t=!0);var e,n,i,o,s,r,a,l,p,c,d,u,h,g=this,f=g.$control_input.val().trim(),v=g.search(f),m=g.$dropdown_content,y=g.$activeOption&&hash_key(g.$activeOption.attr("data-value")),w=v.items.length;for("number"==typeof g.settings.maxOptions&&(w=Math.min(w,g.settings.maxOptions)),o={},s=[],e=0;e<w;e++)for(r=g.options[v.items[e].id],a=g.render("option",r),O=r[g.settings.optgroupField]||"",n=0,i=(l=Array.isArray(O)?O:[O])&&l.length;n<i;n++){var C,O=l[n];g.optgroups.hasOwnProperty(O)||"function"!=typeof g.settings.optionGroupRegister||(C=g.settings.optionGroupRegister.apply(g,[O]))&&g.registerOptionGroup(C),g.optgroups.hasOwnProperty(O)||(O=""),o.hasOwnProperty(O)||(o[O]=document.createDocumentFragment(),s.push(O)),o[O].appendChild(a)}for(this.settings.lockOptgroupOrder&&s.sort(function(t,e){return(g.optgroups[t]&&g.optgroups[t].$order||0)-(g.optgroups[e]&&g.optgroups[e].$order||0)}),p=document.createDocumentFragment(),e=0,w=s.length;e<w;e++)g.optgroups.hasOwnProperty(O=s[e])&&o[O].childNodes.length?((c=document.createDocumentFragment()).appendChild(g.render("optgroup_header",g.optgroups[O])),c.appendChild(o[O]),p.appendChild(g.render("optgroup",$.extend({},g.optgroups[O],{html:domToString(c),dom:c})))):p.appendChild(o[O]);if(m.html(p),g.settings.highlight&&(m.removeHighlight(),v.query.length)&&v.tokens.length)for(e=0,w=v.tokens.length;e<w;e++)highlight(m,v.tokens[e].regex);if(!g.settings.hideSelected)for(g.$dropdown.find(".selected").removeClass("selected"),e=0,w=g.items.length;e<w;e++)g.getOption(g.items[e]).addClass("selected");"auto"!==g.settings.dropdownSize.sizeType&&g.isOpen&&g.setupDropdownHeight(),g.positionDropdown(),(d=g.canCreate(f))&&g.settings.showAddOptionOnCreate&&(m.prepend(g.render("option_create",{input:f})),h=$(m[0].childNodes[0])),g.hasOptions=0<v.items.length||d&&g.settings.showAddOptionOnCreate||g.settings.setFirstOptionActive,g.hasOptions?(0<v.items.length?(f=y&&g.getOption(y),""!==v.query&&g.settings.setFirstOptionActive?u=m.find("[data-selectable]:first"):""!==v.query&&f&&f.length?u=f:"single"===g.settings.mode&&g.items.length&&(u=g.getOption(g.items[0])),u&&u.length||(u=h&&!g.settings.addPrecedence?g.getAdjacentOption(h,1):m.find("[data-selectable]:first"))):u=h,g.setActiveOption(u),t&&!g.isOpen&&g.open()):(g.setActiveOption(null),t&&g.isOpen&&g.close())},addOption:function(t){var e,n,i,o=this;if(Array.isArray(t))for(e=0,n=t.length;e<n;e++)o.addOption(t[e]);else(i=o.registerOption(t))&&(o.userOptions[i]=!0,o.lastQuery=null,o.trigger("option_add",i,t))},registerOption:function(t){var e=hash_key(t[this.settings.valueField]);return null!=e&&!this.options.hasOwnProperty(e)&&(t.$order=t.$order||++this.order,this.options[e]=t,e)},registerOptionGroup:function(t){var e=hash_key(t[this.settings.optgroupValueField]);return!!e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)},addOptionGroup:function(t,e){e[this.settings.optgroupValueField]=t,(t=this.registerOptionGroup(e))&&this.trigger("optgroup_add",t,e)},removeOptionGroup:function(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.renderCache={},this.trigger("optgroup_remove",t))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(t,e){var n,i,o,s=this;if(t=hash_key(t),n=hash_key(e[s.settings.valueField]),null!==t&&s.options.hasOwnProperty(t)){if("string"!=typeof n)throw new Error("Value must be set in option data");o=s.options[t].$order,n!==t&&(delete s.options[t],-1!==(i=s.items.indexOf(t)))&&s.items.splice(i,1,n),e.$order=e.$order||o,s.options[n]=e,i=s.renderCache.item,o=s.renderCache.option,i&&(delete i[t],delete i[n]),o&&(delete o[t],delete o[n]),-1!==s.items.indexOf(n)&&(i=s.getItem(t),o=$(s.render("item",e)),i.hasClass("active")&&o.addClass("active"),i.replaceWith(o)),s.lastQuery=null,s.isOpen&&s.refreshOptions(!1)}},removeOption:function(t,e){var n=this,i=(t=hash_key(t),n.renderCache.item),o=n.renderCache.option;i&&delete i[t],o&&delete o[t],delete n.userOptions[t],delete n.options[t],n.lastQuery=null,n.trigger("option_remove",t),n.removeItem(t,e)},clearOptions:function(t){var n=this,i=(n.loadedSearches={},n.userOptions={},n.renderCache={},n.options);$.each(n.options,function(t,e){-1==n.items.indexOf(t)&&delete i[t]}),n.options=n.sifter.items=i,n.lastQuery=null,n.trigger("option_clear"),n.clear(t)},getOption:function(t){return this.getElementWithValue(t,this.$dropdown_content.find("[data-selectable]"))},getFirstOption:function(){var t=this.$dropdown.find("[data-selectable]");return 0<t.length?t.eq(0):$()},getAdjacentOption:function(t,e){var n=this.$dropdown.find("[data-selectable]"),t=n.index(t)+e;return 0<=t&&t<n.length?n.eq(t):$()},getElementWithValue:function(t,e){if(null!=(t=hash_key(t)))for(var n=0,i=e.length;n<i;n++)if(e[n].getAttribute("data-value")===t)return $(e[n]);return $()},getElementWithTextContent:function(t,e,n){if(null!=(t=hash_key(t)))for(var i=0,o=n.length;i<o;i++){var s=n[i].textContent;if(1==e&&(s=null!==s?s.toLowerCase():null,t=t.toLowerCase()),s===t)return $(n[i])}return $()},getItem:function(t){return this.getElementWithValue(t,this.$control.children())},getFirstItemMatchedByTextContent:function(t,e){return this.getElementWithTextContent(t,e=null!==e&&!0===e,this.$dropdown_content.find("[data-selectable]"))},addItems:function(t,e){this.buffer=document.createDocumentFragment();for(var n=this.$control[0].childNodes,i=0;i<n.length;i++)this.buffer.appendChild(n[i]);for(var o=Array.isArray(t)?t:[t],i=0,s=o.length;i<s;i++)this.isPending=i<s-1,this.addItem(o[i],e);t=this.$control[0];t.insertBefore(this.buffer,t.firstChild),this.buffer=null},addItem:function(s,r){debounce_events(this,r?[]:["change"],function(){var t,e,n,i=this,o=i.settings.mode;s=hash_key(s),-1!==i.items.indexOf(s)?"single"===o&&i.close():i.options.hasOwnProperty(s)&&("single"===o&&i.clear(r),"multi"===o&&i.isFull()||(t=$(i.render("item",i.options[s])),n=i.isFull(),i.items.splice(i.caretPos,0,s),i.insertAtCaret(t),i.isPending&&(n||!i.isFull())||i.refreshState(),i.isSetup&&(n=i.$dropdown_content.find("[data-selectable]"),i.isPending||(e=i.getOption(s),e=i.getAdjacentOption(e,1).attr("data-value"),i.refreshOptions(i.isFocused&&"single"!==o),e&&i.setActiveOption(i.getOption(e))),!n.length||i.isFull()?i.close():i.isPending||i.positionDropdown(),i.updatePlaceholder(),i.trigger("item_add",s,t),i.isPending||i.updateOriginalInput({silent:r}))))})},removeItem:function(t,e){var n,i,o=this,s=t instanceof $?t:o.getItem(t);t=hash_key(s.attr("data-value")),-1!==(n=o.items.indexOf(t))&&(o.trigger("item_before_remove",t,s),s.remove(),s.hasClass("active")&&(s.removeClass("active"),i=o.$activeItems.indexOf(s[0]),o.$activeItems.splice(i,1),s.removeClass("active")),o.items.splice(n,1),o.lastQuery=null,!o.settings.persist&&o.userOptions.hasOwnProperty(t)&&o.removeOption(t,e),n<o.caretPos&&o.setCaret(o.caretPos-1),o.refreshState(),o.updatePlaceholder(),o.updateOriginalInput({silent:e}),o.positionDropdown(),o.trigger("item_remove",t,s))},createItem:function(t,n){var i=this,o=i.caretPos,s=(t=t||(i.$control_input.val()||"").trim(),arguments[arguments.length-1]);if("function"!=typeof s&&(s=function(){}),"boolean"!=typeof n&&(n=!0),!i.canCreate(t))return s(),!1;i.lock();var e="function"==typeof i.settings.create?this.settings.create:function(t){var e={},t=e[i.settings.labelField]=t;if(!i.settings.formatValueToKey||"function"!=typeof i.settings.formatValueToKey||null!=(t=i.settings.formatValueToKey.apply(this,[t]))&&"object"!=typeof t&&"function"!=typeof t)return e[i.settings.valueField]=t,e;throw new Error('Selectize "formatValueToKey" setting must be a function that returns a value other than object or function.')},r=once(function(t){var e;return i.unlock(),!t||"object"!=typeof t||"string"!=typeof(e=hash_key(t[i.settings.valueField]))?s():(i.setTextboxValue(""),i.addOption(t),i.setCaret(o),i.addItem(e),i.refreshOptions(n&&"single"!==i.settings.mode),void s(t))}),e=e.apply(this,[t,r]);return void 0!==e&&r(e),!0},refreshItems:function(t){this.lastQuery=null,this.isSetup&&this.addItem(this.items,t),this.refreshState(),this.updateOriginalInput({silent:t})},refreshState:function(){this.refreshValidityState(),this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return!1;var t=!this.items.length;this.isInvalid=t,this.$control_input.prop("required",t),this.$input.prop("required",!t)},refreshClasses:function(){var t=this,e=t.isFull(),n=t.isLocked;t.$wrapper.toggleClass("rtl",t.rtl),t.$control.toggleClass("focus",t.isFocused).toggleClass("disabled",t.isDisabled).toggleClass("required",t.isRequired).toggleClass("invalid",t.isInvalid).toggleClass("locked",n).toggleClass("full",e).toggleClass("not-full",!e).toggleClass("input-active",t.isFocused&&!t.isInputHidden).toggleClass("dropdown-active",t.isOpen).toggleClass("has-options",!$.isEmptyObject(t.options)).toggleClass("has-items",0<t.items.length),t.$control_input.data("grow",!e&&!n)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(t){var e,n,i,o,s,r,a=this;t=t||{},a.tagType===TAG_SELECT?(o=a.$input.find("option"),e=[],n=[],i=[],r=[],o.get().forEach(function(t){e.push(t.value)}),a.items.forEach(function(t){s=a.options[t][a.settings.labelField]||"",r.push(t),-1==e.indexOf(t)&&n.push('<option value="'+escape_html(t)+'" selected="selected">'+escape_html(s)+"</option>")}),i=e.filter(function(t){return r.indexOf(t)<0}).map(function(t){return'option[value="'+escape_html(t)+'"]'}),e.length-i.length+n.length!==0||a.$input.attr("multiple")||n.push('<option value="" selected="selected"></option>'),a.$input.find(i.join(", ")).remove(),a.$input.append(n.join(""))):(a.$input.val(a.getValue()),a.$input.attr("value",a.$input.val())),a.isSetup&&!t.silent&&a.trigger("change",a.$input.val())},updatePlaceholder:function(){var t;this.settings.placeholder&&(t=this.$control_input,this.items.length?t.removeAttr("placeholder"):t.attr("placeholder",this.settings.placeholder),t.triggerHandler("update",{force:!0}))},open:function(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.focus(),t.isOpen=!0,t.refreshState(),t.$dropdown.css({visibility:"hidden",display:"block"}),t.setupDropdownHeight(),t.positionDropdown(),t.$dropdown.css({visibility:"visible"}),t.trigger("dropdown_open",t.$dropdown))},close:function(){var t=this,e=t.isOpen;"single"===t.settings.mode&&t.items.length&&(t.hideInput(),t.isBlurring)&&t.$control_input[0].blur(),t.isOpen=!1,t.$dropdown.hide(),t.setActiveOption(null),t.refreshState(),e&&t.trigger("dropdown_close",t.$dropdown)},positionDropdown:function(){var t=this.$control,e="body"===this.settings.dropdownParent?t.offset():t.position(),n=(e.top+=t.outerHeight(!0),"fit-content"===this.$wrapper[0].style.width||"body"===this.settings.dropdownParent?"max-content":"100%");this.settings.minWidth&&this.settings.minWidth>n&&(n=this.settings.minWidth),"body"!==this.settings.dropdownParent&&"max-content"===n&&t.outerWidth(!0)>=this.$dropdown.outerWidth(!0)&&(n="100%"),this.$dropdown.css({width:n,minWidth:t.outerWidth(!0),top:e.top,left:e.left})},setupDropdownHeight:function(){if("object"==typeof this.settings.dropdownSize&&"auto"!==this.settings.dropdownSize.sizeType){var t=this.settings.dropdownSize.sizeValue;if("numberItems"===this.settings.dropdownSize.sizeType){for(var e=this.$dropdown_content.find("*").not(".optgroup, .highlight").not(this.settings.ignoreOnDropwdownHeight),n=0,i=0,o=0,s=0,r=0;r<t;r++){var a=$(e[r]);if(0===a.length)break;n+=a.outerHeight(!0),void 0===a.data("selectable")&&(a.hasClass("optgroup-header")&&(a=window.getComputedStyle(a.parent()[0],":before"))&&(i=a.marginTop?Number(a.marginTop.replace(/\W*(\w)\w*/g,"$1")):0,o=a.marginBottom?Number(a.marginBottom.replace(/\W*(\w)\w*/g,"$1")):0,s=a.borderTopWidth?Number(a.borderTopWidth.replace(/\W*(\w)\w*/g,"$1")):0),t++)}t=n+(this.$dropdown_content.css("padding-top")?Number(this.$dropdown_content.css("padding-top").replace(/\W*(\w)\w*/g,"$1")):0)+(this.$dropdown_content.css("padding-bottom")?Number(this.$dropdown_content.css("padding-bottom").replace(/\W*(\w)\w*/g,"$1")):0)+i+o+s+"px"}else if("fixedHeight"!==this.settings.dropdownSize.sizeType)return void console.warn('Selectize.js - Value of "sizeType" must be "fixedHeight" or "numberItems');this.$dropdown_content.css({height:t,maxHeight:"none"})}},clear:function(t){var e=this;e.items.length&&(e.$control.children(":not(input)").remove(),e.items=[],e.lastQuery=null,e.setCaret(0),e.setActiveItem(null),e.updatePlaceholder(),e.updateOriginalInput({silent:t}),e.refreshState(),e.showInput(),e.trigger("clear"))},insertAtCaret:function(t){var e=Math.min(this.caretPos,this.items.length),t=t[0],n=this.buffer||this.$control[0];0===e?n.insertBefore(t,n.firstChild):n.insertBefore(t,n.childNodes[e]),this.setCaret(e+1)},deleteSelection:function(t){var e,n,i,o,s,r=this,a=t&&t.keyCode===KEY_BACKSPACE?-1:1,l=getInputSelection(r.$control_input[0]);if(r.$activeOption&&!r.settings.hideSelected&&(o=("string"==typeof r.settings.deselectBehavior&&"top"===r.settings.deselectBehavior?r.getFirstOption():r.getAdjacentOption(r.$activeOption,-1)).attr("data-value")),i=[],r.$activeItems.length){for(s=r.$control.children(".active:"+(0<a?"last":"first")),s=r.$control.children(":not(input)").index(s),0<a&&s++,e=0,n=r.$activeItems.length;e<n;e++)i.push($(r.$activeItems[e]).attr("data-value"));t&&(t.preventDefault(),t.stopPropagation())}else(r.isFocused||"single"===r.settings.mode)&&r.items.length&&(a<0&&0===l.start&&0===l.length?i.push(r.items[r.caretPos-1]):0<a&&l.start===r.$control_input.val().length&&i.push(r.items[r.caretPos]));if(!i.length||"function"==typeof r.settings.onDelete&&!1===r.settings.onDelete.apply(r,[i]))return!1;for(void 0!==s&&r.setCaret(s);i.length;)r.removeItem(i.pop());return r.showInput(),r.positionDropdown(),r.refreshOptions(!0),o&&(t=r.getOption(o)).length&&r.setActiveOption(t),!0},advanceSelection:function(t,e){var n,i,o,s=this;0!==t&&(s.rtl&&(t*=-1),n=0<t?"last":"first",o=getInputSelection(s.$control_input[0]),s.isFocused&&!s.isInputHidden?(i=s.$control_input.val().length,(t<0?0!==o.start||0!==o.length:o.start!==i)||i||s.advanceCaret(t,e)):(o=s.$control.children(".active:"+n)).length&&(i=s.$control.children(":not(input)").index(o),s.setActiveItem(null),s.setCaret(0<t?i+1:i)))},advanceCaret:function(t,e){var n,i=this;0!==t&&(i.isShiftDown?(n=i.$control_input[0<t?"next":"prev"]()).length&&(i.hideInput(),i.setActiveItem(n),e)&&e.preventDefault():i.setCaret(i.caretPos+t))},setCaret:function(t){var e=this;if(t="single"===e.settings.mode?e.items.length:Math.max(0,Math.min(e.items.length,t)),!e.isPending)for(var n,i=e.$control.children(":not(input)"),o=0,s=i.length;o<s;o++)n=$(i[o]).detach(),o<t?e.$control_input.before(n):e.$control.append(n);e.caretPos=t},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){this.$input.prop("disabled",!0),this.$control_input.prop("disabled",!0).prop("tabindex",-1),this.isDisabled=!0,this.lock()},enable:function(){var t=this;t.$input.prop("disabled",!1),t.$control_input.prop("disabled",!1).prop("tabindex",t.tabIndex),t.isDisabled=!1,t.unlock()},destroy:function(){var t=this,e=t.eventNS,n=t.revertSettings;t.trigger("destroy"),t.off(),t.$wrapper.remove(),t.$dropdown.remove(),t.$input.html("").append(n.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:n.tabindex}).show(),t.$control_input.removeData("grow"),t.$input.removeData("selectize"),0==--Selectize.count&&Selectize.$testInput&&(Selectize.$testInput.remove(),Selectize.$testInput=void 0),$(window).off(e),$(document).off(e),$(document.body).off(e),delete t.$input[0].selectize},render:function(t,e){var n,i,o="",s=!1,r=this;return(s="option"!==t&&"item"!==t?s:!!(n=hash_key(e[r.settings.valueField])))&&(isset(r.renderCache[t])||(r.renderCache[t]={}),r.renderCache[t].hasOwnProperty(n))?r.renderCache[t][n]:(o=$(r.settings.render[t].apply(this,[e,escape_html])),"option"===t||"option_create"===t?e[r.settings.disabledField]||o.attr("data-selectable",""):"optgroup"===t&&(i=e[r.settings.optgroupValueField]||"",o.attr("data-group",i),e[r.settings.disabledField])&&o.attr("data-disabled",""),"option"!==t&&"item"!==t||o.attr("data-value",n||""),s&&(r.renderCache[t][n]=o[0]),o[0])},clearCache:function(t){void 0===t?this.renderCache={}:delete this.renderCache[t]},canCreate:function(t){var e;return!!this.settings.create&&(e=this.settings.createFilter,t.length)&&("function"!=typeof e||e.apply(this,[t]))&&("string"!=typeof e||new RegExp(e).test(t))&&(!(e instanceof RegExp)||e.test(t))}}),Selectize.count=0,Selectize.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,showAddOptionOnCreate:!0,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!0,preload:!1,allowEmptyOption:!1,showEmptyOptionInDropdown:!1,emptyOptionLabel:"--",setFirstOptionActive:!1,closeAfterSelect:!1,closeDropdownThreshold:250,scrollDuration:60,deselectBehavior:"previous",loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",respect_word_boundaries:!1,normalize:!0,mode:null,wrapperClass:"",inputClass:"",dropdownClass:"",dropdownContentClass:"",dropdownParent:null,copyClassesToDropdown:!0,dropdownSize:{sizeType:"auto",sizeValue:"auto"},ignoreOnDropwdownHeight:"img, i",search:!0,showArrow:!0,render:{}},$.fn.selectize=function(c){function d(t,o){function e(t,e){t=$(t);var n,i=hash_key(t.val());(i||v.allowEmptyOption)&&(l.hasOwnProperty(i)?e&&((n=l[i][O])?Array.isArray(n)?n.push(e):l[i][O]=[n,e]:l[i][O]=e):((n=p(t)||{})[y]=n[y]||t.text(),n[w]=n[w]||i,n[C]=n[C]||t.prop("disabled"),n[O]=n[O]||e,n.styles=t.attr("style")||"",n.classes=t.attr("class")||"",l[i]=n,a.push(n),t.is(":selected")&&o.items.push(i)))}var n,i,s,r,a=o.options,l={},p=function(t){var e=m&&t.attr(m),t=t.data(),n={};return"string"==typeof e&&e.length&&(isJSON(e)?Object.assign(n,JSON.parse(e)):n[e]=e),Object.assign(n,t),n||null};for(o.maxItems=t.attr("multiple")?null:1,n=0,i=(r=t.children()).length;n<i;n++)if("optgroup"===(s=r[n].tagName.toLowerCase())){g=h=u=d=c=void 0;var c,d,u,h,g,f=r[n];for((u=(f=$(f)).attr("label"))&&((h=p(f)||{})[_]=u,h[b]=u,h[C]=f.prop("disabled"),o.optgroups.push(h)),c=0,d=(g=$("option",f)).length;c<d;c++)e(g[c],u)}else"option"===s&&e(r[n])}var u=$.fn.selectize.defaults,v=$.extend({},u,c),m=v.dataAttr,y=v.labelField,w=v.valueField,C=v.disabledField,O=v.optgroupField,_=v.optgroupLabelField,b=v.optgroupValueField;return this.each(function(){if(!this.selectize){var t=$(this),e=this.tagName.toLowerCase(),n=t.attr("placeholder")||t.attr("data-placeholder"),i=(n||v.allowEmptyOption||(n=t.children('option[value=""]').text()),v.allowEmptyOption&&v.showEmptyOptionInDropdown&&!t.children('option[value=""]').length&&(l=t.html(),i=escape_html(v.emptyOptionLabel||"--"),t.html('<option value="">'+i+"</option>"+l)),{placeholder:n,options:[],optgroups:[],items:[]});if("select"===e)d(t,i);else{var o,s,r,a,l=t,p=i,n=l.attr(m);if(n)for(p.options=JSON.parse(n),o=0,s=p.options.length;o<s;o++)p.items.push(p.options[o][w]);else{n=(l.val()||"").trim();if(v.allowEmptyOption||n.length){for(o=0,s=(r=n.split(v.delimiter)).length;o<s;o++)(a={})[y]=r[o],a[w]=r[o],p.options.push(a);p.items=r}}}new Selectize(t,$.extend(!0,{},u,i,c)).settings_user=c}})},$.fn.selectize.defaults=Selectize.defaults,$.fn.selectize.support={validity:SUPPORTS_VALIDITY_API},Selectize.define("auto_position",function(){var r=this;const a={top:"top",bottom:"bottom"};r.positionDropdown=function(){var t=this.$control,e="body"===this.settings.dropdownParent?t.offset():t.position(),n=(e.top+=t.outerHeight(!0),this.$dropdown.prop("scrollHeight")+5),i=this.$control.get(0).getBoundingClientRect().top,o=this.$wrapper.height(),s=r.$control.get(0).getBoundingClientRect().bottom,i=i+n+o>window.innerHeight&&0<=s-n-o?a.top:a.bottom,s="fit-content"===this.$wrapper[0].style.width||"body"===this.settings.dropdownParent?"max-content":"100%",n={width:s,minWidth:t.outerWidth(!0),left:e.left};i===a.top?(o={bottom:e.top,top:"unset"},"body"===this.settings.dropdownParent&&(o.top=e.top-this.$dropdown.outerHeight(!0)-t.outerHeight(!0),o.bottom="unset"),Object.assign(n,o),this.$dropdown.addClass("selectize-position-top"),this.$control.addClass("selectize-position-top")):(Object.assign(n,{top:e.top,bottom:"unset"}),this.$dropdown.removeClass("selectize-position-top"),this.$control.removeClass("selectize-position-top")),"body"!==this.settings.dropdownParent&&"max-content"==s&&(t.outerWidth(!0),this.$dropdown.outerWidth(!0)),this.$dropdown.css(n)}}),Selectize.define("auto_select_on_type",function(t){var n,i=this;i.onBlur=(n=i.onBlur,function(t){var e=i.getFirstItemMatchedByTextContent(i.lastValue,!0);return void 0!==e.attr("data-value")&&i.getValue()!==e.attr("data-value")&&i.setValue(e.attr("data-value")),n.apply(this,arguments)})}),Selectize.define("autofill_disable",function(t){var e,n=this;n.setup=(e=n.setup,function(){e.apply(n,arguments),n.$control_input.attr({name:nanoid(21),autocomplete:nanoid(21)})})}),Selectize.define("clear_button",function(e){var t,n=this;e=$.extend({title:"Clear",className:"clear",label:"×",html:function(t){return'<a class="'+t.className+'" title="'+t.title+'"> '+t.label+"</a>"}},e),n.setup=(t=n.setup,function(){t.apply(n,arguments),n.$button_clear=$(e.html(e)),"single"===n.settings.mode&&n.$wrapper.addClass("single"),n.$wrapper.append(n.$button_clear),""!==n.getValue()&&0!==n.getValue().length||n.$wrapper.find("."+e.className).css("display","none"),n.on("change",function(){""===n.getValue()||0===n.getValue().length?n.$wrapper.find("."+e.className).css("display","none"):n.$wrapper.find("."+e.className).css("display","")}),n.$wrapper.on("click","."+e.className,function(t){t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),n.isLocked||(n.clear(),n.$wrapper.find("."+e.className).css("display","none"))})})}),Selectize.define("drag_drop",function(t){if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');var i,e,n,o;"multi"===this.settings.mode&&((i=this).lock=(e=i.lock,function(){var t=i.$control.data("sortable");return t&&t.disable(),e.apply(i,arguments)}),i.unlock=(n=i.unlock,function(){var t=i.$control.data("sortable");return t&&t.enable(),n.apply(i,arguments)}),i.setup=(o=i.setup,function(){o.apply(this,arguments);var n=i.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:i.isLocked,start:function(t,e){e.placeholder.css("width",e.helper.css("width")),n.addClass("dragging")},stop:function(){n.removeClass("dragging");var t=i.$activeItems?i.$activeItems.slice():null,e=[];n.children("[data-value]").each(function(){e.push($(this).attr("data-value"))}),i.isFocused=!1,i.setValue(e),i.isFocused=!0,i.setActiveItem(t),i.positionDropdown()}})}))}),Selectize.define("dropdown_header",function(t){var e,n=this;t=$.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(t){return'<div class="'+t.headerClass+'"><div class="'+t.titleRowClass+'"><span class="'+t.labelClass+'">'+t.title+'</span><a href="javascript:void(0)" class="'+t.closeClass+'">&#xd7;</a></div></div>'}},t),n.setup=(e=n.setup,function(){e.apply(n,arguments),n.$dropdown_header=$(t.html(t)),n.$dropdown.prepend(n.$dropdown_header),n.$dropdown_header.find("."+t.closeClass).on("click",function(){n.close()})})}),Selectize.define("optgroup_columns",function(r){function t(){var t,e,n,i,o=$("[data-group]",a.$dropdown_content),s=o.length;if(s&&a.$dropdown_content.width()){if(r.equalizeHeight){for(t=e=0;t<s;t++)e=Math.max(e,o.eq(t).height());o.css({height:e})}r.equalizeWidth&&(i=a.$dropdown_content.innerWidth()-l(),n=Math.round(i/s),o.css({width:n}),1<s)&&(i=i-n*(s-1),o.eq(s-1).css({width:i}))}}var i,a=this,l=(r=$.extend({equalizeWidth:!0,equalizeHeight:!0},r),this.getAdjacentOption=function(t,e){var n=t.closest("[data-group]").find("[data-selectable]"),t=n.index(t)+e;return 0<=t&&t<n.length?n.eq(t):$()},this.onKeyDown=(i=a.onKeyDown,function(t){var e,n;if(!this.isOpen||t.keyCode!==KEY_LEFT&&t.keyCode!==KEY_RIGHT)return i.apply(this,arguments);a.ignoreHover=!0,e=(n=this.$activeOption.closest("[data-group]")).find("[data-selectable]").index(this.$activeOption),(n=(n=(n=t.keyCode===KEY_LEFT?n.prev("[data-group]"):n.next("[data-group]")).find("[data-selectable]")).eq(Math.min(n.length-1,e))).length&&this.setActiveOption(n)}),function(){var t,e=l.width,n=document;return void 0===e&&((t=n.createElement("div")).innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',t=t.firstChild,n.body.appendChild(t),e=l.width=t.offsetWidth-t.clientWidth,n.body.removeChild(t)),e});(r.equalizeHeight||r.equalizeWidth)&&(hook.after(this,"positionDropdown",t),hook.after(this,"refreshOptions",t))}),Selectize.define("read-only",function(t){var e;this.setup=(e=this.setup,function(){e.apply(this,arguments),this.$dropdown.hasClass("read-only")&&this.$control_input.attr("readonly","readonly")}),this.readonly=function(t){t?(this.$control_input.attr("readonly","readonly"),this.$dropdown.addClass("read-only")):(this.$control_input.removeAttr("readonly"),this.$dropdown.removeClass("read-only"))}}),Selectize.define("remove_button",function(t){var s,e,n,i,r;"single"!==this.settings.mode&&(t=$.extend({label:"&#xd7;",title:"Remove",className:"remove",append:!0},t),i=s=this,r='<a href="javascript:void(0)" class="'+(e=t).className+'" tabindex="-1" title="'+escape_html(e.title)+'">'+e.label+"</a>",s.setup=(n=i.setup,function(){var o;e.append&&(o=i.settings.render.item,i.settings.render.item=function(t){return e=o.apply(s,arguments),n=r,i=e.search(/(<\/[^>]+>\s*)$/),e.substring(0,i)+n+e.substring(i);var e,n,i}),n.apply(s,arguments),s.$control.on("click","."+e.className,function(t){if(t.preventDefault(),!i.isLocked)return t=$(t.currentTarget).parent(),i.setActiveItem(t),i.deleteSelection()&&i.setCaret(i.items.length),!1})}))}),Selectize.define("restore_on_backspace",function(n){var i,t=this;n.text=n.text||function(t){return t[this.settings.labelField]},this.onKeyDown=(i=t.onKeyDown,function(t){var e;if(!(t.keyCode===KEY_BACKSPACE&&""===this.$control_input.val()&&!this.$activeItems.length&&0<=(e=this.caretPos-1)&&e<this.items.length))return i.apply(this,arguments);e=this.options[this.items[e]],this.deleteSelection(t)&&(this.setTextboxValue(n.text.apply(this,[e])),this.refreshOptions(!0)),t.preventDefault()})}),Selectize.define("select_on_focus",function(t){var n,e,i=this;i.on("focus",(n=i.onFocus,function(t){var e=i.getItem(i.getValue()).text();return i.clear(),i.setTextboxValue(e),i.$control_input.select(),setTimeout(function(){i.settings.selectOnTab&&i.setActiveOption(i.getFirstItemMatchedByTextContent(e)),i.settings.score=null},0),n.apply(this,arguments)})),i.onBlur=(e=i.onBlur,function(t){return""===i.getValue()&&i.lastValidValue!==i.getValue()&&i.setValue(i.lastValidValue),setTimeout(function(){i.settings.score=function(){return function(){return 1}}},0),e.apply(this,arguments)}),i.settings.score=function(){return function(){return 1}}}),Selectize.define("tag_limit",function(o){const t=this;o.tagLimit=o.tagLimit,this.onBlur=function(){const i=t.onBlur;return function(t){if(i.apply(this,t),t){var t=this.$control,e=t.find(".item");const n=o.tagLimit;void 0===n||e.length<=n||(e.toArray().forEach(function(t,e){e<n||$(t).hide()}),t.append("<span><b>"+(e.length-n)+"</b></span>"))}}}(),this.onFocus=function(){const e=t.onFocus;return function(t){e.apply(this,t),t&&((t=this.$control).find(".item").show(),t.find("span").remove())}}()});
3401  return Selectize;
3402}));
3403;
3404var hb_stripe_key = "pk_live_51Hs7i5Gf8F2o0UR2iS3xw4CrnIZsfTDGxOjKrurkrANXA1ozbLWsJomcKqrpUUTnBcncmDyaDzG56rUgNH4d9tfK00iyuxNxoy";
3405var hb_stripe_locale = "en";
3406var hb_stripe_currency = "USD";
3407var hb_stripe_zero_decimal_currency = "no";
3408var hb_stripe_payment_methods = "credit_card";
3409var hb_stripe_store_credit_card = "yes";
3410var hb_stripe_requires_country_field_msg = "When using Stripe you need to add a Required Country Field in the Details form.";
3411var hb_status_days_2131 = {"2026-10-19":"hb-day-taken-start","2026-10-20":"hb-day-fully-taken","2026-10-21":"hb-day-fully-taken","2026-10-22":"hb-day-taken-end","2026-10-23":"hb-day-taken-start","2026-10-24":"hb-day-fully-taken","2026-10-25":"hb-day-taken-end","2026-11-14":"hb-day-taken-start","2026-11-15":"hb-day-fully-taken","2026-11-16":"hb-day-fully-taken","2026-11-17":"hb-day-fully-taken","2026-11-18":"hb-day-fully-taken","2026-11-19":"hb-day-fully-taken","2026-11-20":"hb-day-fully-taken","2026-11-21":"hb-day-fully-taken","2026-11-22":"hb-day-fully-taken","2026-11-23":"hb-day-fully-taken","2026-11-24":"hb-day-fully-taken","2026-11-25":"hb-day-fully-taken","2026-11-26":"hb-day-fully-taken","2026-11-27":"hb-day-fully-taken","2026-11-28":"hb-day-fully-taken","2026-11-29":"hb-day-fully-taken","2026-11-30":"hb-day-fully-taken","2026-12-01":"hb-day-fully-taken","2026-12-02":"hb-day-fully-taken","2026-12-03":"hb-day-fully-taken","2026-12-04":"hb-day-fully-taken","2026-12-05":"hb-day-fully-taken","2026-12-06":"hb-day-fully-taken","2026-12-07":"hb-day-fully-taken","2026-12-08":"hb-day-fully-taken","2026-12-09":"hb-day-fully-taken","2026-12-10":"hb-day-fully-taken","2026-12-11":"hb-day-fully-taken","2026-12-12":"hb-day-fully-taken","2026-12-13":"hb-day-fully-taken","2026-12-14":"hb-day-fully-taken","2026-12-15":"hb-day-fully-taken","2026-12-16":"hb-day-fully-taken","2026-12-17":"hb-day-fully-taken","2026-12-18":"hb-day-fully-taken","2026-12-19":"hb-day-fully-taken","2026-12-20":"hb-day-fully-taken","2026-12-21":"hb-day-fully-taken","2026-12-22":"hb-day-fully-taken","2026-12-23":"hb-day-fully-taken","2026-12-24":"hb-day-fully-taken","2026-12-25":"hb-day-fully-taken","2026-12-26":"hb-day-fully-taken","2026-12-27":"hb-day-fully-taken","2026-12-28":"hb-day-fully-taken","2026-12-29":"hb-day-fully-taken","2026-12-30":"hb-day-fully-taken","2026-12-31":"hb-day-fully-taken","2027-01-01":"hb-day-fully-taken","2027-01-02":"hb-day-fully-taken","2027-01-03":"hb-day-fully-taken","2027-01-04":"hb-day-fully-taken","2027-01-05":"hb-day-fully-taken","2027-01-06":"hb-day-fully-taken","2027-01-07":"hb-day-fully-taken","2027-01-08":"hb-day-fully-taken","2027-01-09":"hb-day-fully-taken","2027-01-10":"hb-day-fully-taken","2027-01-11":"hb-day-fully-taken","2027-01-12":"hb-day-fully-taken","2027-01-13":"hb-day-fully-taken","2027-01-14":"hb-day-fully-taken","2027-01-15":"hb-day-fully-taken","2027-01-16":"hb-day-fully-taken","2027-01-17":"hb-day-fully-taken","2027-01-18":"hb-day-fully-taken","2027-01-19":"hb-day-fully-taken","2027-01-20":"hb-day-fully-taken","2027-01-21":"hb-day-fully-taken","2027-01-22":"hb-day-fully-taken","2027-01-23":"hb-day-fully-taken","2027-01-24":"hb-day-fully-taken","2027-01-25":"hb-day-fully-taken","2027-01-26":"hb-day-fully-taken","2027-01-27":"hb-day-fully-taken","2027-01-28":"hb-day-fully-taken","2027-01-29":"hb-day-fully-taken","2027-01-30":"hb-day-fully-taken","2027-01-31":"hb-day-fully-taken","2027-02-01":"hb-day-fully-taken","2027-02-02":"hb-day-fully-taken","2027-02-03":"hb-day-fully-taken","2027-02-04":"hb-day-fully-taken","2027-02-05":"hb-day-fully-taken","2027-02-06":"hb-day-fully-taken","2027-02-07":"hb-day-fully-taken","2027-02-08":"hb-day-fully-taken","2027-02-09":"hb-day-fully-taken","2027-02-10":"hb-day-fully-taken","2027-02-11":"hb-day-fully-taken","2027-02-12":"hb-day-fully-taken","2027-02-13":"hb-day-fully-taken","2027-02-14":"hb-day-fully-taken","2027-02-15":"hb-day-fully-taken","2027-02-16":"hb-day-fully-taken","2027-02-17":"hb-day-fully-taken","2027-02-18":"hb-day-fully-taken","2027-02-19":"hb-day-fully-taken","2027-02-20":"hb-day-fully-taken","2027-02-21":"hb-day-fully-taken","2027-02-22":"hb-day-fully-taken","2027-02-23":"hb-day-fully-taken","2027-02-24":"hb-day-fully-taken","2027-02-25":"hb-day-fully-taken","2027-02-26":"hb-day-fully-taken","2027-02-27":"hb-day-fully-taken","2027-02-28":"hb-day-fully-taken","2027-03-01":"hb-day-fully-taken","2027-03-02":"hb-day-fully-taken","2027-03-03":"hb-day-fully-taken","2027-03-04":"hb-day-fully-taken","2027-03-05":"hb-day-fully-taken","2027-03-06":"hb-day-fully-taken","2027-03-07":"hb-day-fully-taken","2027-03-08":"hb-day-fully-taken","2027-03-09":"hb-day-fully-taken","2027-03-10":"hb-day-fully-taken","2027-03-11":"hb-day-fully-taken","2027-03-12":"hb-day-fully-taken","2027-03-13":"hb-day-fully-taken","2027-03-14":"hb-day-fully-taken","2027-03-15":"hb-day-fully-taken","2027-03-16":"hb-day-fully-taken","2027-03-17":"hb-day-fully-taken","2027-03-18":"hb-day-fully-taken","2027-03-19":"hb-day-fully-taken","2027-03-20":"hb-day-fully-taken","2027-03-21":"hb-day-fully-taken","2027-03-22":"hb-day-fully-taken","2027-03-23":"hb-day-fully-taken","2027-03-24":"hb-day-fully-taken","2027-03-25":"hb-day-fully-taken","2027-03-26":"hb-day-taken-end","2027-06-11":"hb-day-taken-start","2027-06-12":"hb-day-fully-taken","2027-06-13":"hb-day-taken-end","2026-10-09":"hb-day-taken-start","2026-10-10":"hb-day-fully-taken","2026-10-11":"hb-day-fully-taken","2026-10-12":"hb-day-taken-end","2027-10-06":"hb-day-no-check-in-min-stay"};
3412var hb_booking_form_data = {"ajax_url":"https:\/\/havenonseneca.com\/wp-admin\/admin-ajax.php","ajax_timeout":40000,"seasons":[{"id":"63","season_id":"53","start_date":"2025-09-01","end_date":"2025-11-01","days":"0,1,2,3,4,5,6","priority":""},{"id":"64","season_id":"54","start_date":"2025-11-01","end_date":"2025-11-29","days":"0,1,2,3,4,5,6","priority":""},{"id":"73","season_id":"62","start_date":"2026-05-15","end_date":"2026-05-18","days":"0,1,2,3,4,5,6","priority":""},{"id":"74","season_id":"63","start_date":"2026-03-13","end_date":"2026-05-15","days":"0,1,2,3,4,5,6","priority":""},{"id":"75","season_id":"64","start_date":"2026-05-18","end_date":"2026-06-27","days":"0,1,2,3,4,5,6","priority":""},{"id":"76","season_id":"65","start_date":"2026-06-27","end_date":"2026-07-11","days":"0,1,2,3,4,5,6","priority":""},{"id":"77","season_id":"66","start_date":"2026-07-11","end_date":"2026-08-29","days":"0,1,2,3,4,5,6","priority":""},{"id":"78","season_id":"67","start_date":"2026-08-29","end_date":"2026-09-08","days":"0,1,2,3,4,5,6","priority":""},{"id":"79","season_id":"68","start_date":"2026-09-08","end_date":"2026-11-01","days":"0,1,2,3,4,5,6","priority":""},{"id":"80","season_id":"69","start_date":"2026-11-01","end_date":"2026-11-30","days":"0,1,2,3,4,5,6","priority":""}],"price_precision":"two_decimals","decimal_point":".","thousands_sep":",","deposit_type":"percentage","deposit_amount":"50","security_bond":"500","security_bond_deposit":"yes","page_padding_top":"150","horizontal_form_min_width":500,"details_form_stack_width":500,"display_accom_left_threshold":-1,"linked_accom_to_block":[],"is_admin":"no"};
3413var hb_text = {"accom_available_at_chosen_dates":"%accom_name is available at the chosen dates. Do you want to stay at Haven on Seneca with more than 6 people? Then e-mail us. A fee per person may apply.","accom_book_now_button":"Book now!","accom_can_not_suit_nb_adults":"Unfortunately the %accom_name can not suit %adults_nb adults.","accom_can_not_suit_nb_children":"Unfortunately the %accom_name can not suit %children_nb children.","accom_can_not_suit_nb_people":"Unfortunately the %accom_name can not suit %persons_nb persons.","accom_can_not_suit_one_adult":"Unfortunately the %accom_name can not suit one adult.","accom_can_not_suit_one_child":"Unfortunately the %accom_name can not suit one child.","accom_can_not_suit_one_person":"Unfortunately the %accom_name can not suit one person only.","accom_deposit_amount":"Deposit amount:","accom_has_no_extras":"This accommodation does not have any extra services.","accom_left":"There are only %available_accom_nb %accom_name left!","accom_no_longer_available":"Unfortunately the accommodation you have selected is no longer available. Please select another accommodation or start searching again.","accom_no_multiple_accom_booking":"You can not book multiple %accom_name in one reservation.","accom_not_available_at_chosen_dates":"The %accom_name is not available at the chosen dates.","accom_num_no_longer_available":"The %accom_name number %accom_num is no longer available. Please select another accommodation number.","accom_number":"Number of accommodation","accom_number_any":"Any","accom_page_form_title":"","accom_starting_price":"price starting at %price","accom_starting_price_duration_unit":"per night","accom_suggestion_for_multiple_accom_search":"We could not find any result matching your search criteria. You can change your search or check our suggestion below.","accom_suggestion_for_single_accom_search":"More than one accommodation is needed to accommodate your stay. Please check our suggestion below.","address_1":"","address_2":"","adults":"Adults","auto_blocked_accom_multiple":"Selecting the %selected_accom_name automatically blocks %nb_blocked_accom %blocked_accom_name.","auto_blocked_accom_single":"Selecting the %selected_accom_name automatically blocks the %blocked_accom_name.","book_now_button":"Book now!","canada_province_iso":"","change_search_button":"Change search","check_in":"Check-in","check_in_date_before_date":"The check-in date can not be before the %date.","check_in_date_past":"The check-in date can not be in the past.","check_in_day_not_allowed":"Check-in is allowed only on specific days (%check_in_days).","check_in_day_not_allowed_seasonal":"Check-in is allowed only on certain days. Please change your check-in date.","check_out":"Check-out","check_out_before_check_in":"The check-out date must be after the check-in date.","check_out_date_after_date":"The check-out date can not be after the %date.","check_out_day_not_allowed":"Check-out is allowed only on specific days (%check_out_days).","check_out_day_not_allowed_for_check_in_day":"Guests check-in on %check_in_day must check-out on a specific day (%check_out_days).","check_out_day_not_allowed_for_check_in_day_seasonal":"With this check-in date check-out is allowed only on certain days. Please change your check-in or check-out dates.","check_out_day_not_allowed_seasonal":"Check-out is allowed only on certain days. Please change your check-out date.","children":"Children","chosen_accom_number":"Number of accommodation:","chosen_adults":"Adults:","chosen_adults_in_accom_number":"
3413(%nb_adults adults)","chosen_check_in":"Check-in:","chosen_check_out":"Check-out:","chosen_children":"Children:","chosen_options":"Extra services:","chosen_persons_in_accom_number":"(%nb_persons persons)","city":"","connection_error":"There was a connection error. Please try again.","country":"","country_iso":"","coupon_no_longer_valid":"This coupon code is no longer valid.","coupons_button":"Apply","coupons_section_title":"Coupon","coupons_text":"If you have a coupon code enter it in the field below and click on apply.","default_form_title":"Check Availibility","details_form_title":"Enter your details","each_option":" each","email":"","error_rate_not_defined":"Error: please add a rate for accommodation named %accom_name and season named %season_name.","error_season_not_defined":"Error: season is not defined for %night.","external_payment_txt_deposit":" (deposit)","external_payment_txt_desc":"%accom_name%deposit_txt - %nights_txt (from %check_in_date to %check_out_date) - %adults_txt%children_txt","external_payment_txt_one_adult":"1 adult","external_payment_txt_one_child":" - 1 child","external_payment_txt_one_night":"1 night","external_payment_txt_several_adults":"%nb_adults adults","external_payment_txt_several_children":" - %nb_children children","external_payment_txt_several_nights":"%nb_nights nights","fee_1":"","fee_3":"","fee_details_adult_one":"adult","fee_details_adults_several":"adults","fee_details_child_one":"child","fee_details_children_several":"children","fee_details_persons":"persons","first_name":"","free_option":"(free)","global_options_title":"Global options","hide_price_breakdown":"Hide price breakdown","invalid_check_in_date":"The check-in date is not valid.","invalid_check_in_out_date":"The check-in date and the check-out date are not valid.","invalid_check_out_date":"The check-out date is not valid.","invalid_coupon":"This coupon code is not valid.","invalid_email":"Invalid email.","invali
3413d_number":"This field can only contain numbers.","last_name":"","later_payment_already_paid":"A payment has already been made for this Payment link.","later_payment_confirm_error":"We have received your Payment but we could not confirm your reservation. Please contact us and we will check your reservation status.","later_payment_expired":"This Payment link has expired. Please contact us so we can check your reservation status.","later_payment_form_amount":"You will be charged %amount","later_payment_form_could_not_be_loaded":"The Payment form could not be loaded (you did not follow a Payment link or the Payment has expired).","later_payment_form_pay_button":"Pay now","later_payment_form_store_credit_card_text_explanation":"We ask for your credit card details but we will not charge it now.","later_payment_form_submit_button":"Submit","later_payment_form_title":"Payment","later_payment_log_error":"We have received your Payment but we could not update our records to take note of it. Please contact us so we can confirm your payment and update your reservation.","later_payment_no_reservation":"We could not find any valid reservation for this Payment link. Please contact us so we can check your reservation status.","later_payment_pay_button_pay_txt":"Pay now","later_payment_store_credit_card_thanks_message":"Thank you. We have updated your payment method.","later_payment_thanks_message":"Thank you. We have just sent you an email at %customer_email to confirm we have received your payment.","later_payment_txt_before_pay_button":"Please double check the payment details before clicking on \"Pay now\"","later_payment_txt_before_submit_button":"Please double check the form details before clicking on \"Submit\"","later_payment_type_bond":"bond","later_payment_type_deposit":"deposit","later_payment_type_deposit_including_bond":"deposit including the bond","later_payment_type_explanation":"You are paying the %payment_type.","later_payment_type_remaining_balance":"remaining balance","later_payment_type_remaining_balance_including_bond":"remaining balance including the bond","later_payment_type_total_price":"total price","later_payment_type_total_price_including_bond":"total price including the bond","later_payment_update_button_txt":"Add or update your payment method","legend_available":"Available","legend_before_check_in":"Before check-in day","legend_check_in":"Chosen check-in day","legend_check_in_only":"Available for check-in only","legend_check_out":"Chosen check-out day","legend_check_out_only":"Available for check-out only","legend_closed":"Closed","legend_no_check_in":"Not available for check-in","legend_no_check_out":"Not available for check-out","legend_no_check_out_max_stay":"Not available for check-out (due to the %nb_nights-night maximum-stay requirement)","legend_no_check_out_min_stay":"Not available for check-out (due to the %nb_nights-night minimum-stay requirement)","legend_occupied":"Occupied","legend_past":"Past","legend_select_check_in":"Select a check-in date.","legend_select_check_out":"Select a check-out date.","max_option":" - Maximum: %max_value","maximum_stay":"A %nb_nights-nights maximum stay policy applies. Please modify your dates.","maximum_stay_for_check_in_day":"A %nb_nights-night maximum stay applies for booking starting on %check_in_day.","maximum_stay_for_check_in_day_seasonal":"With this check-in date a maximum stay policy applies.","maximum_stay_seasonal":"A maximum stay policy applies. Please modify your dates to shorten your stay.","minimum_stay":"A %nb_nights-nights minimum stay policy applies. Please modify your dates.","minimum_stay_for_check_in_day":"A %nb_nights-night minimum stay is required for booking starting on %check_in_day.","minimum_stay_for_check_in_day_seasonal":"With this check-in date a minimum stay policy applies.","minimum_stay_seasonal":"A minimum stay policy applies. Please modify your dates to extend your stay.","multi_accom_accom_n":"Accommodation %n","multi_accom_intro":"We have found the following accommodation.","multi_accom_no_accom_selected":"Please select an accommodation before continuing.","multi_accom_select_accom_n":"Select accommodation %n","nb_accom_selected":"You have already selected %selected_accom_nb %accom_name.","next_step_button":"Next %arrow","no_accom_at_chosen_dates":"Unfortunately we could not find any accommodation for the dates you entered.","no_accom_can_suit_nb_people":"Unfortunately we could not find any accommodation that would suit %persons_nb persons.","no_accom_can_suit_nb_people_only":"Unfortunately we could not find accommodation to suit %persons_nb persons only.","no_accom_can_suit_one_person":"Unfortunately we could not find any accommodation that would suit one person only.","no_accom_left":"There are no %accom_name left!","no_adults":"Please select the number of adults.","no_adults_children":"Please select the number of adults and the number of children.","no_check_in_date":"Please enter a check-in date.","no_check_in_out_date":"Please enter a check-in date and a check-out date.","no_check_out_date":"Please enter a check-out date.","no_children":"Please select the number of children.","no_coupon":"Please enter a coupon code.","not_enough_accom_for_people":"We do not have enough %accom_name to suit %persons_nb persons.","not_enough_accom_for_people_at_chosen_dates":"We do not have enough %accom_name to suit %persons_nb persons at the chosen dates.","number_of_nights":"Number of nights:","one_accom_left":"There is only one %accom_name left!","one_adult_chosen_in_accom_number":"
3413(1 adult)","one_type_of_accommodation_found":"We have found 1 type of accommodation that suit your needs.","only_x_accom":"We only have %available_accom_nb %accom_name.","only_x_accom_available_at_chosen_dates":"There are only %available_accom_nb %accom_name available at the chosen dates.","payment_method":"Select your payment method:","payment_section_title":"Payment","payment_type":"Select your payment type:","payment_type_deposit":"Pay deposit now","payment_type_explanation_deposit":"You will be charged %deposit_amount","payment_type_explanation_full":"You will be charged %full_amount. The security bond will be refunded after your stay (minus possible damage costs).","payment_type_explanation_offline":"You will pay for your stay at a later stage. The total price is %full_amount","payment_type_explanation_store_credit_card":"We ask for your credit card details but we will not charge it now.","payment_type_full":"Pay total price now","payment_type_offline":"On arrival or offline payment","payment_type_store_credit_card":"Leave credit card details (the card will not be charged now)","paypal_bottom_text_line_1":"Secured payments by","paypal_bottom_text_line_2":"You can pay with your credit card","paypal_payment_method_label":"PayPal","paypal_text_before_form":"Click on Book Now to confirm your reservation. You will be redirected to PayPal to complete your payment.","phone":"","previous_step_button":"%arrow Previous","price_breakdown_accom_price":"Accommodation price:","price_breakdown_adult_one":"Adult:","price_breakdown_adults_several":"Adults (%nb_adults):","price_breakdown_child_one":"Child:","price_breakdown_children_several":"Children (%nb_children):","price_breakdown_dates":"From %from_date to %to_date","price_breakdown_discount":"Discount:","price_breakdown_extra_adult_one":"Extra adult:","price_breakdown_extra_adults_several":"Extra adults (%nb_adults):","price_breakdown_extra_child_one":"Extra child:","price_breakdown_extra_children_several":"Extra children (%nb_children):","price_breakdown_fees":"Fees:","price_breakdown_multiple_nights":"x %nb_nights-night","price_breakdown_night_one":"night","price_breakdown_nights_several":"nights","price_for_1_night":"price for 1 night","price_for_several_nights":"price for %nb_nights nights","price_option":"(%price%each%max)","privacy_policy_error":"Please confirm you have read and you accept the privacy policy and you give your consent for the information above to be collected by checking the box.","privacy_policy_text":"I have read and I accept the privacy policy and I give my consent for the information above to be collected.","processing":"Processing...","required_field":"Required field.","search_button":"Check Availibility","search_specific_accom_number_link":"Search for a specific number of accommodation","searching":"Searching...","season_53":"","season_54":"","select_accom_button":"Select this accommodation","select_accom_num_label":"%accom_name number %accom_num","select_accom_num_select_title":"Select accommodation number","select_accom_num_text":"","select_accom_num_title":"Select your accommodation number","select_accom_title":"Select your accommodation","select_options_title":"Select your options","selected_accom":"You have selected the %accom_name.","several_types_of_accommodation_found":"We have found %nb_types types of accommodation that suit your needs.","state_province":"","stripe_card_number":"Card number:","stripe_cvc":"CVC:","stripe_expiration":"Expiration date:","stripe_payment_declined":"Your payment was declined. Please try again and get in touch with us if you need help.","stripe_payment_method_label":"Credit or debit card","stripe_processing_error":"Could not process the payment (%error_msg).","stripe_text_before_form":"Please enter your credit cards details below.","stripe_text_bottom_form":"Safe and secure payments SSL encrypted","stripe_text_loading_form":"Loading payment form...","summary_accom_price":"Accommodation price:","summary_accom_total_price":"Price:","summary_accommodation":"Accommodation:","summary_accommodation_number":"Accommodation number:","summary_bottom_text":"","summary_change":"Change","summary_chosen_check_in":"Chosen check-in date","summary_chosen_check_out":"Chosen check-out date","summary_coupon_amount":"Coupon amount:","summary_deposit":"Deposit amount:","summary_discount_amount":"Discount amount:","summary_global_options_price":"Global options price:","summary_included_fees":"Price includes:","
3413summary_loading":"Loading summary...","summary_number_of_nights":"Number of nights","summary_options_price":"Options price:","summary_payments_history_subtitle":"Payments history","summary_price":"Total price:","summary_price_breakdown_subtitle":"Price breakdown","summary_resa_details_subtitle":"Reservation details","summary_security_bond":"Security bond amount:","summary_security_bond_explanation":"This will be refunded after your stay minus possible damage costs.","summary_title":"Reservation summary","table_invoice_accom_extras_total":"%accom_name total","table_invoice_accom_subtotal":"Accommodation subtotal","table_invoice_accom_title":"Accommodation","table_invoice_accom_total":"Accommodation total","table_invoice_bond":"Security bond","table_invoice_coupon":"Coupon","table_invoice_discount":"Discount","table_invoice_due":"Total due","table_invoice_extras_subtotal":"Extra services subtotal","table_invoice_extras_title":"Extra services","table_invoice_extras_total":"Extra services total","table_invoice_global_extras_title":"Global extra services","table_invoice_global_extras_total":"Global extra services total","table_invoice_head_amount":"Amount","table_invoice_head_description":"Description","table_invoice_included_fee":"Including","table_invoice_paid":"Amount paid","table_invoice_subtotal":"Subtotal","table_invoice_surcharge":"Surcharge","table_invoice_total":"Total","table_invoice_total_with_bond":"Total including security bond","table_payments_history_head_amount":"Amount","table_payments_history_head_date":"Payment date","table_payments_history_head_method":"Payment method","table_payments_history_total_paid":"Total amount paid:","table_rates_all_nights":"","table_rates_for_night_stay":"for a %nb_nights-night stay","table_rates_from":"From","table_rates_nights":"Nights","table_rates_per_night":"per night","table_rates_price":"Price","table_rates_season":"Season","table_rates_to":"To","terms_and_cond_error":"Please confirm you have read and you accept the <a href=\"https:\/\/havenonseneca.com\/rental-agreement\/\" target=\"_blank\">rental agreement<\/a> by checking the box.","terms_and_cond_text":"I have read and I accept the <a href=\"https:\/\/havenonseneca.com\/rental-agreement\/\" target=\"_blank\">rental agreement<\/a> for this booking.","terms_and_cond_title":"Accept our policies for this reservation","thanks_message_1":"Thanks for your reservation! We have just sent you a confirmation email at %customer_email with the following details:","thanks_message_2":"See you soon!","thanks_message_payment_done_1":"Thanks for your reservation! We confirm that we have received your payment and have just sent you a confirmation email at %customer_email with the following details:","thanks_message_payment_done_2":"See you soon!","timeout_error":"Your session has timed out. Please start a new booking request.","total_options_price":"Options total price:","txt_after_terms_and_conds_title":"","txt_before_book_now_button":"Please double check your reservation details before clicking on \"Book now\".","unselect_accom_button":"Unselect this accommodation","usa_state_iso":"","valid_coupon":"Your coupon code is valid! We have applied a %amount discount!","verifying_coupon":"Verifying coupon...","view_accom_at_chosen_date":"View all available accommodation at the chosen dates.","view_accom_button":"View this accommodation","view_accom_details_button":"Check details","view_accom_for_one_person":"View all available accommodation for one person.","view_accom_for_persons":"View all available accommodation for %persons_nb persons.","view_price_breakdown":"View price breakdown","write_us_a_message":"","zip_code":""};
3414;
3415jQuery( document ).ready( function( $ ) {
3416	'use strict';
3417
3418	/* external payment thank you page */
3419
3420	if ( $( '#hb-resa-payment-thank-you-page-redirect' ).length ) {
3421		if ( typeof window['hbook_reservation_done'] == 'function' ) {
3422			window['hbook_reservation_done']();
3423		}
3424		$( '#hb-resa-payment-thank-you-page-redirect' ).submit();
3425	}
3426
3427	/* end external payment thank you page */
3428
3429	/* ------------------------------------------------------------------------------------------- */
3430
3431	/* padding top */
3432
3433	var page_padding_top = 0;
3434	if ( typeof hb_booking_form_data !== 'undefined' ) {
3435		page_padding_top = hb_booking_form_data.page_padding_top;
3436	} else if ( typeof hb_payment_confirmation_padding_top !== 'undefined' ) {
3437		page_padding_top = hb_payment_confirmation_padding_top;
3438	}
3439
3440	var adminbar_height = 0;
3441	if ( $( '#wpadminbar' ).length ) {
3442		adminbar_height = $( '#wpadminbar' ).height();
3443		page_padding_top = parseInt( page_padding_top ) + adminbar_height;
3444	}
3445
3446	/* end padding top */
3447
3448	/* ------------------------------------------------------------------------------------------- */
3449
3450	/* id and for attributes */
3451
3452	if ( ( typeof hb_booking_form_data !== 'undefined' ) && ( hb_booking_form_data.is_admin != 'yes' ) ) {
3453		var form_nb = 1;
3454		$( '.hbook-wrapper' ).each( function() {
3455			$( this ).find( 'label' ).each( function() {
3456				var new_attr_for = 'hb-form-' + form_nb + '-' + $( this ).attr( 'for' );
3457				$( this ).attr( 'for', new_attr_for );
3458			});
3459			$( this ).find( 'input, select, textarea' ).each( function() {
3460				var attr_id = $( this ).attr( 'id' );
3461				if ( attr_id ) {
3462					var new_attr_id = 'hb-form-' + form_nb + '-' + attr_id;
3463					$( this ).attr( 'id', new_attr_id );
3464				}
3465			});
3466			$( this ).find( '.hb-booking-search-form' ).addClass( 'hb-form-' + form_nb );
3467			$( this ).find( '.hb-multi-accom-people-selection-wrapper' ).attr( 'data-form-num', form_nb );
3468			form_nb++;
3469		});
3470	}
3471
3472	/* end id and for attributes */
3473
3474	/* ------------------------------------------------------------------------------------------- */
3475
3476	/* booking search */
3477
3478	$( 'body' ).append( '<div class="hb-people-popup-wrapper"></div>' );
3479	if ( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( navigator.userAgent ) ) {
3480		$( '.hb-people-popup-wrapper-close' ).css( 'display', 'block' );
3481	}
3482
3483	$( '.hb-accom-number' ).change( function() {
3484		show_people_popup( $( this ) );
3485	});
3486
3487	$( 'html' ).on( 'click', function( e ) {
3488		if (
3489			! $( e.target ).is( '.hb-people-popup-wrapper' ) &&
3490			! $( e.target ).is( '.hb-accom-number' ) &&
3491			! $( e.target ).is( '.hb-accom-number option' ) &&
3492			! $( e.target ).is( '.hb-multi-accom-adults' ) &&
3493			! $( e.target ).is( '.hb-multi-accom-adults option' ) &&
3494			! $( e.target ).is( '.hb-multi-accom-children' ) &&
3495			! $( e.target ).is( '.hb-multi-accom-children option' ) &&
3496			$( '.hb-people-popup-wrapper' ).hasClass( 'hb-people-popup-wrapper-visible' )
3497		) {
3498			hide_people_popup();
3499		}
3500		if ( $( e.target ).is( '.hb-people-popup-wrapper-close' ) ) {
3501			e.preventDefault();
3502			hide_people_popup();
3503		}
3504	});
3505
3506	function show_people_popup( $accom_people_select ) {
3507		if ( ! $( '.hb-people-popup-wrapper' ).hasClass( 'hb-people-popup-wrapper-visible' ) ) {
3508			$( '.hb-people-popup-wrapper' ).addClass(' hb-people-popup-wrapper-visible' ).html( '' );
3509			var $accom_people_selection = $accom_people_select.parents( '.hb-booking-search-form' ).find( '.hb-multi-accom-people-selection-wrapper' );
3510			$accom_people_selection.show();
3511			$( '.hb-people-popup-wrapper' ).append( $accom_people_selection );
3512			if ( ! $accom_people_select.parents( '.hb-booking-search-form' ).hasClass( 'hb-search-form-no-people' ) ) {
3513				$( '.hb-people-popup-wrapper' ).show();
3514			}
3515		}
3516		var multi_accom_num = $accom_people_select.val();
3517		if ( multi_accom_num == 'any' ) {
3518			multi_accom_num = 1;
3519		}
3520		$( '.hb-people-popup-wrapper .hb-multi-accom-people-selection' ).hide();
3521		for ( var i = 1; i <= multi_accom_num; i++ ) {
3522			$( '.hb-people-popup-wrapper .hb-multi-accom-people-selection-accom-' + i ).show();
3523		}
3524		if ( multi_accom_num > 1 ) {
3525			$( '.hb-people-popup-wrapper .hb-multi-accom-people-title' ).show();
3526		} else {
3527			$( '.hb-people-popup-wrapper .hb-multi-accom-people-title' ).hide();
3528		}
3529		if ( $accom_people_select.parents( '.hb-booking-search-form' ).hasClass( 'hb-search-form-no-children' ) ) {
3530			$( '.hb-multi-accom-children-wrapper' ).hide();
3531		} else {
3532			$( '.hb-multi-accom-children-wrapper' ).show();
3533		}
3534		reposition_people_popup();
3535	}
3536
3537	function hide_people_popup() {
3538		if ( $( '.hb-people-popup-wrapper' ).hasClass( 'hb-people-popup-wrapper-visible' ) ) {
3539			$( '.hb-people-popup-wrapper' ).hide().removeClass( 'hb-people-popup-wrapper-visible' );
3540			var $accom_people_selection = $( '.hb-people-popup-wrapper .hb-multi-accom-people-selection-wrapper' );
3541			$accom_people_selection.hide();
3542			if ( hb_booking_form_data.is_admin == 'yes' ) {
3543				var $form = $( '.hb-booking-search-form' );
3544			} else {
3545				var $form = $( '.hb-booking-search-form.hb-form-' + $accom_people_selection.data( 'form-num' ) );
3546			}
3547			$form.append( $accom_people_selection );
3548			update_accom_people( $form );
3549		}
3550	}
3551
3552	function update_accom_people( $form ) {
3553		var accom_people = [];
3554		var total_accom_people = 0;
3555		var has_children = false;
3556		var new_accom_number = $form.find( '.hb-accom-number' ).val();
3557		if ( new_accom_number == 'any' ) {
3558			new_accom_number = 1;
3559			$form.find( '.hb-accom-people-any').val( 'yes' );
3560		} else {
3561			$form.find( '.hb-accom-people-any').val( 'no' );
3562		}
3563		if ( new_accom_number > 0 ) {
3564			for ( var i = 1; i <= new_accom_number; i++ ) {
3565				var accom_adults = $form.find( '.hb-multi-accom-people-selection-accom-' + i + ' .hb-multi-accom-adults' ).val();
3566				var accom_children = $form.find( '.hb-multi-accom-people-selection-accom-' + i + ' .hb-multi-accom-children' ).val();
3567				if ( accom_children > 0 ) {
3568					has_children = true;
3569				}
3570				accom_people.push( accom_adults + '-' + accom_children );
3571				total_accom_people += parseInt( accom_adults ) + parseInt( accom_children );
3572			}
3573			if ( accom_people.length ) {
3574				accom_people = accom_people.join( ',' );
3575			} else {
3576				accom_people = '';
3577			}
3578			$form.find( '.hb-accom-people' ).val( accom_people );
3579			if ( has_children ) {
3580				var option_text = hb_text.chosen_persons_in_accom_number.replace( '%nb_persons', total_accom_people );
3581			} else if ( total_accom_people > 1 ) {
3582				var option_text = hb_text.chosen_adults_in_accom_number.replace( '%nb_adults', total_accom_people );
3583			} else {
3584				var option_text = hb_text.one_adult_chosen_in_accom_number;
3585			}
3586			option_text = $form.find( '.hb-accom-number option:selected' ).html() + ' ' + option_text;
3587			if ( $form.find( '.hb-accom-number option[value="0"]' ).length ) {
3588				$form.find( '.hb-accom-number option[value="0"]' ).html( option_text );
3589				$form.find( '.hb-accom-number' ).val( 0 );
3590			}
3591		}
3592	}
3593
3594	$( '.hb-booking-search-form' ).on( 'submit', function() {
3595		var $form = $( this ),
3596			$booking_wrapper = $form.parents( '.hbook-wrapper' );
3597		$form.find( 'input[type="submit"]' ).blur();
3598		if ( ! $form.hasClass( 'submitted' ) ) {
3599			$booking_wrapper.find( '.hb-booking-details-form' ).hide();
3600			$form.find( '.hb-search-error' ).slideUp();
3601			var check_in = $form.find( '.hb-check-in-date' ).val(),
3602				check_out = $form.find( '.hb-check-out-date' ).val(),
3603				adults = $form.find( 'select.hb-adults' ).val(),
3604				children = $form.find( 'select.hb-children' ).val(),
3605				admin_accom_id = '',
3606				admin_search_type = '',
3607				people_and_date_validation,
3608				accom_id,
3609				accom_id_data;
3610			if ( $form.find( '.hb-admin-search-type' ).length ) {
3611				admin_search_type = $form.find( '.hb-admin-search-type' ).val();
3612			}
3613			if ( admin_search_type == 'single_accom' ) {
3614				admin_accom_id = $form.find( '.hb-accom' ).val();
3615			}
3616			if ( ! children || $form.hasClass( 'hb-search-form-no-children' ) ) {
3617				$form.find( 'select.hb-children' ).val( 0 );
3618				children = 0;
3619			}
3620			if ( $form.hasClass( 'hb-search-form-no-people' ) ) {
3621				$form.find( 'select.hb-adults' ).val( 1 );
3622				adults = 1;
3623			}
3624			if ( ! adults ) {
3625				$form.find( 'select.hb-adults option:nth-child(2)' ).prop( 'selected', true );
3626				adults = $form.find( 'select.hb-adults' ).val();
3627			}
3628			if ( '0-0' == $form.find( '.hb-accom-people' ).val() ) {
3629				$form.find( '.hb-accom-people' ).val( '1-0' );
3630				$form.find( '.hb-multi-accom-people-selection-accom-1 .hb-multi-accom-adults' ).val( 1 );
3631			}
3632			if ( $form.find( 'select.hb-accom-number option:selected' ).val() == -1 ) {
3633				$form.find( 'select.hb-accom-number option:nth-child(3)' ).prop( 'selected', true );
3634				update_accom_people( $form );
3635			}
3636			var booking_rules = $booking_wrapper.data( 'booking-rules' );
3637			var page_accom_id = $booking_wrapper.data( 'page-accom-id' );
3638			if ( '' == page_accom_id ) {
3639				accom_id = '0';
3640			} else {
3641				accom_id = page_accom_id;
3642			}
3643			accom_id_data = 'hb_accom_data_' + accom_id;
3644			people_and_date_validation = validate_people_and_check_dates( check_in, check_out, adults, children, booking_rules, window[ accom_id_data ] );
3645			if ( ! people_and_date_validation.success ) {
3646				search_show_error( $form, people_and_date_validation.error_msg );
3647			} else {
3648				$form.find( '.hb-check-in-hidden' ).val( date_to_string( people_and_date_validation.check_in ) );
3649				$form.find( '.hb-check-out-hidden' ).val( date_to_string( people_and_date_validation.check_out ) );
3650				if ( $form.data( 'search-only' ) == 'yes' || $form.data( 'booking-details-redirection' ) == 'yes' ) {
3651					return true;
3652				}
3653				disable_form_submission( $form );
3654				$form.find( '.hb-search-no-result' ).slideUp();
3655				$form.find( '.hb-booking-searching' ).slideDown();
3656				var accom_people = '';
3657				if ( ( admin_search_type == 'multiple_accom' ) || $form.hasClass( 'hb-search-form-multiple-accom' ) ) {
3658					accom_people = $form.find( '.hb-accom-people' ).val();
3659					if ( $form.find( '.hb-accom-people-any').val() == 'yes' ) {
3660						accom_people = accom_people.split( '-' );
3661						adults = accom_people[0];
3662						children = accom_people[1];
3663						accom_people = '';
3664					}
3665				}
3666				$.ajax({
3667					url: hb_booking_form_data.ajax_url,
3668					type: 'POST',
3669					timeout: hb_booking_form_data.ajax_timeout,
3670					data: {
3671						'action': 'hb_get_available_accom',
3672						'check_in': $form.find( '.hb-check-in-hidden' ).val(),
3673						'check_out': $form.find( '.hb-check-out-hidden' ).val(),
3674						'adults': adults,
3675						'children': children,
3676						'results_show_only_accom_id': $booking_wrapper.data( 'results-show-only-accom-id' ),
3677						'page_accom_id': $booking_wrapper.data( 'page-accom-id' ),
3678						'current_page_id': $booking_wrapper.data( 'current-page-id' ),
3679						'exists_main_booking_form': $booking_wrapper.data( 'exists-main-booking-form' ),
3680						'force_display_thumb': $booking_wrapper.data( 'force-display-thumb' ),
3681						'force_display_desc': $booking_wrapper.data( 'force-display-desc' ),
3682						'chosen_options': $form.find( '.hb-chosen-options' ).val(),
3683						'chosen_accom_num': $form.find( '.hb-chosen-accom-num' ).val(),
3684						'is_admin': hb_booking_form_data.is_admin,
3685						'admin_accom_id': admin_accom_id,
3686						'admin_search_type': admin_search_type,
3687						'accom_people': accom_people
3688					},
3689					success: function( response ) {
3690						search_show_response( response, $form, $booking_wrapper );
3691					},
3692					error: function( jqXHR, textStatus, errorThrown ) {
3693						$form.find( '.hb-booking-searching' ).hide();
3694						enable_form_submission( $form );
3695						search_show_error( $form, hb_text.connection_error );
3696						console.log( jqXHR );
3697						console.log( jqXHR.responseText );
3698						console.log( textStatus );
3699						console.log( errorThrown );
3700					}
3701				});
3702			}
3703		}
3704		return false;
3705	});
3706
3707	function validate_people_and_check_dates( check_in, check_out, adults, children, booking_rules, accom_id_data ) {
3708		if ( ( check_in == '' ) && ( check_out == '' ) ) {
3709			return { success: false, error_msg: hb_text.no_check_in_out_date };
3710		} else if ( check_in == '' ) {
3711			return { success: false, error_msg: hb_text.no_check_in_date };
3712		} else if ( check_out == '' ) {
3713			return { success: false, error_msg: hb_text.no_check_out_date };
3714		} else if ( adults != parseInt( adults, 10 ) && children != parseInt( children, 10 ) ) {
3715			return { success: false, error_msg: hb_text.no_adults_children };
3716		} else if ( adults != parseInt( adults, 10 ) ) {
3717			return { success: false, error_msg: hb_text.no_adults };
3718		} else if ( children != parseInt( children, 10 ) ) {
3719			return { success: false, error_msg: hb_text.no_children };
3720		}
3721		var check_in_date,
3722			check_out_date,
3723			hb_min_date,
3724			hb_max_date;
3725		try {
3726			check_in_date = $.datepick.parseDate( hb_date_format, check_in );
3727		} catch( e ) {
3728			check_in_date = false;
3729		}
3730		try {
3731			check_out_date = $.datepick.parseDate( hb_date_format, check_out );
3732		} catch( e ) {
3733			check_out_date = false;
3734		}
3735		if ( ! check_in_date && ! check_out_date ) {
3736			return { success: false, error_msg: hb_text.invalid_check_in_out_date };
3737		} else if ( ! check_in_date ) {
3738			return { success: false, error_msg: hb_text.invalid_check_in_date };
3739		} else if ( ! check_out_date ) {
3740			return { success: false, error_msg: hb_text.invalid_check_out_date };
3741		}
3742
3743		if ( hb_booking_form_data.is_admin == 'yes' ) {
3744			if ( check_out_date <= check_in_date ) {
3745				return { success: false, error_msg: hb_text.check_out_before_check_in };
3746			}
3747			return { success: true, check_in: check_in_date, check_out: check_out_date };
3748		}
3749		hb_min_date = accom_id_data['min_date'];
3750		if ( hb_min_date != '0' ) {
3751			var min_date = hb_date_str_2_obj( hb_min_date ),
3752				txt_min_date = $.datepick.formatDate( hb_date_format, min_date );
3753			if ( check_in_date < min_date ) {
3754				return { success: false, error_msg: hb_text.check_in_date_before_date.replace( '%date', txt_min_date ) };
3755			}
3756		}
3757		hb_max_date = accom_id_data['max_date'];
3758		if ( hb_max_date != '0' ) {
3759			var max_date = hb_date_str_2_obj( hb_max_date ),
3760				txt_max_date = $.datepick.formatDate( hb_date_format, max_date );
3761			max_date.setDate( max_date.getDate() + 1 );
3762			if ( check_out_date > max_date ) {
3763				return { success: false, error_msg: hb_text.check_out_date_after_date.replace( '%date', txt_max_date ) };
3764			}
3765		}
3766
3767		var yesterday = new Date();
3768		yesterday.setDate( yesterday.getDate() - 1 );
3769		yesterday.setHours( 23, 59, 59 );
3770		if ( check_in_date < yesterday ) {
3771			return { success: false, error_msg: hb_text.check_in_date_past };
3772		} else if ( check_out_date <= check_in_date ) {
3773			return { success: false, error_msg: hb_text.check_out_before_check_in };
3774		}
3775
3776		var check_in_day = day_of_week( check_in_date ),
3777			check_out_day = day_of_week( check_out_date ),
3778			nb_nights = date_diff( check_out_date, check_in_date ),
3779			check_in_date_season = hb_get_season_id( check_in_date ),
3780			check_out_date_season = hb_get_season_id( check_out_date );
3781
3782		if ( booking_rules.allowed_check_in_days != 'all' ) {
3783			var allowed_check_in_days = booking_rules.allowed_check_in_days.split( ',' );
3784			if ( allowed_check_in_days.indexOf( check_in_day ) < 0 ) {
3785				var allowed_days = day_name_list( allowed_check_in_days );
3786				return { success: false, error_msg: hb_text.check_in_day_not_allowed.replace( '%check_in_days', allowed_days ) };
3787			}
3788		}
3789		if ( booking_rules.allowed_check_out_days != 'all' ) {
3790			var allowed_check_out_days = booking_rules.allowed_check_out_days.split( ',' );
3791			if ( allowed_check_out_days.indexOf( check_out_day ) < 0 ) {
3792				var allowed_days = day_name_list( allowed_check_out_days );
3793				return { success: false, error_msg: hb_text.check_out_day_not_allowed.replace( '%check_out_days', allowed_days ) };
3794			}
3795		}
3796		if (
3797			booking_rules.seasonal_allowed_check_in_days[ check_in_date_season ] &&
3798			booking_rules.seasonal_allowed_check_in_days[ check_in_date_season ].split( ',' ).indexOf( check_in_day ) < 0
3799		) {
3800			return { success: false, error_msg: hb_text.check_in_day_not_allowed_seasonal };
3801		}
3802		if (
3803			booking_rules.seasonal_allowed_check_out_days[ check_out_date_season ] &&
3804			booking_rules.seasonal_allowed_check_out_days[ check_out_date_season ].split( ',' ).indexOf( check_out_day ) < 0
3805		) {
3806			return { success: false, error_msg: hb_text.check_out_day_not_allowed_seasonal };
3807		}
3808		if ( booking_rules.seasonal_minimum_stay[ check_in_date_season ] ) {
3809			if ( nb_nights < booking_rules.seasonal_minimum_stay[ check_in_date_season ] ) {
3810				return { success: false, error_msg: hb_text.minimum_stay_seasonal };
3811			}
3812		} else if ( nb_nights < booking_rules.minimum_stay ) {
3813			return { success: false, error_msg: hb_text.minimum_stay.replace( '%nb_nights', booking_rules.minimum_stay ) };
3814		}
3815		if ( booking_rules.seasonal_maximum_stay[ check_in_date_season ] ) {
3816			if ( nb_nights > booking_rules.seasonal_maximum_stay[ check_in_date_season ] ) {
3817				return { success: false, error_msg: hb_text.maximum_stay_seasonal };
3818			}
3819		} else if ( nb_nights > booking_rules.maximum_stay ) {
3820			return { success: false, error_msg: hb_text.maximum_stay.replace( '%nb_nights', booking_rules.maximum_stay ) };
3821		}
3822		if ( booking_rules.conditional_booking_rules.length ) {
3823			for ( var i = 0; i < booking_rules.conditional_booking_rules.length; i++ ) {
3824				var rule = booking_rules.conditional_booking_rules[ i ];
3825				if ( rule.check_in_days.indexOf( check_in_day ) > -1 ) {
3826					if ( rule.check_out_days.indexOf( check_out_day ) < 0 ) {
3827						if ( rule['all_seasons'] == 1 ) {
3828							return {
3829								success: false,
3830								error_msg: hb_text.check_out_day_not_allowed_for_check_in_day
3831									.replace( '%check_in_day', day_name( check_in_day ) )
3832									.replace( '%check_out_days', day_name_list( rule.check_out_days.split( ',' ) ) )
3833							};
3834						}
3834 else if ( rule['seasons'].split( ',' ).indexOf( check_in_date_season ) > -1 ) {
3835							return { success: false, error_msg: hb_text.check_out_day_not_allowed_for_check_in_day_seasonal };
3836						}
3837					}
3838					if ( nb_nights < rule.minimum_stay ) {
3839						if ( rule['all_seasons'] == 1 ) {
3840							return {
3841								success: false,
3842								error_msg: hb_text.minimum_stay_for_check_in_day
3843									.replace( '%nb_nights', rule.minimum_stay )
3844									.replace( '%check_in_day', day_name( check_in_day ) )
3845							};
3846						} else if ( rule['seasons'].split( ',' ).indexOf( check_in_date_season ) > -1 ) {
3847							return { success: false, error_msg: hb_text.minimum_stay_for_check_in_day_seasonal };
3848						}
3849					}
3850					if ( nb_nights > rule.maximum_stay ) {
3851						if ( rule['all_seasons'] == 1 ) {
3852							return {
3853								success: false,
3854								error_msg: hb_text.maximum_stay_for_check_in_day
3855									.replace( '%nb_nights', rule.maximum_stay )
3856									.replace( '%check_in_day', day_name( check_in_day ) )
3857							};
3858						} else if ( rule['
3858seasons'].split( ',' ).indexOf( check_in_date_season ) > -1 ) {
3859							return { success: false, error_msg: hb_text.maximum_stay_for_check_in_day_seasonal };
3860						}
3861					}
3862				}
3863			}
3864		}
3865		return { success: true, check_in: check_in_date, check_out: check_out_date };
3866	}
3867
3868	function day_of_week( date ) {
3869		var day = date.getDay();
3870		if ( day == 0 ) {
3871			day = 6;
3872		} else {
3873			day = day - 1;
3874		}
3875		return day + '';
3876	}
3877
3878	function day_name( day ) {
3879		if ( day == 6 ) {
3880			day = 0;
3881		} else {
3882			day++;
3883		}
3884		return hb_day_names[ day ];
3885	}
3886
3887	function day_name_list( days ) {
3888		var days_name = [];
3889		for ( var i = 0; i < days.length; i++ ) {
3890			days_name.push( day_name( days[ i ] ) );
3891		}
3892		return days_name.join( ', ' );
3893	}
3894
3895	function date_diff( check_out_date, check_in_date ) {
3896		return Math.round( ( check_out_date - check_in_date ) / 1000 / 60 / 60 / 24 );
3897	}
3898
3899	function date_to_string( date ) {
3900		var y = date.getFullYear();
3901		var m = date.getMonth() + 1;
3902		m = m + '';
3903		if ( m.length == 1 ) {
3904			m = '0' + m;
3905		}
3906		var d = date.getDate();
3907		d = d + '';
3908		if ( d.length == 1 ) {
3909			d = '0' + d;
3910		}
3911		return y + '-' + m + '-' + d;
3912	}
3913
3914	function search_show_error( $form, msg ) {
3915		if ( $form.find( '.hb-search-error' ).is( ':visible' ) ) {
3916			$form.find( '.hb-search-error' ).slideUp( function() {
3917				$( this ).html( msg ).slideDown();
3918			});
3919		} else {
3920			$form.find( '.hb-search-error' ).html( msg ).slideDown();
3921		}
3922	}
3923
3924	function search_show_response( response_text, $form, $booking_wrapper ) {
3925		$form.find( '.hb-booking-searching' ).hide();
3926		enable_form_submission( $form );
3927		try {
3928			var response = JSON.parse( response_text );
3929		} catch ( e ) {
3930			$form.find( '.hb-search-error' ).html( 'An error occured. ' + response_text ).slideDown();
3931			return false;
3932		}
3933		if ( ! response.success ) {
3934			if ( response.msg ) {
3935				$form.find( '.hb-search-no-result' ).html( response.msg ).slideDown();
3936			} else {
3937				$form.find( '.hb-search-error' ).html( response_text ).slideDown();
3938			}
3939		} else {
3940			$form.find( '.hb-chosen-check-in-date span' ).html( $form.find( '.hb-check-in-date' ).val() );
3941			$form.find( '.hb-chosen-check-out-date span' ).html( $form.find( '.hb-check-out-date' ).val() );
3942			$form.find( '.hb-chosen-accom-number span' ).html( $form.find( '.hb-accom-number option:selected' ).html() );
3943			$form.find( '.hb-chosen-admin-search-type span' ).html( $form.find( '.hb-admin-search-type option:selected' ).html() );
3944			$form.find( '.hb-chosen-adults span' ).html( $form.find( 'select.hb-adults' ).val() );
3945			$form.find( '.hb-chosen-children span' ).html( $form.find( 'select.hb-children' ).val() );
3946			$form.find( '.hb-chosen-accom span' ).html( $form.find( '.hb-accom option:selected' ).text() );
3947			$form.find( '.hb-search-fields-and-submit' ).slideUp( function() {});
3948			$form.find( '.hb-searched-summary' ).slideDown();
3949			$booking_wrapper.find( '.hb-accom-list' ).html( response.mark_up );
3950			var is_accom_selected = false;
3951			var animate_accom_step = true;
3952			if ( ( $form.find( '.hb-accom' ).length ) && ( $form.find( '.hb-accom' ).val() != 'all' ) ) {
3953				set_selected_accom( $booking_wrapper, $form.find( '.hb-accom' ).val() );
3954				is_accom_selected = true;
3955			}
3956			$booking_wrapper.find( '.hb-multi-accom-choices' ).each( function() {
3957				if ( $( this ).find( '.hb-accom' ).length == 1 ) {
3958					set_selected_accom( $( this ), $( this ).find( '.hb-accom' ).data( 'accom-id' ) );
3959					is_accom_selected = true;
3960				}
3961			});
3962			if ( ! is_accom_selected && ( $booking_wrapper.find( '.hb-multi-accom-choices' ).length == 1 ) ) {
3963				$booking_wrapper.find( '.hb-next-step-1' ).hide();
3964			}
3965			if ( $booking_wrapper.data( 'results-show-only-accom-id' ) != '' ) {
3966				var accom_ids = $booking_wrapper.data( 'results-show-only-accom-id' ).toString().split( ',' );
3967				$booking_wrapper.find( '.hb-accom' ).hide();
3968				$booking_wrapper.find( '.hb-multi-accom-choices' ).each( function( multi_accom_choices_index ) {
3969					$booking_wrapper.find( '.hb-accom-id-' + accom_ids[ multi_accom_choices_index ] ).show();
3970					set_selected_accom( $( this ), accom_ids[ multi_accom_choices_index ] );
3971				});
3972				animate_accom_step = false;
3973				next_step_1( $booking_wrapper );
3974			}
3975			accom_left( $booking_wrapper );
3976			$booking_wrapper.find( '.hb-accom-list' ).slideDown( function() {
3977				if ( animate_accom_step && $booking_wrapper.find( '.hb-accom-step-wrapper' ).length == 1 ) {
3978					var top = $booking_wrapper.find( '.hb-accom-step-wrapper' ).offset().top - page_padding_top;
3979					$( 'html, body' ).animate({ scrollTop: top });
3980				}
3981			});
3982			if ( typeof window['hbook_show_accom_list'] == 'function' ) {
3983				window['hbook_show_accom_list']();
3984			}
3985			hb_format_date();
3986			resize_price_caption();
3987		}
3988	}
3989
3990	function change_search( $booking_wrapper, show_accom_number ) {
3991		$booking_wrapper.data( 'results-show-only-accom-id', '' );
3992		$booking_wrapper.find( '.hb-chosen-options' ).val( '' );
3993		$booking_wrapper.find( '.hb-chosen-accom-num' ).val( '' );
3994		$booking_wrapper.find( '.hb-accom-list' ).slideUp();
3995		$booking_wrapper.find( '.hb-booking-details-form' ).slideUp();
3996		$booking_wrapper.find( '.hb-coupon-code' ).val( '' );
3997		$booking_wrapper.find( '.hb-pre-validated-coupon-id' ).val( '' );
3998		$booking_wrapper.find( '.hb-coupon-amount' ).html( '0' );
3999		$booking_wrapper.find( '.hb-coupon-msg, .hb-coupon-error' ).slideUp();
4000		$( '#hb-global-discount-amount' ).val( 0 );
4001		$( '#hb-global-discount-amount-type-fixed' ).prop( 'checked', true );
4002		$booking_wrapper.find( '.hb-searched-summary' ).slideUp( function() {
4003			if ( show_accom_number ) {
4004				$booking_wrapper.find( '.hb-booking-search-form' ).addClass( 'hb-search-form-multiple-accom' );
4005			}
4006			$booking_wrapper.find( '.hb-search-fields-and-submit' ).slideDown();
4007		});
4008	}
4009
4010	$( '.hb-change-search-wrapper input' ).on( 'click', function( e ) {
4011		e.preventDefault();
4012		change_search( $( this ).parents( '.hbook-wrapper' ), false );
4013	});
4014
4015	$( '.hbook-wrapper' ).on( 'click', '.hb-search-specific-accom-number a', function( e ) {
4016		e.preventDefault();
4017		var $booking_wrapper = $( this ).parents( '.hbook-wrapper' );
4018		var $search_form = $booking_wrapper.find( '.hb-booking-search-form' );
4019		if ( ! $search_form.hasClass('hb-search-form-multiple-accom') ) {
4020			var adults = $search_form.find( '.hb-adults' ).val();
4021			var children = $search_form.find( '.hb-children' ).val();
4022			var accom_adults = [];
4023			var accom_children = [];
4024			for ( var i = 0; i < 2; i++ ) {
4025				accom_adults[ i ] = Math.floor( adults / 2 );
4026				accom_children[ i ] = Math.floor( children / 2 );
4027			}
4028			accom_adults[0] += adults % 2;
4029			accom_children[0] += children % 2;
4030			$search_form.find( '.hb-accom-number' ).val( 2 );
4031			for ( var i = 1; i <= 2; i++ ) {
4032				$search_form.find( '.hb-multi-accom-people-selection-accom-' + i + ' .hb-multi-accom-adults' ).val( accom_adults[ i - 1 ] );
4033				$search_form.find( '.hb-multi-accom-people-selection-accom-' + i + ' .hb-multi-accom-children' ).val( accom_children[ i - 1 ] );
4034			}
4035			update_accom_people( $search_form );
4036		}
4037		change_search( $booking_wrapper, true );
4038	});
4039
4040	$( '.hbook-wrapper' ).on( 'click', '.hb-other-search', function() {
4041		var $form = $( this ).parents( '.hb-booking-search-form' );
4042		$form.data( 'search-only', 'yes' );
4043		$form.submit();
4044		return false;
4045	});
4046
4047	/* end booking search */
4048
4049	/* ------------------------------------------------------------------------------------------- */
4050
4051	/* accom selection */
4052
4053	$( '.hb-accom-list' ).on( 'click', '.hb-view-price-breakdown', function() {
4054		var $self = $( this );
4055		$self.blur();
4056		$self.parents( '.hb-accom' ).find( '.hb-price-breakdown' ).slideToggle( function() {
4057			if ( $( this ).is( ':visible' ) ) {
4058				$self.find( '.hb-price-bd-hide-text' ).show();
4059				$self.find( '.hb-price-bd-show-text' ).hide();
4060			} else {
4061				$self.find( '.hb-price-bd-hide-text' ).hide();
4062				$self.find( '.hb-price-bd-show-text' ).show();
4063			}
4064		});
4065		return false;
4066	});
4067
4068	$( '.hb-accom-list' ).on( 'click', '.hb-view-accom input', function( e ) {
4069		e.preventDefault();
4070		$( this ).blur();
4071		window.open( $( this ).data( 'accom-url' ), $( this ).data( 'link-target' ) );
4072	});
4073
4074	$( '.hb-accom-list' ).on( 'click', '.hb-unselect-accom input', function( e ) {
4075		e.preventDefault();
4076		$( this ).blur();
4077		$( this ).parents( '.hb-accom' ).removeClass( 'hb-accom-selected' );
4078		accom_left( $( this ).parents( '.hbook-wrapper' ) );
4079	});
4080
4081
4082	$( '.hb-accom-list' ).on( 'click', '.hb-select-accom input', function( e ) {
4083		e.preventDefault();
4084		$( this ).blur();
4085
4086		var accom_id = $( this ).parents( '.hb-accom' ).data( 'accom-id' );
4087		var $booking_wrapper = $( this ).parents( '.hbook-wrapper' );
4088		var $current_accom_choices = $( this ).parents( '.hb-multi-accom-choices' );
4089		var $all_accom_choices = $booking_wrapper.find( '.hb-multi-accom-choices' );
4090		var clicked_nb = $all_accom_choices.index( $current_accom_choices );
4091		var clicked_last = ( clicked_nb == $all_accom_choices.length - 1 );
4092
4093		$( '.hb-multi-accom-no-accom-selected' ).hide();
4094		set_selected_accom( $current_accom_choices, accom_id );
4095		accom_left( $booking_wrapper );
4096		if ( $booking_wrapper.find( '.hb-accom-selected' ).length < $booking_wrapper.find( '.hb-multi-accom-choices' ).length ) {
4097			setTimeout( function() {
4098				select_next_accom_scroll( $booking_wrapper );
4099			}, 800 );
4100		} else if (
4101			clicked_last ||
4102			(
4103				( $booking_wrapper.find( '.hb-multi-accom-choices' ).length == 1 ) &&
4104				( $booking_wrapper.find( '.hb-multi-accom-choices .hb-accom' ).length > 1 )
4105			)
4106		) {
4107			next_step_1( $booking_wrapper );
4108		}
4109	});
4110
4111	function set_selected_accom( $accom_choices, accom_id ) {
4112		$accom_choices.find( '.hb-accom' ).removeClass( 'hb-accom-selected' );
4113		$accom_choices.find( '.hb-accom-id-' + accom_id ).addClass( 'hb-accom-selected' );
4114	}
4115
4116	function select_next_accom_scroll( $booking_wrapper ) {
4117		$booking_wrapper.find( '.hb-multi-accom-choices' ).each( function() {
4118			var $hb_multi_accom_choices = $( this );
4119			if ( ! $hb_multi_accom_choices.find( '.hb-accom-selected' ).length ) {
4120				var top = $hb_multi_accom_choices.offset().top - page_padding_top;
4121				var show_select_accom_msg = false;
4122				if ( $( window ).scrollTop() > top ) {
4123					show_select_accom_msg = true;
4124				}
4125				$( 'html, body' ).animate({ scrollTop: top }, function() {
4126					if ( show_select_accom_msg ) {
4127						$hb_multi_accom_choices.find( '.hb-multi-accom-no-accom-selected' ).slideDown();
4128					}
4129				});
4130				return false;
4131			}
4132		});
4133	}
4134
4135	function accom_left( $booking_wrapper ) {
4136		var selected_accom_ids = [];
4137		$booking_wrapper.find( '.hb-multi-accom-choices' ).each( function() {
4138			if ( $( this ).find( '.hb-accom-selected' ).length ) {
4139				selected_accom_ids.push( $( this ).find( '.hb-accom-selected' ).data( 'accom-id' ) );
4140			}
4141		});
4142		$( '.hb-accom-none-left' ).removeClass( 'hb-accom-none-left' );
4143		$( '.hb-accom-auto-blocked-details' ).hide();
4144		$booking_wrapper.find( '.hb-accom-quantity' ).each( function() {
4145			var accom_id = $( this ).data( 'accom-id' );
4146			var $accom = $booking_wrapper.find( '.hb-accom.hb-accom-id-' + accom_id );
4147			$accom.each( function() {
4148				if ( $( this ).hasClass( 'hb-accom-selected' ) ) {
4149					$( this ).find( '.hb-accom-selected-left-wrapper' ).show();
4150				} else {
4151					$( this ).find( '.hb-accom-selected-left-wrapper' ).hide();
4152				}
4153			});
4154			var nb_selected = 0;
4155			var nb_blocked = 0;
4156			for ( var i = 0; i < selected_accom_ids.length; i++ ) {
4157				if ( selected_accom_ids[ i ] == accom_id ) {
4158					nb_selected++;
4159				}
4160			}
4161			if ( typeof hb_booking_form_data.linked_accom_to_block[ accom_id ] != 'undefined' ) {
4162				for ( var j = 0; j < hb_booking_form_data.linked_accom_to_block[ accom_id ].length; j++ ) {
4163					for ( var k = 0; k < selected_accom_ids.length; k++ ) {
4164						if ( hb_booking_form_data.linked_accom_to_block[ accom_id ][ j ]['blocked_by'] == selected_accom_ids[ k ] ) {
4165							nb_blocked += hb_booking_form_data.linked_accom_to_block[ accom_id ][ j ]['blocked_time'];
4166							$( '.hb-accom-' + accom_id + '-auto-blocked-by-' + hb_booking_form_data.linked_accom_to_block[ accom_id ][ j ]['blocked_by'] ).css( 'display', 'block' );
4167						}
4168					}
4169				}
4170			}
4171			$accom.find( '.hb-nb-accom-selected-nb' ).html( nb_selected );
4172			var updated_quantity = $( this ).data( 'quantity' ) - nb_selected - nb_blocked;
4173			$accom.find( '.hb-accom-left, .hb-nb-accom-selected' ).hide();
4174			if ( updated_quantity <= 0 ) {
4175				$accom.each( function() {
4176					$( this ).addClass( 'hb-accom-none-left' );
4177					if (
4178						( updated_quantity < 0 ) &&
4179						( hb_booking_form_data.is_admin != 'yes' ) &&
4180						$( this ).hasClass( 'hb-accom-selected' )
4181					) {
4182						$( this ).removeClass( 'hb-accom-selected' );
4183					}
4184					if ( ! $( this ).hasClass( 'hb-accom-selected' )  ) {
4185						if ( nb_selected > 0 ) {
4186							$( this ).find( '.hb-nb-accom-selected' ).show();
4187						}
4188						$( this ).find( '.hb-no-accom-left, .hb-accom-selected-left-wrapper' ).show();
4189					}
4190				});
4191			} else if ( ( hb_booking_form_data.is_admin != 'yes' ) && ( updated_quantity <= hb_booking_form_data.display_accom_left_threshold ) ) {
4192				$accom.find( '.hb-accom-selected-left-wrapper' ).show();
4193				if ( updated_quantity == 1 ) {
4194					$accom.find( '.hb-one-accom-left' ).show();
4195				} else {
4196					$accom.find( '.hb-multiple-accom-left' ).show();
4197					$accom.find( '.hb-accom-left-nb' ).html( updated_quantity );
4198				}
4199			}
4200		});
4201	}
4202
4203	/* end accom selection */
4204
4205	/* ------------------------------------------------------------------------------------------- */
4206
4207	/* steps */
4208
4209	function init_step( $booking_wrapper ) {
4210		var top = $booking_wrapper.find( '.hb-accom-list' ).offset().top;
4211		if ( top ) {
4212			top -= page_padding_top;
4213			$( 'html, body' ).animate({ scrollTop: top }, function() {
4214				$booking_wrapper.find( '.hb-step-wrapper' ).slideUp();
4215			});
4216		} else {
4217			$booking_wrapper.find( '.hb-step-wrapper' ).hide();
4218		}
4219	}
4220
4221	$( '.hb-accom-list' ).on( 'click', '.hb-next-step-1 input', function() {
4222		$( this ).blur();
4223		next_step_1( $( this ).parents( '.hbook-wrapper' ) );
4224	});
4225
4226	function next_step_1( $booking_wrapper ) {
4227		var $form = $booking_wrapper.find( '.hb-booking-search-form' );
4228		if ( $form.attr( 'action' ) != '#' ) {
4229			$form.data( 'booking-details-redirection', 'yes' );
4230			var accom_ids = [];
4231			$booking_wrapper.find( '.hb-multi-accom-choices' ).each( function() {
4232				accom_ids.push( $( this ).find( '.hb-accom-selected' ).data( 'accom-id' ) );
4233			});
4234			$form.find( '.hb-results-show-only-accom-id' ).val( accom_ids.join( ',' ) );
4235			$form.submit();
4236			return;
4237		}
4238
4239		if ( $booking_wrapper.find( '.hb-accom-selected' ).length < $booking_wrapper.find( '.hb-multi-accom-choices' ).length ) {
4240			if ( $booking_wrapper.find( '.hb-multi-accom-choices' ).length == 1 ) {
4241				var top = $booking_wrapper.find( '.hb-search-result-title-section .hb-title-select' ).offset().top;
4242				top -= page_padding_top;
4243				$( 'html, body' ).animate({ scrollTop: top });
4244				return;
4245			} else {
4246				select_next_accom_scroll( $booking_wrapper );
4247			}
4248			return;
4249		}
4250		$booking_wrapper.find( '.hb-filter-accom-list-wrapper' ).slide
4250Up();
4251		init_step( $booking_wrapper );
4252
4253		$booking_wrapper.find( '.hb-coupon-code' ).val( '' );
4254		$booking_wrapper.find( '.hb-coupon-amount' ).html( '0' );
4255
4256		calculate_options_price( $booking_wrapper );
4257
4258		var accom_ids = [];
4259		$booking_wrapper.find( '.hb-multi-accom-choices' ).each( function() {
4260			accom_ids.push( $( this ).find( '.hb-accom-selected' ).data( 'accom-id' ) );
4261		});
4262		set_details_form_info( $booking_wrapper, accom_ids.join( '-' ) );
4263		toggle_accom_not_available_msg( $booking_wrapper, accom_ids[0] );
4264		$booking_wrapper.find( '.hb-policies-error, .hb-confirm-error, .hb-option, .hb-options-form, .hb-select-accom-num, .hb-booking-details-form, .hb-summary-wrapper' ).hide();
4265		show_hide_country_iso_info( $booking_wrapper );
4266
4267		var show_intermediate_step = false;
4268		if ( $booking_wrapper.find( '.hb-select-accom-num-form' ).length ) {
4269			var has_multiple_num_choice = false;
4270			for ( var i = 1; i < accom_ids.length + 1; i++ ) {
4271				var select_wrapper_class = '.hb-select-multi-accom-num-accom-' + i + ' .hb-select-accom-num-accom-' + accom_ids[ i - 1 ];
4272				if ( $( select_wrapper_class ).find( 'option' ).length > 2 ) {
4273					has_multiple_num_choice = true;
4274				}
4275				$booking_wrapper.find( select_wrapper_class ).show();
4276			}
4277			if ( has_multiple_num_choice ) {
4278				$booking_wrapper.find( '.hb-select-accom-num-form' ).show();
4279				show_intermediate_step = true;
4280			} else {
4281				$booking_wrapper.find( '.hb-select-accom-num-form' ).hide();
4282				$booking_wrapper.find( '.hb-select-accom-num-form option:nth-child(2)' ).prop( 'selected', true );
4283			}
4284		}
4285
4286		var show_options_form = false;
4287		for ( var i = 1; i < accom_ids.length + 1; i++ ) {
4288			var option_class = '.hb-options-multi-accom-' + i + ' .hb-option-accom-' + accom_ids[ i - 1 ];
4289			if ( $booking_wrapper.find( option_class ).length ) {
4290				show_options_form = true;
4291				show_intermediate_step = true;
4292				$booking_wrapper.find( option_class ).show();
4293				$booking_wrapper.find( '.hb-options-multi-accom-' + i + ' .hb-options-gap' ).show();
4294			} else {
4295				$booking_wrapper.find( '.hb-options-multi-accom-' + i + ' .hb-no-options' ).show();
4296				$booking_wrapper.find( '.hb-options-multi-accom-' + i + ' .hb-options-gap' ).hide();
4297			}
4298		}
4299		if ( $booking_wrapper.find( '.hb-options-multi-accom-global' ).length ) {
4300			$booking_wrapper.find( '.hb-options-multi-accom-global .hb-option' ).show();
4301			show_options_form = true;
4302			show_intermediate_step = true;
4303		}
4304		if ( show_options_form ) {
4305			$booking_wrapper.find( '.hb-options-form' ).show();
4306		} else {
4307			$booking_wrapper.find( '.hb-options-form' ).hide();
4308		}
4309
4310		if ( show_intermediate_step ) {
4311			$booking_wrapper.addClass( 'has-intermediate-step' );
4312			setTimeout( function( ) {
4313				$booking_wrapper.find( '.hb-intermediate-step-wrapper' ).slideDown( function() {
4314					scroll_to_accom_list_top( $booking_wrapper );
4315				});
4316			}, 800 );
4317		} else {
4318			$booking_wrapper.removeClass( 'has-intermediate-step' );
4319			set_summary( $booking_wrapper );
4320			setTimeout( function( ) {
4321				$booking_wrapper.find( '.hb-booking-details-form' ).slideDown( function() {
4322					hb_resize_forms();
4323					scroll_to_accom_list_top( $booking_wrapper );
4324				});
4325			}, 800 );
4326		}
4327
4328		return false;
4329	}
4330
4331	$( '.hb-accom-list' ).on( 'click', '.hb-next-step-2 input', function() {
4332		$( this ).blur();
4333		var $booking_wrapper = $( this ).parents( '.hbook-wrapper' );
4334		init_step( $booking_wrapper );
4335		if ( $booking_wrapper.find( '.hb-select-accom-num-form' ).length ) {
4336			var accom_ids = $booking_wrapper.find( '.hb-details-accom-ids' ).val().split( '-' );
4337			var selected_accom_nums = {};
4338			for ( var i = 1; i < accom_ids.length + 1; i++ ) {
4339				selected_accom_nums[ accom_ids[ i - 1 ] ] = [];
4340			}
4341			for ( var i = 1; i < accom_ids.length + 1; i++ ) {
4342				var $select_num_wrapper = $booking_wrapper.find( '.hb-select-multi-accom-num-accom-' + i + ' .hb-select-accom-num-accom-' + accom_ids[ i - 1 ] );
4343				var selected_num = $select_num_wrapper.find( 'select' ).val();
4344				if ( selected_num != 0 ) {
4345					selected_accom_nums[ accom_ids[ i - 1 ] ].push( selected_num );
4346				}
4347			}
4348			for ( var i = 1; i < accom_ids.length + 1; i++ ) {
4349				var $select_num_wrapper = $booking_wrapper.find( '.hb-select-multi-accom-num-accom-' + i + ' .hb-select-accom-num-accom-' + accom_ids[ i - 1 ] );
4350				var selected_num = $select_num_wrapper.find( 'select' ).val();
4351				if ( selected_num == 0 ) {
4352					for ( var j = 2; j <= $select_num_wrapper.find( 'option' ).length; j++ ) {
4353						var $option_num = $select_num_wrapper.find( 'option:nth-child(' + j + ')' );
4354						var candidate_num = $option_num.val();
4355						if ( selected_accom_nums[ accom_ids[ i - 1 ] ].indexOf( candidate_num ) < 0 ) {
4356							$option_num.prop( 'selected', true );
4357							selected_accom_nums[ accom_ids[ i - 1 ] ].push( candidate_num );
4358							break;
4359						}
4360					}
4361				}
4362			}
4363		}
4364		set_summary( $booking_wrapper );
4365		setTimeout( function() {
4366			$booking_wrapper.find( '.hb-booking-details-form' ).slideDown( function() {
4367				hb_resize_forms();
4368				var top = $booking_wrapper.find( '.hb-booking-details-form' ).offset().top - page_padding_top;
4369				$( 'html, body' ).animate({ scrollTop: top });
4370			});
4371		}, 800 );
4372		return false;
4373	});
4374
4375	$( '.hb-accom-list' ).on( 'click', '.hb-previous-step-1 input', function() {
4376		$( this ).blur();
4377		var $booking_wrapper = $( this ).parents( '.hbook-wrapper' );
4378		$booking_wrapper.find( '.hb-next-step-1' ).show();
4379		init_step( $booking_wrapper );
4380		setTimeout( function() {
4381			$booking_wrapper.find( '.hb-accom-step-wrapper, .hb-filter-accom-list-wrapper' ).slideDown( function() {
4382				scroll_to_accom_list_top( $booking_wrapper );
4383			});
4384		}, 800 );
4385		return false;
4386	});
4387
4388	$( '.hb-previous-step-2 input' ).on( 'click', function() {
4389		$( this ).blur();
4390		var $booking_wrapper = $( this ).parents( '.hbook-wrapper' );
4391		init_step( $booking_wrapper );
4392		setTimeout( function() {
4393			if ( $booking_wrapper.hasClass( 'has-intermediate-step' ) ) {
4394				$booking_wrapper.find( '.hb-intermediate-step-wrapper' ).slideDown( function() {
4395					scroll_to_accom_list_top( $booking_wrapper );
4396				});
4397			} else {
4398				$booking_wrapper.find( '.hb-accom-step-wrapper' ).slideDown( function() {
4399					scroll_to_accom_list_top( $booking_wrapper );
4400				});
4401				$booking_wrapper.find( '.hb-next-step-1' ).show();
4402			}
4403		}, 800 );
4404		return false;
4405	});
4406
4407	function scroll_to_accom_list_top( $booking_wrapper ) {
4408		var top = $booking_wrapper.find( '.hb-accom-list' ).offset().top - page_padding_top;
4409		$( 'html, body' ).animate({ scrollTop: top });
4410	}
4411
4412	/* end steps */
4413
4414	/* ------------------------------------------------------------------------------------------- */
4415
4416	/* accom num selection */
4417
4418	$( '.hb-accom-list' ).on( 'change', '.hb-select-accom-num-form select', function() {
4419		var accom_id = $( this ).data( 'accom-id' );
4420		var select_id = $( this ).attr( 'id' );
4421		var select_val = $( this ).val();
4422		$( this ).parents( '.hb-select-accom-num-form' ).find( '.hb-select-accom-num-accom-' + accom_id + ' select' ).each( function() {
4423			if (
4424				( $( this ).attr( 'id' ) != select_id ) &&
4425				( $( this ).val() == select_val )
4426			) {
4427				$( this ).val( '0' ).focus();
4428			}
4429		});
4430	});
4431
4432	/* end accom num selection */
4433
4434	/* ------------------------------------------------------------------------------------------- */
4435
4436	/* options selection */
4437
4438	$( '.hb-accom-list' ).on( 'click', '.hb-option', function() {
4439		var $booking_wrapper = $( this ).parents( '.hbook-wrapper' );
4440		verify_option_max( $booking_wrapper );
4441		calculate_options_price( $booking_wrapper );
4442	});
4443
4444	$( '.hb-accom-list' ).on( 'keyup', '.hb-option input', function() {
4445		var $booking_wrapper = $( this ).parents( '.hbook-wrapper' );
4446		verify_option_max( $booking_wrapper );
4447		calculate_options_price( $booking_wrapper );
4448	});
4449
4450	function verify_option_max( $booking_wrapper ) {
4451		$booking_wrapper.find( '.hb-option' ).each( function() {
4452			if ( $( this ).hasClass( 'hb-quantity-option' ) && $( this ).find( 'input' ).attr( 'max' ) ) {
4453				if ( parseInt( $( this ).find( 'input' ).val() ) > parseInt( $( this ).find( 'input' ).attr( 'max' ) ) ) {
4454					$( this ).find( 'input' ).val( $( this ).find( 'input' ).attr( 'max' ) );
4455				}
4456			}
4457		});
4458	}
4459
4460	function calculate_options_price( $booking_wrapper ) {
4461		var options_price = 0;
4462		var accom_ids = [];
4463
4464		$booking_wrapper.find( '.hb-multi-accom-choices' ).each( function() {
4465			accom_ids.push( $( this ).find( '.hb-accom-selected' ).data( 'accom-id' ) );
4466		});
4467		accom_ids.push( 'global' );
4468
4469		for ( var i = 1; i < accom_ids.length + 1; i++ ) {
4470			var $options_wrapper = $booking_wrapper.find( '.hb-options-multi-accom-' + i );
4471			if ( accom_ids[ i - 1 ] == 'global' ) {
4472				$options_wrapper = $booking_wrapper.find( '.hb-options-multi-accom-global' );
4473			}
4474			$options_wrapper.find( '.hb-option' ).each( function() {
4475				if (
4476					$( this ).hasClass( 'hb-option-accom-' + accom_ids[ i - 1 ] ) ||
4477					$( this ).hasClass( 'hb-option-global' )
4478				) {
4479					if ( $( this ).hasClass( 'hb-quantity-option' ) ) {
4480						if ( $( this ).find( 'input' ).val() < 0 ) {
4481							$( this ).find( 'input' ).val( 0 );
4482						}
4483						options_price += parseFloat( $( this ).find( 'input' ).data( 'price' ) * $( this ).find( 'input' ).val() );
4484					} else if ( $( this ).hasClass( 'hb-multiple-option' ) && $( this ).find( 'input:checked' ).length ) {
4485						options_price += parseFloat( $( this ).find( 'input:checked' ).data( 'price' ) );
4486					} else if ( $( this ).hasClass( 'hb-single-option' ) && $( this ).find( 'input' ).is(':checked' ) ) {
4487						options_price += parseFloat( $( this ).find( 'input' ).data( 'price' ) );
4488					}
4489				}
4490			});
4491		}
4492
4493		if ( options_price != 0 ) {
4494			options_price = format_price( options_price );
4495			if ( options_price < 0 ) {
4496				options_price = format_price( options_price * -1 );
4497				$booking_wrapper.find( '.hb-options-total-price .hb-price-placeholder-minus' ).css( 'display', 'inline' );
4498			} else {
4499				$booking_wrapper.find( '.hb-options-total-price .hb-price-placeholder-minus' ).css( 'display', 'none' );
4500			}
4501			$booking_wrapper.find( '.hb-options-total-price .hb-price-placeholder' ).html( options_price );
4502			$booking_wrapper.find( '.hb-options-total-price' ).show();
4503		} else {
4504			$booking_wrapper.find( '.hb-options-total-price' ).hide();
4505		}
4506
4507	}
4508
4509	/* end options selection */
4510
4511	/* ------------------------------------------------------------------------------------------- */
4512
4513	/* coupons */
4514
4515	$( '.hb-apply-coupon' ).on( 'click', function() {
4516		var $form = $( this ).parents( '.hb-booking-details-form' );
4517		$form.find( '.hb-coupon-error, .hb-coupon-msg' ).slideUp();
4518		if ( ! $form.find( '.hb-coupon-code' ).val() ) {
4519			$form.find( '.hb-coupon-msg' ).html( hb_text.no_coupon ).slideDown();
4520			if ( $form.find( '.hb-pre-validated-coupon-id' ).val() != '' ) {
4521				$form.find( '.hb-pre-validated-coupon-id' ).val( '' );
4522				set_summary( $form.parents( '.hbook-wrapper' ) );
4523			}
4524			return false;
4525		}
4526		$( this ).prop( 'disabled', true ).blur();
4527		$form.find( '.hb-processing-coupon' ).show();
4528		$.ajax({
4529			data: {
4530				'action': 'hb_verify_coupon',
4531				'check_in': $form.find( '.hb-details-check-in' ).val(),
4532				'check_out': $form.find( '.hb-details-check-out' ).val(),
4533				'accom_ids': $form.find( '.hb-details-accom-ids' ).val(),
4534				'coupon_code': $form.find( '.hb-coupon-code' ).val(),
4535			},
4536			success: function( response ) {
4537				coupon_verify_result( response, $form );
4538			},
4539			type : 'POST',
4540			timeout: hb_booking_form_data.ajax_timeout,
4541			url: hb_booking_form_data.ajax_url,
4542			error: function( jqXHR, textStatus, errorThrown ) {
4543				$form.find( '.hb-processing-coupon' ).hide();
4544				$form.find( '.hb-coupon-error' ).html( hb_text.connection_error ).slideDown();
4545				$form.find( '.hb-apply-coupon' ).prop( 'disabled', false );
4546				console.log( jqXHR );
4547				console.log( textStatus );
4548				console.log( errorThrown );
4549			}
4550		});
4551		return false;
4552	});
4553
4554	function coupon_verify_result( response_text, $form ) {
4555		$form.find( '.hb-apply-coupon' ).prop( 'disabled', false );
4556		$form.find( '.hb-processing-coupon' ).hide();
4557		try {
4558			var response = JSON.parse( response_text );
4559		} catch ( e ) {
4560			$form.find( '.hb-coupon-error' ).html( 'An error occured. ' + response_text ).slideDown();
4561			return false;
4562		}
4563		if ( response['success'] ) {
4564			if ( $form.find( '.hb-pre-validated-coupon-id' ).val() != response['coupon_id'] ) {
4565				$form.find( '.hb-pre-validated-coupon-id' ).val( response['coupon_id'] );
4566				set_summary( $form.parents( '.hbook-wrapper' ) );
4567			}
4568		} else {
4569			if ( $form.find( '.hb-pre-validated-coupon-id' ).val() != '' ) {
4570				$form.find( '.hb-pre-validated-coupon-id' ).val( '' );
4571				set_summary( $form.parents( '.hbook-wrapper' ) );
4572			}
4573		}
4574		$form.find( '.hb-coupon-msg' ).html( response['msg'] ).slideDown();
4575	}
4576
4577	/* end coupons */
4578
4579	/* ------------------------------------------------------------------------------------------- */
4580
4581	/* admin global discount */
4582
4583	$( '#hb-global-discount-amount, input[name="hb-global-discount-amount-type"]' ).on( 'change', function() {
4584		summary_on_discount_change();
4585	});
4586
4587	$( '#hb-global-discount-amount' ).on( 'keyup', function() {
4588		summary_on_discount_change();
4589	});
4590
4591	var summary_reload_timer;
4592
4593	function summary_on_discount_change() {
4594		var $booking_wrapper =  $( '.hbook-wrapper' );
4595		$booking_wrapper.find( '.hb-summary-wrapper' ).hide();
4596		$booking_wrapper.find( '.hb-loading-summary' ).show();
4597		clearTimeout( summary_reload_timer );
4598		summary_reload_timer = setTimeout( function() {
4599			set_summary_on_discount_change( $booking_wrapper );
4600		}, 500 );
4601	}
4602
4603	/* end admin global discount */
4604
4605	/* ------------------------------------------------------------------------------------------- */
4606
4607	/* update payment info */
4608
4609	function update_payment_info( $booking_wrapper ) {
4610		var $payment_data = $booking_wrapper.find( '.hb-payment-data-summary' );
4611		if ( $payment_data.data( 'null-price' ) == 'yes' ) {
4612			$booking_wrapper.find( '.hb-payment-info-wrapper' ).hide();
4613			$booking_wrapper.find( 'input.hb-payment-type-null-price' ).prop( 'checked', true );
4614		} else {
4615			var charged_total_price = $payment_data.data( 'charged-total-price' );
4616			var charged_deposit = $payment_data.data( 'charged-deposit' );
4617			var charged_total_minus_deposit = $payment_data.data( 'charged-total-minus-deposit' );
4618			$booking_wrapper.find( '.hb-payment-info-wrapper' ).show();
4619			$booking_wrapper.find( '.hb-payment-type-explanation-full_amount' ).html( charged_total_price );
4620			$booking_wrapper.find( '.hb-payment-type-explanation-deposit_amount' ).html( charged_deposit );
4621			$booking_wrapper.find( '.hb-payment-type-explanation-full_minus_deposit_amount' ).html( charged_total_minus_deposit );
4622			if (
4623				( charged_total_price == charged_deposit ) &&
4624				( $booking_wrapper.find( '.hb-payment-type-deposit-wrapper, .hb-payment-type-full-wrapper' ).length == 2 )
4625			) {
4626				$booking_wrapper.find( '.hb-payment-type-deposit-wrapper' ).hide();
4627				if ( $booking_wrapper.find( 'input[name="hb-payment-type"]:checked' ).val() == 'deposit' ) {
4628					$booking_wrapper.find( 'input[name="hb-payment-type"]' ).each( function() {
4629						if ( $( this ).val() != 'deposit' ) {
4630							$( this ).prop( 'checked', true );
4631							return false;
4632						}
4633					});
4634				}
4635				if ( $booking_wrapper.find( '.hb-payment-type-wrapper' ).length == 2 ) {
4636					$booking_wrapper.find( '.hb-payment-type-multiple-choice' ).hide();
4637				}
4638			} else {
4639				$booking_wrapper.find( 'input[name="hb-payment-type"]' ).first().prop( 'checked', true );
4640				$booking_wrapper.find( '.hb-payment-type-multiple-choice, .hb-payment-type-deposit-wrapper' ).show();
4641			}
4642			hide_show_payment_explanation( $booking_wrapper.find( '.hb-booking-details-form' ) );
4643		}
4644		$( 'input[name="hb-payment-gateway"]' ).each( function() {
4645			let payment_gateway = $( this ).val();
4646			if ( typeof window['hb_' + payment_gateway + '_update_payment_form'] == 'function' ) {
4647				window['hb_' + payment_gateway + '_update_payment_form']( $booking_wrapper );
4648			}
4649		});
4650	}
4651
4652	/* end update payment info */
4653
4654	/* ------------------------------------------------------------------------------------------- */
4655
4656	/* summary */
4657
4658	function set_summary_on_discount_change( $booking_wrapper ) {
4659		set_summary( $booking_wrapper, true );
4660	}
4661
4662	function set_summary( $booking_wrapper, on_discount_change ) {
4663		$booking_wrapper.find( '.hb-summary-wrapper' ).hide();
4664		$booking_wrapper.find( '.hb-loading-summary' ).show();
4665		var accom_ids = $booking_wrapper.find( '.hb-details-accom-ids' ).val().split( '-' );
4666		if ( accom_ids.length > 1 ) {
4667			$( '.hb-global-discount-wrapper' ).css( 'display', 'none' );
4668		} else {
4669			$( '.hb-global-discount-wrapper' ).css( 'display', 'block' );
4670		}
4671		var $details_form = $booking_wrapper.find( '.hb-booking-details-form' );
4672		var $options_form = $booking_wrapper.find( '.hb-options-form' );
4673		var $accom_num_form = $booking_wrapper.find( '.hb-select-accom-num-form' );
4674		var $forms;
4675		$details_form.find( 'input[name="action"]' ).val( 'hb_get_summary');
4676		$forms = $details_form.add( $options_form );
4677		$forms = $forms.add( $accom_num_form );
4678		$.ajax({
4679			data: $forms.serialize(),
4680			success: function( response ) {
4681				$booking_wrapper.find( '.hb-loading-summary' ).hide();
4682				$booking_wrapper.find( '.hb-summary-wrapper' ).html( response );
4683				hb_format_date();
4684				$booking_wrapper.find( '.hb-summary-wrapper' ).slideDown();
4685				if ( hb_booking_form_data.is_admin != 'yes' ) {
4686					update_payment_info( $booking_wrapper );
4687				} else {
4688					if ( ! on_discount_change ) {
4689						if ( $booking_wrapper.find( '.hb-discount-data-summary' ).length ) {
4690							$( '#hb-global-discount-amount' ).val( $booking_wrapper.find( '.hb-discount-data-summary' ).data( 'discount-amount' ) );
4691							if ( $booking_wrapper.find( '.hb-discount-data-summary' ).data( 'discount-amount-type' ) == 'fixed' ) {
4692								$( '#hb-global-discount-amount-type-fixed' ).prop( 'checked', true );
4693							} else {
4694								$( '#hb-global-discount-amount-type-percent' ).prop( 'checked', true );
4695							}
4696						} else {
4697							$( '#hb-global-discount-amount' ).val( 0 );
4698							$( '#hb-global-discount-amount-type-fixed' ).prop( 'checked', true );
4699						}
4700					}
4701				}
4702				$details_form.find( 'input[name="action"]' ).val( 'hb_create_resa' );
4703			},
4704			type : 'POST',
4705			timeout: hb_booking_form_data.ajax_timeout,
4706			url: hb_booking_form_data.ajax_url,
4707			error: function( jqXHR, textStatus, errorThrown ) {
4708				$booking_wrapper.find( '.hb-loading-summary' ).hide();
4709				$details_form.find( 'input[name="action"]' ).val( 'hb_create_resa' );
4710				alert( hb_text.connection_error );
4711				console.log( jqXHR );
4712				console.log( jqXHR.responseText );
4713				console.log( textStatus );
4714				console.log( errorThrown );
4715			}
4716		});
4717	}
4718
4719	$( '.hb-summary-wrapper' ).on( 'click', '.hb-summary-view-price-breakdown', function() {
4720		var $self = $( this );
4721		$self.blur();
4722		$self.parents( '.hb-summary-multi-accom-accom' ).find( '.hb-summary-price-details' ).slideToggle( function() {
4723			if ( $( this ).is( ':visible' ) ) {
4724				$self.find( '.hb-summary-price-breakdown-hide-text' ).show();
4725				$self.find( '.hb-summary-price-breakdown-show-text' ).hide();
4726			} else {
4727				$self.find( '.hb-summary-price-breakdown-hide-text' ).hide();
4728				$self.find( '.hb-summary-price-breakdown-show-text' ).show();
4729			}
4730		});
4731		return false;
4732	});
4733
4734	/* end summary */
4735
4736	/* ------------------------------------------------------------------------------------------- */
4737
4738	/* details form info */
4739
4740	function toggle_accom_not_available_msg( $booking_wrapper, accom_id ) {
4741		if (
4742			( hb_booking_form_data.is_admin != 'yes' ) ||
4743			( $booking_wrapper.find( '.hb-admin-search-type' ).val() == 'multiple_accom' ) ||
4744			$booking_wrapper.find( '.hb-accom-id-' + accom_id ).hasClass( 'hb-accom-available' )
4745		) {
4746			$( '#hb-resa-customer-details-wrap, .hb-confirm-area' ).slideDown();
4747			$( '.hb-accom-not-available-msg' ).slideUp();
4748		} else {
4749			$( '#hb-resa-customer-details-wrap, .hb-confirm-area' ).slide
4749Up();
4750			$( '.hb-accom-not-available-msg' ).slideDown();
4751		}
4752	}
4753
4754	function set_details_form_info( $booking_wrapper, accom_ids ) {
4755		$booking_wrapper.find( '.hb-details-check-in' ).val( $booking_wrapper.find( '.hb-check-in-hidden' ).val() );
4756		$booking_wrapper.find( '.hb-details-check-out' ).val( $booking_wrapper.find( '.hb-check-out-hidden' ).val() );
4757		$booking_wrapper.find( '.hb-details-adults' ).val( $booking_wrapper.find( '.hb-booking-nb-adults' ).val() );
4758		$booking_wrapper.find( '.hb-details-children' ).val( $booking_wrapper.find( '.hb-booking-nb-children' ).val() );
4759		$booking_wrapper.find( '.hb-details-accom-ids' ).val( accom_ids );
4760		$booking_wrapper.find( '.hb-details-is-admin' ).val( hb_booking_form_data.is_admin );
4761	}
4762
4763	$( 'input[name="hb_first_name"]' ).on( 'keyup', function() {
4764		if ( $( this ).val().toLowerCase() == 'hbook' ) {
4765			var $form = $( this ).parents( '.hb-booking-details-form' );
4766			var input_names = ['last_name', 'email', 'phone', 'address_1', 'address_2', 'city', 'state_province', 'zip_code', 'country'];
4767			var input_values = {
4768				'last_name': 'Maestrel',
4769				'email': '[email protected]',
4770				'phone': '0123456789',
4771				'address_1': 'Times Square',
4772				'address_2': '',
4773				'city': 'New York City',
4774				'state_province': 'New York',
4775				'zip_code': '10036',
4776				'country': 'USA',
4777			}
4778			for ( var i = 0; i < input_names.length; i++ ) {
4779				$form.find( 'input[name="hb_' + input_names[ i ] + '"]' ).val( input_values[ input_names[ i ] ] );
4780			}
4781			var $selectize = $form.find( 'select[name="hb_country_iso"]' ).attr( 'id' );
4782			if ( 'undefined' !== typeof $selectize ) {
4783				$form.find( 'select[name="hb_country_iso"]' ).val( 'US' );
4784				$selectized_selects[ $form.find( 'select[name="hb_country_iso"]' ).attr( 'id' ) ][0].selectize.setValue( 'US' );
4785				$selectized_selects[ $form.find( 'select[name="hb_usa_state_iso"]' ).attr( 'id' ) ][0].selectize.setValue( 'US-NY' );
4786			}
4787		}
4788	});
4789
4790	if ( ( typeof hb_booking_form_data !== 'undefined' ) && ( hb_booking_form_data.is_admin == 'no' ) ) {
4791		$( '.hb-coupon-code' ).on( 'keydown', function( e ) {
4792			if ( e.key == 'Enter' ) {
4793				$( this ).parent().find( '.hb-apply-coupon' ).click();
4794				return false;
4795			}
4796		});
4797		$( '.hb-booking-details-form input, .hb-booking-details-form select' ).on( 'keydown', function( e ) {
4798			if ( e.key == 'Enter' ) {
4799				var $form_elements = $( this ).parents( '.hb-booking-details-form' ).find( 'input, select' );
4800				var next_form_element_index = $form_elements.index( this ) + 1;
4801				var $next_form_element = $form_elements.eq( next_form_element_index );
4802				if ( $next_form_element.length != 0 ) {
4803					$next_form_element.focus();
4804				}
4805				return false;
4806			}
4807		});
4808	}
4809
4810	/* end details form info */
4811
4812	/* ------------------------------------------------------------------------------------------- */
4813
4814	/* country iso */
4815
4816	var $selectized_selects = [];
4817
4818	if ( ( typeof hb_booking_form_data !== 'undefined' ) || ( typeof hb_payment_link_form_data !== 'undefined' ) ) {
4819		var selectize_names = ['hb_country_iso', 'hb_usa_state_iso', 'hb_canada_province_iso'];
4820
4821		if ( typeof hb_booking_form_data !== 'undefined' ) {
4822			selectize_names.forEach( function( name ) {
4823				$( 'select[name="' + name + '"]' ).each( function() {
4824					$selectized_selects[ $( this ).attr( 'id' ) ] = $( this ).selectize();
4825				});
4826				$( 'select[name="' + name + '"]' ).parents( '.hotelwp-select-wrapper' ).addClass( 'hotelwp-select-selectized' );
4827			});
4828		} else {
4829			selectize_names.forEach( function( name ) {
4830				$( 'select[name="' + name + '"]' ).selectize();
4831			});
4832		}
4833
4834		var tmp_markup_for_selectize_style = '<p id="hb-tmp-element-for-selectize-style" ';
4835		tmp_markup_for_selectize_style += 'class="hb-people-wrapper hb-people-wrapper-adults" ';
4836		tmp_markup_for_selectize_style += 'style="display: block !important">';
4837		tmp_markup_for_selectize_style += '<select class="hb-adults">';
4838		tmp_markup_for_selectize_style += '<option>1</option>';
4839		tmp_markup_for_selectize_style += '</select>';
4840		tmp_markup_for_selectize_style += '</p>';
4841		if ( $( '#hbook-booking-form-1 .hb-search-fields' ).length ) {
4842			$( '#hbook-booking-form-1 .hb-search-fields' ).append( tmp_markup_for_selectize_style );
4843			$( '.hb-accom-listing-booking-form' ).css( 'display', 'block' );
4844			var $select_for_style = $( '#hb-tmp-element-for-selectize-style select.hb-adults' );
4845		} else {
4846			$( '#hb-payment-form-select-for-selectize-styles' ).css( 'display', 'block' );
4847			var $select_for_style = $( '#hb-payment-form-select-for-selectize-styles' );
4848		}
4849		var bg_color = $select_for_style.css( 'background-color' );
4850		var border_top = $select_for_style.css( 'border-top' );
4851		var border_right = $select_for_style.css( 'border-right' );
4852		var border_bottom = $select_for_style.css( 'border-bottom' );
4853		var border_left = $select_for_style.css( 'border-left' );
4854		var border_radius = $select_for_style.css( 'border-radius' );
4855		var height = $select_for_style.css( 'height' );
4856		var padding_left = $select_for_style.css( 'padding-left' );
4857		if ( padding_left == '0px' ) {
4858			padding_left = '5px';
4859		}
4860		if ( $( '#hbook-booking-form-1 .hb-search-fields' ).length ) {
4861			$( '.hb-accom-listing-booking-form' ).css( 'display', 'none' );
4862			$( '#hb-tmp-element-for-selectize-style' ).remove();
4863		} else {
4864			$( '#hb-payment-form-select-for-selectize-styles' ).css( 'display', 'none' );
4865			$( '#hb-payment-form-select-for-selectize-styles' ).parents( '.hotelwp-select-wrapper' ).css( 'display', 'none' );
4866		}
4867
4868		$( '.hbook-wrapper .selectize-control .selectize-input, .hb-payment-link-form-wrapper .selectize-control .selectize-input' ).css({
4869			'background-color': bg_color,
4870			'border-top': border_top,
4871			'border-right': border_right,
4872			'border-bottom': border_bottom,
4873			'border-left': border_left,
4874			'border-radius': border_radius,
4875			'line-height': height,
4876			'padding-left': padding_left,
4877		});
4878
4879		$( 'select[name="hb_country_iso"]' ).on( 'change', function() {
4880			var $parent_form_wrapper = $( this ).parents( '.hbook-wrapper' );
4881			if ( ! $parent_form_wrapper.length ) {
4882				$parent_form_wrapper = $( this ).parents( '.hb-payment-link-form-wrapper' );
4883			}
4884			show_hide_country_iso_info( $parent_form_wrapper );
4885		});
4886
4887		$( '.hbook-wrapper, .hb-payment-link-form-wrapper' ).each( function() {
4888			show_hide_country_iso_info( $( this ) );
4889		});
4890	}
4891
4892	function show_hide_country_iso_info( $booking_wrapper ) {
4893		$booking_wrapper.find( '.hb-country-iso-additional-info-wrapper' ).hide();
4894		$booking_wrapper.find( '.hb-country-iso-additional-info-wrapper select' ).attr( 'data-validation', '' );
4895		var selected_country_iso = $booking_wrapper.find( 'select[name="hb_country_iso"]' ).val();
4896		var selected_country_required = false;
4897		if ( $booking_wrapper.find( 'select[name="hb_country_iso"]' ).data( 'validation' ) == 'required' ) {
4898			selected_country_required = true;
4899		}
4900		if ( selected_country_iso == 'US' ) {
4901			$booking_wrapper.find( 'input[name="hb_state_province"]' ).attr( 'data-validation', '' ).parent( 'p' ).hide();
4902			$booking_wrapper.find( '.hb-usa-state-iso-wrapper' ).show();
4903			if ( selected_country_required ) {
4904				$booking_wrapper.find( 'select[name="hb_usa_state_iso"]' ).attr( 'data-validation', 'required' );
4905			}
4906		} else if ( selected_country_iso == 'CA' ) {
4907			$booking_wrapper.find( 'input[name="hb_state_province"]' ).attr( 'data-validation', '' ).parent( 'p' ).hide();
4908			$booking_wrapper.find( '.hb-canada-province-iso-wrapper' ).show();
4909			if ( selected_country_required ) {
4910				$booking_wrapper.find( 'select[name="hb_canada_province_iso"]' ).attr( 'data-validation', 'required' );
4911			}
4912		} else {
4913			$booking_wrapper.find( 'input[name="hb_state_province"]' ).parent( 'p' ).show();
4914			var data_validation_saved = $booking_wrapper.find( 'input[name="hb_state_province"]' ).data( 'validation-saved' );
4915			$booking_wrapper.find( 'input[name="hb_state_province"]' ).attr( 'data-validation', data_validation_saved );
4916		}
4917	}
4918
4919	/* end country iso */
4920
4921	/* ------------------------------------------------------------------------------------------- */
4922
4923	/* details form validation */
4924
4925	if ( ( typeof hb_booking_form_data !== 'undefined' ) && ( hb_booking_form_data.is_admin != 'yes' ) && $( '.hb-booking-details-form' ).length ) {
4926		$.validate({
4927			form: '.hb-booking-details-form',
4928			validateOnBlur: false,
4929			language: {
4930				badEmail: hb_text.invalid_email,
4931				requiredField: hb_text.required_field,
4932				requiredFields: hb_text.required_field,
4933				groupCheckedTooFewStart: hb_text.required_field + '<span style="display: none">',
4934				groupCheckedEnd: '</span>',
4935				badInt: hb_text.invalid_number
4936			},
4937			borderColorOnError: false,
4938			scrollToTopOnError: false,
4939			validateHiddenInputs: true,
4940			onError: function( $form ) {
4941				$form.find( '.hb-confirm-button input' ).blur();
4942				$( 'html, body' ).animate({	scrollTop: $( '.has-error' ).first().offset().top - page_padding_top }, 400 );
4943			},
4944			onSuccess: function( $form ) {
4945				submit_booking_details( $form );
4946				return false;
4947			}
4948		});
4949	}
4950
4951	if ( ( typeof hb_booking_form_data !== 'undefined' ) && ( hb_booking_form_data.is_admin == 'yes' ) ) {
4952		$( '.hb-booking-details-form' ).on( 'submit', function() {
4953			$( this ).find( 'input[type="submit"]' ).blur();
4954			if ( $( '#hb-admin-customer-type-id:checked' ).length ) {
4955				if ( ! $( '#hb-add-resa-customer-id-list' ).val() ) {
4956					alert( hb_text.customer_not_selected );
4957					return false;
4958				}
4959			}
4960			submit_booking_details( $( this ) );
4961			return false;
4962		});
4963	}
4964
4965	/* end details form validation */
4966
4967	/* ------------------------------------------------------------------------------------------- */
4968
4969	/* save reservation details */
4970
4971	function submit_booking_details( $form ) {
4972		$form.find( '.hb-confirm-button input' ).blur();
4973
4974		if ( $form.hasClass( 'submitted' ) ) {
4975			return false;
4976		}
4977
4978		var policies_error = '';
4979		$form.find( '.hb-policies-error, .hb-confirm-error' ).hide();
4980		if ( $form.find( 'input[name="hb_terms_and_cond"]' ).length && ! $form.find( 'input[name="hb_terms_and_cond"]' ).prop( 'checked' ) ) {
4981			policies_error = hb_text.terms_and_cond_error;
4982		}
4983		if ( $form.find( 'input[name="hb_privacy_policy"]' ).length && ! $form.find( 'input[name="hb_privacy_policy"]' ).prop( 'checked' ) ) {
4984			if ( policies_error ) {
4985				policies_error += '<br/>';
4986			}
4987			policies_error += hb_text.privacy_policy_error;
4988		}
4989		if ( policies_error ) {
4990			$form.find( '.hb-policies-error' ).html( policies_error ).slideDown();
4991			$( 'html, body' ).animate({
4992				scrollTop: $form.find( '.hb-policies-area' ).offset().top - page_padding_top
4993			}, 1000 );
4994			return false;
4995		}
4996
4997		var payment_type = $form.find( 'input[name="hb-payment-type"]:checked' ).val(),
4998			payment_processing = false;
4999
5000		if ( payment_type == 'store_credit_card' || payment_type == 'deposit' || payment_type == 'full' ) {
5001			$form.find( '.hb-payment-flag' ).val( 'yes' );
5002			var gateway_id = $form.find( 'input[name="hb-payment-gateway"]:checked' ).val(),
5003				payment_process_function = 'hb_' + gateway_id + '_payment_process';
5004			if ( ! gateway_id ) {
5005				alert( 'Error: all payment gateways are inactive.' );
5006				return;
5007			}
5008			if ( typeof window[ payment_process_function ] == 'function' ) {
5009				disable_form_submission( $form );
5010				payment_processing = window[ payment_process_function ]( $form, save_resa_details );
5011				if ( ! payment_processing ) {
5012					enable_form_submission( $form );
5013					return;
5014				}
5015			}
5016		} else {
5017			$form.find( '.hb-payment-flag' ).val( '' );
5018		}
5019
5020		if ( ! payment_processing ) {
5021			$form.find( '.hb-saving-resa' ).slideDown();
5022			save_resa_details( $form );
5023		}
5024	}
5025
5026	function save_resa_details( $form ) {
5027		disable_form_submission( $form );
5028		var $options_form = $form.parents( '.hbook-wrapper' ).find( '.hb-options-form' ),
5029			$accom_num_form = $form.parents( '.hbook-wrapper' ).find( '.hb-select-accom-num-form' ),
5030			$forms;
5031		$forms = $form.add( $options_form );
5032		$forms = $forms.add( $accom_num_form );
5033		$.ajax({
5034			data: $forms.serialize(),
5035			success: function( response ) {
5036				after_form_details_submit( response, $form );
5037			},
5038			type : 'POST',
5039			timeout: hb_booking_form_data.ajax_timeout,
5040			url: hb_booking_form_data.ajax_url,
5041			error: function( jqXHR, textStatus, errorThrown ) {
5042				$form.find( '.hb-saving-resa, .hb-confirm-error, .hb-policies-error' ).slideUp();
5043				$form.find( '.hb-confirm-error' ).html( hb_text.connection_error ).slideDown();
5044				console.log( jqXHR );
5045				console.log( jqXHR.responseText );
5046				console.log( textStatus );
5047				console.log( errorThrown );
5048				enable_form_submission( $form );
5049			}
5050		});
5051	}
5052
5053	function after_form_details_submit( response_text, $form ) {
5054		try {
5055			var response = JSON.parse( response_text );
5056		} catch ( e ) {
5057			enable_form_submission( $form );
5058			$form.find( '.hb-saving-resa' ).slideUp();
5059			$form.find( '.hb-confirm-error' ).html( response_text ).slideDown();
5060			return false;
5061		}
5062		if ( response['success'] ) {
5063			if ( response['payment_requires_action'] == 'yes' ) {
5064				var gateway_id = $form.find( 'input[name="hb-payment-gateway"]:checked' ).val();
5065				var payment_requires_action = 'hb_' + gateway_id + '_payment_requires_action';
5066				window[ payment_requires_action ]( $form, response );
5067				return false;
5068			}
5069			var payment_type = $form.find( 'input[name="hb-payment-type"]:checked' ).val(),
5070				payment_has_redirection = $form.find( 'input[name="hb-payment-gateway"]:checked' ).data( 'has-redirection' );
5071			if ( ( payment_type == 'deposit' || payment_type == 'full' ) && ( payment_has_redirection == 'yes' ) ) {
5072				var gateway_id = $form.find( 'input[name="hb-payment-gateway"]:checked' ).val(),
5073					payment_process_redirection = 'hb_' + gateway_id + '_payment_redirection';
5074				window[ payment_process_redirection ]( $form, response );
5075			} else {
5076				$form.find( '.hb-saving-resa' ).slideUp();
5077				if ( hb_booking_form_data.is_admin != 'yes' ) {
5078					var $thank_you_page_form = $form.parents( '.hbook-wrapper' ).find( '.hb-thank-you-page-form' );
5079					if ( $thank_you_page_form.length ) {
5080						$( 'body' ).addClass( 'no-hbook-unload' );
5081						$thank_you_page_form.find( '.hb-resa-id' ).val( response.resa_id );
5082						$thank_you_page_form.find( '.hb-resa-is-parent' ).val( response.resa_is_parent );
5083						$thank_you_page_form.find( '.hb-resa-payment-type' ).val( payment_type );
5084						$thank_you_page_form.submit();
5085						return;
5086					}
5087					$form.find( '.hb-resa-done-email' ).html( $form.find( 'input[name="hb_email"]' ).val() );
5088					$form.find( '.hb-resa-done-alphanum-id' ).html( response['alphanum_id'] );
5089					$form.find( '.hb-resa-done-alphanum-id-hidden' ).val( response['alphanum_id'] );
5090					$( 'html, body' ).animate({ scrollTop: $form.parents( '.hbook-wrapper' ).offset().top - page_padding_top }, 1000, function() {
5091						$form.parents( '.hbook-wrapper' ).find( '.hb-booking-search-form, .hb-accom-list, .hb-step-button, .hb-details-fields, .hb-coupons-area, .hb-confirm-area, .hb-policies-area, .hb-payment-info-wrapper, .hb-resa-summary' ).fadeOut( 1000, function() {
5092							if ( payment_type == 'deposit' || payment_type == 'full' ) {
5093								$form.find( '.hb-resa-payment-msg' ).show();
5094							} else {
5095								$form.find( '.hb-resa-done-msg' ).show();
5096							}
5097							$form.find( '.hb-resa-summary' ).slideDown();
5098						});
5099					});
5100					if ( typeof window['hbook_reservation_done'] == 'function' ) {
5101						window['hbook_reservation_done']();
5102					}
5103				} else {
5104					hb_new_admin_resas = response['resas'];
5105					enable_form_submission( $form );
5106					change_search( $form.parents( '.hbook-wrapper' ) );
5107					$( '#hb-process-new-admin-resa' ).submit();
5108				}
5109			}
5110		} else {
5111			enable_form_submission( $form );
5112			$form.find( '.hb-saving-resa' ).slideUp();
5113			$form.find( '.hb-confirm-error' ).html( response['error_msg'] ).slideDown();
5114		}
5115	}
5116
5117	/* end save reservation details */
5118
5119	/* ------------------------------------------------------------------------------------------- */
5120
5121	/* external payment confirmation */
5122
5123	if ( $( '#hb-resa-confirm-done' ).length ) {
5124		var $accom_listing_item = $( '#hb-resa-confirm-done' ).parents( '.hb-accom-listing-item' );
5125		$accom_listing_item.find( '.hb-accom-listing-booking-form' ).show();
5126		$accom_listing_item.find( '.hb-listing-book-accom' ).hide();
5127		hb_format_date();
5128		if ( typeof window['hbook_reservation_done'] == 'function' ) {
5129			window['hbook_reservation_done']();
5130		}
5131		$( 'html, body' ).animate({ scrollTop: $( '#hb-resa-confirm-done' ).offset().top - page_padding_top }, 1000 );
5132	}
5133
5134	/* end external payment confirmation */
5135
5136	/* ------------------------------------------------------------------------------------------- */
5137
5138	/* payment type and method init */
5139
5140	$( '.hb-booking-details-form, .hb-payment-link-form' ).each( function() {
5141		$( this ).find( 'input[name="hb-payment-type"]' ).first().prop( 'checked', true );
5142		$( this ).find( 'input[name="hb-payment-gateway"]' ).first().prop( 'checked', true );
5143		hide_show_payment_explanation( $( this ) );
5144		hide_show_payment_gateway_choice( $( this ) );
5145		hide_show_payment_gateway_form( $( this ) );
5146		hide_show_bottom_area( $( this ) );
5147	});
5148
5149	/* end payment type and method init */
5150
5151	/* ------------------------------------------------------------------------------------------- */
5152
5153	/* payment gateway choice */
5154
5155	$( 'input[name="hb-payment-type"]' ).on( 'change', function() {
5156		hide_show_payment_explanation( $( this ).parents( 'form' ) );
5157		hide_show_payment_gateway_choice( $( this ).parents( 'form' ) );
5158		hide_show_bottom_area( $( this ).parents( 'form' ) );
5159	});
5160
5161	$( 'input[name="hb-payment-gateway"]' ).on( 'change', function() {
5162		hide_show_payment_gateway_form( $( this ).parents( 'form' ) );
5163		hide_show_bottom_area( $( this ).parents( 'form' ) );
5164	});
5165
5166	function hide_show_payment_explanation( $form ) {
5167		var payment_type = $form.find( 'input[name="hb-payment-type"]:checked' ).val();
5168		$form.find( '.hb-payment-type-explanation' ).hide();
5169		$form.find( '.hb-payment-type-explanation-' + payment_type ).slideDown();
5170	}
5171
5172	function hide_show_payment_gateway_choice( $form ) {
5173		var payment_type = $form.find( 'input[name="hb-payment-type"]:checked' ).val();
5174		if ( payment_type == 'store_credit_card' || payment_type == 'deposit' || payment_type == 'full' ) {
5175			$form.find( '.hb-payment-method-wrapper' ).slideDown();
5176		} else {
5177			$form.find( '.hb-payment-method-wrapper' ).slideUp();
5178		}
5179		if ( payment_type == 'store_credit_card' ) {
5180			$form.find( '.hb-payment-method' ).slideUp();
5181			$form.find( 'input[name="hb-payment-gateway"][value="stripe"]' ).prop( 'checked', true );
5182			if ( $form.find( '.hb-payment-form-stripe' ).css( 'display' ) == 'none' ) {
5183				$form.find( '.hb-payment-form' ).slideUp();
5184				$form.find( '.hb-payment-form-stripe' ).slideDown();
5185			}
5186		} else {
5187			$form.find( '.hb-payment-method' ).slideDown();
5188		}
5189	}
5190
5191	function hide_show_payment_gateway_form( $form ) {
5192		$form.find( '.hb-payment-form' ).slideUp();
5193		var gateway_id = $form.find( 'input[name="hb-payment-gateway"]:checked' ).val();
5194		$form.find( '.hb-payment-form-' + gateway_id ).slideDown();
5195		$form.find( '.hb-' + gateway_id + '-payment-method' ).slideDown();
5196	}
5197
5198	function hide_show_bottom_area( $form ) {
5199		var payment_type = $form.find( 'input[name="hb-payment-type"]:checked' ).val();
5200		if ( payment_type == 'deposit' || payment_type == 'full' ) {
5201			var gateway_id = $form.find( 'input[name="hb-payment-gateway"]:checked' ).val();
5202			if ( $form.find( '.hb-bottom-area-content-' + gateway_id ).length ) {
5203				var bottom_area_content = $form.find( '.hb-bottom-area-content-' + gateway_id ).html();
5204				$form.find( '.hb-bottom-area' ).html( bottom_area_content ).slideDown();
5205			} else {
5206				$form.find( '.hb-bottom-area' ).slideUp();
5207			}
5208		} else {
5209			$form.find( '.hb-bottom-area' ).slideUp();
5210		}
5211	}
5212
5213	/* end payment gateway choice */
5214
5215	/* ------------------------------------------------------------------------------------------- */
5216
5217	/* misc */
5218
5219	function format_price( price ) {
5220		if ( hb_booking_form_data.price_precision == 'no_decimals' ) {
5221			var formatted_price = Math.round( price );
5222		} else {
5223			var formatted_price = parseFloat( price ).toFixed( 2 );
5224		}
5225		var price_parts = formatted_price.toString().split( '.' );
5226		if ( hb_booking_form_data.thousands_sep ) {
5227			price_parts[0] = price_parts[0].replace( /\B(?=(\d{3})+(?!\d))/g, hb_booking_form_data.thousands_sep );
5228		}
5229		return price_parts.join( hb_booking_form_data.decimal_point );
5230	}
5231
5232	function disable_form_submission( $form ) {
5233		$form.addClass( 'submitted' );
5234		$form.find( 'input[type="submit"]' ).prop( 'disabled', true );
5235	}
5236
5237	function enable_form_submission( $form ) {
5238		$form.removeClass( 'submitted' );
5239		$form.find( 'input[type="submit"]' ).prop( 'disabled', false );
5240	}
5241
5242	function debouncer( func ) {
5243		var timeoutID,
5244			timeout = 50;
5245		return function () {
5246			var scope = this,
5247				args = arguments;
5248			clearTimeout( timeoutID );
5249			timeoutID = setTimeout( function () {
5250				func.apply( scope, Array.prototype.slice.call( args ) );
5251			}, timeout );
5252		}
5253	}
5254
5255	function resize_price_caption() {
5256		$( '.hb-accom-list' ).each( function() {
5257			if ( $( this ).width() < 600 ) {
5258				$( this ).find( '.hb-accom-price-caption br' ).show();
5259				$( this ).find( '.hb-accom-price-caption-dash' ).hide();
5260				$( this ).find( '.hb-accom-price-caption' ).addClass( 'hb-accom-price-caption-small' );
5261			} else {
5262				$( this ).find( '.hb-accom-price-caption br' ).hide();
5263				$( this ).find( '.hb-accom-price-caption-dash' ).show();
5264				$( this ).find( '.hb-accom-price-caption' ).removeClass( 'hb-accom-price-caption-small' );
5265			}
5266		});
5267	}
5268
5269	function reposition_people_popup() {
5270		var $people_popup = $( '.hb-people-popup-wrapper-visible' );
5271		if ( $people_popup.length ) {
5272			var $accom_people_selection = $people_popup.find( '.hb-multi-accom-people-selection-wrapper' );
5273			if ( hb_booking_form_data.is_admin == 'yes' ) {
5274				var $select = $( '.hb-booking-search-form .hb-accom-number' );
5275			} else {
5276				var form_num = $accom_people_selection.data( 'form-num' );
5277				var $select = $( '.hb-booking-search-form.hb-form-' + form_num + ' .hb-accom-number' );
5278			}
5279			var scroll_y = $( window ).scrollTop();
5280			var select_top = $select.offset().top;
5281			var select_bottom = select_top + $select.outerHeight( true );
5282			var select_left = $select.offset().left;
5283			var available_space_above = select_top - scroll_y;
5284			var available_space_below = $( window ).height() - select_bottom + scroll_y;
5285			var people_popup_height = $( '.hb-people-popup-wrapper' ).outerHeight( true );
5286			if ( available_space_below > people_popup_height ) {
5287				$( '.hb-people-popup-wrapper' ).css( 'top', select_bottom );
5288			} else if ( available_space_above > people_popup_height ) {
5289				$( '.hb-people-popup-wrapper' ).css( 'top', select_top - peo
5289ple_popup_height );
5290			} else {
5291				$( '.hb-people-popup-wrapper' ).css( 'top', scroll_y );
5292			}
5293			$( '.hb-people-popup-wrapper' ).css( 'left', select_left );
5294		}
5295	}
5296
5297	$( window ).resize( debouncer ( function () {
5298		hb_resize_forms();
5299		resize_price_caption();
5300		reposition_people_popup();
5301	})).resize();
5302
5303	$( window ).on( 'beforeunload', function() {
5304		if ( ! $( 'body' ).hasClass( 'no-hbook-unload' ) ) {
5305			$( '.hb-accom-list, .hb-booking-details-form' ).each( function() {
5306				if ( $( this ).is( ':visible' ) ) {
5307					var scroll_top = $( window ).scrollTop();
5308					var offset = $( this ).offset().top;
5309					var height = $( this ).outerHeight( true );
5310					$( this ).hide();
5311					if ( scroll_top > offset + height ) {
5312						$( 'html, body' ).scrollTop( scroll_top - height );
5313					} else if ( scroll_top > offset ) {
5314						$( 'html, body' ).scrollTop( offset );
5315					}
5316				}
5317			});
5318		}
5319	});
5320
5321	/* end misc */
5322
5323	/* ------------------------------------------------------------------------------------------- */
5324
5325	/* status processing */
5326
5327	$( '.hbook-wrapper-booking-form' ).each( function() {
5328		var $booking_wrapper = $( this ),
5329			$search_form = $booking_wrapper.find( '.hb-booking-search-form' );
5330		if ( $search_form.find( '.hb-check-in-hidden' ).val() != '' ) {
5331			var check_in = hb_date_str_2_obj( $search_form.find( '.hb-check-in-hidden' ).val() ),
5332				check_out = hb_date_str_2_obj( $search_form.find( '.hb-check-out-hidden' ).val() );
5333			check_in = $.datepick.formatDate( hb_date_format, check_in );
5334			check_out = $.datepick.formatDate( hb_date_format, check_out );
5335			$search_form.find( '.hb-check-in-date' ).val( check_in );
5336			$search_form.find( '.hb-check-out-date' ).val( check_out );
5337			$search_form.find( 'select.hb-adults' ).val( $search_form.find( '.hb-adults-hidden' ).val() );
5338			$search_form.find( 'select.hb-children' ).val( $search_form.find( '.hb-children-hidden' ).val() );
5339		}
5340		var accom_people = $( '.hb-accom-people' ).val();
5341		if ( ( typeof accom_people !== 'undefined' ) && ( accom_people != '' ) ) {
5342			accom_people = accom_people.split( ',' );
5343			$search_form.find( 'select.hb-accom-number' ).val( accom_people.length );
5344			for ( var i = 0; i < accom_people.length; i++ ) {
5345				var multi_accom_num = i + 1;
5346				var accom_adults = accom_people[i].split( '-' )[0];
5347				var accom_children = accom_people[i].split( '-' )[1];
5348				$search_form.find( '.hb-multi-accom-people-selection-accom-' + multi_accom_num + ' .hb-multi-accom-adults' ).val( accom_adults );
5349				$search_form.find( '.hb-multi-accom-people-selection-accom-' + multi_accom_num + ' .hb-multi-accom-children' ).val( accom_children );
5350			}
5351			update_accom_people( $search_form );
5352		} else {
5353			setTimeout( function() {
5354				if ( $search_form.find( 'select.hb-accom-number option[value="-1"]' ).length ) {
5355					$search_form.find( 'select.hb-accom-number' ).val( -1 );
5356					$search_form.find( '.hb-accom-people' ).val( '' );
5357				}
5358			}, 1000 );
5359		}
5360
5361		if ( $booking_wrapper.data( 'status' ) == 'search-accom' ) {
5362			$( 'html, body' ).animate({ scrollTop: $search_form.offset().top - page_padding_top }, function() {
5363				$search_form.submit();
5364			});
5365			return false;
5366		}
5367
5368		if ( $booking_wrapper.data( 'status' ) == 'external-payment-timeout' ) {
5369			alert( hb_text.timeout_error );
5370		}
5371
5372		if ( $booking_wrapper.data( 'status' ) == 'external-payment-confirm-error' ) {
5373			alert( hb_payment_confirmation_error );
5374		}
5375	});
5376
5377	/* end status processing */
5378
5379	/* ------------------------------------------------------------------------------------------- */
5380
5381});;
5382'use strict';
5383
5384var hb_stripe_class = Stripe( hb_stripe_key, { 'locale': hb_stripe_locale } );
5385var hb_stripe_elements = [];
5386var hb_stripe_payment_elements = [];
5387var hb_stripe_confirm_type = 'confirmSetup';
5388
5389jQuery( document ).ready( function( $ ) {
5390	var show_country_field_alert = false;
5391	$( '.hb-booking-details-form' ).each( function() {
5392		if (
5393			! $( this ).find( '.hb-country-iso-select' ).length ||
5394			( $( this ).find( '.hb-country-iso-select' ).data( 'validation' ) != 'required' )
5395		) {
5396			show_country_field_alert = true;
5397		}
5398	});
5399	if ( show_country_field_alert ) {
5400		alert( hb_stripe_requires_country_field_msg );
5401	}
5402
5403	$( '.hb-booking-details-form, .hb-payment-link-form' ).each( function() {
5404		if ( ! $( this ).find( 'input[name="hb-current-url"]' ).length ) {
5405			$( this ).append( $( '<input type="hidden" name="hb-current-url" />' ) );
5406		}
5407	});
5408
5409	$( 'input[name="hb-payment-type"], input[name="hb-payment-gateway"]' ).change( function() {
5410		var $booking_wrapper = $( this ).parents( '.hbook-wrapper' );
5411		if ( $booking_wrapper.find( 'input[name="hb-payment-gateway"]:checked' ).val() != 'stripe' ) {
5412			return;
5413		}
5414		if ( hb_stripe_payment_elements[ $booking_wrapper.attr( 'id' ) ] ) {
5415			try {
5416				hb_stripe_payment_elements[ $booking_wrapper.attr( 'id' ) ].destroy();
5417			} catch ( e ) {
5418			}
5419		}
5420		hb_stripe_update_payment_form( $booking_wrapper );
5421	});
5422});
5423
5424function hb_stripe_update_payment_form( $booking_wrapper ) {
5425	$booking_wrapper.find( '.hb-stripe-loading-form' ).show();
5426	var stripe_payment_types = ['store_credit_card', 'deposit', 'full'];
5427	var payment_type = $booking_wrapper.find( 'input[name="hb-payment-type"]:checked' ).val();
5428	if ( stripe_payment_types.indexOf( payment_type ) >= 0 ) {
5429		$booking_wrapper.find( 'input[name="hb-current-url"]' ).val( document.URL );
5430		var $payment_data = $booking_wrapper.find( '.hb-payment-data-summary' );
5431		var mode = 'setup';
5432		var amount = 0;
5433		var setup_future_usage = '';
5434		if ( payment_type == 'deposit' ) {
5435			mode = 'payment';
5436			hb_stripe_confirm_type = 'confirmPayment';
5437			amount = $payment_data.data( 'charged-deposit-raw' );
5438		} else if ( payment_type == 'full' ) {
5439			mode = 'payment';
5440			hb_stripe_confirm_type = 'confirmPayment';
5441			amount = $payment_data.data( 'charged-total-price-raw' );
5442		}
5443		if ( hb_stripe_zero_decimal_currency == 'no' ) {
5444			amount = amount * 100;
5445		}
5446		amount = Math.round( amount );
5447		if ( amount == 0 ) {
5448			setup_future_usage = 'off_session';
5449			mode = 'setup';
5450			hb_stripe_confirm_type = 'confirmSetup';
5451		}
5452		if ( hb_stripe_store_credit_card == 'yes' ) {
5453			setup_future_usage = 'off_session';
5454		}
5455		var create_elements_options = {
5456			mode: mode,
5457			currency: hb_stripe_currency.toLowerCase(),
5458		}
5459		if ( setup_future_usage ) {
5460			create_elements_options['setupFutureUsage'] = setup_future_usage;
5461		}
5462		if ( mode == 'payment' ) {
5463			create_elements_options['amount'] = amount;
5464		}
5465		if ( hb_stripe_payment_methods != 'all' ) {
5466			create_elements_options['paymentMethodTypes'] = ['card'];
5467		}
5468		try {
5469			hb_stripe_elements[ $booking_wrapper.attr( 'id' ) ] = hb_stripe_class.elements( create_elements_options );
5470			hb_stripe_payment_elements[ $booking_wrapper.attr( 'id' ) ] = hb_stripe_elements[ $booking_wrapper.attr( 'id' ) ].create( 'payment', { layout: 'tabs', fields: { billingDetails: 'never' } } );
5471			hb_stripe_payment_elements[ $booking_wrapper.attr( 'id' ) ].on( 'ready', function( event ) {
5472				$booking_wrapper.find( '.hb-stripe-loading-form' ).hide();
5473			});
5474			hb_stripe_payment_elements[ $booking_wrapper.attr( 'id' ) ].mount( '#' + $booking_wrapper.attr( 'id' ) + ' .hb-stripe-payment-element-wrapper' );
5475		} catch ( e ) {
5476			console.log( 'Stripe error.' );
5477			console.log( e );
5478			alert( 'Stripe error: ' + e.message );
5479		}
5480	}
5481}
5482
5483function hb_stripe_payment_process( $form, callback_func ) {
5484	$form.find( 'input[type="submit"]' ).blur().prop( 'disabled', true );
5485	if ( $form.hasClass( 'hb-payment-link-form' ) ) {
5486		var booking_wrapper_id = 'hb-payment-link-form';
5487	} else {
5488		var booking_wrapper_id = $form.parents( '.hbook-wrapper' ).attr( 'id' );
5489	}
5490	try {
5491		hb_stripe_elements[ booking_wrapper_id ].submit().then( function( result ) {
5492			if ( result.error ) {
5493				console.log( result.error );
5494				$form.removeClass( 'submitted' );
5495				$form.find( 'input[type="submit"]' ).prop( 'disabled', false );
5496				return false;
5497			} else {
5498				$form.find( '.hb-saving-resa, .hb-processing-later-payment' ).slideDown();
5499				callback_func( $form );
5500			}
5501		});
5502		return true;
5503	} catch( e ) {
5504		console.log( e );
5505		$form.removeClass( 'submitted' );
5506		$form.find( 'input[type="submit"]' ).prop( 'disabled', false );
5507		return false;
5508	}
5509}
5510
5511function hb_stripe_payment_requires_action( $form, response ) {
5512	var customer_info = {};
5513	var customer_details_list = ['first_name', 'last_name', 'email', 'phone', 'address_1', 'address_2', 'city', 'state_province', 'zip_code'];
5514	for ( var i = 0; i < customer_details_list.length; i++ ) {
5515		if ( $form.hasClass( 'hb-payment-link-form' ) ) {
5516			if ( typeof hb_customer_info[ customer_details_list[ i ] ] !== 'undefined' ) {
5517				customer_info[ customer_details_list[ i ] ] = hb_customer_info[ customer_details_list[ i ] ];
5518			} else {
5519				customer_info[ customer_details_list[ i ] ] = '';
5520			}
5521		} else {
5522			var customer_input = 'input[name="hb_' + customer_details_list[ i ] + '"]';
5523			if ( $form.find( customer_input ).length ) {
5524				customer_info[ customer_details_list[ i ] ] = $form.find( customer_input ).val();
5525			} else {
5526				customer_info[ customer_details_list[ i ] ] = '';
5527			}
5528		}
5529	}
5530	var customer_name_sep = '';
5531	if ( customer_info['first_name'] && customer_info['last_name'] ) {
5532		customer_name_sep = ' ';
5533	}
5534	customer_info['name'] = customer_info['first_name'] + customer_name_sep + customer_info['last_name'];
5535	if ( $form.hasClass( 'hb-payment-link-form' ) ) {
5536		var booking_wrapper_id = 'hb-payment-link-form';
5537		if ( ( typeof hb_customer_info['country_iso'] !== 'undefined' ) && ( hb_customer_info['country_iso'] != '' ) ) {
5538			customer_info['country'] = hb_customer_info['country_iso'];
5539		} else {
5540			customer_info['country'] = $form.find( '.hb-country-iso-select' ).val();
5541		}
5542	} else {
5543		var booking_wrapper_id = $form.parents( '.hbook-wrapper' ).attr( 'id' );
5544		customer_info['country'] = $form.find( '.hb-country-iso-select' ).val();
5545	}
5546
5547	hb_stripe_class[ hb_stripe_confirm_type ]({
5548		elements: hb_stripe_elements[ booking_wrapper_id ],
5549		clientSecret: response['client_secret'],
5550		confirmParams: {
5551			return_url: response['return_url'],
5552			payment_method_data: {
5553				billing_details: {
5554					name: customer_info['name'],
5555					email: customer_info['email'],
5556					phone: customer_info['phone'],
5557					address: {
5558						line1: customer_info['address_1'],
5559						line2: customer_info['address_2'],
5560						city: customer_info['city'],
5561						state: customer_info['state_province'],
5562						country: customer_info['country'],
5563						postal_code: customer_info['zip_code'],
5564					}
5565				}
5566			}
5567		},
5568	}).then( function( result ) {
5569		if ( result.error ) {
5570			hb_stripe_handle_error( response, $form, result.error );
5571		}
5572	}).catch( function ( e ) {
5573		hb_stripe_handle_error( response, $form, e );
5574	});
5575}
5576
5577function hb_stripe_handle_error( response, $form, error ) {
5578	$form.find( '.hb-saving-resa, .hb-processing-later-payment' ).slideUp();
5579	$form.removeClass( 'submitted' );
5580	$form.find( 'input[type="submit"]' ).prop( 'disabled', false );
5581	$form.find( '.hb-confirm-error' ).html( error.message ).slideDown();
5582	console.log( error );
5583	var ajax_timeout = 40000;
5584	if ( typeof hb_booking_form_data != 'undefined' ) {
5585		ajax_timeout = hb_booking_form_data.ajax_timeout;
5586	} else if ( typeof hb_payment_link_form_data != 'undefined' ) {
5587		ajax_timeout = hb_payment_link_form_data.ajax_timeout;
5588	}
5589	var ajax_url = '';
5590	if ( typeof hb_booking_form_data != 'undefined' ) {
5591		ajax_url = hb_booking_form_data.ajax_url;
5592	} else if ( typeof hb_payment_link_form_data != 'undefined' ) {
5593		ajax_url = hb_payment_link_form_data.ajax_url;
5594	}
5595	jQuery.ajax({
5596		data: {
5597			'action': 'hb_stripe_declined_payment',
5598			'payment_token': response['payment_token'],
5599		},
5600		success: function( ajax_response ) {
5601			if ( ajax_response != 'stripe_declined_payment' ) {
5602				console.log( ajax_response );
5603			}
5604		},
5605		type : 'POST',
5606		timeout: ajax_timeout,
5607		url: ajax_url,
5608		error: function( jqXHR, textStatus, errorThrown ) {
5609			console.log( jqXHR );
5610			console.log( textStatus );
5611			console.log( errorThrown );
5612		}
5613	});
5614};
5615'undefined'=== typeof _trfq || (window._trfq = []);'undefined'=== typeof _trfd && (window._trfd=[]),
5616                _trfd.push({'tccl.baseHost':'secureserver.net'}),
5617                _trfd.push({'ap':'wpaas_v2'},
5618                    {'server':'559391460e0b'},
5619                    {'pod':'c28-prod-p3-us-west-2'},
5620                                        {'xid':'45387438'},
5621                    {'wp':'7.1.2'},
5622                    {'php':'7.4.33.69'},
5623                    {'loggedin':'0'},
5624                    {'cdn':'1'},
5625                    {'builder':'elementor'},
5626                    {'theme':'hello-elementor'},
5627                    {'wds':'0'},
5628                    {'wp_alloptions_count':'633'},
5629                    {'wp_alloptions_bytes':'134194'},
5630                    {'gdl_coming_soon_page':'0'}
5631                    , {'appid':'794060'}                 );
5632            var trafficScript = document.createElement('script'); trafficScript.src = 'https://img1.wsimg.com/signals/js/clients/scc-c2/scc-c2.min.js'; window.document.head.appendChild(trafficScript);;
5633window.addEventListener('click', function (elem) { var _elem$target, _elem$target$dataset, _window, _window$_trfq; return (elem === null || elem === void 0 ? void 0 : (_elem$target = elem.target) === null || _elem$target === void 0 ? void 0 : (_elem$target$dataset = _elem$target.dataset) === null || _elem$target$dataset === void 0 ? void 0 : _elem$target$dataset.eid) && ((_window = window) === null || _window === void 0 ? void 0 : (_window$_trfq = _window._trfq) === null || _window$_trfq === void 0 ? void 0 : _window$_trfq.push(["cmdLogEvent", "click", elem.target.dataset.eid]));});;
5634!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("tti",[],e):"object"==typeof exports?exports["tti"]=e():t["tti"]=e()}(window,function(){return n=[function(t,e){var n=function(){return this}();try{n=n||Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";e.__esModule=!0,e.setCustomProperties=e._sendWebVitalsData=e._collectVitals=e.calculateTTI=void 0,n(2);function i(){0<s.timeToInteractive&&setTimeout(function(){window._expDataLayer=window._expDataLayer||[],window._expDataLayer.push({schema:"add_perf",version:"v1",data:window._tccInternal?{type:"pageperf",properties:s,custom_properties:c}:{timing_object:s,is_hard_navigation:!0,custom_properties:c}})},0)}function r(){var t,e,n=(r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).name,r=r.value;s[n]="CLS"===n?r:Math.round(r),"timeToInteractive"===n&&(s.hasOwnProperty("FID")?i():(t=0,e=setInterval(function(){(s.hasOwnProperty("FID")||10<t)&&(e&&(clearInterval(e),e=null),i()),t+=1}
vendor: 5,363 bytes, line 5634
5634,500)))}var o=n(5),u=n(6),a=n(7),s={nav_type:"hard"},c={};e.calculateTTI=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:r;try{(0,u.getLCP)(e,!0),(0,u.getFID)(e),(0,u.getCLS)(e,!0),(0,o.getFirstConsistentlyInteractive)().then(function(t){e({name:"timeToInteractive",value:t})})}catch(t){(0,a.error)('unable to calculate "web-vitals" performance metrics',t)}},e._collectVitals=r,e._sendWebVitalsData=i,e.setCustomProperties=function(){return c=Object.assign({},c,0<arguments.length&&void 0!==arguments[0]?arguments[0]:{})}},function(t,e,n){"use strict";t.exports=n(3).polyfill()},function(t,e,n){var rt,it;rt=n(4),it=n(0),t.exports=function(){"use strict";function r(t){var e=typeof t;return t!==null&&(e==="object"||e==="function")}function s(t){return typeof t==="function"}var t=void 0;if(Array.isArray)t=Array.isArray;else t=function(t){return Object.prototype.toString.call(t)==="[object Array]"};var n=t,i=0,e=void 0,o=void 0,u=function t(e,n){b[i]=e;b[i+1]=n;i+=2;if(i===2)if(o)o(_);else S()};function a(t){o=t}function c(t){u=t}var f=typeof window!=="undefined"?window:undefined,l=f||{},d=l.MutationObserver||l.WebKitMutationObserver,p=typeof self==="undefined"&&typeof rt!=="undefined"&&{}.toString.call(rt)==="[object process]",v=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function h(){return function(){return rt.nextTick(_)}}function m(){if(typeof e!=="undefined")return function(){e(_)};return w()}function y(){var t=0;var e=new d(_);var n=document.createTextNode("");e.observe(n,{characterData:true});return function(){n.data=t=++t%2}}function g(){var t=new MessageChannel;t.port1.onmessage=_;return function(){return t.port2.postMessage(0)}}function w(){var t=setTimeout;return function(){return t(_,1)}}var b=new Array(1e3);function _(){for(var t=0;t<i;t+=2){var e=b[t];var n=b[t+1];e(n);b[t]=undefined;b[t+1]=undefined}i=0}function T(){try{var t=Function("return this")().require("vertx");e=t.runOnLoop||t.runOnContext;return m()}catch(t){return w()}}var S=void 0;if(p)S=h();else if(d)S=y();else if(v)S=g();else if(f===undefined&&"function"==="function")S=T();else S=w();function E(t,e){var n=this;var r=new this.constructor(j);if(r[x]===undefined)X(r);var i=n._state;if(i){var o=arguments[i-1];u(function(){return V(i,r,o,n._result)})}else H(n,r,t,e);return r}function L(t){var e=this;if(t&&typeof t==="object"&&t.constructor===e)return t;var n=new e(j);q(n,t);return n}var x=Math.random().toString(36).substring(2);function j(){}var A=void 0,P=1,O=2;function C(){return new TypeError("You cannot resolve a promise with itself")}function F(){return new TypeError("A promises callback cannot return that same promise.")}function M(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}function k(t,r,i){u(function(e){var n=false;var t=M(i,r,function(t){if(n)return;n=true;if(r!==t)q(e,t);else B(e,t)},function(t){if(n)return;n=true;W(e,t)},"Settle: "+(e._label||" unknown promise"));if(!n&&t){n=true;W(e,t)}},t)}function I(e,t){if(t._state===P)B(e,t._result);else if(t._state===O)W(e,t._result);else H(t,undefined,function(t){return q(e,t)},function(t){return W(e,t)})}function D(t,e,n){if(e.constructor===t.constructor&&n===E&&e.constructor.resolve===L)I(t,e);else if(n===undefined)B(t,e);else if(s(n))k(t,e,n);else B(t,e)}function q(e,t){if(e===t)W(e,C());else if(r(t)){var n=void 0;try{n=t.then}catch(t){W(e,t);return}D(e,t,n)}else B(e,t)}function N(t){if(t._onerror)t._onerror(t._result);R(t)}function B(t,e){if(t._state!==A)return;t._result=e;t._state=P;if(t._subscribers.length!==0)u(R,t)}function W(t,e){if(t._state!==A)return;t._state=O;t._result=e;u(N,t)}function H(t,e,n,r){var i=t._subscribers;var o=i.length;t._onerror=null;i[o]=e;i[o+P]=n;i[o+O]=r;if(o===0&&t._state)u(R,t)}function R(t){var e=t._subscribers;var n=t._state;if(e.length===0)return;var r=void 0,i=void 0,o=t._result;for(var u=0;u<e.length;u+=3){r=e[u];i=e[u+n];if(r)V(n,r,i,o);else i(o)}t._subscribers.length=0}function V(t,e,n,r){var i=s(n),o=void 0,u=void 0,a=true;if(i){try{o=n(r)}catch(t){a=false;u=t}if(e===o){W(e,F());return}}else o=r;if(e._state!==A);else if(i&&a)q(e,o);else if(a===false)W(e,u);else if(t===P)B(e,o);else if(t===O)W(e,o)}function Y(n,t){try{t(function t(e){q(n,e)},function t(e){W(n,e)})}catch(t){W(n,t)}}var K=0;function U(){return K++}function X(t){t[x]=K++;t._state=undefined;t._result=undefined;t._subscribers=[]}function J(){return new Error("Array Methods must be provided an Array")}var z=function(){function t(t,e){this._instanceConstructor=t;this.promise=new t(j);if(!this.promise[x])X(this.promise);if(n(e)){this.length=e.length;this._remaining=e.length;this._result=new Array(this.length);if(this.length===0)B(this.promise,this._result);else{this.length=this.length||0;this._enumerate(e);if(this._remaining===0)B(this.promise,this._result)}}else W(this.promise,J())}t.prototype._enumerate=function t(e){for(var n=0;this._state===A&&n<e.length;n++)this._eachEntry(e[n],n)};t.prototype._eachEntry=function t(e,n){var r=this._instanceConstructor;var i=r.resolve;if(i===L){var o=void 0;var u=void 0;var a=false;try{o=e.then}catch(t){a=true;u=t}if(o===E&&e._state!==A)this._settledAt(e._state,n,e._result);else if(typeof o!=="function"){this._remaining--;this._result[n]=e}else if(r===et){var s=new r(j);if(a)W(s,u);else D(s,e,o);this._willSettleAt(s,n)}
5634else this._willSettleAt(new r(function(t){return t(e)}),n)}else this._willSettleAt(i(e),n)};t.prototype._settledAt=function t(e,n,r){var i=this.promise;if(i._state===A){this._remaining--;if(e===O)W(i,r);else this._result[n]=r}if(this._remaining===0)B(i,this._result)};t.prototype._willSettleAt=function t(e,n){var r=this;H(e,undefined,function(t){return r._settledAt(P,n,t)},function(t){return r._settledAt(O,n,t)})};return t}();function G(t){return new z(this,t).promise}function Q(i){var o=this;if(!n(i))return new o(function(t,e){return e(new TypeError("You must pass an array to race."))});else return new o(function(t,e){var n=i.length;for(var r=0;r<n;r++)o.resolve(i[r]).then(t,e)})}function Z(t){var e=this;var n=new e(j);W(n,t);return n}function $(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function tt(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var et=function(){function e(t){this[x]=U();this._result=this._state=undefined;this._subscribers=[];if(j!==t){typeof t!=="function"&&$();this instanceof e?Y(this,t):tt()}}e.prototype.catch=function t(e){return this.then(null,e)};e.prototype.finally=function t(e){var n=this;var r=n.constructor;if(s(e))return n.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})});return n.then(e,e)};return e}();function nt(){var t=void 0;if(typeof it!=="undefined")t=it;else if(typeof self!=="undefined")t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if(n==="[object Promise]"&&!e.cast)return}t.Promise=et}return et.prototype.then=E,et.all=G,et.race=Q,et.resolve=L,et.reject=Z,et._setScheduler=a,et._setAsap=c,et._asap=u,et.polyfill=nt,et.Promise=et}()},function(t,e){var n,r,t=t.exports={};function i(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return(n=setTimeout)(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var a,s=[],c=!1,f=-1;function l(){c&&a&&(c=!1,a.length?s=a.concat(s):f=-1,s.length&&d())}function d(){if(!c){var t=u(l);c=!0;for(var e=s.length;e;){for(a=s,s=[];++f<e;)a&&a[f].run();f=-1,e=s.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return(r=clearTimeout)(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function v(){}t.nextTick=function(t){var e=Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new p(t,e)),1!==s.length||c||u(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=v,t.addListener=v,t.once=v,t.off=v,t.removeListener=v,t.removeAllListeners=v,t.emit=v,t.prependListener=v,t.prependOnceListener=v,t.listeners=function(t){return[]},t.binding=function(t){throw Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(t){throw Error("process.chdir is not supported")},t.umask=function(){return 0}},function(y,g,t){var w,b;w=t(0),function(){var r=("undefined"==typeof window||window!==this)&&void 0!==w&&null!=w?w:this,e="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)};function n(){n=function(){},r.Symbol||(r.Symbol=t)}var i=0;function t(t){return"jscomp_symbol_"+(t||"")+i++}function o(){n();var t=(t=r.Symbol.iterator)||(r.Symbol.iterator=r.Symbol("iterator"));"function"!=typeof Array.prototype[t]&&e(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return u(this)}}),o=function(){}}function u(t){var e,n=0;return e=function(){return n<t.length?{done:!1,value:t[n++]}:{done:!0}},o(),(e={next:e})[r.Symbol.iterator]=function(){return this},e}function l(t){o();var e=t[Symbol.iterator];return e?e.call(t):u(t)}function d(t){if(!(t instanceof Array)){t=l(t);for(var e,n=[];!(e=t.next()).done;)n.push(e.value);t=n}return t}var p=0;var a="img script iframe link audio video source".split(" ");function v(n){var t=new MutationObserver(function(t){for(var e=(t=l(t)).next();!e.done;e=t.next())("childList"==(e=e.value).type&&function t(e,n){for(var r=(e
5634=l(e)).next();!r.done;r=e.next())if(r=r.value,n.includes(r.nodeName.toLowerCase())||t(r.children,n))return 1}(e.addedNodes,a)||"attributes"==e.type&&a.includes(e.target.tagName.toLowerCase()))&&n(e)});return t.observe(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]}),t}function h(t,e){if(2<t.length)return performance.now();for(var n=[],r=(e=l(e)).next();!r.done;r=e.next())r=r.value,n.push({timestamp:r.start,type:"requestStart"}),n.push({timestamp:r.end,type:"requestEnd"});for(r=(e=l(t)).next();!r.done;r=e.next())n.push({timestamp:r.value,type:"requestStart"});for(n.sort(function(t,e){return t.timestamp-e.timestamp}),t=t.length,e=n.length-1;0<=e;e--)switch(r=n[e],r.type){case"requestStart":t--;break;case"requestEnd":if(2<++t)return r.timestamp;break;default:throw Error("Internal Error: This should never happen")}return 0}function s(t){this.w=!!(t=t||{}).useMutationObserver,this.u=t.minValue||null,t=window.__tti&&window.__tti.e;var i,o,u,a,s,c,f,r,e=window.__tti&&window.__tti.o;this.a=t?t.map(function(t){return{start:t.startTime,end:t.startTime+t.duration}}):[],e&&e.disconnect(),this.b=[],this.f=new Map,this.j=null,this.v=-1/0,this.i=!1,this.h=this.c=this.s=null,i=this.m.bind(this),o=this.l.bind(this),u=XMLHttpRequest.prototype.send,a=p++,XMLHttpRequest.prototype.send=function(t){for(var e=[],n=0;n<arguments.length;++n)e[+n]=arguments[n];var r=this;return i(a),this.addEventListener("readystatechange",function(){4===r.readyState&&o(a)}),u.apply(this,e)},s=this.m.bind(this),c=this.l.bind(this),f=fetch,fetch=function(t){for(var i=[],e=0;e<arguments.length;++e)i[+e]=arguments[e];return new Promise(function(e,n){var r=p++;s(r),f.apply(null,[].concat(d(i))).then(function(t){c(r),e(t)},function(t){c(t),n(t)})})},(r=this).c=new PerformanceObserver(function(t){for(var e,n=(t=l(t.getEntries())).next();!n.done;n=t.next())"resource"===(n=n.value).entryType&&(r.b.push({start:n.fetchStart,end:n.responseEnd}),m(r,h(r.g,r.b)+5e3)),"longtask"===n.entryType&&(e=n.startTime+n.duration,r.a.push({start:n.startTime,end:e}),m(r,e+5e3))}),r.c.observe({entryTypes:["longtask","resource"]}),this.w&&(this.h=v(this.B.bind(this)))}function c(t){t.i=!0;var e=0<t.a.length?t.a[t.a.length-1].end:0,n=h(t.g,t.b);m(t,Math.max(n+5e3,e))}function m(o,t){!o.i||o.v>t||(clearTimeout(o.j),o.j=setTimeout(function(){var t=performance.timing.navigationStart,e=h(o.g,o.b),t=(window.a&&window.a.A?1e3*window.a.A().C-t:0)||performance.timing.domContentLoadedEventEnd-t,n=o.u||(performance.timing.domContentLoadedEventEnd?(n=performance.timing).domContentLoadedEventEnd-n.navigationStart:null),r=performance.now();null===n&&m(o,Math.max(e+5e3,r+1e3));var i=o.a;(e=r-e<5e3?null:r-(e=i.length?i[i.length-1].end:t)<5e3?null:Math.max(e,n))&&(o.s(e),clearTimeout(o.j),o.i=!1,o.c&&o.c.disconnect(),o.h&&o.h.disconnect()),m(o,performance.now()+1e3)},t-performance.now()),o.v=t)}s.prototype.getFirstConsistentlyInteractive=function(){var e=this;return new Promise(function(t){e.s=t,"complete"==document.readyState?c(e):window.addEventListener("load",function(){c(e)})})},s.prototype.m=function(t){this.f.set(t,performance.now())},s.prototype.l=function(t){this.f.delete(t)},s.prototype.B=function(){m(this,performance.now()+5e3)},r.Object.defineProperties(s.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return[].concat(d(this.f.values()))}}});var f={getFirstConsistentlyInteractive:function(t){return t=t||{},"PerformanceLongTaskTiming"in window?new s(t).getFirstConsistentlyInteractive():Promise.resolve(null)}};y.exports?y.exports=f:void 0===(b=function(){return f}.apply(g,[]))||(y.exports=b)}()},function(t,e,n){"use strict";n.r(e),n.d(e,"getCLS",function(){return _}),n.d(e,"getFCP",function(){return g}),n.d(e,"getFID",function(){return x}),n.d(e,"getLCP",function(){return A}),n.d(e,"getTTFB",function(){return P});function c(t,e){return{name:t,value:void 0===e?-1:e,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(1e12+Math.floor(8999999999999*Math.random()))}}function f(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if("first-input"===t&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver(function(t){return t.getEntries().map(e)});return n.observe({type:t,buffered:!0}),n}}catch(t){}}
5634function l(e,n){function r(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||(e(t),n&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))}addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)}function d(e){addEventListener("pageshow",function(t){t.persisted&&e(t)},!0)}function p(e,n,r){var i;return function(t){0<=n.value&&(t||r)&&(n.delta=n.value-(i||0),!n.delta&&void 0!==i||(i=n.value,e(n)))}}function r(){return"hidden"===document.visibilityState?0:1/0}function i(){l(function(t){t=t.timeStamp;y=t},!0)}function s(){return y<0&&(y=r(),i(),d(function(){setTimeout(function(){y=r(),i()},0)})),{get firstHiddenTime(){return y}}}function a(t,e){v||(v=e,h=t,u=new Date,L(removeEventListener),E())}function o(t){var e,n,r,i;function o(){a(n,r),i()}function u(){i()}t.cancelable&&(e=(1e12<t.timeStamp?new Date:performance.now())-t.timeStamp,"pointerdown"==t.type?(n=e,r=t,i=function(){removeEventListener("pointerup",o,T),removeEventListener("pointercancel",u,T)},addEventListener("pointerup",o,T),addEventListener("pointercancel",u,T)):a(e,t))}var v,h,u,m,y=-1,g=function(e,n){function t(t){"first-contentful-paint"===t.name&&(a&&a.disconnect(),t.startTime<i.firstHiddenTime&&(o.value=t.startTime,o.entries.push(t),r(!0)))}var r,i=s(),o=c("FCP"),u=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],a=u?null:f("paint",t);(u||a)&&(r=p(e,o,n),u&&t(u),d(function(t){o=c("FCP"),r=p(e,o,n),requestAnimationFrame(function(){requestAnimationFrame(function(){o.value=performance.now()-t.timeStamp,r(!0)})})}))},w=!1,b=-1,_=function(e,t){w||(g(function(t){b=t.value}),w=!0);function n(t){-1<b&&e(t)}function r(t){var e,n;t.hadRecentInput||(e=a[0],n=a[a.length-1],u&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(u+=t.value,a.push(t)):(u=t.value,a=[t]),u>o.value&&(o.value=u,o.entries=a,i()))}var i,o=c("CLS",0),u=0,a=[],s=f("layout-shift",r);s&&(i=p(n,o,t),l(function(){s.takeRecords().map(r),i(!0)}),d(function(){b=-1,o=c("CLS",u=0),i=p(n,o,t)}))},T={passive:!0,capture:!0},S=new Date,E=function(){var e;0<=h&&h<u-S&&(e={entryType:"first-input",name:v.type,target:v.target,cancelable:v.cancelable,startTime:v.timeStamp,processingStart:v.timeStamp+h},m.forEach(function(t){t(e)}),m=[])},L=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,o,T)})},x=function(t,e){function n(t){t.startTime<r.firstHiddenTime&&(i.value=t.processingStart-t.startTime,i.entries.push(t),u(!0))}var r=s(),i=c("FID"),o=f("first-input",n),u=p(t,i,e);o&&l(function(){o.takeRecords().map(n),o.disconnect()},!0),o&&d(function(){i=c("FID"),u=p(t,i,e),m=[],h=-1,v=null,L(addEventListener),m.push(n),E()})},j={},A=function(e,n){function t(t){var e=t.startTime;e<o.firstHiddenTime&&(u.value=e,u.entries.push(t),r())}var r,i,o=s(),u=c("LCP"),a=f("largest-contentful-paint",t);a&&(r=p(e,u,n),i=function(){j[u.id]||(a.takeRecords().map(t),a.disconnect(),j[u.id]=!0,r(!0))},["keydown","click"].forEach(function(t){addEventListener(t,i,{once:!0,capture:!0})}),l(i,!0),d(function(t){u=c("LCP"),r=p(e,u,n),requestAnimationFrame(function(){requestAnimationFrame(function(){u.value=performance.now()-t.timeStamp,j[u.id]=!0,r(!0)})})}))},P=function(e){var n=c("TTFB"),t=function(){try{var t=performance.getEntriesByType("navigation")[0]||function(){var t,e=performance.timing,n={entryType:"navigation",startTime:0};for(t in e)"navigationStart"!==t&&"toJSON"!==t&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n}();if(n.value=n.delta=t.responseStart,n.value<0||n.value>performance.now())return;n.entries=[t],e(n)}catch(t){}};"complete"===document.readyState?setTimeout(t,0):addEventListener("load",function(){return setTimeout(t,0)})}},function(t,e,n){"use strict";e.error=void 0;n(8);var r=n(9),n=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];(0,r.getWindow)().console;return function(){}},n=(n(),function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];(0,r.getWindow)().console;return function(){}}),n=n();e.error=n},function(t,e,n){"use strict";var r=!1;e.isDebug=function(){return r}},function(t,e,n){"use strict";e.getWindow=void 0;n(10);function r(){return a.window}var i,o,u,a=(i="",u={document:o=Object.create({get cookie(){return i},set cookie(t){i=t}}
5634)},n={},"undefined"==typeof window?{window:u,document:o,navigator:n}:{window:window||u,document:window.document||o,navigator:navigator||n});e.getWindow=r},function(t,e,n){"use strict";function r(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];try{if(e(n,r))return t}catch(t){}}return t}var i="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};t.exports={cleanKeyNames:null,map:r,merge:null,parseString:null,parseValue:null,stringify:null,removeUndefined:function t(e){for(var n in e)void 0===e[n]?delete e[n]:"object"===i(e[n])&&(t(e[n]),0===Object.keys(e[n]).length&&delete e[n])}}}],r={},i.m=n,i.c=r,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1);function i(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var n,r});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.