var toolsetCommonEs;toolsetCommonEs=(()=>{var e={575:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},913:e=>{function t(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,o,r){return o&&t(e.prototype,o),r&&t(e,r),e}},8:e=>{function t(o){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(o)}e.exports=t},657:(e,t,o)=>{"use strict";o.r(t),o.d(t,{Masonry:()=>s,fontToHead:()=>a,styleToHead:()=>f});var r=o(575),n=o.n(r),i=o(913),l=o.n(i),s=function(){function e(t){var o=this;if(n()(this,e),t){this.CHROME_MAX_NUMBER_ROWS=1e3,this.CHROME_MAX_ROW_SPAN=1e3,this.root=t,this.resizeAllGridItems();var r=Array.from(this.root.querySelectorAll("img")),i=r.length,l=0;r.forEach((function(e){e.addEventListener("load",(function(){++l===i&&o.resizeAllGridItems()}))})),window.addEventListener("resize",this.resizeAllGridItems.bind(this)),window.addEventListener("load",this.resizeAllGridItems.bind(this))}}return l()(e,[{key:"resizeGridItem",value:function(e,t){var o=e.querySelector(".tb-brick__content");if(o){var r=window.getComputedStyle(this.root),n=parseInt(r.getPropertyValue("grid-row-gap")),i=Math.ceil(o.getBoundingClientRect().height+n),l=Math.ceil(i/t);e.style.gridRowEnd="span ".concat(l)}}},{key:"getMaxItemsHeight",value:function(e){return e.children.length?Array.from(e.children).reduce((function(e,t){return Math.max(e||0,(t.querySelector(".tb-brick__content")||{}).offsetHeight)})):0}},{key:"getMultiplier",value:function(e){var t=window.getComputedStyle(e).gridTemplateColumns.split(" ").length,o=Math.ceil(e.children.length/t),r=this.getMaxItemsHeight(e);if(r>this.CHROME_MAX_ROW_SPAN||o*r>this.CHROME_MAX_NUMBER_ROWS){var n=Math.floor(r*o/this.CHROME_MAX_ROW_SPAN)+1;return e.style.gridAutoRows="".concat(n,"px"),n}return e.style.gridAutoRows="1px",1}},{key:"resizeAllGridItems",value:function(){var e=this;if(this.root){var t=this.getMultiplier(this.root);Array.from(this.root.children).forEach((function(o){return e.resizeGridItem(o,t)}))}}}]),e}();function a(){var e=document.getElementsByClassName("tces-js-font-encoded"),t=e.length?e[e.length-1]:null;if(t){var o="https://fonts.googleapis.com/css?family="+window.atob(t.innerHTML).split("###").join("|");if(!document.querySelector("link[href='"+o+"']")){var r=document.createElement("link");r.href=o,r.rel="stylesheet",document.head.appendChild(r)}}for(;e[0];)e[0].parentNode.removeChild(e[0]);for(var n=document.getElementsByClassName("tces-js-font-to-head");n[0];)n[0].parentNode.removeChild(n[0])}var d=o(8),c=o.n(d);function u(e){if("object"!==c()(window.tcesData)||void 0===window.tcesData.bodyIdToSelectors||!window.tcesData.bodyIdToSelectors)return e;var t=window.tcesData.bodyIdToSelectors;if(!document.body.id||document.body.id===t)return document.body.id=t,e;var o="#"+document.body.id;return o.split(" ").length>1?e.replace("#"+t,""):e.replace("#"+t,"#"+o)}function f(){var e=document.getElementById("toolset-blocks-styling");e||(document.head.insertAdjacentHTML("beforeend",'<style id="toolset-blocks-styling"></style>'),e=document.getElementById("toolset-blocks-styling"));var t=document.getElementsByClassName("tces-js-style-encoded"),o=t.length?t[t.length-1]:null;if(e&&o){var r=e.innerHTML,n=window.atob(o.innerHTML);-1!==r.indexOf(n)||(-1!==n.indexOf(r)?e.innerHTML=u(n):e.appendChild(document.createTextNode(u(n))))}for(;t[0];)t[0].parentNode.removeChild(t[0]);for(var i=document.getElementsByClassName("tces-js-style-to-head");i[0];)i[0].parentNode.removeChild(i[0])}}},t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={exports:{}};return e[r](n,n.exports,o),n.exports}return o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o(657)})();/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function fe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}ce.fn=ce.prototype={jquery:t,constructor:ce,length:0,toArray:function(){return ae.call(this)},get:function(e){return null==e?ae.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ce.each(this,e)},map:function(n){return this.pushStack(ce.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(ce.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(ce.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:oe.sort,splice:oe.splice},ce.extend=ce.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||ce.isPlainObject(n)?n:{},i=!1,a[t]=ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ce.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==i.call(e))&&(!(t=r(e))||"function"==typeof(n=ue.call(t,"constructor")&&t.constructor)&&o.call(n)===a)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(c(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=ce.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ce.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!l.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(c(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:le}),"function"==typeof Symbol&&(ce.fn[Symbol.iterator]=oe[Symbol.iterator]),ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var pe=oe.pop,de=oe.sort,he=oe.splice,ge="[\\x20\\t\\r\\n\\f]",ve=new RegExp("^"+ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ge+"+$","g");ce.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var f=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function p(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}ce.escapeSelector=function(e){return(e+"").replace(f,p)};var ye=C,me=s;!function(){var e,b,w,o,a,T,r,C,d,i,k=me,S=ce.expando,E=0,n=0,s=W(),c=W(),u=W(),h=W(),l=function(e,t){return e===t&&(a=!0),0},f="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",p="\\["+ge+"*("+t+")(?:"+ge+"*([*^$|!~]?=)"+ge+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+ge+"*\\]",g=":("+t+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+p+")*)|.*)\\)|)",v=new RegExp(ge+"+","g"),y=new RegExp("^"+ge+"*,"+ge+"*"),m=new RegExp("^"+ge+"*([>+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="<a id='"+S+"' href='' disabled='disabled'></a><select id='"+S+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0<I(t,T,null,[e]).length},I.contains=function(e,t){return(e.ownerDocument||e)!=T&&V(e),ce.contains(e,t)},I.attr=function(e,t){(e.ownerDocument||e)!=T&&V(e);var n=b.attrHandle[t.toLowerCase()],r=n&&ue.call(b.attrHandle,t.toLowerCase())?n(e,t,!C):void 0;return void 0!==r?r:e.getAttribute(t)},I.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ce.uniqueSort=function(e){var t,n=[],r=0,i=0;if(a=!le.sortStable,o=!le.sortStable&&ae.call(e,0),de.call(e,l),a){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)he.call(e,n[r],1)}return o=null,e},ce.fn.uniqueSort=function(){return this.pushStack(ce.uniqueSort(ae.apply(this)))},(b=ce.expr={cacheLength:50,createPseudo:F,match:D,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(v," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(d,e,t,h,g){var v="nth"!==d.slice(0,3),y="last"!==d.slice(-4),m="of-type"===e;return 1===h&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u=v!==y?"nextSibling":"previousSibling",l=e.parentNode,c=m&&e.nodeName.toLowerCase(),f=!n&&!m,p=!1;if(l){if(v){while(u){o=e;while(o=o[u])if(m?fe(o,c):1===o.nodeType)return!1;s=u="only"===d&&!s&&"nextSibling"}return!0}if(s=[y?l.firstChild:l.lastChild],y&&f){p=(a=(r=(i=l[S]||(l[S]={}))[d]||[])[0]===E&&r[1])&&r[2],o=a&&l.childNodes[a];while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if(1===o.nodeType&&++p&&o===e){i[d]=[E,a,p];break}}else if(f&&(p=a=(r=(i=e[S]||(e[S]={}))[d]||[])[0]===E&&r[1]),!1===p)while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if((m?fe(o,c):1===o.nodeType)&&++p&&(f&&((i=o[S]||(o[S]={}))[d]=[E,p]),o===e))break;return(p-=g)===h||p%h==0&&0<=p/h}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||I.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?F(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=se.call(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:F(function(e){var r=[],i=[],s=ne(e.replace(ve,"$1"));return s[S]?F(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:F(function(t){return function(e){return 0<I(t,e).length}}),contains:F(function(t){return t=t.replace(O,P),function(e){return-1<(e.textContent||ce.text(e)).indexOf(t)}}),lang:F(function(n){return A.test(n||"")||I.error("unsupported lang: "+n),n=n.replace(O,P).toLowerCase(),function(e){var t;do{if(t=C?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=ie.location&&ie.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===r},focus:function(e){return e===function(){try{return T.activeElement}catch(e){}}()&&T.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:z(!1),disabled:z(!0),checked:function(e){return fe(e,"input")&&!!e.checked||fe(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)},input:function(e){return N.test(e.nodeName)},button:function(e){return fe(e,"input")&&"button"===e.type||fe(e,"button")},text:function(e){var t;return fe(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:X(function(){return[0]}),last:X(function(e,t){return[t-1]}),eq:X(function(e,t,n){return[n<0?n+t:n]}),even:X(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:X(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:X(function(e,t,n){var r;for(r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:X(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=B(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=_(e);function G(){}function Y(e,t){var n,r,i,o,a,s,u,l=c[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=y.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=m.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ve," ")}),a=a.slice(n.length)),b.filter)!(r=D[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?I.error(e):c(e,s).slice(0)}function Q(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function J(a,e,t){var s=e.dir,u=e.next,l=u||s,c=t&&"parentNode"===l,f=n++;return e.first?function(e,t,n){while(e=e[s])if(1===e.nodeType||c)return a(e,t,n);return!1}:function(e,t,n){var r,i,o=[E,f];if(n){while(e=e[s])if((1===e.nodeType||c)&&a(e,t,n))return!0}else while(e=e[s])if(1===e.nodeType||c)if(i=e[S]||(e[S]={}),u&&fe(e,u))e=e[s]||e;else{if((r=i[l])&&r[0]===E&&r[1]===f)return o[2]=r[2];if((i[l]=o)[2]=a(e,t,n))return!0}return!1}}function K(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Z(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function ee(d,h,g,v,y,e){return v&&!v[S]&&(v=ee(v)),y&&!y[S]&&(y=ee(y,e)),F(function(e,t,n,r){var i,o,a,s,u=[],l=[],c=t.length,f=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)I(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),p=!d||!e&&h?f:Z(f,u,d,n,r);if(g?g(p,s=y||(e?d:c||v)?[]:t,n,r):s=p,v){i=Z(s,l),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(s[l[o]]=!(p[l[o]]=a))}if(e){if(y||d){if(y){i=[],o=s.length;while(o--)(a=s[o])&&i.push(p[o]=a);y(null,s=[],i,r)}o=s.length;while(o--)(a=s[o])&&-1<(i=y?se.call(e,a):u[o])&&(e[i]=!(t[i]=a))}}else s=Z(s===t?s.splice(c,s.length):s),y?y(null,t,s,r):k.apply(t,s)})}function te(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=J(function(e){return e===i},a,!0),l=J(function(e){return-1<se.call(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!=w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[J(K(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return ee(1<s&&K(c),1<s&&Q(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ve,"$1"),t,s<n&&te(e.slice(s,n)),n<r&&te(e=e.slice(n)),n<r&&Q(e))}c.push(t)}return K(c)}function ne(e,t){var n,v,y,m,x,r,i=[],o=[],a=u[e+" "];if(!a){t||(t=Y(e)),n=t.length;while(n--)(a=te(t[n]))[S]?i.push(a):o.push(a);(a=u(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=E+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==T||(V(o),n=!C);while(s=v[a++])if(s(o,t||T,n)){k.call(r,o);break}i&&(E=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=pe.call(r));f=Z(f)}k.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&ce.uniqueSort(r)}return i&&(E=h,w=p),c},m?F(r):r))).selector=e}return a}function re(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&Y(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&C&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(O,P),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=D.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(O,P),H.test(o[0].type)&&U(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&Q(o)))return k.apply(n,r),n;break}}}return(l||ne(e,c))(r,t,!C,n,!t||H.test(e)&&U(t.parentNode)||t),n}G.prototype=b.filters=b.pseudos,b.setFilters=new G,le.sortStable=S.split("").sort(l).join("")===S,V(),le.sortDetached=$(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce.find=I,ce.expr[":"]=ce.expr.pseudos,ce.unique=ce.uniqueSort,I.compile=ne,I.select=re,I.setDocument=V,I.tokenize=Y,I.escape=ce.escapeSelector,I.getText=ce.text,I.isXML=ce.isXMLDoc,I.selectors=ce.expr,I.support=ce.support,I.uniqueSort=ce.uniqueSort}();var d=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&ce(e).is(n))break;r.push(e)}return r},h=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},b=ce.expr.match.needsContext,w=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1<se.call(n,e)!==r}):ce.filter(n,e,r)}ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t<r;t++)if(ce.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)ce.find(e,i[t],n);return 1<r?ce.uniqueSort(n):n},filter:function(e){return this.pushStack(T(this,e||[],!1))},not:function(e){return this.pushStack(T(this,e||[],!0))},is:function(e){return!!T(this,"string"==typeof e&&b.test(e)?ce(e):e||[],!1).length}});var k,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ce.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&ce(e);if(!b.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(ce(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return d(e,"parentNode")},parentsUntil:function(e,t,n){return d(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return d(e,"nextSibling")},prevAll:function(e){return d(e,"previousSibling")},nextUntil:function(e,t,n){return d(e,"nextSibling",n)},prevUntil:function(e,t,n){return d(e,"previousSibling",n)},siblings:function(e){return h((e.parentNode||{}).firstChild,e)},children:function(e){return h(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(fe(e,"template")&&(e=e.content||e),ce.merge([],e.childNodes))}},function(r,i){ce.fn[r]=function(e,t){var n=ce.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=ce.filter(t,n)),1<this.length&&(j[r]||ce.uniqueSort(n),E.test(r)&&n.reverse()),this.pushStack(n)}});var D=/[^\x20\t\r\n\f]+/g;function N(e){return e}function q(e){throw e}function L(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}ce.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},ce.each(e.match(D)||[],function(e,t){n[t]=!0}),n):ce.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){ce.each(e,function(e,t){v(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==x(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return ce.each(arguments,function(e,t){var n;while(-1<(n=ce.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<ce.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},ce.extend({Deferred:function(e){var o=[["notify","progress",ce.Callbacks("memory"),ce.Callbacks("memory"),2],["resolve","done",ce.Callbacks("once memory"),ce.Callbacks("once memory"),0,"resolved"],["reject","fail",ce.Callbacks("once memory"),ce.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return ce.Deferred(function(r){ce.each(o,function(e,t){var n=v(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&v(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,v(t)?s?t.call(e,l(u,o,N,s),l(u,o,q,s)):(u++,t.call(e,l(u,o,N,s),l(u,o,q,s),l(u,o,N,o.notifyWith))):(a!==N&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){ce.Deferred.exceptionHook&&ce.Deferred.exceptionHook(e,t.error),u<=i+1&&(a!==q&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(ce.Deferred.getErrorHook?t.error=ce.Deferred.getErrorHook():ce.Deferred.getStackHook&&(t.error=ce.Deferred.getStackHook()),ie.setTimeout(t))}}return ce.Deferred(function(e){o[0][3].add(l(0,e,v(r)?r:N,e.notifyWith)),o[1][3].add(l(0,e,v(t)?t:N)),o[2][3].add(l(0,e,v(n)?n:q))}).promise()},promise:function(e){return null!=e?ce.extend(e,a):a}},s={};return ce.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=ae.call(arguments),o=ce.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?ae.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(L(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||v(i[t]&&i[t].then)))return o.then();while(t--)L(i[t],a(t),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ce.Deferred.exceptionHook=function(e,t){ie.console&&ie.console.warn&&e&&H.test(e.name)&&ie.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},ce.readyException=function(e){ie.setTimeout(function(){throw e})};var O=ce.Deferred();function P(){C.removeEventListener("DOMContentLoaded",P),ie.removeEventListener("load",P),ce.ready()}ce.fn.ready=function(e){return O.then(e)["catch"](function(e){ce.readyException(e)}),this},ce.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--ce.readyWait:ce.isReady)||(ce.isReady=!0)!==e&&0<--ce.readyWait||O.resolveWith(C,[ce])}}),ce.ready.then=O.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?ie.setTimeout(ce.ready):(C.addEventListener("DOMContentLoaded",P),ie.addEventListener("load",P));var M=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n))for(s in i=!0,n)M(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ce(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},R=/^-ms-/,I=/-([a-z])/g;function W(e,t){return t.toUpperCase()}function F(e){return e.replace(R,"ms-").replace(I,W)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function B(){this.expando=ce.expando+B.uid++}B.uid=1,B.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[F(t)]=n;else for(r in t)i[F(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][F(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(F):(t=F(t))in r?[t]:t.match(D)||[]).length;while(n--)delete r[t[n]]}(void 0===t||ce.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ce.isEmptyObject(t)}};var _=new B,z=new B,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function V(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}z.set(e,t,n)}else n=void 0;return n}ce.extend({hasData:function(e){return z.hasData(e)||_.hasData(e)},data:function(e,t,n){return z.access(e,t,n)},removeData:function(e,t){z.remove(e,t)},_data:function(e,t,n){return _.access(e,t,n)},_removeData:function(e,t){_.remove(e,t)}}),ce.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=z.get(o),1===o.nodeType&&!_.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=F(r.slice(5)),V(o,r,i[r]));_.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){z.set(this,n)}):M(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=z.get(o,n))?t:void 0!==(t=V(o,n))?t:void 0;this.each(function(){z.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){z.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=_.get(e,t),n&&(!r||Array.isArray(n)?r=_.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){ce.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return _.get(e,n)||_.access(e,n,{empty:ce.Callbacks("once memory").add(function(){_.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?ce.queue(this[0],t):void 0===n?this:this.each(function(){var e=ce.queue(this,t,n);ce._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&ce.dequeue(this,t)})},dequeue:function(e){return this.each(function(){ce.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ce.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=_.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Y=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),Q=["Top","Right","Bottom","Left"],J=C.documentElement,K=function(e){return ce.contains(e.ownerDocument,e)},Z={composed:!0};J.getRootNode&&(K=function(e){return ce.contains(e.ownerDocument,e)||e.getRootNode(Z)===e.ownerDocument});var ee=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&K(e)&&"none"===ce.css(e,"display")};function te(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},u=s(),l=n&&n[3]||(ce.cssNumber[t]?"":"px"),c=e.nodeType&&(ce.cssNumber[t]||"px"!==l&&+u)&&Y.exec(ce.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)ce.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,ce.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ne={};function re(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=_.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ee(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ne[s])||(o=a.body.appendChild(a.createElement(s)),u=ce.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ne[s]=u)))):"none"!==n&&(l[c]="none",_.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}ce.fn.extend({show:function(){return re(this,!0)},hide:function(){return re(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ee(this)?ce(this).show():ce(this).hide()})}});var xe,be,we=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",le.option=!!xe.lastChild;var ke={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n<r;n++)_.set(e[n],"globalEval",!t||_.get(t[n],"globalEval"))}ke.tbody=ke.tfoot=ke.colgroup=ke.caption=ke.thead,ke.th=ke.td,le.option||(ke.optgroup=ke.option=[1,"<select multiple='multiple'>","</select>"]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))ce.merge(p,o.nodeType?[o]:o);else if(je.test(o)){a=a||f.appendChild(t.createElement("div")),s=(Te.exec(o)||["",""])[1].toLowerCase(),u=ke[s]||ke._default,a.innerHTML=u[1]+ce.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;ce.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<ce.inArray(o,r))i&&i.push(o);else if(l=K(o),a=Se(f.appendChild(o),"script"),l&&Ee(a),n){c=0;while(o=a[c++])Ce.test(o.type||"")&&n.push(o)}return f}var De=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function qe(){return!1}function Le(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Le(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=qe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return ce().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function He(e,r,t){t?(_.set(e,r,!1),ce.event.add(e,r,{namespace:!1,handler:function(e){var t,n=_.get(this,r);if(1&e.isTrigger&&this[r]){if(n)(ce.event.special[r]||{}).delegateType&&e.stopPropagation();else if(n=ae.call(arguments),_.set(this,r,n),this[r](),t=_.get(this,r),_.set(this,r,!1),n!==t)return e.stopImmediatePropagation(),e.preventDefault(),t}else n&&(_.set(this,r,ce.event.trigger(n[0],n.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ne)}})):void 0===_.get(e,r)&&ce.event.add(e,r,Ne)}ce.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.get(t);if($(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&ce.find.matchesSelector(J,i),n.guid||(n.guid=ce.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof ce&&ce.event.triggered!==e.type?ce.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(D)||[""]).length;while(l--)d=g=(s=De.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=ce.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=ce.event.special[d]||{},c=ce.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ce.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),ce.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.hasData(e)&&_.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(D)||[""]).length;while(l--)if(d=g=(s=De.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=ce.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||ce.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)ce.event.remove(e,d+t[l],n,r,!0);ce.isEmptyObject(u)&&_.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=ce.event.fix(e),l=(_.get(this,"events")||Object.create(null))[u.type]||[],c=ce.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=ce.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((ce.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<ce(i,this).index(l):ce.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(ce.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[ce.expando]?e:new ce.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click",!0),!1},trigger:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click"),!0},_default:function(e){var t=e.target;return we.test(t.type)&&t.click&&fe(t,"input")&&_.get(t,"click")||fe(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ce.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ce.Event=function(e,t){if(!(this instanceof ce.Event))return new ce.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ne:qe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&ce.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[ce.expando]=!0},ce.Event.prototype={constructor:ce.Event,isDefaultPrevented:qe,isPropagationStopped:qe,isImmediatePropagationStopped:qe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ne,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ne,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ne,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ce.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},ce.event.addProp),ce.each({focus:"focusin",blur:"focusout"},function(r,i){function o(e){if(C.documentMode){var t=_.get(this,"handle"),n=ce.event.fix(e);n.type="focusin"===e.type?"focus":"blur",n.isSimulated=!0,t(e),n.target===n.currentTarget&&t(n)}else ce.event.simulate(i,e.target,ce.event.fix(e))}ce.event.special[r]={setup:function(){var e;if(He(this,r,!0),!C.documentMode)return!1;(e=_.get(this,i))||this.addEventListener(i,o),_.set(this,i,(e||0)+1)},trigger:function(){return He(this,r),!0},teardown:function(){var e;if(!C.documentMode)return!1;(e=_.get(this,i)-1)?_.set(this,i,e):(this.removeEventListener(i,o),_.remove(this,i))},_default:function(e){return _.get(e.target,r)},delegateType:i},ce.event.special[i]={setup:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i);n||(C.documentMode?this.addEventListener(i,o):e.addEventListener(r,o,!0)),_.set(t,i,(n||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i)-1;n?_.set(t,i,n):(C.documentMode?this.removeEventListener(i,o):e.removeEventListener(r,o,!0),_.remove(t,i))}}}),ce.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){ce.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||ce.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),ce.fn.extend({on:function(e,t,n,r){return Le(this,e,t,n,r)},one:function(e,t,n,r){return Le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ce(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=qe),this.each(function(){ce.event.remove(this,e,n,t)})}});var Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)ce.event.add(t,i,s[i][n]);z.hasData(e)&&(o=z.access(e),a=ce.extend({},o),z.set(t,a))}}function $e(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=v(d);if(h||1<f&&"string"==typeof d&&!le.checkClone&&Pe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),$e(t,r,i,o)});if(f&&(t=(e=Ae(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=ce.map(Se(e,"script"),Ie)).length;c<f;c++)u=e,c!==p&&(u=ce.clone(u,!0,!0),s&&ce.merge(a,Se(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,ce.map(a,We),c=0;c<s;c++)u=a[c],Ce.test(u.type||"")&&!_.access(u,"globalEval")&&ce.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?ce._evalUrl&&!u.noModule&&ce._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):m(u.textContent.replace(Me,""),u,l))}return n}function Be(e,t,n){for(var r,i=t?ce.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ce.cleanData(Se(r)),r.parentNode&&(n&&K(r)&&Ee(Se(r,"script")),r.parentNode.removeChild(r));return e}ce.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=K(e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(a=Se(c),r=0,i=(o=Se(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&we.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||Se(e),a=a||Se(c),r=0,i=o.length;r<i;r++)Fe(o[r],a[r]);else Fe(e,c);return 0<(a=Se(c,"script")).length&&Ee(a,!f&&Se(e,"script")),c},cleanData:function(e){for(var t,n,r,i=ce.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[_.expando]){if(t.events)for(r in t.events)i[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[_.expando]=void 0}n[z.expando]&&(n[z.expando]=void 0)}}}),ce.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return M(this,function(e){return void 0===e?ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return $e(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Re(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(Se(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return M(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!ke[(Te.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(ce.cleanData(Se(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return $e(this,arguments,function(e){var t=this.parentNode;ce.inArray(this,n)<0&&(ce.cleanData(Se(this)),t&&t.replaceChild(e,this))},n)}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){ce.fn[e]=function(e){for(var t,n=[],r=ce(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),ce(r[o])[a](t),s.apply(n,t.get());return this.pushStack(n)}});var _e=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),ze=/^--/,Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=ie),t.getComputedStyle(e)},Ue=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ve=new RegExp(Q.join("|"),"i");function Ge(e,t,n){var r,i,o,a,s=ze.test(t),u=e.style;return(n=n||Xe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(ve,"$1")||void 0),""!==a||K(e)||(a=ce.style(e,t)),!le.pixelBoxStyles()&&_e.test(a)&&Ve.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",J.appendChild(u).appendChild(l);var e=ie.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),J.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=C.createElement("div"),l=C.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",le.clearCloneStyle="content-box"===l.style.backgroundClip,ce.extend(le,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=C.createElement("table"),t=C.createElement("tr"),n=C.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",J.appendChild(e).appendChild(t).appendChild(n),r=ie.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,J.removeChild(e)),a}}))}();var Qe=["Webkit","Moz","ms"],Je=C.createElement("div").style,Ke={};function Ze(e){var t=ce.cssProps[e]||Ke[e];return t||(e in Je?e:Ke[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;while(n--)if((e=Qe[n]+t)in Je)return e}(e)||e)}var et=/^(none|table(?!-c[ea]).+)/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var r=Y.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function it(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=ce.css(e,n+Q[a],!0,i)),r?("content"===n&&(u-=ce.css(e,"padding"+Q[a],!0,i)),"margin"!==n&&(u-=ce.css(e,"border"+Q[a]+"Width",!0,i))):(u+=ce.css(e,"padding"+Q[a],!0,i),"padding"!==n?u+=ce.css(e,"border"+Q[a]+"Width",!0,i):s+=ce.css(e,"border"+Q[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function ot(e,t,n){var r=Xe(e),i=(!le.boxSizingReliable()||n)&&"border-box"===ce.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(_e.test(a)){if(!n)return a;a="auto"}return(!le.boxSizingReliable()&&i||!le.reliableTrDimensions()&&fe(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===ce.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===ce.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!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,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=F(t),u=ze.test(t),l=e.style;if(u||(t=Ze(s)),a=ce.cssHooks[t]||ce.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=Y.exec(n))&&i[1]&&(n=te(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(ce.cssNumber[s]?"":"px")),le.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=F(t);return ze.test(t)||(t=Ze(s)),(a=ce.cssHooks[t]||ce.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),ce.each(["height","width"],function(e,u){ce.cssHooks[u]={get:function(e,t,n){if(t)return!et.test(ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,u,n):Ue(e,tt,function(){return ot(e,u,n)})},set:function(e,t,n){var r,i=Xe(e),o=!le.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===ce.css(e,"boxSizing",!1,i),s=n?it(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-it(e,u,"border",!1,i)-.5)),s&&(r=Y.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=ce.css(e,u)),rt(0,t,s)}}}),ce.cssHooks.marginLeft=Ye(le.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ce.each({margin:"",padding:"",border:"Width"},function(i,o){ce.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+Q[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(ce.cssHooks[i+o].set=rt)}),ce.fn.extend({css:function(e,t){return M(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=ce.css(e,t[a],!1,r);return o}return void 0!==n?ce.style(e,t,n):ce.css(e,t)},e,t,1<arguments.length)}}),((ce.Tween=at).prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}}).init.prototype=at.prototype,(at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||!ce.cssHooks[e.prop]&&null==e.elem.style[Ze(e.prop)]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=at.prototype.init,ce.fx.step={};var st,ut,lt,ct,ft=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function dt(){ut&&(!1===C.hidden&&ie.requestAnimationFrame?ie.requestAnimationFrame(dt):ie.setTimeout(dt,ce.fx.interval),ce.fx.tick())}function ht(){return ie.setTimeout(function(){st=void 0}),st=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=Q[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function vt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(o,e,t){var n,a,r=0,i=yt.prefilters.length,s=ce.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=st||ht(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:ce.extend({},e),opts:ce.extend(!0,{specialEasing:{},easing:ce.easing._default},t),originalProperties:e,originalOptions:t,startTime:st||ht(),duration:t.duration,tweens:[],createTween:function(e,t){var n=ce.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=F(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=ce.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=yt.prefilters[r].call(l,o,c,l.opts))return v(n.stop)&&(ce._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return ce.map(c,vt,l),v(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),ce.fx.timer(ce.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}ce.Animation=ce.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return te(n.elem,e,Y.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(D);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ee(e),v=_.get(e,"fxshow");for(r in n.queue||(null==(a=ce._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,ce.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ft.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||ce.style(e,r)}if((u=!ce.isEmptyObject(t))||!ce.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=_.get(e,"display")),"none"===(c=ce.css(e,"display"))&&(l?c=l:(re([e],!0),l=e.style.display||l,c=ce.css(e,"display"),re([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===ce.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=_.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&re([e],!0),p.done(function(){for(r in g||re([e]),_.remove(e,"fxshow"),d)ce.style(e,r,d[r])})),u=vt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),ce.speed=function(e,t,n){var r=e&&"object"==typeof e?ce.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return ce.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in ce.fx.speeds?r.duration=ce.fx.speeds[r.duration]:r.duration=ce.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&ce.dequeue(this,r.queue)},r},ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ee).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=ce.isEmptyObject(t),o=ce.speed(e,n,r),a=function(){var e=yt(this,ce.extend({},t),o);(i||_.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=ce.timers,r=_.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&pt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||ce.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=_.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=ce.timers,o=n?n.length:0;for(t.finish=!0,ce.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),ce.each(["toggle","show","hide"],function(e,r){var i=ce.fn[r];ce.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(gt(r,!0),e,t,n)}}),ce.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){ce.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),ce.timers=[],ce.fx.tick=function(){var e,t=0,n=ce.timers;for(st=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||ce.fx.stop(),st=void 0},ce.fx.timer=function(e){ce.timers.push(e),ce.fx.start()},ce.fx.interval=13,ce.fx.start=function(){ut||(ut=!0,dt())},ce.fx.stop=function(){ut=null},ce.fx.speeds={slow:600,fast:200,_default:400},ce.fn.delay=function(r,e){return r=ce.fx&&ce.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=ie.setTimeout(e,r);t.stop=function(){ie.clearTimeout(n)}})},lt=C.createElement("input"),ct=C.createElement("select").appendChild(C.createElement("option")),lt.type="checkbox",le.checkOn=""!==lt.value,le.optSelected=ct.selected,(lt=C.createElement("input")).value="t",lt.type="radio",le.radioValue="t"===lt.value;var mt,xt=ce.expr.attrHandle;ce.fn.extend({attr:function(e,t){return M(this,ce.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===o&&ce.isXMLDoc(e)||(i=ce.attrHooks[t.toLowerCase()]||(ce.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=ce.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&fe(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(D);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var a=xt[t]||ce.find.attr;xt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=xt[o],xt[o]=r,r=null!=a(e,t,n)?o:null,xt[o]=i),r}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;function Tt(e){return(e.match(D)||[]).join(" ")}function Ct(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(D)||[]}ce.fn.extend({prop:function(e,t){return M(this,ce.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,i=ce.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),le.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.fn.extend({addClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).addClass(t.call(this,e,Ct(this)))}):(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).removeClass(t.call(this,e,Ct(this)))}):arguments.length?(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return v(t)?this.each(function(e){ce(this).toggleClass(t.call(this,e,Ct(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=kt(t),this.each(function(){if(s)for(o=ce(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=Ct(this))&&_.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":_.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+Tt(Ct(n))+" ").indexOf(t))return!0;return!1}});var St=/\r/g;ce.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=v(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,ce(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=ce.map(t,function(e){return null==e?"":e+""})),(r=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=ce.valHooks[t.type]||ce.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:Tt(ce.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!fe(n.parentNode,"optgroup"))){if(t=ce(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=ce.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<ce.inArray(ce.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<ce.inArray(ce(e).val(),t)}},le.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=ie.location,jt={guid:Date.now()},At=/\?/;ce.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new ie.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||ce.error("Invalid XML: "+(n?ce.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Dt=/^(?:focusinfocus|focusoutblur)$/,Nt=function(e){e.stopPropagation()};ce.extend(ce.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||C],d=ue.call(e,"type")?e.type:e,h=ue.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!Dt.test(d+ce.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[ce.expando]?e:new ce.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:ce.makeArray(t,[e]),c=ce.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!y(n)){for(s=c.delegateType||d,Dt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||C)&&p.push(a.defaultView||a.parentWindow||ie)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(_.get(o,"events")||Object.create(null))[e.type]&&_.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&$(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!$(n)||u&&v(n[d])&&!y(n)&&((a=n[u])&&(n[u]=null),ce.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Nt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Nt),ce.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t)}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}});var qt=/\[\]$/,Lt=/\r?\n/g,Ht=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;function Pt(n,e,r,i){var t;if(Array.isArray(e))ce.each(e,function(e,t){r||qt.test(n)?i(n,t):Pt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==x(e))i(n,e);else for(t in e)Pt(n+"["+t+"]",e[t],r,i)}ce.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){i(this.name,this.value)});else for(n in e)Pt(n,e[n],t,i);return r.join("&")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Ot.test(this.nodeName)&&!Ht.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:Array.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,$t=/^\/\//,Bt={},_t={},zt="*/".concat("*"),Xt=C.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(D)||[];if(v(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,ce.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ce.extend(!0,e,r),e}Xt.href=Et.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,ce.ajaxSettings),t):Gt(ce.ajaxSettings,e)},ajaxPrefilter:Ut(Bt),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=ce.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?ce(y):ce.event,x=ce.Deferred(),b=ce.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Wt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace($t,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(D)||[""],null==v.crossDomain){r=C.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=ce.param(v.data,v.traditional)),Vt(Bt,v,t,T),h)return T;for(i in(g=ce.event&&v.global)&&0==ce.active++&&ce.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ft.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(At.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(At.test(f)?"&":"?")+"_="+jt.guid+++o),v.url=f+o),v.ifModified&&(ce.lastModified[f]&&T.setRequestHeader("If-Modified-Since",ce.lastModified[f]),ce.etag[f]&&T.setRequestHeader("If-None-Match",ce.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=ie.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&ie.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<ce.inArray("script",v.dataTypes)&&ce.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(ce.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(ce.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--ce.active||ce.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,i){ce[i]=function(e,t,n,r){return v(t)&&(r=r||n,n=t,t=void 0),ce.ajax(ce.extend({url:e,type:i,dataType:r,data:t,success:n},ce.isPlainObject(e)&&e))}}),ce.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),ce._evalUrl=function(e,t,n){return ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){ce.globalEval(e,t,n)}})},ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return v(n)?this.each(function(e){ce(this).wrapInner(n.call(this,e))}):this.each(function(){var e=ce(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=v(t);return this.each(function(e){ce(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ce(this).replaceWith(this.childNodes)}),this}}),ce.expr.pseudos.hidden=function(e){return!ce.expr.pseudos.visible(e)},ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ce.ajaxSettings.xhr=function(){try{return new ie.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=ce.ajaxSettings.xhr();le.cors=!!Qt&&"withCredentials"in Qt,le.ajax=Qt=!!Qt,ce.ajaxTransport(function(i){var o,a;if(le.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&ie.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=ce("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Tt(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&ce.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?ce("<div>").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.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,n){ce.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;ce.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=ae.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(ae.call(arguments)))}).guid=e.guid=e.guid||ce.guid++,i},ce.holdReady=function(e){e?ce.readyWait++:ce.ready(!0)},ce.isArray=Array.isArray,ce.parseJSON=JSON.parse,ce.nodeName=fe,ce.isFunction=v,ce.isWindow=y,ce.camelCase=F,ce.type=x,ce.now=Date.now,ce.isNumeric=function(e){var t=ce.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},ce.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce});var tn=ie.jQuery,nn=ie.$;return ce.noConflict=function(e){return ie.$===ce&&(ie.$=nn),e&&ie.jQuery===ce&&(ie.jQuery=tn),ce},"undefined"==typeof e&&(ie.jQuery=ie.$=ce),ce});jQuery.noConflict();/*! jQuery Migrate v3.4.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
"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},"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={},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});(function($){'use strict'})(jQuery);localStorage.removeItem('wp_cta_impressions');function wp_cta_record_impressions(ctas,page_id){jQuery.ajax({type:'POST',url:cta_variation.admin_url,data:{action:'wp_cta_record_impressions',cta_impressions:ctas,page_id:page_id,},success:function(user_id){_inbound.deBugger('cta','CTA Impressions Recorded')},error:function(MLHttpRequest,textStatus,errorThrown){}})}
function wp_cta_add_tracking_classes(ctas){jQuery.each(ctas,function(cta_id,vid){var vid=ctas[cta_id];jQuery('.wp_cta_'+cta_id+'_variation_'+vid).show();var wp_cta_id='<input type="hidden" name="wp_cta_id" value="'+cta_id+'">';var wp_cta_vid='<input type="hidden" name="wp_cta_vid" value="'+vid+'">';jQuery('#wp_cta_'+cta_id+'_variation_'+vid+' form').each(function(){jQuery(this).addClass('wpl-track-me');jQuery(this).append(wp_cta_id);jQuery(this).append(wp_cta_vid)});var lead_cpt_id=_inbound.Utils.readCookie("wp_lead_id");var lead_email=_inbound.Utils.readCookie("wp_lead_email");var lead_unique_key=_inbound.Utils.readCookie("wp_lead_uid");if(typeof(lead_cpt_id)!="undefined"&&lead_cpt_id!==null){string="&wpl_id="+lead_cpt_id+"&l_type=wplid"}else if(typeof(lead_email)!="undefined"&&lead_email!==null&&lead_email!==""){string="&wpl_id="+lead_email+"&l_type=wplemail"}else if(typeof(lead_unique_key)!="undefined"&&lead_unique_key!==null&&lead_unique_key!==""){string="&wpl_id="+lead_unique_key+"&l_type=wpluid"}else{string=""}})}
function wp_cta_load_variation(cta_id,vid){var loaded_ctas=_inbound.totalStorage('wp_cta_loaded');if(loaded_ctas===null){var loaded_ctas={}}
var cta_impressions=_inbound.totalStorage('wp_cta_impressions');if(cta_impressions===null){var cta_impressions={}}
if(typeof vid!='undefined'&&vid!=null&&vid!=''){_inbound.debug('CTA '+cta_id+' loads variation:'+vid);jQuery('.wp_cta_'+cta_id+'_variation_'+vid).show();loaded_ctas[cta_id]=vid;cta_impressions[cta_id]=vid;_inbound.totalStorage('wp_cta_loaded',loaded_ctas);_inbound.totalStorage('wp_cta_impressions',cta_impressions);wp_cta_add_tracking_classes(loaded_ctas)}else if(parseInt(cta_variation.split_testing)==0){loaded_ctas[cta_id]=0;cta_impressions[cta_id]=0;_inbound.totalStorage('wp_cta_loaded',loaded_ctas);_inbound.totalStorage('wp_cta_impressions',cta_impressions);_inbound.deBugger('WP CTA Load Object Updated:'+JSON.stringify(loaded_ctas))}else if((cta_id in loaded_ctas)&&parseInt(cta_variation.sticky_cta)==1){cta_impressions[cta_id]=loaded_ctas[cta_id];_inbound.totalStorage('wp_cta_impressions',cta_impressions)}else{jQuery.ajax({type:"POST",url:cta_variation.admin_url,dataType:"html",async:!1,data:{'action':'cta_get_variation','cta_id':cta_id,'fast_ajax':!0,'load_plugins':["inbound-pro/inbound-pro.php","_inbound-now/inbound-pro.php","cta/calls-to-action.php"]},success:function(vid){loaded_ctas[cta_id]=vid.trim();_inbound.totalStorage('wp_cta_loaded',loaded_ctas);_inbound.totalStorage('wp_cta_impressions',loaded_ctas);_inbound.deBugger('cta','WP CTA Load Object Updated:'+JSON.stringify(loaded_ctas))}})}}
jQuery(document).ready(function($){var timeout=500;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){timeout=500}
if(cta_variation.cta_id>0){wp_cta_load_variation(cta_variation.cta_id,null)}
setTimeout(function(){var ctas=_inbound.totalStorage('wp_cta_loaded');if(ctas===null||ctas==="undefined"){return!1}
wp_cta_add_tracking_classes(ctas);if(cta_variation.page_tracking=='off'&&inbound_settings.post_type!='landing-page'){wp_cta_record_impressions(ctas,inbound_settings.post_id)}},timeout)});/*! Inbound Analyticsv1.0.0 | (c) 2018 Inbound Now | https://github.com/inboundnow/cta */
function inboundFormNoRedirect(){if(null==window.frames.frameElement)e=document.querySelectorAll("button.inbound-button-submit[disabled]")[0];else if("iframe"==window.frames.frameElement.tagName.toLowerCase())var e=window.frames.frameElement.contentWindow.document.querySelectorAll("button.inbound-button-submit")[0];if(void 0!==e){var t=e.form,n=t.querySelectorAll('input[value][type="hidden"][name="inbound_furl"]:not([value=""])');0!=n.length&&"IA=="!=n[0].value||(t.action="javascript:void(0)")}}function inboundFormNoRedirectContent(){if(null==window.frames.frameElement)e=document.querySelectorAll("button.inbound-button-submit[disabled]")[0];else if("iframe"==window.frames.frameElement.tagName.toLowerCase())var e=window.frames.frameElement.contentWindow.document.querySelectorAll("button.inbound-button-submit")[0];if(void 0!==e){var t=e.form.querySelectorAll('input[value][type="hidden"][name="inbound_furl"]:not([value=""])'),n=jQuery(e).css("background"),o=jQuery(e).css("color"),i=jQuery(e).css("height"),a=e.getElementsByClassName("inbound-form-spinner");0!=t.length&&"IA=="!=t[0].value||(jQuery(a).remove(),jQuery(e).prepend('<div id="redir-check"><i class="fa fa-check-square" aria-hidden="true" style="background='+n+"; color="+o+"; font-size:calc("+i+' * .42);"></i></div>'))}}var inbound_data=inbound_data||{},_inboundOptions=_inboundOptions||{},_gaq=_gaq||[],_inbound=function(e){var t={timeout:inbound_settings.is_admin?500:1e4,formAutoTracking:!0,formAutoPopulation:!0},n={init:function(){_inbound.Utils.init(),_inbound.Utils.domReady(window,function(){_inbound.DomLoaded()})},DomLoaded:function(){_inbound.PageTracking.init(),_inbound.Forms.init(),_inbound.Utils.setUrlParams(),_inbound.LeadsAPI.init(),setTimeout(function(){_inbound.Forms.init()},2e3),_inbound.trigger("analytics_ready")},extend:function(e,t){var n,o={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(o[n]=t[n]);return o},debug:function(e,t){},deBugger:function(e,t,n){if(console){var o,i,a,r=document.location.hash?document.location.hash:"",s=r.indexOf("#debug")>-1,t=t||!1;r&&r.match(/debug/)&&(a=(r=r.split("-"))[1]),i="true"===_inbound.Utils.readCookie("inbound_debug"),((o="true"===_inbound.Utils.readCookie("inbound_debug_"+e))||s||i)&&(t&&"string"==typeof t&&(i||"all"===a?console.log('logAll "'+e+'"  =>',t):o?console.log('log "'+e+'" =>',t):e===a&&console.log('#log "'+e+'" =>',t)),n&&n instanceof Function&&n())}}},o=n.extend(t,e);return n.Settings=o||{},n}(_inboundOptions),_inboundHooks=function(e){return e.hooks=new function(){function e(e,t,n,o){if(a[e][t])if(n){var i,r=a[e][t];if(o)for(i=r.length;i--;){var s=r[i];s.callback===n&&s.context===o&&r.splice(i,1)}else for(i=r.length;i--;)r[i].callback===n&&r.splice(i,1)}else a[e][t]=[]}function t(e,t,o,i,r){var s={callback:o,priority:i,context:r},l=a[e][t];l?(l.push(s),l=n(l)):l=[s],a[e][t]=l}function n(e){for(var t,n,o,i=1,a=e.length;i<a;i++){for(t=e[i],n=i;(o=e[n-1])&&o.priority>t.priority;)e[n]=e[n-1],--n;e[n]=t}return e}function o(e,t,n){var o=a[e][t];if(!o)return"filters"===e&&n[0];var i=0,r=o.length;if("filters"===e)for(;i<r;i++)n[0]=o[i].callback.apply(o[i].context,n);else for(;i<r;i++)o[i].callback.apply(o[i].context,n);return"filters"!==e||n[0]}var i={removeFilter:function(t,n){return"string"==typeof t&&e("filters",t,n),i},applyFilters:function(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t?o("filters",t,e):i},addFilter:function(e,n,o,a){return"string"==typeof e&&"function"==typeof n&&t("filters",e,n,o=parseInt(o||10,10)),i},removeAction:function(t,n){return"string"==typeof t&&e("actions",t,n),i},doAction:function(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t&&o("actions",t,e),i},addAction:function(e,n,o,a){return"string"==typeof e&&"function"==typeof n&&t("actions",e,n,o=parseInt(o||10,10),a),i}},a={actions:{},filters:{}};return i},e.add_action=function(){var t=arguments[0].split(" ");for(k in t)arguments[0]="inbound."+t[k],e.hooks.addAction.apply(this,arguments);return this},e.remove_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeAction.apply(this,arguments),this},e.do_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.doAction.apply(this,arguments),this},e.add_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.addFilter.apply(this,arguments),this},e.remove_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeFilter.apply(this,arguments),this},e.apply_filters=function(){return arguments[0]="inbound."+arguments[0],e.hooks.applyFilters.apply(this,arguments)},e}(_inbound||{}),_inboundUtils=function(e){var t,n=window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,o=(Object.prototype.toString,{api_host:("https:"==location.protocol?"https://":"http://")+location.hostname+location.pathname.replace(/\/$/,""),track_pageview:!0,track_links_timeout:300,cookie_name:"_sp",cookie_expiration:365,cookie_domain:(host=location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}$/i))?host[0]:""});return e.Utils={init:function(){this.polyFills(),this.checkLocalStorage(),this.SetUID(),this.storeReferralData()},polyFills:function(){window.console||(window.console={});for(var e=["log","info","warn","error","debug","trace","dir","group","groupCollapsed","groupEnd","time","timeEnd","profile","profileEnd","dirxml","assert","count","markTimeline","timeStamp","clear"],t=0;t<e.length;t++)window.console[e[t]]||(window.console[e[t]]=function(){});Date.prototype.toISOString||function(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}();try{new CustomEvent("?")}catch(e){this.CustomEvent=function(e,t){function n(t,n,o,i){this["init"+e](t,n,o,i),"detail"in this||(this.detail=i)}return function(o,i){var a=document.createEvent(e);return null!==o?n.call(a,o,(i||(i=t)).bubbles,i.cancelable,i.detail):a.initCustomEvent=n,a}}(this.CustomEvent?"CustomEvent":"Event",{bubbles:!1,cancelable:!1,detail:null})}document.querySelectorAll||(document.querySelectorAll=function(e){var t,n=document.createElement("style"),o=[];for(document.documentElement.firstChild.appendChild(n),document._qsa=[],n.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),n.parentNode.removeChild(n);document._qsa.length;)(t=document._qsa.shift()).style.removeAttribute("x-qsa"),o.push(t);return document._qsa=null,o}),document.querySelector||(document.querySelector=function(e){var t=document.querySelectorAll(e);return t.length?t[0]:null}),!("innerText"in document.createElement("a"))&&"getSelection"in window&&HTMLElement.prototype.__defineGetter__("innerText",function(){for(var e,t=window.getSelection(),n=[],o=0;o<t.rangeCount;o++)n[o]=t.getRangeAt(o);t.removeAllRanges(),t.selectAllChildren(this),e=t.toString(),t.removeAllRanges();for(o=0;o<n.length;o++)t.addRange(n[o]);return e})},createCookie:function(e,t,n){var o="";if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),o="; expires="+i.toGMTString()}document.cookie=e+"="+t+o+"; path=/"},readCookie:function(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var i=n[o];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},eraseCookie:function(e){this.createCookie(e,"",-1)},getAllCookies:function(){var t={};if(document.cookie&&""!==document.cookie)for(var n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o].split("=");i[0]=i[0].replace(/^ /,""),t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e.totalStorage("inbound_cookies",t),t},setUrlParams:function(){var n={};!function(){for(var e,t=function(e){return decodeURIComponent(e).replace(/\+/g," ")},o=window.location.search.substring(1),i=/([^&=]+)=?([^&]*)/g;e=i.exec(o);)if("-1"==e[1].indexOf("["))n[t(e[1])]=t(e[2]);else{var a=e[1].indexOf("["),r=e[1].slice(a+1,e[1].indexOf("]",a)),s=t(e[1].slice(0,a));"object"!=typeof n[s]&&(n[t(s)]={},n[t(s)].length=0),r?n[t(s)][t(r)]=t(e[2]):Array.prototype.push.call(n[t(s)],t(e[2]))}}();for(var o in n)if("action"!=o)if("object"==typeof n[o])for(var i in n[o])this.createCookie(i,n[o][i],30);else this.createCookie(o,n[o],30);if(t){var a=e.totalStorage("inbound_url_params")||{},r=this.mergeObjs(a,n);e.totalStorage("inbound_url_params",r)}var s={option1:"yo",option2:"woooo"};e.trigger("url_parameters",n,s)},getAllUrlParams:function(){n={};if(t)var n=e.totalStorage("inbound_url_params");return n},getParameterVal:function(e,t){return(RegExp(e+"=(.+?)(&|$)").exec(t)||[,!1])[1]},checkLocalStorage:function(){if("localStorage"in window)try{ls=void 0===window.localStorage?void 0:window.localStorage,t="undefined"!=typeof ls&&void 0!==window.JSON}catch(e){t=!1}return t},showLocalStorageSize:function(){function e(e){return 2*e.length}function t(e){return e/1024/1024}var n=Object.keys(localStorage).map(function(t){return{name:t,size:e(localStorage[t])}}).map(function(e){return e.size=t(e.size).toFixed(2)+" MB",e});console.table(n)},addDays:function(e,t){return new Date(e.getTime()+24*t*60*60*1e3)},GetDate:function(){var e=new Date,t=e.getDate(),n=t<10?"0":"",o=e.getFullYear(),i=e.getHours(),a=i<10?"0":"",r=e.getMinutes(),s=r<10?"0":"",l=e.getSeconds(),u=l<10?"0":"",c=e.getMonth()+1;return o+"/"+(c<10?"0":"")+c+"/"+n+t+" "+a+i+":"+s+r+":"+u+l},SetSessionTimeout:function(){this.readCookie("lead_session_expire");var e=new Date;e.setTime(e.getTime()+18e5),this.createCookie("lead_session_expire",!0,e)},storeReferralData:function(){var t=new Date,n=document.referrer||"Direct Traffic",o=e.Utils.readCookie("inbound_referral_site"),i=e.totalStorage("inbound_original_referral");t.setTime(t.getTime()+18e5),o||this.createCookie("inbound_referral_site",n,t),i||e.totalStorage("inbound_original_referral",i)},CreateUID:function(e){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split(""),n="";e||(e=Math.floor(Math.random()*t.length));for(var o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n},generateGUID:function(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,guid)},SetUID:function(e){if(!this.readCookie("wp_lead_uid")){var t=e||this.CreateUID(35);this.createCookie("wp_lead_uid",t)}},countProperties:function(e){var t=0;for(var n in e)e.hasOwnProperty(n)&&++t;return t},mergeObjs:function(e,t){var n={};for(var o in e)n[o]=e[o];for(var o in t)n[o]=t[o];return n},hasClass:function(e,t){if("classList"in document.documentElement)n=t.classList.contains(e);else var n=new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className);return n},addClass:function(e,t){"classList"in document.documentElement?t.classList.add(e):this.hasClass(t,e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(e,t){"classList"in document.documentElement?t.classList.remove(e):this.hasClass(t,e)&&(t.className=t.className.replace(new RegExp("(^|\\s)*"+e+"(\\s|$)*","g"),""))},removeElement:function(e){e.parentNode.removeChild(e)},trim:function(e){return e=e.replace(/(^\s*)|(\s*$)/gi,""),e=e.replace(/[ ]{2,}/gi," "),e=e.replace(/\n /,"\n")},ajaxPolyFill:function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;for(var e,t=["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"],n=0;n<t.length;n++)try{e=new ActiveXObject(t[n]);break}catch(e){}return e},ajaxSendData:function(e,t,n,o,i){var a=this.ajaxPolyFill();setTimeout(function(){a.open(n,e,!0),a.onreadystatechange=function(){4==a.readyState&&t(a.responseText)},"POST"==n&&a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send(o)},100)},ajaxGet:function(e,t,n,o){var i=[];for(var a in t)i.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e+"?"+i.join("&"),n,"GET",null,o)},ajaxPost:function(e,t,n,o){var i=[];for(var a in t)i.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e,n,"POST",i.join("&"),o)},sendEvent:function(e,t,i){t=t||{},async=!0;var a=getCookie();if(a){var r;for(r in a)t[r]=a[r]}t.id||(t.id=getId());var s={e:e,t:(new Date).toISOString(),kv:t},l=o.api_host+"/track?data="+encodeURIComponent(JSON.stringify(s));if(n){var u=new XMLHttpRequest;u.open("GET",l,async),u.withCredentials=async,u.send(null)}else{var c=document.createElement("script");c.type="text/javascript",c.async=async,c.defer=async,c.src=l;var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d)}return action(i),self},domReady:function(e,t){var n=!1,o=!0,i=e.document,a=i.documentElement,r=i.addEventListener?"addEventListener":"attachEvent",s=i.addEventListener?"removeEventListener":"detachEvent",l=i.addEventListener?"":"on",u=function(o){"readystatechange"==o.type&&"complete"!=i.readyState||(("load"==o.type?e:i)[s](l+o.type,u,!1),!n&&(n=!0)&&t.call(e,o.type||o))},c=function(){try{a.doScroll("left")}catch(e){return void setTimeout(c,50)}u("poll")};if("complete"==i.readyState)t.call(e,"lazy");else{if(i.createEventObject&&a.doScroll){try{o=!e.frameElement}catch(e){}o&&c()}i[r](l+"DOMContentLoaded",u,!1),i[r](l+"readystatechange",u,!1),e[r](l+"load",u,!1)}},addListener:function(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n)},removeListener:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},throttle:function(e,t){var n,o,i,a=null,r=0,s=function(){r=new Date,a=null,i=e.apply(n,o)};return function(){var l=new Date;r||(r=l);var u=t-(l-r);return n=this,o=arguments,u<=0?(clearTimeout(a),a=null,r=l,i=e.apply(n,o)):a||(a=setTimeout(s,u)),i}},checkTypeofGA:function(){"function"==typeof ga&&(universalGA=!0),void 0!==_gaq&&"function"==typeof _gaq.push&&(classicGA=!0),"undefined"!=typeof dataLayer&&"function"==typeof dataLayer.push&&(googleTagManager=!0)},cacheSearchData:function(n,o){if(t){var i=e.totalStorage.getItem("inbound_search_storage");if(i)i.unshift(n),e.totalStorage.setItem("inbound_search_storage",i);else{var a=[n];e.totalStorage.setItem("inbound_search_storage",a)}}else{var r=JSON.stringify(n),s=this.readCookie("inbound_search_storage");s&&(r+="SPLIT-TOKEN"+s),this.createCookie("inbound_search_storage",r,"180")}e.Forms.releaseFormSubmit(o)},storeSearchData:function(){if(inbound_settings.wp_lead_data.lead_id&&inbound_settings.wp_lead_data.lead_nonce){var t=[],n=e.totalStorage.getItem("inbound_search_storage"),o=this.readCookie("inbound_search_storage");if(n||o){if(o){o=o.split("SPLIT-TOKEN");for(var i in o)t.push(JSON.parse(o[i]))}n&&(t=t.concat(n)),t.sort(function(e,t){return e.timestamp-t.timestamp});var a={action:"inbound_search_store",data:t=encodeURIComponent(JSON.stringify(t)),nonce:inbound_settings.wp_lead_data.lead_nonce,lead_id:inbound_settings.wp_lead_data.lead_id};callback=function(t){t&&(t=JSON.parse(t)),t.success&&(console.log(t.success),e.Utils.eraseCookie("inbound_search_storage"),e.totalStorage.deleteItem("inbound_search_storage")),t.error&&console.log(t.error)},this.ajaxPost(inbound_settings.admin_url,a,callback)}}}},e}(_inbound||{}),InboundForms=function(e){var t=e.Utils,n=[],o=[],a=[],r={},s=e.Settings,l=["first name","last name","name","email","e-mail","phone","website","job title","your favorite food","company","tele","address","comment"];if(e.Forms={init:function(){e.Forms.runFieldMappingFilters(),e.Forms.formTrackInit(),e.Forms.searchTrackInit()},runFieldMappingFilters:function(){l=e.hooks.applyFilters("forms.field_map",l)},debug:function(e,t){return},formTrackInit:function(){for(var e=0;e<window.document.forms.length;e++){var t=window.document.forms[e];t.dataset.formProcessed||(t.dataset.formProcessed=!0,this.checkTrackStatus(t)&&(this.attachFormSubmitEvent(t),this.initFormMapping(t)))}},searchTrackInit:function(){if("off"!=inbound_settings.search_tracking&&!r.searchTrackInit){for(var e=0;e<window.document.forms.length;e++){var n=window.document.forms[e];n.dataset.searchChecked||(n.dataset.searchChecked=!0,this.checkSearchTrackStatus(n)&&this.attachSearchFormSubmitEvent(n))}t.storeSearchData(),r.searchTrackInit=!0}},checkTrackStatus:function(t){var n=t.getAttribute("class");if(""!==n&&null!==n)return n.toLowerCase().indexOf("wpl-track-me")>-1||(n.toLowerCase().indexOf("inbound-track")>-1||(cb=function(){console.log(t)},e.deBugger("forms","This form not tracked. Please assign on in settings...",cb),!1))},checkSearchTrackStatus:function(t){var n=t.getAttribute("class"),o=t.getAttribute("id");return""!==n&&null!==n&&n.toLowerCase().indexOf("search")>-1||(""===o||null===o?(cb=function(){console.log(t)},e.deBugger("searches","This search form is not tracked. Please assign on in settings...",cb),!1):o.toLowerCase().indexOf("search")>-1||void 0)},loopClassSelectors:function(n,o){for(var i=n.length-1;i>=0;i--){var a=t.trim(n[i]);-1===a.indexOf("#")&&-1===a.indexOf(".")&&(a="#"+a),(a=document.querySelector(a))&&("add"===o?(e.Utils.addClass("wpl-track-me",a),e.Utils.addClass("inbound-track",a)):(e.Utils.removeClass("wpl-track-me",a),e.Utils.removeClass("inbound-track",a)))}},initFormMapping:function(t){for(var n=[],o=0;o<t.elements.length;o++)formInput=t.elements[o],"hidden"!==formInput.type?(this.mapField(formInput),this.rememberInputValues(formInput),s.formAutoPopulation&&!e.Utils.hasClass("nopopulate",t)&&this.fillInputValues(formInput)):n.push(formInput);for(var i=n.length-1;i>=0;i--)formInput=n[i],this.mapField(formInput)},mapField:function(o){var a=o.id||!1,r=o.name||!1,s=this.getInputLabel(o);if(s&&this.ignoreFieldByLabel(s[0].innerText))return o.dataset.ignoreFormField=!0,!1;for(i=0;i<l.length;i++){var u=!1,c=l[i],d=t.trim(c),m=d.replace(/ /g,"_");r&&r.toLowerCase().indexOf(d)>-1?(u=!0,e.deBugger("forms","Found matching name attribute for -> "+d)):a&&a.toLowerCase().indexOf(d)>-1?(u=!0,e.deBugger("forms","Found matching ID attribute for ->"+d)):s?s[0].innerText.toLowerCase().indexOf(d)>-1&&(u=!0,e.deBugger("forms","Found matching sibling label for -> "+d)):n.push(d),u&&(this.addDataAttr(o,m),this.removeArrayItem(l,d),i--)}return inbound_data},formListener:function(t){t.preventDefault(),e.Forms.saveFormData(t.target),document.body.style.cursor="wait"},searchFormListener:function(t){t.preventDefault(),e.Forms.saveSearchData(t.target)},attachFormSubmitEvent:function(e){t.addListener(e,"submit",this.formListener);document.querySelector(".inbound-email")},attachSearchFormSubmitEvent:function(e){t.addListener(e,"submit",this.searchFormListener)},ignoreFieldByLabel:function(t){var n=!1;return!!t&&(-1==t.toLowerCase().indexOf("credit card")&&-1==t.toLowerCase().indexOf("card number")||(n=!0),-1==t.toLowerCase().indexOf("expiration")&&-1==t.toLowerCase().indexOf("expiry")||(n=!0),"month"!=t.toLowerCase()&&"mm"!=t.toLowerCase()&&"yy"!=t.toLowerCase()&&"yyyy"!=t.toLowerCase()&&"year"!=t.toLowerCase()||(n=!0),-1==t.toLowerCase().indexOf("cvv")&&-1==t.toLowerCase().indexOf("cvc")&&-1==t.toLowerCase().indexOf("secure code")&&-1==t.toLowerCase().indexOf("security code")||(n=!0),n&&e.deBugger("forms","ignore "+t),n)},ignoreFieldByValue:function(e){var t=!1;if(!e)return!1;if("visa"!=e.toLowerCase()&&"mastercard"!=e.toLowerCase()&&"american express"!=e.toLowerCase()&&"amex"!=e.toLowerCase()&&"discover"!=e.toLowerCase()||(t=!0),new RegExp("/^[0-9]+$/").test(e)){var n=e.replace(" ","");this.isInt(n)&&n.length>=16&&(t=!0)}return t},isInt:function(e){return"number"==typeof e&&isFinite(e)&&e%1==0},releaseFormSubmit:function(e){document.body.style.cursor="default",t.removeClass("wpl-track-me",e),t.removeListener(e,"submit",this.formListener);var n=e.getAttribute("class");if(""!==n&&null!==n&&-1!=n.toLowerCase().indexOf("wpcf7-form"))return setTimeout(function(){document.body.style.cursor="default"},300),!0;"function"==typeof e.submit?e.submit():"function"==typeof e.click&&jQuery("#"+e.id).find("button").click(),setTimeout(function(){for(var t=0;t<e.elements.length;t++)formInput=e.elements[t],type=formInput.type||!1,"submit"===type&&"submit"===formInput.name&&e.elements[t].click()},2e3)},saveFormData:function(n){for(var i=i||{},r=0;r<n.elements.length;r++)if(formInput=n.elements[r],multiple=!1,formInput.name)if(formInput.dataset.ignoreFormField)e.deBugger("forms","ignore "+formInput.name);else{switch(inputName=formInput.name.replace(/\[([^\[]*)\]/g,"%5B%5D$1"),i[inputName]||(i[inputName]={}),formInput.type&&(i[inputName].type=formInput.type),i[inputName].name||(i[inputName].name=formInput.name),formInput.dataset.mapFormField&&(i[inputName].map=formInput.dataset.mapFormField),formInput.nodeName){case"INPUT":if(!1===(l=this.getInputValue(formInput)))continue;break;case"TEXTAREA":l=formInput.value;break;case"SELECT":if(formInput.multiple){values=[],multiple=!0;for(var s=0;s<formInput.length;s++)formInput[s].selected&&values.push(encodeURIComponent(formInput[s].value))}else l=formInput.value}if(e.deBugger("forms","Input Value = "+l),l){i[inputName].value||(i[inputName].value=[]),i[inputName].value.push(multiple?values.join(","):encodeURIComponent(l));var l=multiple?values.join(","):encodeURIComponent(l)}}e.deBugger("forms",i);for(var u in i){var c=i[u].value,d=i[u].map;void 0!==c&&null!=c&&""!=c&&o.push(u+"="+i[u].value.join(",")),void 0!==d&&null!=d&&i[u].value&&(a[d]=i[u].value.join(","))}var m=o.join("&");e.deBugger("forms","Stringified Raw Form PARAMS: "+m);var f=Object.keys(a).map(function(e){return e+"="+a[e]}).join("&");if(e.deBugger(a),e.deBugger("forms","Stringified Mapped PARAMS"+f),g||(g=t.getParameterVal("wpleads_email_address",f)),e.deBugger("Email 1:"+g),!g)var g=t.getParameterVal("email",f);e.deBugger("Email 2:"+g),g||(g=t.readCookie("wp_lead_email")),e.deBugger("Email 3:"+g);var p=t.getParameterVal("name",f),h=t.getParameterVal("first_name",f),v=t.getParameterVal("last_name",f);if(!v&&h&&(_=decodeURI(h).split(" ")).length>0&&(h=_[0],v=_[1]),p&&!v&&!h){var _=decodeURI(p).split(" ");_.length>0&&(h=_[0],v=_[1])}p=h&&v?h+" "+v:p,h||(h=""),v||(v=""),e.deBugger("forms","fName = "+h),e.deBugger("forms","lName = "+v),e.deBugger("forms","fullName = "+p),e.deBugger("forms","Email = "+g);var b=e.totalStorage("page_views")||{},y=e.totalStorage("inbound_url_params")||{},w=n.querySelectorAll('input[value][type="hidden"][name="inbound_furl"]:not([value=""])'),k=!1;if(0==w.length||"IA=="==w[0].value)k=!0;var S=n.querySelectorAll('input[value][type="hidden"][name="inbound_form_id"]');S=S.length>0?S[0].value:0;if("undefined"!=typeof landing_path_info)I=landing_path_info.variation;else if("undefined"!=typeof cta_path_info)I=cta_path_info.variation;else var I=inbound_settings.variation_id;var C=inbound_settings.post_type||"page",L=inbound_settings.post_id||0;search_data={},formData={action:"inbound_lead_store",email:g,full_name:p,first_name:h,last_name:v,raw_params:m,mapped_params:f,url_params:JSON.stringify(y),search_data:"test",page_views:JSON.stringify(b),post_type:C,page_id:L,variation:I,source:t.readCookie("inbound_referral_site"),inbound_submitted:k,inbound_form_id:S,inbound_nonce:inbound_settings.ajax_nonce,event:n},callback=function(o){e.deBugger("forms","Lead Created with ID: "+o),o=parseInt(o,10),formData.leadID=o,o&&(t.createCookie("wp_lead_id",o),e.totalStorage.deleteItem("page_views"),e.totalStorage.deleteItem("tracking_events")),e.trigger("form_after_submission",formData),e.Forms.releaseFormSubmit(n)},e.trigger("form_before_submission",formData),t.ajaxPost(inbound_settings.admin_url,formData,callback)},saveSearchData:function(n){for(var o=o||{},i=0;i<n.elements.length;i++)if(formInput=n.elements[i],multiple=!1,formInput.name){if(formInput.dataset.ignoreFormField){e.deBugger("searches","ignore "+formInput.name);continue}switch(d=formInput.name.replace(/\[([^\[]*)\]/g,"%5B%5D$1"),o[d]||(o[d]={}),formInput.type&&(o[d].type=formInput.type),o[d].name||(o[d].name=formInput.name),formInput.dataset.mapFormField&&(o[d].map=formInput.dataset.mapFormField),formInput.nodeName){case"INPUT":if(!1===(r=this.getInputValue(formInput)))continue;break;case"TEXTAREA":r=formInput.value;break;case"SELECT":if(formInput.multiple){values=[],multiple=!0;for(var a=0;a<formInput.length;a++)formInput[a].selected&&values.push(encodeURIComponent(formInput[a].value))}else r=formInput.value}if(e.deBugger("searches","Input Value = "+r),r){o[d].value||(o[d].value=[]),o[d].value.push(multiple?values.join(","):encodeURIComponent(r));var r=multiple?values.join(","):encodeURIComponent(r)}}e.deBugger("searches",o);var s=[];for(var l in o){var u=o[l].value,c=o[l].type,d=o[l].name;void 0!==u&&null!=u&&""!=u&&("search"==c?s.push("search_text|value|"+o[l].value):"s"==d&&s.push("search_text|value|"+o[l].value))}s[0]||e.Forms.releaseFormSubmit(n);var m=s.join("|field|");if(e.deBugger("searches","Stringified Search Form PARAMS: "+m),"undefined"!=typeof landing_path_info)f=landing_path_info.variation;else if("undefined"!=typeof cta_path_info)f=cta_path_info.variation;else var f=inbound_settings.variation_id;var g=inbound_settings.post_type||"page",p=inbound_settings.post_id||0,h=t.readCookie("wp_lead_uid");inbound_settings.wp_lead_data.lead_email?email=inbound_settings.wp_lead_data.lead_email:t.readCookie("inbound_wpleads_email_address")?email=t.readCookie("inbound_wpleads_email_address"):email="",searchData={email:email,search_data:m,user_UID:h,post_type:g,page_id:p,variation:f,source:t.readCookie("inbound_referral_site"),ip_address:inbound_settings.ip_address,timestamp:Math.floor((new Date).getTime()/1e3)},e.trigger("search_before_caching",searchData),inbound_settings.wp_lead_data.lead_id?(searchData.lead_id=inbound_settings.wp_lead_data.lead_id,t.cacheSearchData(searchData,n)):t.cacheSearchData(searchData,n)},rememberInputValues:function(n){n.name&&n.name;var o=n.type?n.type:"text";if("submit"===o||"hidden"===o||"file"===o||"password"===o||n.dataset.ignoreFormField)return!1;t.addListener(n,"change",function(n){if(n.target.name){if("checkbox"!==o)var i=n.target.value;else for(var a=[],r=document.querySelectorAll('input[name="'+n.target.name+'"]'),s=0;s<r.length;s++)r[s].checked&&a.push(r[s].value),i=a.join(",");inputData={name:n.target.name,node:n.target.nodeName.toLowerCase(),type:o,value:i,mapping:n.target.dataset.mapFormField},e.trigger("form_input_change",inputData),t.createCookie("inbound_"+n.target.name,encodeURIComponent(i))}})},fillInputValues:function(e){var n=e.name?"inbound_"+e.name:"",o=e.type?e.type:"text";if("submit"===o||"hidden"===o||"file"===o||"password"===o)return!1;if(t.readCookie(n)&&"comment"!=n)if(value=decodeURIComponent(t.readCookie(n)),"checkbox"===o||"radio"===o)for(var i=value.split(","),a=0;a<i.length;a++)e.value.indexOf(i[a])>-1&&(e.checked=!0);else"undefined"!==value&&(e.value=value)},getInputLabel:function(e){var t;return(t=this.siblingsIsLabel(e))?t:!!(t=this.CheckParentForLabel(e))&&t},getInputValue:function(e){var t=!1;switch(e.type){case"radio":case"checkbox":e.checked&&(t=e.value);break;case"text":case"hidden":default:t=e.value}return t},addDataAttr:function(e,t){for(var n=document.getElementsByName(e.name),o=n.length-1;o>=0;o--)e.dataset.mapFormField||(n[o].dataset.mapFormField=t)},removeArrayItem:function(e,t){if(e.indexOf)index=e.indexOf(t);else for(index=e.length-1;index>=0&&e[index]!==t;--index);index>=0&&e.splice(index,1)},siblingsIsLabel:function(e){for(var t=this.getSiblings(e),n=[],o=t.length-1;o>=0;o--)"label"===t[o].nodeName.toLowerCase()&&n.push(t[o]);return n.length>0&&n.length<2&&n},getChildren:function(e,t){for(var n=[];e;e=e.nextSibling)1==e.nodeType&&e!=t&&n.push(e);return n},getSiblings:function(e){return this.getChildren(e.parentNode.firstChild,e)},CheckParentForLabel:function(e){if("FORM"===e.nodeName)return null;do{var t=e.getElementsByTagName("label");if(t.length>0&&t.length<2)return e.getElementsByTagName("label")}while(e=e.parentNode);return null},mailCheck:function(){var e=document.querySelector(".inbound-email");e&&(t.addListener(e,"blur",this.mailCheck),u.run({email:document.querySelector(".inbound-email").value,suggested:function(n){var o=document.querySelector(".email_suggestion");o&&t.removeElement(o);var i=document.createElement("span");i.innerHTML="<span class=\"email_suggestion\">Did youu mean <b><i id='email_correction' style='cursor: pointer;' title=\"click to update\">"+n.full+"</b></i>?</span>",e.parentNode.insertBefore(i,e.nextSibling);var a=document.getElementById("email_correction");t.addListener(a,"click",function(){e.value=a.innerHTML,a.parentNode.parentNode.innerHTML="Fixed!"})},empty:function(){}}))}},void 0===u)var u={domainThreshold:1,topLevelThreshold:3,defaultDomains:["yahoo.com","google.com","hotmail.com","gmail.com","me.com","aol.com","mac.com","live.com","comcast.net","googlemail.com","msn.com","hotmail.co.uk","yahoo.co.uk","facebook.com","verizon.net","sbcglobal.net","att.net","gmx.com","mail.com","outlook.com","icloud.com"],defaultTopLevelDomains:["co.jp","co.uk","com","net","org","info","edu","gov","mil","ca","de"],run:function(e){e.domains=e.domains||u.defaultDomains,e.topLevelDomains=e.topLevelDomains||u.defaultTopLevelDomains,e.distanceFunction=e.distanceFunction||u.sift3Distance;var t=function(e){return e},n=e.suggested||t,o=e.empty||t,i=u.suggest(u.encodeEmail(e.email),e.domains,e.topLevelDomains,e.distanceFunction);return i?n(i):o()},suggest:function(e,t,n,o){e=e.toLowerCase();var i=this.splitEmail(e),a=this.findClosestDomain(i.domain,t,o,this.domainThreshold);if(a){if(a!=i.domain)return{address:i.address,domain:a,full:i.address+"@"+a}}else{var r=this.findClosestDomain(i.topLevelDomain,n,o,this.topLevelThreshold);if(i.domain&&r&&r!=i.topLevelDomain){var s=i.domain;return a=s.substring(0,s.lastIndexOf(i.topLevelDomain))+r,{address:i.address,domain:a,full:i.address+"@"+a}}}return!1},findClosestDomain:function(e,t,n,o){o=o||this.topLevelThreshold;var i,a=99,r=null;if(!e||!t)return!1;n||(n=this.sift3Distance);for(var s=0;s<t.length;s++){if(e===t[s])return e;(i=n(e,t[s]))<a&&(a=i,r=t[s])}return a<=o&&null!==r&&r},sift3Distance:function(e,t){if(null===e||0===e.length)return null===t||0===t.length?0:t.length;if(null===t||0===t.length)return e.length;for(var n=0,o=0,i=0,a=0;n+o<e.length&&n+i<t.length;){if(e.charAt(n+o)==t.charAt(n+i))a++;else{o=0,i=0;for(var r=0;r<5;r++){if(n+r<e.length&&e.charAt(n+r)==t.charAt(n)){o=r;break}if(n+r<t.length&&e.charAt(n)==t.charAt(n+r)){i=r;break}}}n++}return(e.length+t.length)/2-a},splitEmail:function(e){var t=e.trim().split("@");if(t.length<2)return!1;for(a=0;a<t.length;a++)if(""===t[a])return!1;var n=t.pop(),o=n.split("."),i="";if(0===o.length)return!1;if(1==o.length)i=o[0];else{for(var a=1;a<o.length;a++)i+=o[a]+".";o.length>=2&&(i=i.substring(0,i.length-1))}return{topLevelDomain:i,domain:n,address:t.join("@")}},encodeEmail:function(e){var t=encodeURI(e);return t=t.replace("%20"," ").replace("%25","%").replace("%5E","^").replace("%60","`").replace("%7B","{").replace("%7C","|").replace("%7D","}")}};return e}(_inbound||{}),_inboundEvents=function(e){function t(t,o,i){var o=o||{};(i=i||{}).bubbles=i.bubbles||!0,i.cancelable=i.cancelable||!0,o=e.apply_filters("filter_"+t,o);!window.ActiveXObject&&window;if("function"==typeof CustomEvent)var a=new CustomEvent(t,{detail:o,bubbles:i.bubbles,cancelable:i.cancelable});else(a=document.createEvent("Event")).initEvent(t,!0,!0);window.dispatchEvent(a),e.do_action(t,o),n(t,o)}function n(e,t){if(window.jQuery){var t=t||{};jQuery(document).trigger(e,t)}}e.trigger=function(t,n){e.Events[t](n)};return e.Events={analytics_ready:function(){t("analytics_ready",{data:"xyxy"},{opt1:!0})},url_parameters:function(e){t("url_parameters",e)},session_start:function(){console.log(""),t("session_start")},session_end:function(e){t("session_end",e),console.log("Session End")},session_active:function(){t("session_active")},session_idle:function(e){t("session_idle",e)},session_resume:function(){t("session_resume")},session_heartbeat:function(e){t("session_heartbeat",{clock:e,leadData:InboundLeadData})},page_visit:function(e){t("page_view",e)},page_first_visit:function(n){t("page_first_visit"),e.deBugger("pages","First Ever Page View of this Page")},page_revisit:function(n){t("page_revisit",n);e.deBugger("pages",status,function(){console.log("pageData",n),console.log("Page Revisit viewed "+n+" times")})},tab_hidden:function(n){e.deBugger("pages","Tab Hidden"),t("tab_hidden")},tab_visible:function(n){e.deBugger("pages","Tab Visible"),t("tab_visible")},tab_mouseout:function(n){e.deBugger("pages","Tab Mouseout"),t("tab_mouseout")},form_input_change:function(n){e.deBugger("forms","inputData change. Data=",function(){console.log(n)}),t("form_input_change",n)},form_before_submission:function(e){t("form_before_submission",e)},form_after_submission:function(e){t("form_after_submission",e)},search_before_caching:function(e){t("search_before_caching",e)},analyticsError:function(e,t,n){var o=new CustomEvent("inbound_analytics_error",{detail:{MLHttpRequest:e,textStatus:t,errorThrown:n}});window.dispatchEvent(o),console.log("Page Save Error")}},e}(_inbound||{});_inbound.add_action("form_before_submission",inboundFormNoRedirect,10),_inbound.add_action("form_after_submission",inboundFormNoRedirectContent,10);var InboundTotalStorage=function(e){var t,n;if("localStorage"in window)try{n=void 0===window.localStorage?void 0:window.localStorage,t=void 0!==n&&void 0!==window.JSON,window.localStorage.setItem("_inbound","1"),window.localStorage.removeItem("_inbound")}catch(e){t=!1}e.totalStorage=function(t,n,o){return e.totalStorage.impl.init(t,n)},e.totalStorage.setItem=function(t,n){return e.totalStorage.impl.setItem(t,n)},e.totalStorage.getItem=function(t){return e.totalStorage.impl.getItem(t)},e.totalStorage.getAll=function(){return e.totalStorage.impl.getAll()},e.totalStorage.deleteItem=function(t){return e.totalStorage.impl.deleteItem(t)},e.totalStorage.impl={init:function(e,t){return void 0!==t?this.setItem(e,t):this.getItem(e)},setItem:function(o,i){if(!t)try{return e.Utils.createCookie(o,i),i}catch(e){console.log("Local Storage not supported by this browser. Install the cookie plugin on your site to take advantage of the same functionality. You can get it at https://github.com/carhartl/jquery-cookie")}var a=JSON.stringify(i);return n.setItem(o,a),this.parseResult(a)},getItem:function(o){if(!t)try{return this.parseResult(e.Utils.readCookie(o))}catch(e){return null}var i=n.getItem(o);return this.parseResult(i)},deleteItem:function(o){if(!t)try{return e.Utils.eraseCookie(o,null),!0}catch(e){return!1}return n.removeItem(o),!0},getAll:function(){var o=[];if(t)for(var i in n)i.length&&o.push({key:i,value:this.parseResult(n.getItem(i))});else try{for(var a=document.cookie.split(";"),r=0;r<a.length;r++){var s=a[r].split("=")[0];o.push({key:s,value:this.parseResult(e.Utils.readCookie(s))})}}catch(e){return null}return o},parseResult:function(e){var t;try{void 0===(t=JSON.parse(e))&&(t=e),"true"==t&&(t=!0),"false"==t&&(t=!1),parseFloat(t)==t&&"object"!=typeof t&&(t=parseFloat(t))}catch(n){t=e}return t}}}(_inbound||{}),_inboundLeadsAPI=function(e){return e.LeadsAPI={init:function(){var t=e.Utils,n=(t.readCookie("wp_lead_uid"),t.readCookie("wp_lead_id"));t.readCookie("lead_data_expire")||(e.deBugger("leads","expired vistor. Run Processes"),n&&e.LeadsAPI.getAllLeadData())},setGlobalLeadData:function(e){InboundLeadData=e},getAllLeadData:function(t){var n=e.Utils.readCookie("wp_lead_id"),o=e.totalStorage("inbound_lead_data"),i=e.Utils.readCookie("lead_data_expire");data={action:"inbound_get_all_lead_data",wp_lead_id:n},success=function(t){var n=JSON.parse(t);e.LeadsAPI.setGlobalLeadData(n),e.totalStorage("inbound_lead_data",n);var o=new Date;o.setTime(o.getTime()+18e5);var i=e.Utils.addDays(o,3);e.Utils.createCookie("lead_data_expire",!0,i)},o?(e.LeadsAPI.setGlobalLeadData(o),e.deBugger("lead","Set Global Lead Data from Localstorage"),i||(e.Utils.ajaxPost(inbound_settings.admin_url,data,success),e.deBugger("lead","localized data old. Pull new from DB"))):e.Utils.ajaxPost(inbound_settings.admin_url,data,success)},getLeadLists:function(){var t={action:"wpl_check_lists",wp_lead_id:e.Utils.readCookie("wp_lead_id")};e.Utils.ajaxPost(inbound_settings.admin_url,t,function(t){e.Utils.createCookie("lead_session_list_check",!0,{path:"/",expires:1}),e.deBugger("lead","Lists checked")})}},e}(_inbound||{}),_inboundPageTracking=function(e){var t,n,o=!1,i=!1,a=!1,r=parseInt(e.Utils.readCookie("lead_session"),10)||0,s=0,l=(new Date,null),u=null,c=null,d=e.Utils,m=e.Utils.GetDate(),f="page_views",g=e.totalStorage(f)||{},p=inbound_settings.post_id||window.location.pathname;e.Settings.timeout;return e.PageTracking={init:function(o){var i=this.isRevisit(g);this.triggerPageView(i),o=o||{},t=parseInt(o.reportInterval,10)||10,n=parseInt(o.idleTimeout,10)||3,d.addListener(document,"keydown",d.throttle(e.PageTracking.pingSession,1e3)),d.addListener(document,"click",d.throttle(e.PageTracking.pingSession,1e3)),d.addListener(window,"mousemove",d.throttle(e.PageTracking.pingSession,1e3)),e.PageTracking.checkVisibility(),this.startSession()},setIdle:function(t){var n="Session IDLE. Activity Timeout due to "+(t=t||"No Movement");e.deBugger("pages",n),clearTimeout(e.PageTracking.idleTimer),e.PageTracking.stopClock(),e.trigger("session_idle")},checkVisibility:function(){var t,n;void 0!==document.hidden?(t="hidden",n="visibilitychange"):void 0!==document.mozHidden?(t="mozHidden",n="mozvisibilitychange"):void 0!==document.msHidden?(t="msHidden",n="msvisibilitychange"):void 0!==document.webkitHidden&&(t="webkitHidden",n="webkitvisibilitychange");var o=document[t];e.Utils.addListener(document,n,function(n){o!=document[t]&&(document[t]?(e.trigger("tab_hidden"),e.PageTracking.setIdle("browser tab switch")):(e.trigger("tab_visible"),e.PageTracking.pingSession()),o=document[t])})},clock:function(){var n="Total time spent on Page in this Session: "+((r+=1)/60).toFixed(2)+" min";if(e.deBugger("pages",n),r>0&&r%t==0){var o=new Date;o.setTime(o.getTime()+18e5),d.createCookie("lead_session",r,o),e.trigger("session_heartbeat",r)}},inactiveClock:function(){var t="Time until Session Timeout: "+((1800-(s+=1))/60).toFixed(2)+" min";e.deBugger("pages",t),s>1800&&(e.trigger("session_end",InboundLeadData),e.Utils.eraseCookie("lead_session"),s=0,clearTimeout(u))},stopClock:function(){i=!0,clearTimeout(l),clearTimeout(u),u=setInterval(e.PageTracking.inactiveClock,1e3)},restartClock:function(){i=!1,e.trigger("session_resume"),e.deBugger("pages","Activity resumed. Session Active"),clearTimeout(l),s=0,clearTimeout(u),l=setInterval(e.PageTracking.clock,1e3)},turnOff:function(){e.PageTracking.setIdle(),a=!0},turnOn:function(){a=!1},startSession:function(){new Date;if(o=!0,l=setInterval(e.PageTracking.clock,1e3),d.readCookie("lead_session"))e.trigger("session_active");else{e.trigger("session_start");var t=new Date;t.setTime(t.getTime()+18e5),e.Utils.createCookie("lead_session",1,t)}this.pingSession()},resetInactiveFunc:function(){s=0,clearTimeout(u)},pingSession:function(t){a||(o||e.PageTracking.startSession(),i&&e.PageTracking.restartClock(),clearTimeout(c),c=setTimeout(e.PageTracking.setIdle,1e3*n+100),void 0!==t&&"mousemove"===t.type&&e.PageTracking.mouseEvents(t))},mouseEvents:function(t){t.pageY<=5&&e.trigger("tab_mouseout")},getPageViews:function(){if(e.Utils.checkLocalStorage()){var t=localStorage.getItem(f),n=JSON.parse(t);return n}},isRevisit:function(e){var t=!1,n=(e=e||{})[p];return void 0!==n&&null!==n&&(t=!0),t},triggerPageView:function(t){var n={title:document.title,url:document.location.href,path:document.location.pathname,count:1};t?(g[p].push(m),n.count=g[p].length,e.trigger("page_revisit",n)):(g[p]=[],g[p].push(m),e.trigger("page_first_visit",n)),e.trigger("page_visit",n),e.totalStorage(f,g);jQuery(document).ready(function(){e.PageTracking.storePageView()})},CheckTimeOut:function(){e.deBugger("pages",status)},storePageView:function(){"off"==inbound_settings.page_tracking&&"landing-page"!=inbound_settings.post_type||setTimeout(function(){var t=e.Utils.readCookie("wp_lead_id")?e.Utils.readCookie("wp_lead_id"):"",n=e.Utils.readCookie("wp_lead_uid")?e.Utils.readCookie("wp_lead_uid"):"",o=e.totalStorage("wp_cta_loaded"),i=e.totalStorage("wp_cta_impressions");stored=!0,e.totalStorage("wp_cta_impressions",{});var a={action:"inbound_track_lead",wp_lead_uid:n,wp_lead_id:t,page_id:inbound_settings.post_id,variation_id:inbound_settings.variation_id,post_type:inbound_settings.post_type,current_url:window.location.href,page_views:JSON.stringify(e.PageTracking.getPageViews()),cta_impressions:JSON.stringify(i),cta_history:JSON.stringify(o),json:"0"};e.Utils.ajaxPost(inbound_settings.admin_url,a,function(e){})},200)}},e}(_inbound||{});_inbound.init(),InboundLeadData=_inbound.totalStorage("inbound_lead_data")||null;var _hsq=_hsq||[];_hsq.push(["setContentType","blog-post"]);window.addEventListener("load",function(){var c={script:!1,link:!1};function ls(s){if(!['script','link'].includes(s)||c[s]){return}c[s]=!0;var d=document,f=d.getElementsByTagName(s)[0],j=d.createElement(s);if(s==='script'){j.async=!0;j.src='https://kamelturismo.com.br/wp-content/plugins/toolset-blocks/vendor/toolset/blocks/public/js/frontend.js?v=1.6.10'}else{j.rel='stylesheet';j.href='https://kamelturismo.com.br/wp-content/plugins/toolset-blocks/vendor/toolset/blocks/public/css/style.css?v=1.6.10'}f.parentNode.insertBefore(j,f)};function ex(){ls('script');ls('link')}window.addEventListener("scroll",ex,{once:!0});if(('IntersectionObserver' in window)&&('IntersectionObserverEntry' in window)&&('intersectionRatio' in window.IntersectionObserverEntry.prototype)){var i=0,fb=document.querySelectorAll("[class^='tb-']"),o=new IntersectionObserver(es=>{es.forEach(e=>{o.unobserve(e.target);if(e.intersectionRatio>0){ex();o.disconnect()}else{i++;if(fb.length>i){o.observe(fb[i])}}})});if(fb.length){o.observe(fb[i])}}});jQuery(document).ready(function($){});wp_cta_load_variation('13943','');jQuery(document).ready(function($){});;var sbiajaxurl="https://kamelturismo.com.br/wp-admin/admin-ajax.php";const lazyloadRunObserver=()=>{const lazyloadBackgrounds=document.querySelectorAll(`.e-con.e-parent:not(.e-lazyloaded)`);const lazyloadBackgroundObserver=new IntersectionObserver((entries)=>{entries.forEach((entry)=>{if(entry.isIntersecting){let lazyloadBackground=entry.target;if(lazyloadBackground){lazyloadBackground.classList.add('e-lazyloaded')}
lazyloadBackgroundObserver.unobserve(entry.target)}})},{rootMargin:'200px 0px 200px 0px'});lazyloadBackgrounds.forEach((lazyloadBackground)=>{lazyloadBackgroundObserver.observe(lazyloadBackground)})};const events=['DOMContentLoaded','elementor/lazyload/observe',];events.forEach((event)=>{document.addEventListener(event,lazyloadRunObserver)});!function(a,b){"object"==typeof module&&module.exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(k.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",k.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;if(b=b.charAt(0).toUpperCase()+b.slice(1),void 0!==e[b])return b;for(d=0;d<l.length;d++)if(c=l[d]+b,void 0!==e[c])return c}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}k.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.scale*d.width,left:d.scale*d.radius,top:-d.scale*d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.scale*(d.length+d.width),k=2*d.scale*j,l=-(d.width+d.length)*d.scale*2+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k,l=["webkit","Moz","ms","O"],m={},n={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"};if(h.defaults={},f(h.prototype,{spin:function(b){this.stop();var c=this,d=c.opts,f=c.el=a(null,{className:d.className});if(e(f,{position:d.position,width:0,zIndex:d.zIndex,left:d.left,top:d.top}),b&&b.insertBefore(f,b.firstChild||null),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.scale*(f.length+f.width)+"px",height:f.scale*f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.scale*f.radius+"px,0)",borderRadius:(f.corners*f.scale*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.scale*f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}}),"undefined"!=typeof document){k=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}();var o=e(a("group"),{behavior:"url(#default#VML)"});!d(o,"transform")&&o.adj?i():j=d(o,"animation")}return h});var EventPost=EventPost||{};EventPost.front={"imgpath":"https:\/\/kamelturismo.com.br\/wp-content\/plugins\/event-post\/img\/","maptiles":{"default@osm.org":{"name":"Open Street Map","id":"default@osm.org","urls":["https:\/\/a.tile.openstreetmap.org\/{z}\/{x}\/{y}.png","https:\/\/b.tile.openstreetmap.org\/{z}\/{x}\/{y}.png","https:\/\/c.tile.openstreetmap.org\/{z}\/{x}\/{y}.png"],"attribution":"&copy; <a href=\"\/copyright\">OpenStreetMap<\/a>."},"OpenCycleMap":{"name":"Open Cycle Map","id":"OpenCycleMap","urls":["http:\/\/a.tile.opencyclemap.org\/cycle\/{z}\/{x}\/{y}.png","http:\/\/b.tile.opencyclemap.org\/cycle\/{z}\/{x}\/{y}.png","http:\/\/c.tile.opencyclemap.org\/cycle\/{z}\/{x}\/{y}.png"],"api_param":"apikey","attribution":"&copy; <a href=\"\/copyright\">OpenStreetMap<\/a>. Tiles courtesy of <a href=\"http:\/\/www.thunderforest.com\/\" target=\"_blank\">Andy Allan<\/a>"},"hot":{"name":"Humanitarian","id":"hot","urls":["https:\/\/tile-a.openstreetmap.fr\/hot\/{z}\/{x}\/{y}.png","https:\/\/tile-b.openstreetmap.fr\/hot\/{z}\/{x}\/{y}.png","https:\/\/tile-c.openstreetmap.fr\/hot\/{z}\/{x}\/{y}.png"],"attribution":"&copy; <a href=\"\/copyright\">OpenStreetMap<\/a>."},"mapquest":{"name":"Map Quest","id":"mapquest","urls":["http:\/\/otile1.mqcdn.com\/tiles\/1.0.0\/osm\/{z}\/{x}\/{y}.png","http:\/\/otile2.mqcdn.com\/tiles\/1.0.0\/osm\/{z}\/{x}\/{y}.png","http:\/\/otile3.mqcdn.com\/tiles\/1.0.0\/osm\/{z}\/{x}\/{y}.png"],"attribution":""},"osmfr":{"name":"OSM-fr","id":"osmfr","urls":["https:\/\/a.tile.openstreetmap.fr\/osmfr\/{z}\/{x}\/{y}.png","https:\/\/b.tile.openstreetmap.fr\/osmfr\/{z}\/{x}\/{y}.png","https:\/\/c.tile.openstreetmap.fr\/osmfr\/{z}\/{x}\/{y}.png"],"attribution":"&copy; <a href=\"\/copyright\">OpenStreetMap<\/a>."},"etalab":{"name":"Etalab","id":"etalab","urls":["https:\/\/openmaptiles.geo.data.gouv.fr\/data\/france-vector\/{z}\/{x}\/{y}.pbf","https:\/\/b.tile.openstreetmap.fr\/osmfr\/{z}\/{x}\/{y}.png","https:\/\/c.tile.openstreetmap.fr\/osmfr\/{z}\/{x}\/{y}.png"],"attribution":"&copy; <a href=\"\/copyright\">OpenStreetMap<\/a>."},"2u":{"name":"2u","id":"2u","urls":["http:\/\/a.layers.openstreetmap.fr\/2u\/{z}\/{x}\/{y}.png","http:\/\/b.layers.openstreetmap.fr\/2u\/{z}\/{x}\/{y}.png","http:\/\/c.layers.openstreetmap.fr\/2u\/{z}\/{x}\/{y}.png"],"attribution":"&copy; <a href=\"\/copyright\">OpenStreetMap<\/a>."},"satelite":{"name":"Satelite","id":"satelite","urls":["http:\/\/otile1-s.mqcdn.com\/tiles\/1.0.0\/sat\/{z}\/{x}\/{y}.jpg","http:\/\/otile2-s.mqcdn.com\/tiles\/1.0.0\/sat\/{z}\/{x}\/{y}.jpg","http:\/\/otile3-s.mqcdn.com\/tiles\/1.0.0\/sat\/{z}\/{x}\/{y}.jpg"],"attribution":""},"toner":{"name":"Toner by Stamen","id":"toner","urls":["http:\/\/a.tile.stamen.com\/toner\/{z}\/{x}\/{y}.png","http:\/\/b.tile.stamen.com\/toner\/{z}\/{x}\/{y}.png","http:\/\/c.tile.stamen.com\/toner\/{z}\/{x}\/{y}.png"],"attribution":"Map tiles by <a href=\"http:\/\/stamen.com\">Stamen Design<\/a>, under <a href=\"http:\/\/creativecommons.org\/licenses\/by\/3.0\">CC BY 3.0<\/a>. Data by <a href=\"http:\/\/openstreetmap.org\">OpenStreetMap<\/a>, under <a href=\"http:\/\/www.openstreetmap.org\/copyright\">ODbL<\/a>."},"positron":{"name":"Positron","id":"positron","urls":["http:\/\/a.basemaps.cartocdn.com\/light_all\/{z}\/{x}\/{y}.png","http:\/\/b.basemaps.cartocdn.com\/light_all\/{z}\/{x}\/{y}.png","http:\/\/b.basemaps.cartocdn.com\/light_all\/{z}\/{x}\/{y}.png"],"urls_retina":["http:\/\/a.basemaps.cartocdn.com\/light_all\/{z}\/{x}\/{y}@2x.png","http:\/\/b.basemaps.cartocdn.com\/light_all\/{z}\/{x}\/{y}@2x.png","http:\/\/b.basemaps.cartocdn.com\/light_all\/{z}\/{x}\/{y}@2x.png"],"attribution":"&copy; <a href=\"http:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a> contributors, &copy; <a href=\"https:\/\/carto.com\/attributions\">CARTO<\/a>"},"darkmatter":{"name":"Dark matter","id":"darkmatter","urls":[" http:\/\/a.basemaps.cartocdn.com\/dark_all\/{z}\/{x}\/{y}.png"," http:\/\/b.basemaps.cartocdn.com\/dark_all\/{z}\/{x}\/{y}.png"," http:\/\/c.basemaps.cartocdn.com\/dark_all\/{z}\/{x}\/{y}.png"],"urls_retina":[" http:\/\/a.basemaps.cartocdn.com\/dark_all\/{z}\/{x}\/{y}@2x.png"," http:\/\/b.basemaps.cartocdn.com\/dark_all\/{z}\/{x}\/{y}@2x.png"," http:\/\/c.basemaps.cartocdn.com\/dark_all\/{z}\/{x}\/{y}@2x.png"],"attribution":"&copy; <a href=\"http:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a> contributors, &copy; <a href=\"https:\/\/carto.com\/attributions\">CARTO<\/a>"}},"defaulttile":"default@osm.org","zoom":12,"ajaxurl":"https:\/\/kamelturismo.com.br\/wp-admin\/admin-ajax.php","map_interactions":{"DragRotate":"Girar Arrastando","DoubleClickZoom":"Zoom clique duplo","DragPan":"Arraste Mover ","PinchRotate":"Girar Pin\u00e7a","PinchZoom":"Zoom Pin\u00e7a","KeyboardPan":"Mover com Teclado","KeyboardZoom":"Zoom com Teclado","MouseWheelZoom":"Zoom com Roda do Mouse","DragZoom":"Mover com Roda do Mouse"}};;(function($){$.fn.ecwd_popup=function(opt){var default_options={button:'',title:'Event Details',body_id:'',body_class:'',container_class:'',fillhtml:!1,only_open:!1,get_ajax_data:function(el){},popup_close:function(){},after_popup_show:function(el){},get_el_class:function(el){}};for(var key in default_options){if(opt[key]==undefined){opt[key]=default_options[key]}}
var params=opt;var el=$(this);el.hide();params.button.on('click',function(e){e.preventDefault();var data=params.get_ajax_data($(this));if(data){if(params.fillhtml){data.html=params.fillhtml.val()}
jQuery.post(ecwd.ajaxurl,data,function(response){if(response!=0){open_popup(response);show_gmap()}})}else if(params.fillhtml.length>0&&params.fillhtml){open_popup(params.fillhtml.val())}else{open_popup(el.html())}
el.on('click','.ecwd_close_popup',function(){el.hide();jQuery('body').removeClass("body-ecwd_open_popup");params.popup_close(el)});$(document).keyup(function(e){if(e.keyCode==27){el.hide();jQuery('body').removeClass("body-ecwd_open_popup");params.popup_close(el)}})});function open_popup(html){if(params.only_open==!1){add_popup(html)}
jQuery('body').addClass("body-ecwd_open_popup");el.show();params.after_popup_show(el);el.addClass('ecwd_popup_el')}
function add_popup(html){var head=get_popup_head();var body=get_popup_body(html);var popup_html="<div class='ecwd_popup_back ecwd_open_popup'>"+"<div class='ecwd_popup_container "+params.container_class+"'>"+head+body+"</div>"+"</div>";el.html(popup_html)}
function get_popup_head(){var popup_head="<div class='ecwd_popup_head'>"+"<div class='ecwd_popup_title'><h4>"+params.title+"</h4></div>"+"<div class='ecwd_close_popup'><i class='fa fa-times'></i></div>"+"</div>";return popup_head}
function get_popup_body(html){var body_id=(params.body_id!='')?"id='"+params.body_id+"'":"";var popup_body="<div "+body_id+" class='ecwd_popup_body "+params.body_class+"'>"+html+"</div>";return popup_body}
function show_gmap(){var interval=setInterval(function(){var el=$('.ecwd_popup_container').find('.ecwd-show-map .ecwd_markers');if(el.html()!=""){ecwd_js_init_call.showMap();clearInterval(interval)}},100)}
$.fn.ecwd_popup.params=default_options}}(jQuery));/*! jQuery UI - v1.13.3 - 2024-04-26
* https://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
/*!
 * jQuery UI :data 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
/*!
 * jQuery UI Disable Selection 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
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")}}),
/*!
 * jQuery UI Focusable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.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")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
/*!
 * jQuery UI Form Reset Mixin 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
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=this.element._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"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
/*!
 * jQuery UI Support for jQuery core 1.8.x and newer 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 *
 */
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),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})}}),
/*!
 * jQuery UI Keycode 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
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},
/*!
 * jQuery UI Labels 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
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='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},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)}},
/*!
 * jQuery UI Position 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 *
 * https://api.jqueryui.com/position/
 */
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=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=N(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(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(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&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[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:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.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",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.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;e.collisionWidth>n?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;e.collisionHeight>o?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)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
/*!
 * jQuery UI Scroll Parent 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
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)},
/*!
 * jQuery UI Tabbable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
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)}}),
/*!
 * jQuery UI Unique ID 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
/*!
 * jQuery UI Widget 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=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");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][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)}r[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},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),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=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.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=p.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=c++,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))},_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()})}})});/*!
 * jQuery UI Mouse 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../ie","../version","../widget"],e):e(jQuery)}(function(o){"use strict";var n=!1;return o(document).on("mouseup",function(){n=!1}),o.widget("ui.mouse",{version:"1.13.3",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(e){if(!0===o.data(e.target,t.widgetName+".preventClickEvent"))return o.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){var t,i,s;if(!n)return this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),i=1===(this._mouseDownEvent=e).which,s=!("string"!=typeof(t=this).options.cancel||!e.target.nodeName)&&o(e.target).closest(this.options.cancel).length,i&&!s&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?e.preventDefault():(!0===o.data(e.target,this.widgetName+".preventClickEvent")&&o.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0)),!0},_mouseMove:function(e){if(this._mouseMoved){if(o.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&o.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});/*!
 * jQuery UI Draggable 1.13.3
 * https://jqueryui.com
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../plugin","../safe-active-element","../safe-blur","../scroll-parent","../version","../widget"],t):t(jQuery)}(function(P){"use strict";return P.widget("ui.draggable",P.ui.mouse,{version:"1.13.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<P(t.target).closest(".ui-resizable-handle").length||(this.handle=this._getHandle(t),!this.handle)||(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=P(this);return P("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=P.ui.safeActiveElement(this.document[0]);P(t.target).closest(e).length||P.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),P.ui.ddmanager&&(P.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===P(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),P.ui.ddmanager&&!e.dropBehaviour&&P.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),P.ui.ddmanager&&P.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){e=this._uiHash();if(!1===this._trigger("drag",t,e))return this._mouseUp(new P.Event("mouseup",t)),!1;this.position=e.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",P.ui.ddmanager&&P.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,s=!1;return P.ui.ddmanager&&!this.options.dropBehaviour&&(s=P.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,s)?P(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),P.ui.ddmanager&&P.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),P.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new P.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!P(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,s="function"==typeof e.helper,t=s?P(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return t.parents("body").length||t.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),s&&t[0]===this.element[0]&&this._setPositionRelative(),t[0]===this.element[0]||/(fixed|absolute)/.test(t.css("position"))||t.css("position","absolute"),t},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&P.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this._isRootNode(this.offsetParent[0])?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){var t,e;return"relative"!==this.cssPosition?{top:0,left:0}:(t=this.element.position(),e=this._isRootNode(this.scrollParent[0]),{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())})},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e=this.options,s=this.document[0];this.relativeContainer=null,e.containment?"window"===e.containment?this.containment=[P(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,P(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,P(window).scrollLeft()+P(window).width()-this.helperProportions.width-this.margins.left,P(window).scrollTop()+(P(window).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:"document"===e.containment?this.containment=[0,0,P(s).width()-this.helperProportions.width-this.margins.left,(P(s).height()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:e.containment.constructor===Array?this.containment=e.containment:("parent"===e.containment&&(e.containment=this.helper[0].parentNode),(e=(s=P(e.containment))[0])&&(t=/(scroll|auto)/.test(s.css("overflow")),this.containment=[(parseInt(s.css("borderLeftWidth"),10)||0)+(parseInt(s.css("paddingLeft"),10)||0),(parseInt(s.css("borderTopWidth"),10)||0)+(parseInt(s.css("paddingTop"),10)||0),(t?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(s.css("borderRightWidth"),10)||0)-(parseInt(s.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(s.css("borderBottomWidth"),10)||0)-(parseInt(s.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=s)):this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var t="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*t+this.offset.parent.top*t-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*t,left:e.left+this.offset.relative.left*t+this.offset.parent.left*t-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*t}},_generatePosition:function(t,e){var s,i=this.options,o=this._isRootNode(this.scrollParent[0]),n=t.pageX,r=t.pageY;return o&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),{top:(r=e&&(this.containment&&(s=this.relativeContainer?(e=this.relativeContainer.offset(),[this.containment[0]+e.left,this.containment[1]+e.top,this.containment[2]+e.left,this.containment[3]+e.top]):this.containment,t.pageX-this.offset.click.left<s[0]&&(n=s[0]+this.offset.click.left),t.pageY-this.offset.click.top<s[1]&&(r=s[1]+this.offset.click.top),t.pageX-this.offset.click.left>s[2]&&(n=s[2]+this.offset.click.left),t.pageY-this.offset.click.top>s[3])&&(r=s[3]+this.offset.click.top),i.grid&&(e=i.grid[1]?this.originalPageY+Math.round((r-this.originalPageY)/i.grid[1])*i.grid[1]:this.originalPageY,r=!s||e-this.offset.click.top>=s[1]||e-this.offset.click.top>s[3]?e:e-this.offset.click.top>=s[1]?e-i.grid[1]:e+i.grid[1],t=i.grid[0]?this.originalPageX+Math.round((n-this.originalPageX)/i.grid[0])*i.grid[0]:this.originalPageX,n=!s||t-this.offset.click.left>=s[0]||t-this.offset.click.left>s[2]?t:t-this.offset.click.left>=s[0]?t-i.grid[0]:t+i.grid[0]),"y"===i.axis&&(n=this.originalPageX),"x"===i.axis)?this.originalPageY:r)-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:o?0:this.offset.scroll.top),left:n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:o?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,s){return s=s||this._uiHash(),P.ui.plugin.call(this,t,[e,s,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),P.Widget.prototype._trigger.call(this,t,e,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),P.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,s){var i=P.extend({},t,{item:s.element});s.sortables=[],P(s.options.connectToSortable).each(function(){var t=P(this).sortable("instance");t&&!t.options.disabled&&(s.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,i))})},stop:function(e,t,s){var i=P.extend({},t,{item:s.element});s.cancelHelperRemoval=!1,P.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,i))})},drag:function(s,i,o){P.each(o.sortables,function(){var t=!1,e=this;e.positionAbs=o.positionAbs,e.helperProportions=o.helperProportions,e.offset.click=o.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,P.each(o.sortables,function(){return this.positionAbs=o.positionAbs,this.helperProportions=o.helperProportions,this.offset.click=o.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&P.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,o._parent=i.helper.parent(),e.currentItem=i.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return i.helper[0]},s.target=e.currentItem[0],e._mouseCapture(s,!0),e._mouseStart(s,!0,!0),e.offset.click.top=o.offset.click.top,e.offset.click.left=o.offset.click.left,e.offset.parent.left-=o.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=o.offset.parent.top-e.offset.parent.top,o._trigger("toSortable",s),o.dropped=e.element,P.each(o.sortables,function(){this.refreshPositions()}),o.currentItem=o.element,e.fromOutside=o),e.currentItem&&(e._mouseDrag(s),i.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",s,e._uiHash(e)),e._mouseStop(s,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),i.helper.appendTo(o._parent),o._refreshOffsets(s),i.position=o._generatePosition(s,!0),o._trigger("fromSortable",s),o.dropped=!1,P.each(o.sortables,function(){this.refreshPositions()}))})}}),P.ui.plugin.add("draggable","cursor",{start:function(t,e,s){var i=P("body"),s=s.options;i.css("cursor")&&(s._cursor=i.css("cursor")),i.css("cursor",s.cursor)},stop:function(t,e,s){s=s.options;s._cursor&&P("body").css("cursor",s._cursor)}}),P.ui.plugin.add("draggable","opacity",{start:function(t,e,s){e=P(e.helper),s=s.options;e.css("opacity")&&(s._opacity=e.css("opacity")),e.css("opacity",s.opacity)},stop:function(t,e,s){s=s.options;s._opacity&&P(e.helper).css("opacity",s._opacity)}}),P.ui.plugin.add("draggable","scroll",{start:function(t,e,s){s.scrollParentNotHidden||(s.scrollParentNotHidden=s.helper.scrollParent(!1)),s.scrollParentNotHidden[0]!==s.document[0]&&"HTML"!==s.scrollParentNotHidden[0].tagName&&(s.overflowOffset=s.scrollParentNotHidden.offset())},drag:function(t,e,s){var i=s.options,o=!1,n=s.scrollParentNotHidden[0],r=s.document[0];n!==r&&"HTML"!==n.tagName?(i.axis&&"x"===i.axis||(s.overflowOffset.top+n.offsetHeight-t.pageY<i.scrollSensitivity?n.scrollTop=o=n.scrollTop+i.scrollSpeed:t.pageY-s.overflowOffset.top<i.scrollSensitivity&&(n.scrollTop=o=n.scrollTop-i.scrollSpeed)),i.axis&&"y"===i.axis||(s.overflowOffset.left+n.offsetWidth-t.pageX<i.scrollSensitivity?n.scrollLeft=o=n.scrollLeft+i.scrollSpeed:t.pageX-s.overflowOffset.left<i.scrollSensitivity&&(n.scrollLeft=o=n.scrollLeft-i.scrollSpeed))):(i.axis&&"x"===i.axis||(t.pageY-P(r).scrollTop()<i.scrollSensitivity?o=P(r).scrollTop(P(r).scrollTop()-i.scrollSpeed):P(window).height()-(t.pageY-P(r).scrollTop())<i.scrollSensitivity&&(o=P(r).scrollTop(P(r).scrollTop()+i.scrollSpeed))),i.axis&&"y"===i.axis||(t.pageX-P(r).scrollLeft()<i.scrollSensitivity?o=P(r).scrollLeft(P(r).scrollLeft()-i.scrollSpeed):P(window).width()-(t.pageX-P(r).scrollLeft())<i.scrollSensitivity&&(o=P(r).scrollLeft(P(r).scrollLeft()+i.scrollSpeed)))),!1!==o&&P.ui.ddmanager&&!i.dropBehaviour&&P.ui.ddmanager.prepareOffsets(s,t)}}),P.ui.plugin.add("draggable","snap",{start:function(t,e,s){var i=s.options;s.snapElements=[],P(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var t=P(this),e=t.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,s){for(var i,o,n,r,l,a,h,p,c,f=s.options,d=f.snapTolerance,g=e.offset.left,u=g+s.helperProportions.width,m=e.offset.top,v=m+s.helperProportions.height,_=s.snapElements.length-1;0<=_;_--)a=(l=s.snapElements[_].left-s.margins.left)+s.snapElements[_].width,p=(h=s.snapElements[_].top-s.margins.top)+s.snapElements[_].height,u<l-d||a+d<g||v<h-d||p+d<m||!P.contains(s.snapElements[_].item.ownerDocument,s.snapElements[_].item)?(s.snapElements[_].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,P.extend(s._uiHash(),{snapItem:s.snapElements[_].item})),s.snapElements[_].snapping=!1):("inner"!==f.snapMode&&(i=Math.abs(h-v)<=d,o=Math.abs(p-m)<=d,n=Math.abs(l-u)<=d,r=Math.abs(a-g)<=d,i&&(e.position.top=s._convertPositionTo("relative",{top:h-s.helperProportions.height,left:0}).top),o&&(e.position.top=s._convertPositionTo("relative",{top:p,left:0}).top),n&&(e.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left),r)&&(e.position.left=s._convertPositionTo("relative",{top:0,left:a}).left),c=i||o||n||r,"outer"!==f.snapMode&&(i=Math.abs(h-m)<=d,o=Math.abs(p-v)<=d,n=Math.abs(l-g)<=d,r=Math.abs(a-u)<=d,i&&(e.position.top=s._convertPositionTo("relative",{top:h,left:0}).top),o&&(e.position.top=s._convertPositionTo("relative",{top:p-s.helperProportions.height,left:0}).top),n&&(e.position.left=s._convertPositionTo("relative",{top:0,left:l}).left),r)&&(e.position.left=s._convertPositionTo("relative",{top:0,left:a-s.helperProportions.width}).left),!s.snapElements[_].snapping&&(i||o||n||r||c)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,P.extend(s._uiHash(),{snapItem:s.snapElements[_].item})),s.snapElements[_].snapping=i||o||n||r||c)}}),P.ui.plugin.add("draggable","stack",{start:function(t,e,s){var i,s=s.options,s=P.makeArray(P(s.stack)).sort(function(t,e){return(parseInt(P(t).css("zIndex"),10)||0)-(parseInt(P(e).css("zIndex"),10)||0)});s.length&&(i=parseInt(P(s[0]).css("zIndex"),10)||0,P(s).each(function(t){P(this).css("zIndex",i+t)}),this.css("zIndex",i+s.length))}}),P.ui.plugin.add("draggable","zIndex",{start:function(t,e,s){e=P(e.helper),s=s.options;e.css("zIndex")&&(s._zIndex=e.css("zIndex")),e.css("zIndex",s.zIndex)},stop:function(t,e,s){s=s.options;s._zIndex&&P(e.helper).css("zIndex",s._zIndex)}}),P.ui.draggable});/*!
 * imagesLoaded PACKAGED v4.1.4
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */
!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});/*! This file is auto-generated */
/*!
 * Masonry PACKAGED v4.2.2
 * Cascading grid layout library
 * https://masonry.desandro.com
 * MIT License
 * by David DeSandro
 */
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var n=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,n,h)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),o&&!this.isTransitioning)return void this.layoutPosition();var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},f.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},f.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});var functions_interval;if(typeof ecwd_js_init_call!="object"){var ecwd_js_init_call}
if(typeof ecwd_js_init!="function"){var ecwd_js_init}
jQuery(function(){ecwd_js_init=function(){ecwd_eventsOff();if(jQuery('#ecwd-calendar-main-css').length==0){jQuery("<link/>",{id:'ecwd-calendar-main-css',rel:"stylesheet",type:"text/css",href:ecwd.plugin_url+'/css/calendar.css?ver=1'}).appendTo("head")}
var cwidth=jQuery(".calendar_main .ecwd_calendar").width();var view_click=1;var click=1;jQuery('a[href="#ecwd-modal-preview"]').click(function(){setTimeout(function(){showFilterSliderArrow()},1)});clearTimeout(functions_interval);functions_interval=setTimeout(function(){show_filters(0);showMiniCalendarEventOnHover();showFullCalendarEventOnHover();showWidgetEventDesc();calendarFullResponsive();showFilterSliderArrow();createSearchForm();upcomingEventsSlider();doMasonry()},1);jQuery('.ecwd_reset_filters').click(function(){jQuery(this).closest('.ecwd_filters').find('input:checkbox').prop('checked',!1)});jQuery('.ecwd-calendar-more-event').each(function(){jQuery(this).find('.ecwd-more-events-container').ecwd_popup({button:jQuery(this).find('.more_events_link'),title:jQuery(this).find('.ecwd-more-event-title').val(),body_id:"ecwd-modal-preview",body_class:"ecwd-excluded-events",container_class:"ecwd_more_event",after_popup_show:function(el){el.find('li.inmore').show();el.find('.more_events').find('li').on('click',function(){el.find('li').find('.event-details-container').slideUp();if(jQuery(this).find('.event-details-container').is(":visible"))
jQuery(this).find('.event-details-container').slideUp();else jQuery(this).find('.event-details-container').slideDown()});add_single_events_popup()},})});add_single_events_popup();jQuery('.ecwd_calendar_prev_next .next, .ecwd_calendar_prev_next .previous, .ecwd_calendar .type, .cpage, .current-month a, .ecwd_filter, .ecwd_reset_filters').on('click',function(e){var days=jQuery('input[name="ecwd_weekdays[]"]:checked').map(function(){return this.value}).get();var cats=jQuery('input[name="ecwd_categories[]"]:checked').map(function(){return this.value}).get();var tags=jQuery('input[name="ecwd_tags[]"]:checked').map(function(){return this.value}).get();var venues=jQuery('input[name="ecwd_venues[]"]:checked').map(function(){return this.value}).get();var organizers=jQuery('input[name="ecwd_organizers[]"]:checked').map(function(){return this.value}).get();var el=jQuery(this);if(!jQuery(this).is(':checkbox')){e.preventDefault()}
var navLink=jQuery(this);if((!navLink.attr('href')||navLink.attr('href')=='undefined')&&!navLink.is(':checkbox')&&navLink.attr('class')!='ecwd_reset_filters'){navLink=jQuery(this).find('a')}
var main_div=navLink.closest('.calendar_main');var calendar_ids_class_1=jQuery(main_div).find('div.ecwd_calendar').find('div:first-child').data("id");var calendar_ids_class_2=jQuery(main_div).find('div.ecwd_calendar').find('div:first-child').data("type");var display=jQuery(main_div).find('div.ecwd_calendar').attr('class').split(' ')[0].split('-')[2];var calendar_ids=calendar_ids_class_1;var query=jQuery(main_div).find('input.ecwd-search').val();var tag=jQuery('.ecwd_tags').val();var venue=jQuery('.ecwd_venues').val();var organizer=jQuery('.ecwd_organizers').val();var category=jQuery('.ecwd_categories').val();var displays=jQuery(main_div).find('.ecwd_displays').val();var date=jQuery(main_div).find('.ecwd_date').val();var page_items=jQuery(main_div).find('.ecwd_page_items').val();var event_search=jQuery(main_div).find('.event_search').val();var filters=jQuery(main_div).find('.ecwd_filters').val();jQuery(main_div).find('.ecwd_loader').show();jQuery.post(ecwd.ajaxurl,{action:'ecwd_ajax',ecwd_calendar_ids:calendar_ids,ecwd_link:navLink.attr('href'),ecwd_type:calendar_ids_class_2,ecwd_query:query,ecwd_weekdays:days,ecwd_categories:cats,ecwd_tags:tags,ecwd_venues:venues,ecwd_organizers:organizers,ecwd_category:category,ecwd_tag:tag,ecwd_venue:venue,ecwd_organizer:organizer,ecwd_displays:displays,ecwd_prev_display:display,ecwd_page_items:page_items,ecwd_event_search:event_search,ecwd_filters:filters,ecwd_date:1,ecwd_date_filter:date,ecwd_nonce:ecwd.ajaxnonce},function(data){jQuery(main_div).find('div.ecwd_calendar').replaceWith(data);jQuery(main_div).find('.ecwd_loader').hide();if(jQuery('.ecwd_open_event_popup').length>0){jQuery('.ecwd_open_event_popup').css({'cursor':'pointer'})}})
e.stopPropagation()});function createSearchForm(){var scinpt=document.getElementById("ecwd-search-submit");if(scinpt!==null){}
jQuery('.ecwd-search').on("keyup",function(e){if(e.keyCode==13){doSearch(this)}});jQuery('.ecwd-search-submit').on("focus",function(e){doSearch(this)});jQuery('.ecwd-tag-container .ecwd-dropdown-menu > div').click(function(e){jQuery('.ecwd_tags').val(jQuery(this).attr("data-term-tag"));doSearch(this)});jQuery('.ecwd-category-container .ecwd-dropdown-menu > div').click(function(e){jQuery('.ecwd_categories').val(jQuery(this).attr("data-term-category"));doSearch(this)});jQuery('.ecwd-venue-container .ecwd-dropdown-menu > div').click(function(e){jQuery('.ecwd_venues').val(jQuery(this).attr("data-term-venue"));doSearch(this)});jQuery('.ecwd-organizer-container .ecwd-dropdown-menu > div').click(function(e){jQuery('.ecwd_organizers').val(jQuery(this).attr("data-term-organizer"));doSearch(this)})}
function doSearch(el){var main_div=jQuery(el).closest('.calendar_main');var navLink=jQuery(main_div).find('.ecwd_current_link');var query=jQuery(main_div).find('input.ecwd-search').val();var tag=jQuery(main_div).find('.ecwd_tags').val();var venue=jQuery(main_div).find('.ecwd_venues').val();var organizer=jQuery(main_div).find('.ecwd_organizers').val();var category=jQuery(main_div).find('.ecwd_categories').val();var calendar_ids_class_1=jQuery(main_div).find('div.ecwd_calendar').find('div:first-child').data("id");var calendar_ids_class_2=jQuery(main_div).find('div.ecwd_calendar').find('div:first-child').data("type");var calendar_ids=calendar_ids_class_1;var displays=jQuery(main_div).find('.ecwd_displays').val();var page_items=jQuery(main_div).find('.ecwd_page_items').val();var event_search=jQuery(main_div).find('.event_search').val();var filters=jQuery(main_div).find('.ecwd_filters').val();jQuery(main_div).find('.ecwd_loader').show();jQuery.post(ecwd.ajaxurl,{action:'ecwd_ajax',ecwd_query:query,ecwd_category:category,ecwd_tag:tag,ecwd_venue:venue,ecwd_organizer:organizer,ecwd_displays:displays,ecwd_filters:filters,ecwd_page_items:page_items,ecwd_link:navLink.val(),ecwd_calendar_ids:calendar_ids,ecwd_event_search:event_search,ecwd_date:1,ecwd_type:calendar_ids_class_2,ecwd_calendar_search:1,ecwd_nonce:ecwd.ajaxnonce},function(data){jQuery(main_div).find('div.ecwd_calendar').replaceWith(data)});jQuery('.ecwd-search-submit').blur()}
function showMiniCalendarEventOnHover(){};var ulEvent,day;var ulEventFull,dayFull;jQuery('div.ecwd_calendar .has-events').on('click',function(e){dayFull=jQuery(this).attr('data-date').split('-');dayFull=dayFull[2];ulEventFull=jQuery(this).find('ul.events');if(parseInt(jQuery(this).closest('.ecwd_calendar').width())<=300||parseInt(jQuery(window).width())<=768||jQuery(this).closest('.ecwd_calendar').hasClass('ecwd-widget-mini')||jQuery(this).closest('.ecwd_calendar').hasClass('ecwd-page-mini')){if(dayFull==jQuery(this).closest('.ecwd_calendar').find('.ecwd-events-day-details').attr('data-dayNumber')&&jQuery(this).closest('.ecwd_calendar').find('.ecwd-events-day-details').is(':empty')==!1){jQuery(this).closest('.ecwd_calendar').find('.ecwd-events-day-details').html('')}else{showEvent(ulEventFull,this)}
jQuery(this).closest('.ecwd_calendar').find('.ecwd-events-day-details').attr('data-dayNumber',dayFull)}});function showEvent(el,calendar){if(el.parent().parent().parent().parent().attr('class').indexOf("full")!=-1){var obj=el;if(el.length>1){el.each(function(){if(jQuery(this).hasClass('more_events')){obj=jQuery(this);return}})}
jQuery(calendar).closest('.ecwd_calendar').find('.ecwd-events-day-details').html(obj.find('.event-details').clone().css('display','block'))}else if(el.parent().parent().parent().parent().attr('class').indexOf("mini")!=-1){jQuery(calendar).closest('.ecwd_calendar').find('.ecwd-events-day-details').html(el.clone())}
jQuery(calendar).closest('.ecwd_calendar').find('.ecwd-events-day-details').find('li').each(function(){jQuery(this).css('background','none')});add_single_events_popup()}
function showFullCalendarEventOnHover(){if(parseInt(jQuery(window).width())>=768){jQuery('div.ecwd-page-full .has-events ul.events:not(.more_events) > li:not(.ecwd-calendar-more-event)').on('mouseover',function(e){jQuery(this).find('ul.events').show();var show_event_hover_info=jQuery(".show_event_hover_info");if(show_event_hover_info.length>0){jQuery(this).find('div.event-details-container').show()}});jQuery('div.ecwd-page-full .has-events ul.events:not(.more_events) > li:not(.ecwd-calendar-more-event)').on('mouseout',function(e){jQuery(this).find('div.event-details-container').css('display','none')})}
jQuery('div.ecwd-page-full .has-events ul.more_events > li').on('click',function(e){jQuery('div.ecwd-page-full .has-events ul.more_events > li').find('.event-details-container').slideUp();if(jQuery(this).find('.event-details-container').is(":visible"))
jQuery(this).find('.event-details-container').slideUp();else jQuery(this).find('.event-details-container').slideDown()})}
jQuery('.ecwd-show-map-span').click(function(){jQuery('.ecwd-show-map').show()});function doMasonry(){var $container=jQuery('.ecwd-poster-board');if($container.length&&jQuery('.ecwd-poster-board').find('.ecwd-poster-item').length>0){$container.imagesLoaded(function(){$container.masonry({itemSelector:'.ecwd-poster-item'})})}}
function showFilterSliderArrow(){var li_position,li_width,last_child;jQuery(".calendar_main:not([class^='ecwd_widget'] .calendar_main) .ecwd_calendar_view_tabs").each(function(key,element){var cwidth=jQuery(element).closest('.ecwd_calendar').outerWidth();if(cwidth==0)
cwidth=600;if(jQuery(this).find('.ecwd-search').length!=0)
var ecwd_calendar_view_tabs_width=parseInt(cwidth)-50;else var ecwd_calendar_view_tabs_width=parseInt(cwidth);if(parseInt(jQuery('body').width())<=768||jQuery(".calendar_full_content .ecwd_calendar").width()<600){var ecwd_calendar_view_visible_count=parseInt(ecwd_calendar_view_tabs_width/110)}else if(parseInt(jQuery('body').width())<=500||jQuery(".calendar_full_content .ecwd_calendar").width()<400){var ecwd_calendar_view_visible_count=parseInt(ecwd_calendar_view_tabs_width/90)}else{var ecwd_calendar_view_visible_count=parseInt(ecwd_calendar_view_tabs_width/150)}
jQuery(element).find('.filter-container').width(ecwd_calendar_view_tabs_width);jQuery(element).find('ul li').each(function(keyli,elementli){if(jQuery(elementli).hasClass('ecwd-selected-mode')){li_position=keyli;li_width=jQuery(elementli).outerWidth()}});if(jQuery(element).find(".filter-arrow-right").css("display")=="block"||last_child==1)
jQuery(element).find('.filter-container ul li').width((ecwd_calendar_view_tabs_width-30)/ecwd_calendar_view_visible_count);else jQuery(element).find('.filter-container ul li').width((ecwd_calendar_view_tabs_width)/ecwd_calendar_view_visible_count);var ecwd_view_item_width=jQuery(element).find('.filter-container ul li').eq(0).innerWidth()-1;if(!(ecwd_calendar_view_tabs_width<ecwd_view_item_width*parseInt(jQuery(element).find('.filter-container ul li').length)&&!(jQuery(element).find("ul li:last-child").hasClass("ecwd-selected-mode"))))
jQuery(element).find('.filter-arrow-right').hide();if(ecwd_calendar_view_tabs_width<ecwd_view_item_width*parseInt(jQuery(element).find('.filter-container ul li').length)&&!(jQuery(element).find("ul li:last-child").hasClass("ecwd-selected-mode"))){jQuery(element).find('.filter-arrow-right').show()}else if(jQuery(element).find("ul li:last-child").hasClass("ecwd-selected-mode")){last_child=1}
if(ecwd_calendar_view_visible_count<=li_position&&li_position!=0){jQuery(element).find('ul li').css({left:"-"+((li_position+1-ecwd_calendar_view_visible_count)*ecwd_view_item_width)+"px"});jQuery(element).find('.filter-arrow-left').show()}else jQuery(element).find('ul li').css({left:"0px"})});jQuery('.ecwd_calendar_view_tabs .filter-arrow-right').click(function(){var view_filter_width=jQuery(this).parent().find('ul li').eq(0).outerWidth();var cwidth=jQuery(this).closest('.ecwd_calendar').outerWidth();if(cwidth==0)
cwidth=600;if(jQuery(this).find('.ecwd-search').length!=0)
var view_filter_container_width=parseInt(cwidth)-50;else var view_filter_container_width=parseInt(cwidth);var view_filter_count=parseInt(jQuery(this).parent().find('ul li').length);jQuery(this).parent().find('.filter-arrow-left').show();if(parseInt(jQuery(this).parent().find('ul li').css('left'))<=-((view_filter_width*view_filter_count)-view_filter_container_width)+view_filter_width)
jQuery(this).hide();if(click&&view_filter_container_width<view_filter_width*view_filter_count&&parseInt(jQuery(this).parent().find('ul li').css('left'))>=-(view_filter_width*(view_filter_count)-view_filter_container_width)){click=0;jQuery(this).parent().find('ul li').animate({left:"-="+view_filter_width},400,function(){click=1})}});jQuery('.ecwd_calendar_view_tabs .filter-arrow-left').click(function(){var view_filter_width=jQuery(this).parent().find('ul li').eq(0).outerWidth();if(jQuery(this).parent().find('.filter-arrow-right').css('display')=='none')
jQuery(this).parent().find('.filter-arrow-right').show();if(parseInt(jQuery(this).parent().find('ul li').css('left'))==-view_filter_width)
jQuery(this).hide();if(click&&parseInt(jQuery(this).parent().find('ul li').css('left'))<0){click=0;jQuery(this).parent().find('ul li').animate({left:"+="+view_filter_width},400,function(){click=1})}})}
function upcomingEventsSlider(){var current_date=Date.parse(Date());var upcoming_events_slider_main=jQuery('.upcoming_events_slider').width();jQuery('.upcoming_events_slider .upcoming_events_item').width(upcoming_events_slider_main);jQuery('.upcoming_events_slider .upcoming_event_container').width(parseInt(upcoming_events_slider_main)-80);jQuery('.upcoming_events_slider > ul').width(upcoming_events_slider_main*jQuery('.upcoming_events_slider .upcoming_events_item').length);if(jQuery(".upcoming_events_slider").width()<jQuery('.upcoming_events_slider > ul').width()){jQuery('.upcoming_events_slider .upcoming_events_slider-arrow-right').show()}
var min=0;jQuery('.upcoming_events_slider .upcoming_events_item').each(function(){var item_date=Date.parse(jQuery(this).data('date'));if(item_date<current_date){min++}else{return!1}});if(min&&min==jQuery('.upcoming_events_slider .upcoming_events_item').length){min--}
jQuery('.upcoming_events_slider .upcoming_events_item').css('left',-upcoming_events_slider_main*min);if(parseInt(jQuery('.upcoming_events_slider .upcoming_events_item').css('left'))<0){jQuery('.upcoming_events_slider').parent().find('.upcoming_events_slider-arrow-left').show()}
if(parseInt(jQuery('.upcoming_events_slider .upcoming_events_item').css('left'))==-(jQuery('.upcoming_events_slider > ul').width()-upcoming_events_slider_main)){jQuery('.upcoming_events_slider').parent().find('.upcoming_events_slider-arrow-right').hide()}
jQuery('.upcoming_events_slider .upcoming_events_slider-arrow-right').click(function(){var events_item_width=jQuery(this).parent().find('ul li').eq(0).width();var events_item_count=parseInt(jQuery(this).parent().find('ul li').length);if(jQuery(this).parent().find('.upcoming_events_slider-arrow-left').css('display')=='none')
jQuery(this).parent().find('.upcoming_events_slider-arrow-left').show();if(click&&upcoming_events_slider_main<events_item_width*events_item_count&&parseInt(jQuery(this).parent().find('ul li').css('left'))>=-(events_item_width*(events_item_count)-upcoming_events_slider_main)){click=0;jQuery(this).parent().find('ul li').animate({left:"-="+events_item_width},400,function(){click=1})}
if(parseInt(jQuery(this).parent().find('ul li').css('left'))<=-(jQuery('.upcoming_events_slider > ul').width()-(2*events_item_width)))
jQuery(this).hide()});jQuery('.upcoming_events_slider .upcoming_events_slider-arrow-left').click(function(){var events_item_width=jQuery(this).parent().find('ul li').eq(0).width();if(jQuery(this).parent().find('.upcoming_events_slider-arrow-right').css('display')=='none')
jQuery(this).parent().find('.upcoming_events_slider-arrow-right').show();if(parseInt(jQuery(this).parent().find('ul li').css('left'))==-events_item_width)
jQuery(this).hide();if(click&&parseInt(jQuery(this).parent().find('ul li').css('left'))<0){click=0;jQuery(this).parent().find('ul li').animate({left:"+="+events_item_width},400,function(){click=1})}})}
function showWidgetEventDesc(){jQuery('.ecwd-widget-mini .event-container, .ecwd-widget-mini .ecwd_list .event-main-content').each(function(){if(jQuery(this).find('.arrow-down').length==0){jQuery(this).find('.ecwd-list-date-cont').append("<span class='arrow-down'>&nbsp</span>");jQuery(this).find('.ecwd-list-date-cont').after("<div class='event_dropdown_cont'></div>");jQuery(this).find('.event_dropdown_cont').append(jQuery(this).children(".event-venue,.event-content, .event-organizers"));jQuery(this).find('.arrow-down').click(function(){if(jQuery(this).hasClass('open')){jQuery(this).parent().parent().find('.event_dropdown_cont').slideUp(400);jQuery(this).removeClass('open')}else{jQuery(this).parent().parent().find('.event_dropdown_cont').slideDown(400);jQuery(this).addClass('open')}})}})}
function calendarFullResponsive(){if(jQuery(window).width()<=500){jQuery('div[class^="ecwd-page"] .event-container, div[class^="ecwd-page"] .ecwd_list .event-main-content').each(function(){if(jQuery(this).find('.arrow-down').length==0){var content=jQuery(this).find('.event-content').html();if(jQuery(this).hasClass("event-container")){jQuery(this).find('.event-content').html(jQuery(this).find('.ecwd-list-img').html()+content);jQuery(this).find('.ecwd-list-img').remove()}else{var content=jQuery(this).find('.event-content').html();jQuery(this).find('.event-content').html(jQuery(this).prev().html()+content);jQuery(this).prev().remove()}
jQuery(this).find('.ecwd-list-date-cont').append("<span class='arrow-down'>&nbsp</span>");jQuery(this).find('.ecwd-list-date-cont').after("<div class='event_dropdown_cont'></div>");jQuery(this).find('.event_dropdown_cont').append(jQuery(this).children(".event-venue,.event-content, .event-organizers"));jQuery(this).find('.arrow-down').each(function(){jQuery(this).click(function(){if(jQuery(this).hasClass('open')){jQuery(this).parent().parent().find('.event_dropdown_cont').slideUp(400);jQuery(this).removeClass('open')}else{jQuery(this).parent().parent().find('.event_dropdown_cont').slideDown(400);jQuery(this).addClass('open')}})})}})}else if(jQuery(window).width()>500){jQuery('div[class^="ecwd-page"] .event-container, div[class^="ecwd-page"] .ecwd_list .event-main-content').each(function(){if(jQuery(this).find('.arrow-down').length!=0){if(jQuery(this).hasClass("event-container")){jQuery(this).find('.event-title').before('<div class="ecwd-list-img"><div class="ecwd-list-img-container">'+jQuery(this).find('.ecwd-list-img-container').html()+'</div></div>');jQuery(this).find('.event-content .ecwd-list-img-container').remove();jQuery(this).find('.ecwd-list-date-cont').after(jQuery(this).find('.event_dropdown_cont').html());jQuery(this).find('.event_dropdown_cont').remove()}else{jQuery(this).parent().find('.ecwd-list-date.resp').after('<div class="ecwd-list-img"><div class="ecwd-list-img-container">'+jQuery(this).find('.ecwd-list-img-container').html()+'</div></div>');jQuery(this).find('.event-content .ecwd-list-img-container').remove();jQuery(this).find('.ecwd-list-date-cont').after(jQuery(this).find('.event_dropdown_cont').html());jQuery(this).find('.event_dropdown_cont').remove()}
jQuery(this).find('.arrow-down').remove()}})}}
function add_single_events_popup(){if(jQuery('.ecwd_open_event_popup').length==0){return}
jQuery('.single_event_popup').ecwd_popup({button:jQuery('.ecwd_open_event_popup'),body_class:"ecwd-excluded-events ecwd_popup_body_scroll",title:ecwd.event_popup_title_text,get_ajax_data:function(el){var start_date=el.attr('start-date-data');var end_date=el.attr('end-date-data');if(start_date&&end_date){var data={action:'ecwd_event_popup_ajax',ecwd_nonce:ecwd.ajaxnonce,id:el.attr('class').split('event')[2],start_date:start_date,end_date:end_date};return data}else{return{}}}})}
setTimeout(function(){if(parseInt(jQuery('body').width())<=768||jQuery(".calendar_full_content").width()<=550){jQuery('.calendar_main').each(function(k,v){jQuery(this).find('.ecwd_show_filters').click(function(){if(jQuery(this).find('span').hasClass('open')){jQuery(this).find('span').html(jQuery('.ecwd_show_filters_text').val());jQuery(this).next().hide();jQuery(this).find('span').removeClass('open')}else{jQuery(this).find('span').html(jQuery('.ecwd_hide_filters_text').val());jQuery(this).next().show();jQuery(this).find('span').addClass('open')}})})}else{jQuery('.calendar_main').each(function(){jQuery(this).find('.ecwd_show_filters span').click(function(){if(jQuery(this).hasClass('open')){jQuery(this).html(jQuery('.ecwd_show_filters_text').val());jQuery(this).closest(".calendar_full_content").find(".ecwd_calendar").css({"max-width":"100%","width":"100%"});jQuery(this).parent().next().hide();jQuery(this).removeClass('open');showFilterSliderArrow();if(jQuery('.ecwd-poster-board').length>0){doMasonry()}}else{jQuery(this).html(jQuery('.ecwd_hide_filters_text').val());jQuery(this).closest(".calendar_full_content").find(".ecwd_filters").css({"max-width":"27%","width":"27%","float":"left"});jQuery(this).closest(".calendar_full_content").find(".ecwd_calendar").css({"max-width":"71%","float":"left"});jQuery(this).parent().next().show();jQuery(this).addClass('open');showFilterSliderArrow();if(jQuery('.ecwd-poster-board').length>0){doMasonry()}}})});jQuery(".month-name").show()}
jQuery('.ecwd_filter_item').unbind().click(function(){jQuery(this).find(".ecwd_filter_checkboxes").slideToggle("slow")})},100);function show_filters(main_div){if(parseInt(jQuery('body').width())<=768||jQuery(".calendar_full_content").width()<=550){jQuery(".calendar_full_content .ecwd_calendar").css("max-width","100%");jQuery(".calendar_full_content .ecwd_filters, .calendar_full_content .ecwd_calendar").css({"max-width":"100%","width":"100%","float":"none"});jQuery(".ecwd_show_filters").removeClass('ecwd_show_filters_left').addClass('ecwd_show_filters_top');if(!main_div){jQuery(".ecwd_show_filters span").html(jQuery('.ecwd_show_filters_text').val());jQuery(".ecwd_show_filters span").removeClass("open");jQuery(".ecwd_filters").hide()}}else{if(!main_div){jQuery(".ecwd_show_filters").removeClass('ecwd_show_filters_top').addClass('ecwd_show_filters_left')}else{if(main_div.find(".ecwd_calendar").hasClass('ecwd-widget-mini')===!1){if(main_div.find(".ecwd_show_filters span").hasClass('open')){main_div.find(".ecwd_calendar").css({"max-width":"71%","float":"left"});main_div.find(".ecwd_filters").css({"max-width":"27%","width":"27%","float":"left"})}else{main_div.find(".ecwd_filters").css({"max-width":"100%","width":"100%","float":"none"});main_div.find(".ecwd_calendar").css({"max-width":"100%","width":"100%","float":"none"})}}}}}
this.showMap=function(){if(ecwd.gmap_key==""){jQuery(".ecwd_map_div").each(function(k,v){var $this=jQuery(this);if($this.closest('.ecwd-show-map').length==1){$this.closest('.ecwd-show-map').hide()}
$this.hide()});return}
if(typeof google=='undefined'||typeof google.maps=="undefined"){var script=document.createElement('script');script.type='text/javascript';script.src='https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&callback=ecwd_js_init_call.showMap&key='+ecwd.gmap_key;document.body.appendChild(script)}else{var maps=[];jQuery(".ecwd_map_div").each(function(k,v){maps[k]=this;var locations=JSON.parse(jQuery(maps[k]).next('textarea').val());var locations_len=Object.keys(locations).length;jQuery(maps[k]).gmap3();var markers=[];var zoom=17;if(locations_len>0&&typeof locations[0]!='undefined'&&typeof locations[0].zoom!='undefined'){zoom=parseInt(locations[0].zoom)}else{zoom=2}
var center={lat:0,lng:0}
for(var i=0;i<locations_len;i++){if(locations[i]){var marker=new Object();marker.lat=locations[i].latlong[0];marker.lng=locations[i].latlong[1];marker.data=locations[i].infow;marker.options=new Object();markers.push(marker);center.lat+=parseFloat(locations[i].latlong[0]);center.lng+=parseFloat(locations[i].latlong[1])}}
if(locations_len>0){center.lat=center.lat/locations_len;center.lng=center.lng/locations_len}
jQuery(maps[k]).gmap3({map:{options:{zoom:zoom,zoomControl:!0,styles:(ecwd.gmap_style!=="")?JSON.parse(ecwd.gmap_style):null,center:center},center:center},marker:{values:markers,options:{draggable:!1},events:{click:function(marker,event,context){var map=jQuery(maps[k]).gmap3("get"),infowindow=jQuery(maps[k]).gmap3({get:{name:"infowindow"}});if(infowindow){infowindow.open(map,marker);infowindow.setContent(context.data)}else{jQuery(maps[k]).gmap3({infowindow:{anchor:marker,options:{content:context.data}}})}}}},})})}}
if(jQuery('.ecwd_map_div').length>0){this.showMap()}}
ecwd_js_init_call=new ecwd_js_init()});function ecwd_eventsOff(){jQuery(".calendar_main,.ecwd-event,.ecwd-organizer,.ecwd-venue").find("*").off();jQuery(".calendar_main,.ecwd-event,.ecwd-organizer,.ecwd-venue").children().off()}
jQuery(window).resize(function(){var window_width=jQuery(window).width();if(typeof checkw=='undefined')
checkw=window_width;if(window_width!=checkw){ecwd_js_init_call=new ecwd_js_init();checkw=window_width}});(()=>{"use strict";jQuery(document).ready((function(){var e=0,t=0;jQuery(".event_timeline.event_loop").each((function(){var n=jQuery(this),i=n.find(".track"),r=n.data("nb"),s=jQuery(this).find(".event_item"),d=jQuery(this).find(".event_past");0==r&&(r=s.length),e=n.width()/r,i.css("width",e*s.length+"px"),t=0-e*d.length,i.css("left",t+"px"),s.each((function(){jQuery(this).css("width",e+"px")})),d.length>0&&n.find(".previous").show(300)})),jQuery(".next").click((function(){var n=jQuery(this).parent(".event_timeline.event_loop"),i=n.find(".track"),r=n.find(".previous");n.find(".next"),jQuery(i).find(".event_item"),t-=e*n.data("nb"),i.width()+t<=n.data("nb")*e&&(t=n.data("nb")*e-i.width(),n.find(".next").hide(300)),i.css("left",t+"px"),r.show(300)})),jQuery(".previous").click((function(){var n=jQuery(this).parent(".event_timeline.event_loop"),i=n.find(".track"),r=n.find(".next");((t+=e*n.data("nb"))>0||0==t)&&(t=0,jQuery(this).hide(300)),r.show(300),i.css("left",t+"px")}))}))})();(()=>{var t={341:function(t){t.exports=function(){"use strict";function t(t,n,s,o,r){!function t(i,n,s,o,r){for(;o>s;){if(o-s>600){var a=o-s+1,h=n-s+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(h-a/2<0?-1:1);t(i,n,Math.max(s,Math.floor(n-h*c/a+u)),Math.min(o,Math.floor(n+(a-h)*c/a+u)),r)}var d=i[n],g=s,_=o;for(e(i,s,n),r(i[o],d)>0&&e(i,s,o);g<_;){for(e(i,g,_),g++,_--;r(i[g],d)<0;)g++;for(;r(i[_],d)>0;)_--}0===r(i[s],d)?e(i,s,_):e(i,++_,o),_<=n&&(s=_+1),n<=_&&(o=_-1)}}(t,n,s||0,o||t.length-1,r||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function o(t,e){r(t,0,t.children.length,e,t)}function r(t,e,i,n,s){s||(s=_(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(var o=e;o<i;o++){var r=t.children[o];a(s,t.leaf?n(r):r)}return s}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function h(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function _(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,i,n,s,o){for(var r=[i,n];r.length;)if(!((n=r.pop())-(i=r.pop())<=s)){var a=i+Math.ceil((n-i)/s/2)*s;t(e,a,i,n,o),r.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!g(t,e))return i;for(var n=this.toBBox,s=[];e;){for(var o=0;o<e.children.length;o++){var r=e.children[o],a=e.leaf?n(r):r;g(t,a)&&(e.leaf?i.push(r):d(t,a)?this._all(r,i):s.push(r))}e=s.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!g(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var s=e.children[n],o=e.leaf?this.toBBox(s):s;if(g(t,o)){if(e.leaf||d(t,o))return!0;i.push(s)}}e=i.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=_([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,o,r=this.data,a=this.toBBox(t),h=[],l=[];r||h.length;){if(r||(r=h.pop(),n=h[h.length-1],i=l.pop(),o=!0),r.leaf){var c=s(t,r.children,e);if(-1!==c)return r.children.splice(c,1),h.push(r),this._condense(h),this}o||r.leaf||!d(r,a)?n?(i++,r=n.children[i],o=!1):r=null:(h.push(r),l.push(i),i=0,n=r,r=r.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var s,r=i-e+1,a=this._maxEntries;if(r<=a)return o(s=_(t.slice(e,i+1)),this.toBBox),s;n||(n=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/Math.pow(a,n-1))),(s=_([])).leaf=!1,s.height=n;var h=Math.ceil(r/a),l=h*Math.ceil(Math.sqrt(a));f(t,e,i,l,this.compareMinX);for(var c=e;c<=i;c+=l){var u=Math.min(c+l-1,i);f(t,c,u,h,this.compareMinY);for(var d=c;d<=u;d+=h){var g=Math.min(d+h-1,u);s.children.push(this._build(t,d,g,n-1))}}return o(s,this.toBBox),s},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var s=1/0,o=1/0,r=void 0,a=0;a<e.children.length;a++){var h=e.children[a],l=c(h),u=(d=t,g=h,(Math.max(g.maxX,d.maxX)-Math.min(g.minX,d.minX))*(Math.max(g.maxY,d.maxY)-Math.min(g.minY,d.minY))-l);u<o?(o=u,s=l<s?l:s,r=h):u===o&&l<s&&(s=l,r=h)}e=r||e.children[0]}var d,g;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),s=[],o=this._chooseSubtree(n,this.data,e,s);for(o.children.push(t),a(o,n);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=_(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=_([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,s,o,a,h,l,u,d=1/0,g=1/0,_=e;_<=i-e;_++){var f=r(t,0,_,this.toBBox),m=r(t,_,i,this.toBBox),p=(s=f,o=m,void 0,void 0,void 0,void 0,a=Math.max(s.minX,o.minX),h=Math.max(s.minY,o.minY),l=Math.min(s.maxX,o.maxX),u=Math.min(s.maxY,o.maxY),Math.max(0,l-a)*Math.max(0,u-h)),y=c(f)+c(m);p<d?(d=p,n=_,g=y<g?y:g):p===d&&y<g&&(g=y,n=_)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:h,s=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var s=this.toBBox,o=r(t,0,e,s),h=r(t,i-e,i,s),l=u(o)+u(h),c=e;c<i-e;c++){var d=t.children[c];a(o,t.leaf?s(d):d),l+=u(o)}for(var g=i-e-1;g>=e;g--){var _=t.children[g];a(h,t.leaf?s(_):_),l+=u(h)}return l},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n}()}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,i),o.exports}(()=>{"use strict";function t(t){t.stopPropagation()}const e=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}},n="propertychange",s=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function o(t,e){return t>e?1:t<e?-1:0}function r(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"==typeof i){for(let s=1;s<n;++s){const n=t[s];if(n===e)return s;if(n<e)return i(e,t[s-1],n)>0?s-1:s}return n-1}if(i>0){for(let i=1;i<n;++i)if(t[i]<e)return i-1;return n-1}if(i<0){for(let i=1;i<n;++i)if(t[i]<=e)return i;return n-1}for(let i=1;i<n;++i){if(t[i]==e)return i;if(t[i]<e)return t[i-1]-e<e-t[i]?i-1:i}return n-1}function a(t,e,i){for(;e<i;){const n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function h(t,e){const i=Array.isArray(e)?e:[e],n=i.length;for(let e=0;e<n;e++)t[t.length]=i[e]}function l(t,e){const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function c(){return!0}function u(){return!1}function d(){}function g(t){for(const e in t)delete t[e]}function _(t){let e;for(e in t)return!1;return!e}const f=class extends s{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const i="string"==typeof t,n=i?t:t.type,s=this.listeners_&&this.listeners_[n];if(!s)return;const o=i?new e(t):t;o.target||(o.target=this.eventTarget_||this);const r=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});let h;n in r||(r[n]=0,a[n]=0),++r[n];for(let t=0,e=s.length;t<e;++t)if(h="handleEvent"in s[t]?s[t].handleEvent(o):s[t].call(this,o),!1===h||o.propagationStopped){h=!1;break}if(0==--r[n]){let t=a[n];for(delete a[n];t--;)this.removeEventListener(n,d);delete r[n]}return h}disposeInternal(){this.listeners_&&g(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(t,e){const i=this.listeners_&&this.listeners_[t];if(i){const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=d,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}},m="change",p="contextmenu",y="click",v="keydown",x="keypress",C="touchmove",S="wheel";function w(t,e,i,n,s){if(n&&n!==t&&(i=i.bind(n)),s){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const o={target:t,type:e,listener:i};return t.addEventListener(e,i),o}function E(t,e,i,n){return w(t,e,i,n,!0)}function T(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),g(t))}class R extends f{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(m)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=w(this,t[s],e);return n}return w(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const n=t.length;i=new Array(n);for(let s=0;s<n;++s)i[s]=E(this,t[s],e)}else i=E(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)!function(t){if(Array.isArray(t))for(let e=0,i=t.length;e<i;++e)T(t[e]);else T(t)}(i);else if(Array.isArray(t))for(let i=0,n=t.length;i<n;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)}}R.prototype.on,R.prototype.once,R.prototype.un;const I=R;function b(){throw new Error("Unimplemented abstract method.")}let M=0;function P(t){return t.ol_uid||(t.ol_uid=String(++M))}class F extends e{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}const L=class extends I{constructor(t){super(),this.on,this.once,this.un,P(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new F(i,t,e)),i=n,this.hasListener(i)&&this.dispatchEvent(new F(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],_(this.values_)&&(this.values_=null),e||this.notify(t,i)}}},k="postrender",A="loadstart",O="loadend",D="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",z=D.includes("firefox"),G=(D.includes("safari")&&!D.includes("chrom")&&(D.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(D)),D.includes("webkit")&&!D.includes("edge")),W=D.includes("macintosh"),j="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,N="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,X="undefined"!=typeof Image&&Image.prototype.decode,Y=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}();function B(t,e,i,n){let s;return s=i&&i.length?i.shift():N?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",n)}function K(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function V(t){let e=t.offsetWidth;const i=getComputedStyle(t);return e+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10),e}function Z(t){let e=t.offsetHeight;const i=getComputedStyle(t);return e+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10),e}function U(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function H(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function q(t){for(;t.lastChild;)t.removeChild(t.lastChild)}const Q=class extends L{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){H(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&H(this.element);for(let t=0,e=this.listenerKeys.length;t<e;++t)T(this.listenerKeys[t]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==d&&this.listenerKeys.push(w(t,k,this.render,this)),t.render())}render(t){}setTarget(t){this.target_="string"==typeof t?document.getElementById(t):t}},J="ol-hidden",$="ol-unselectable",tt="ol-control",et="ol-collapsed",it=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),nt=["style","variant","weight","size","lineHeight","family"],st=function(t){const e=t.match(it);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let t=0,n=nt.length;t<n;++t){const n=e[t+1];void 0!==n&&(i[nt[t]]=n)}return i.families=i.family.split(/,\s?/),i};function ot(t){return Math.pow(t,3)}function rt(t){return 1-ot(1-t)}function at(t){return 3*t*t-2*t*t*t}function ht(t){return t}const lt=class extends Q{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",s=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",o=void 0!==t.zoomInLabel?t.zoomInLabel:"+",r=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",a=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",h=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",l=document.createElement("button");l.className=n,l.setAttribute("type","button"),l.title=a,l.appendChild("string"==typeof o?document.createTextNode(o):o),l.addEventListener(y,this.handleClick_.bind(this,i),!1);const c=document.createElement("button");c.className=s,c.setAttribute("type","button"),c.title=h,c.appendChild("string"==typeof r?document.createTextNode(r):r),c.addEventListener(y,this.handleClick_.bind(this,-i),!1);const u=e+" "+$+" "+tt,d=this.element;d.className=u,d.appendChild(l),d.appendChild(c),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:rt})):e.setZoom(n)}}},ct="pointermove",ut="pointerdown",dt="pointerup";function gt(t,e,i){return Math.min(Math.max(t,e),i)}function _t(t,e,i,n,s,o){const r=s-i,a=o-n;if(0!==r||0!==a){const h=((t-i)*r+(e-n)*a)/(r*r+a*a);h>1?(i=s,n=o):h>0&&(i+=r*h,n+=a*h)}return ft(t,e,i,n)}function ft(t,e,i,n){const s=i-t,o=n-e;return s*s+o*o}function mt(t){return t*Math.PI/180}function pt(t,e){const i=t%e;return i*e<0?i+e:i}function yt(t,e,i){return t+i*(e-t)}function vt(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function xt(t,e){return Math.floor(vt(t,e))}function Ct(t,e){return Math.ceil(vt(t,e))}const St=class extends Q{constructor(e){super({target:(e=e||{}).target,element:document.createElement("div"),render:e.render}),this.dragListenerKeys_=[],this.currentResolution_=void 0,this.direction_=0,this.dragging_,this.heightLimit_=0,this.widthLimit_=0,this.startX_,this.startY_,this.thumbSize_=null,this.sliderInitialized_=!1,this.duration_=void 0!==e.duration?e.duration:200;const i=void 0!==e.className?e.className:"ol-zoomslider",n=document.createElement("button");n.setAttribute("type","button"),n.className=i+"-thumb "+$;const s=this.element;s.className=i+" "+$+" "+tt,s.appendChild(n),s.addEventListener(ut,this.handleDraggerStart_.bind(this),!1),s.addEventListener(ct,this.handleDraggerDrag_.bind(this),!1),s.addEventListener(dt,this.handleDraggerEnd_.bind(this),!1),s.addEventListener(y,this.handleContainerClick_.bind(this),!1),n.addEventListener(y,t,!1)}setMap(t){super.setMap(t),t&&t.render()}initSlider_(){const t=this.element;let e=t.offsetWidth,i=t.offsetHeight;if(0===e&&0===i)return this.sliderInitialized_=!1;const n=getComputedStyle(t);e-=parseFloat(n.paddingRight)+parseFloat(n.paddingLeft),i-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom);const s=t.firstElementChild,o=getComputedStyle(s),r=s.offsetWidth+parseFloat(o.marginRight)+parseFloat(o.marginLeft),a=s.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom);return this.thumbSize_=[r,a],e>i?(this.direction_=1,this.widthLimit_=e-r):(this.direction_=0,this.heightLimit_=i-a),this.sliderInitialized_=!0}handleContainerClick_(t){const e=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),n=this.getResolutionForPosition_(i),s=e.getConstrainedZoom(e.getZoomForResolution(n));e.animateInternal({zoom:s,duration:this.duration_,easing:rt})}handleDraggerStart_(t){if(!this.dragging_&&t.target===this.element.firstElementChild){const e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){const t=this.handleDraggerDrag_,e=this.handleDraggerEnd_,i=this.getMap().getOwnerDocument();this.dragListenerKeys_.push(w(i,ct,t,this),w(i,dt,e,this))}}}handleDraggerDrag_(t){if(this.dragging_){const e=t.clientX-this.startX_,i=t.clientY-this.startY_,n=this.getRelativePosition_(e,i);this.currentResolution_=this.getResolutionForPosition_(n),this.getMap().getView().setResolution(this.currentResolution_)}}handleDraggerEnd_(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(T),this.dragListenerKeys_.length=0)}setThumbPosition_(t){const e=this.getPositionForResolution_(t),i=this.element.firstElementChild;1==this.direction_?i.style.left=this.widthLimit_*e+"px":i.style.top=this.heightLimit_*e+"px"}getRelativePosition_(t,e){let i;return i=1===this.direction_?t/this.widthLimit_:e/this.heightLimit_,gt(i,0,1)}getResolutionForPosition_(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)}getPositionForResolution_(t){return gt(1-this.getMap().getView().getValueForResolutionFunction()(t),0,1)}render(t){if(!t.frameState)return;if(!this.sliderInitialized_&&!this.initSlider_())return;const e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}};function wt(t){return t[0]>0&&t[1]>0}function Et(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}class Tt{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Et(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Tt({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return b()}getImage(t){return b()}getHitDetectionImage(){return b()}getPixelRatio(t){return 1}getImageState(){return b()}getImageSize(){return b()}getOrigin(){return b()}getSize(){return b()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Et(t)}listenImageChange(t){b()}load(){b()}unlistenImageChange(t){b()}}const Rt=Tt,It={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};class bt extends Error{constructor(t){const e=It[t];super(e),this.code=t,this.name="AssertionError",this.message=e}}const Mt=bt;function Pt(t,e){if(!t)throw new Mt(e)}const Ft=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Lt=/^([a-z]*)$|^hsla?\(.*\)$/i;function kt(t){return"string"==typeof t?t:zt(t)}const At=function(){const t={};let e=0;return function(i){let n;if(t.hasOwnProperty(i))n=t[i];else{if(e>=1024){let i=0;for(const n in t)3&i++||(delete t[n],--e)}n=function(t){let e,i,n,s,o;if(Lt.exec(t)&&(t=function(t){const e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);const t=getComputedStyle(e).color;return document.body.removeChild(e),t}return""}(t)),Ft.exec(t)){const r=t.length-1;let a;a=r<=4?1:2;const h=4===r||8===r;e=parseInt(t.substr(1+0*a,a),16),i=parseInt(t.substr(1+1*a,a),16),n=parseInt(t.substr(1+2*a,a),16),s=h?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,h&&(s=(s<<4)+s)),o=[e,i,n,s/255]}else t.startsWith("rgba(")?(o=t.slice(5,-1).split(",").map(Number),Dt(o)):t.startsWith("rgb(")?(o=t.slice(4,-1).split(",").map(Number),o.push(1),Dt(o)):Pt(!1,14);return o}(i),t[i]=n,++e}return n}}();function Ot(t){return Array.isArray(t)?t:At(t)}function Dt(t){return t[0]=gt(t[0]+.5|0,0,255),t[1]=gt(t[1]+.5|0,0,255),t[2]=gt(t[2]+.5|0,0,255),t[3]=gt(t[3],0,1),t}function zt(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function Gt(t){return Array.isArray(t)?zt(t):t}const Wt="10px sans-serif",jt="#000",Nt="round",Xt=[],Yt="round",Bt="#000",Kt="center",Vt="middle",Zt=[0,0,0,0],Ut=new L;let Ht,qt=null;const Qt={},Jt=function(){const t="32px ",e=["monospace","serif"],i=e.length,n="wmytzilWMYTZIL@#/&?$%10";let s,o;function r(s,r,a){let h=!0;for(let l=0;l<i;++l){const i=e[l];if(o=ee(s+" "+r+" "+t+i,n),a!=i){const e=ee(s+" "+r+" "+t+a+","+i,n);h=h&&e!=o}}return!!h}function a(){let t=!0;const e=Ut.getKeys();for(let i=0,n=e.length;i<n;++i){const n=e[i];Ut.get(n)<100&&(r.apply(this,n.split("\n"))?(g(Qt),qt=null,Ht=void 0,Ut.set(n,100)):(Ut.set(n,Ut.get(n)+1,!0),t=!1))}t&&(clearInterval(s),s=void 0)}return function(t){const e=st(t);if(!e)return;const i=e.families;for(let t=0,n=i.length;t<n;++t){const n=i[t],o=e.style+"\n"+e.weight+"\n"+n;void 0===Ut.get(o)&&(Ut.set(o,100,!0),r(e.style,e.weight,n)||(Ut.set(o,0,!0),void 0===s&&(s=setInterval(a,32))))}}}(),$t=function(){let t;return function(e){let i=Qt[e];if(null==i){if(N){const t=st(e),n=te(e,"Žg");i=(isNaN(Number(t.lineHeight))?1.2:Number(t.lineHeight))*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.minHeight="0",t.style.maxHeight="none",t.style.height="auto",t.style.padding="0",t.style.border="none",t.style.position="absolute",t.style.display="block",t.style.left="-99999px"),t.style.font=e,document.body.appendChild(t),i=t.offsetHeight,document.body.removeChild(t);Qt[e]=i}return i}}();function te(t,e){return qt||(qt=B(1,1)),t!=Ht&&(qt.font=t,Ht=qt.font),qt.measureText(e)}function ee(t,e){return te(t,e).width}function ie(t,e,i){if(e in i)return i[e];const n=e.split("\n").reduce(((e,i)=>Math.max(e,ee(t,i))),0);return i[e]=n,n}class ne extends Rt{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=void 0!==t.radius?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new ne({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const i=this.renderOptions_,n=B(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return 2}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius_,s=void 0===this.radius2_?n:this.radius2_;if(n<s){const t=n;n=s,s=t}const o=void 0===this.radius2_?this.points_:2*this.points_,r=2*Math.PI/o,a=s*Math.sin(r),h=n-Math.sqrt(s*s-a*a),l=Math.sqrt(a*a+h*h),c=l/a;if("miter"===t&&c<=i)return c*e;const u=e/2/c,d=e/2*(h/l),g=Math.sqrt((n+u)*(n+u)+d*d)-n;if(void 0===this.radius2_||"bevel"===t)return 2*g;const _=n*Math.sin(r),f=s-Math.sqrt(n*n-_*_),m=Math.sqrt(_*_+f*f)/_;if(m<=i){const t=m*e/2-s-n;return 2*Math.max(g,t)}return 2*g}createRenderOptions(){let t,e=Yt,i=0,n=null,s=0,o=0;this.stroke_&&(t=this.stroke_.getColor(),null===t&&(t=Bt),t=Gt(t),o=this.stroke_.getWidth(),void 0===o&&(o=1),n=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset(),e=this.stroke_.getLineJoin(),void 0===e&&(e=Yt),i=this.stroke_.getMiterLimit(),void 0===i&&(i=10));const r=this.calculateLineJoinSize_(e,o,i),a=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*a+r),lineDash:n,lineDashOffset:s,lineJoin:e,miterLimit:i}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let t=this.fill_.getColor();null===t&&(t=jt),e.fillStyle=Gt(t),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){if(this.fill_){let e=this.fill_.getColor(),i=0;if("string"==typeof e&&(e=Ot(e)),null===e?i=1:Array.isArray(e)&&(i=4===e.length?e[3]:1),0===i){const e=B(t.size,t.size);this.hitDetectionCanvas_=e.canvas,this.drawHitDetectionCanvas_(t,e)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(t){let e=this.points_;const i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{const n=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);const s=this.angle_-Math.PI/2,o=2*Math.PI/e;for(let r=0;r<e;r++){const e=s+r*o,a=r%2==0?i:n;t.lineTo(a*Math.cos(e),a*Math.sin(e))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=jt,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}}const se=ne;class oe extends se{constructor(t){super({points:1/0,fill:(t=t||{radius:5}).fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new oe({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const re=oe;class ae{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null}clone(){const t=this.getColor();return new ae({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const he=ae;class le{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new le({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const ce=le;class ue{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=_e,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new ue({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=_e,this.geometry_=t}setZIndex(t){this.zIndex_=t}}let de=null;function ge(t,e){if(!de){const t=new he({color:"rgba(255,255,255,0.4)"}),e=new ce({color:"#3399CC",width:1.25});de=[new ue({image:new re({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return de}function _e(t){return t.getGeometry()}const fe=ue;function me(t,e,i){return e+":"+t+":"+(i?kt(i):"null")}const pe=new class{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];3&t++||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,i){const n=me(t,e,i);return n in this.cache_?this.cache_[n]:null}set(t,e,i,n){const s=me(t,e,i);this.cache_[s]=n,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}},ye={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function ve(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0,n=t.length;i<n;++i)Pe(e,t[i]);return e}function xe(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function Ce(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function Se(t,e,i){let n,s;return n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,s=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0,n*n+s*s}function we(t,e){return Te(t,e[0],e[1])}function Ee(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Te(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function Re(t,e){const i=t[0],n=t[1],s=t[2],o=t[3],r=e[0],a=e[1];let h=ye.UNKNOWN;return r<i?h|=ye.LEFT:r>s&&(h|=ye.RIGHT),a<n?h|=ye.BELOW:a>o&&(h|=ye.ABOVE),h===ye.UNKNOWN&&(h=ye.INTERSECTING),h}function Ie(t,e,i,n,s){return s?(s[0]=t,s[1]=e,s[2]=i,s[3]=n,s):[t,e,i,n]}function be(t){return Ie(1/0,1/0,-1/0,-1/0,t)}function Me(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Pe(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function Fe(t,e,i,n,s){for(;i<n;i+=s)Le(t,e[i],e[i+1]);return t}function Le(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function ke(t,e){let i;return i=e(Oe(t)),i||(i=e(De(t)),i||(i=e(Be(t)),i||(i=e(Ye(t)),i||!1)))}function Ae(t){let e=0;return Ze(t)||(e=Ke(t)*Ne(t)),e}function Oe(t){return[t[0],t[1]]}function De(t){return[t[2],t[1]]}function ze(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function Ge(t,e){let i;return"bottom-left"===e?i=Oe(t):"bottom-right"===e?i=De(t):"top-left"===e?i=Ye(t):"top-right"===e?i=Be(t):Pt(!1,13),i}function We(t,e,i,n,s){const[o,r,a,h,l,c,u,d]=je(t,e,i,n);return Ie(Math.min(o,a,l,u),Math.min(r,h,c,d),Math.max(o,a,l,u),Math.max(r,h,c,d),s)}function je(t,e,i,n){const s=e*n[0]/2,o=e*n[1]/2,r=Math.cos(i),a=Math.sin(i),h=s*r,l=s*a,c=o*r,u=o*a,d=t[0],g=t[1];return[d-h+u,g-l-c,d-h-u,g-l+c,d+h-u,g+l+c,d+h+u,g+l-c,d-h+u,g-l-c]}function Ne(t){return t[3]-t[1]}function Xe(t,e,i){const n=i||[1/0,1/0,-1/0,-1/0];return Ve(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):be(n),n}function Ye(t){return[t[0],t[3]]}function Be(t){return[t[2],t[3]]}function Ke(t){return t[2]-t[0]}function Ve(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Ze(t){return t[2]<t[0]||t[3]<t[1]}function Ue(t,e){const i=e.getExtent(),n=ze(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){const e=Ke(i),s=Math.floor((n[0]-i[0])/e)*e;t[0]-=s,t[2]-=s}return t}function He(t,e,i){const n=t;let s=!0,o=!1,r=!1;const a=[E(n,"load",(function(){r=!0,o||e()}))];return n.src&&X?(o=!0,n.decode().then((function(){s&&e()})).catch((function(t){s&&(r?e():i())}))):a.push(E(n,"error",i)),function(){s=!1,a.forEach(T)}}let qe=null;class Qe extends f{constructor(t,e,i,n,s,o){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=n,this.canvas_={},this.color_=o,this.unlisten_=null,this.imageState_=s,this.size_=i,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&2===this.imageState_){qe||(qe=B(1,1,void 0,{willReadFrequently:!0})),qe.drawImage(this.image_,0,0);try{qe.getImageData(0,0,1,1),this.tainted_=!1}catch(t){qe=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(m)}handleImageError_(){this.imageState_=3,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=2,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=B(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(0===this.imageState_){this.image_||this.initializeImage_(),this.imageState_=1;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=He(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||2!==this.imageState_)return;const e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);const n=i.getContext("2d");n.scale(t,t),n.drawImage(e,0,0),n.globalCompositeOperation="multiply",n.fillStyle=kt(this.color_),n.fillRect(0,0,i.width/t,i.height/t),n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),this.canvas_[t]=i}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Je(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class $e extends Rt{constructor(t){const e=void 0!==(t=t||{}).opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,s=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;const o=void 0!==t.img?t.img:null;this.imgSize_=t.imgSize;let r=t.src;Pt(!(void 0!==r&&o),4),Pt(!o||o&&this.imgSize_,5),void 0!==r&&0!==r.length||!o||(r=o.src||P(o)),Pt(void 0!==r&&r.length>0,6),Pt(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),69);const a=void 0!==t.src?0:2;if(this.color_=void 0!==t.color?Ot(t.color):null,this.iconImage_=function(t,e,i,n,s,o){let r=pe.get(e,n,o);return r||(r=new Qe(t,e,i,n,s,o),pe.set(e,n,o,r)),r}(o,r,void 0!==this.imgSize_?this.imgSize_:null,this.crossOrigin_,a,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(!(n instanceof HTMLCanvasElement||n.src&&n.complete)){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(Je(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}e=n.width,i=n.height}void 0!==e&&this.setScale(Je(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new $e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:2==this.iconImage_.getImageState()?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:2==this.iconImage_.getImageState()?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(m,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(m,t)}}const ti=$e;class ei{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Et(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new he({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding}clone(){const t=this.getScale();return new ei({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Et(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const ii=ei,ni={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937},si=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||ni[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}},oi=6378137,ri=Math.PI*oi,ai=[-ri,-ri,ri,ri],hi=[-180,-85,180,85],li=oi*Math.log(Math.tan(Math.PI/2));class ci extends si{constructor(t){super({code:t,units:"m",extent:ai,global:!0,worldExtent:hi,getPointResolution:function(t,e){return t/Math.cosh(e[1]/oi)}})}}const ui=[new ci("EPSG:3857"),new ci("EPSG:102100"),new ci("EPSG:102113"),new ci("EPSG:900913"),new ci("http://www.opengis.net/def/crs/EPSG/0/3857"),new ci("http://www.opengis.net/gml/srs/epsg.xml#3857")];const di=[-180,-90,180,90],gi=6378137*Math.PI/180;class _i extends si{constructor(t,e){super({code:t,units:"degrees",extent:di,axisOrientation:e,global:!0,metersPerUnit:gi,worldExtent:di})}}const fi=[new _i("CRS:84"),new _i("EPSG:4326","neu"),new _i("urn:ogc:def:crs:OGC:1.3:CRS84"),new _i("urn:ogc:def:crs:OGC:2:84"),new _i("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new _i("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new _i("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let mi={},pi={};function yi(t,e,i){const n=t.getCode(),s=e.getCode();n in pi||(pi[n]={}),pi[n][s]=i}function vi(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function xi(t,e){const i=Math.cos(e),n=Math.sin(e),s=t[0]*i-t[1]*n,o=t[1]*i+t[0]*n;return t[0]=s,t[1]=o,t}function Ci(t,e){if(e.canWrapX()){const i=Ke(e.getExtent()),n=function(t,e,i){const n=e.getExtent();let s=0;return e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])&&(i=i||Ke(n),s=Math.floor((t[0]-n[0])/i)),s}(t,e,i);n&&(t[0]-=n*i)}return t}const Si=6371008.8;function wi(t,e,i){i=i||Si;const n=mt(t[1]),s=mt(e[1]),o=(s-n)/2,r=mt(e[0]-t[0])/2,a=Math.sin(o)*Math.sin(o)+Math.sin(r)*Math.sin(r)*Math.cos(n)*Math.cos(s);return 2*i*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}const Ei={info:1,warn:2,error:3,none:4};let Ti=Ei.info;function Ri(...t){Ti>Ei.warn||console.warn(...t)}let Ii=!0;function bi(t,e){if(void 0!==e)for(let i=0,n=t.length;i<n;++i)e[i]=t[i];else e=t.slice();return e}function Mi(t,e){if(void 0!==e&&t!==e){for(let i=0,n=t.length;i<n;++i)e[i]=t[i];t=e}return t}function Pi(t){!function(t,e){mi[t]=e}(t.getCode(),t),yi(t,t,bi)}function Fi(t){return"string"==typeof t?mi[e=t]||mi[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function Li(t,e,i,n){let s;const o=(t=Fi(t)).getPointResolutionFunc();if(o){if(s=o(e,i),n&&n!==t.getUnits()){const e=t.getMetersPerUnit();e&&(s=s*e/ni[n])}}else{const o=t.getUnits();if("degrees"==o&&!n||"degrees"==n)s=e;else{const r=Di(t,Fi("EPSG:4326"));if(r===Mi&&"degrees"!==o)s=e*t.getMetersPerUnit();else{let t=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];t=r(t,t,2),s=(wi(t.slice(0,2),t.slice(2,4))+wi(t.slice(4,6),t.slice(6,8)))/2}const a=n?ni[n]:t.getMetersPerUnit();void 0!==a&&(s/=a)}}return s}function ki(t){!function(t){t.forEach(Pi)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&yi(e,t,bi)}))}))}function Ai(t,e){return t?"string"==typeof t?Fi(t):t:Fi(e)}function Oi(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||Di(t,e)===bi)&&i}function Di(t,e){let i=function(t,e){let i;return t in pi&&e in pi[t]&&(i=pi[t][e]),i}(t.getCode(),e.getCode());return i||(i=Mi),i}function zi(t,e){return Di(Fi(t),Fi(e))}function Gi(t,e,i){return zi(e,i)(t,void 0,t.length)}let Wi=null;function ji(){return Wi}function Ni(t,e){return t}function Xi(t,e){return Ii&&!vi(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(Ii=!1,Ri("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function Yi(t,e){return t}function Bi(t,e){return t}function Ki(t,e){return t}var Vi,Zi,Ui;ki(ui),ki(fi),Vi=ui,Zi=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let s=0;s<n;s+=i){e[s]=ri*t[s]/180;let i=oi*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));i>li?i=li:i<-li&&(i=-li),e[s+1]=i}return e},Ui=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let s=0;s<n;s+=i)e[s]=180*t[s]/ri,e[s+1]=360*Math.atan(Math.exp(t[s+1]/oi))/Math.PI-90;return e},fi.forEach((function(t){Vi.forEach((function(e){yi(t,e,Zi),yi(e,t,Ui)}))}));class Hi extends L{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Hi(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(T(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=w(t,m,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;let e;return Array.isArray(t)?e=t:(Pt("function"==typeof t.getZIndex,41),e=[t]),function(){return e}}(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}const qi=Hi,Qi="add",Ji="remove",$i="length";class tn extends e{constructor(t,e,i){super(t),this.element=e,this.index=i}}const en=class extends L{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let t=0,e=this.array_.length;t<e;++t)this.assertUnique_(this.array_[t],t);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get($i)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new tn(Qi,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new tn(Ji,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new tn(Ji,i,t)),this.dispatchEvent(new tn(Qi,e,t))}updateLength_(){this.set($i,this.array_.length)}assertUnique_(t,e){for(let i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new Mt(58)}};function nn(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function sn(t,e,i,n,s,o,r,a){const h=Math.sin(o),l=Math.cos(o);return t[0]=n*l,t[1]=s*h,t[2]=-n*h,t[3]=s*l,t[4]=r*n*l-a*n*h+e,t[5]=r*s*h+a*s*l+i,t}function on(t,e){const i=(n=e)[0]*n[3]-n[1]*n[2];var n;Pt(0!==i,32);const s=e[0],o=e[1],r=e[2],a=e[3],h=e[4],l=e[5];return t[0]=a/i,t[1]=-o/i,t[2]=-r/i,t[3]=s/i,t[4]=(r*l-a*h)/i,t[5]=-(s*l-o*h)/i,t}let rn;function an(t){const e="matrix("+t.join(", ")+")";if(N)return e;const i=rn||(rn=document.createElement("div"));return i.style.transform=e,i.style.transform}new Array(6);const hn="opacity",ln="visible",cn="extent",un="zIndex",dn="maxResolution",gn="minResolution",fn="maxZoom",mn="minZoom",pn="source",yn=class extends L{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[hn]=void 0!==t.opacity?t.opacity:1,Pt("number"==typeof e[hn],64),e[ln]=void 0===t.visible||t.visible,e[un]=t.zIndex,e[dn]=void 0!==t.maxResolution?t.maxResolution:1/0,e[gn]=void 0!==t.minResolution?t.minResolution:0,e[mn]=void 0!==t.minZoom?t.minZoom:-1/0,e[fn]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=gt(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return b()}getLayerStatesArray(t){return b()}getExtent(){return this.get(cn)}getMaxResolution(){return this.get(dn)}getMinResolution(){return this.get(gn)}getMinZoom(){return this.get(mn)}getMaxZoom(){return this.get(fn)}getOpacity(){return this.get(hn)}getSourceState(){return b()}getVisible(){return this.get(ln)}getZIndex(){return this.get(un)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(cn,t)}setMaxResolution(t){this.set(dn,t)}setMinResolution(t){this.set(gn,t)}setMaxZoom(t){this.set(fn,t)}setMinZoom(t){this.set(mn,t)}setOpacity(t){Pt("number"==typeof t,64),this.set(hn,t)}setVisible(t){this.set(ln,t)}setZIndex(t){this.set(un,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},vn="prerender",xn="postrender",Cn="precompose",Sn="rendercomplete",wn={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},En=42,Tn=256;function Rn(t,e,i){return function(n,s,o,r,a){if(!n)return;if(!s&&!e)return n;const h=e?0:o[0]*s,l=e?0:o[1]*s,c=a?a[0]:0,u=a?a[1]:0;let d=t[0]+h/2+c,g=t[2]-h/2+c,_=t[1]+l/2+u,f=t[3]-l/2+u;d>g&&(d=(g+d)/2,g=d),_>f&&(_=(f+_)/2,f=_);let m=gt(n[0],d,g),p=gt(n[1],_,f);if(r&&i&&s){const t=30*s;m+=-t*Math.log(1+Math.max(0,d-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-g)/t),p+=-t*Math.log(1+Math.max(0,_-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-f)/t)}return[m,p]}}function In(t){return t}function bn(t,e,i,n){const s=Ke(e)/i[0],o=Ne(e)/i[1];return n?Math.min(t,Math.max(s,o)):Math.min(t,Math.min(s,o))}function Mn(t,e,i){let n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),gt(n,i/2,2*e)}function Pn(t,e,i,n,s){return i=void 0===i||i,function(o,r,a,h){if(void 0!==o){const r=n?bn(t,n,a,s):t;return i&&h?Mn(o,r,e):gt(o,e,r)}}}function Fn(t){if(void 0!==t)return 0}function Ln(t){if(void 0!==t)return t}function kn(t,e,i,n,s,o){o=o||[];let r=0;for(let a=e;a<i;a+=n){const e=t[a],i=t[a+1];o[r++]=s[0]*e+s[2]*i+s[4],o[r++]=s[1]*e+s[3]*i+s[5]}return o&&o.length!=r&&(o.length=r),o}function An(t,e,i,n,s,o,r){r=r||[];const a=Math.cos(s),h=Math.sin(s),l=o[0],c=o[1];let u=0;for(let s=e;s<i;s+=n){const e=t[s]-l,i=t[s+1]-c;r[u++]=l+e*a-i*h,r[u++]=c+e*h+i*a;for(let e=s+2;e<s+n;++e)r[u++]=t[e]}return r&&r.length!=u&&(r.length=u),r}const On=[1,0,0,1,0,0],Dn=class extends L{constructor(){super(),this.extent_=[1/0,1/0,-1/0,-1/0],this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=function(t){let e,i,n,s=!1;return function(){const o=Array.prototype.slice.call(arguments);return s&&this===n&&l(o,i)||(s=!0,n=this,i=o,e=t.apply(this,arguments)),e}}((function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return b()}closestPointXY(t,e,i,n){return b()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return b()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&be(t),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)}rotate(t,e){b()}scale(t,e,i){b()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return b()}getType(){return b()}applyTransform(t){b()}intersectsExtent(t){return b()}translate(t,e){b()}transform(t,e){const i=Fi(t),n="tile-pixels"==i.getUnits()?function(t,n,s){const o=i.getExtent(),r=i.getWorldExtent(),a=Ne(r)/Ne(o);return sn(On,r[0],r[3],a,-a,0,0,0),kn(t,0,t.length,s,On,n),zi(i,e)(t,n,s)}:zi(i,e);return this.applyTransform(n),this}};function zn(t){let e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}const Gn=class extends Dn{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return e=this.flatCoordinates,i=this.flatCoordinates.length,n=this.stride,Fe(be(t),e,0,i,n);var e,i,n}getCoordinates(){return b()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=zn(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){b()}setLayout(t,e,i){let n;if(t)n=zn(t);else{for(let t=0;t<i;++t){if(0===e.length)return this.layout="XY",void(this.stride=2);e=e[0]}n=e.length,t=function(t){let e;return 2==t?e="XY":3==t?e="XYZ":4==t&&(e="XYZM"),e}(n)}this.layout=t,this.stride=n}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();An(i,0,i.length,n,t,e,i),this.changed()}}scale(t,e,i){void 0===e&&(e=t),i||(i=ze(this.getExtent()));const n=this.getFlatCoordinates();if(n){const s=this.getStride();!function(t,e,i,n,s,o,r,a){a=a||[];const h=r[0],l=r[1];let c=0;for(let e=0;e<i;e+=n){const i=t[e]-h,r=t[e+1]-l;a[c++]=h+s*i,a[c++]=l+o*r;for(let i=e+2;i<e+n;++i)a[c++]=t[i]}a&&a.length!=c&&(a.length=c)}(n,0,n.length,s,t,e,i,n),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();!function(t,e,i,n,s,o,r){r=r||[];let a=0;for(let e=0;e<i;e+=n){r[a++]=t[e]+s,r[a++]=t[e+1]+o;for(let i=e+2;i<e+n;++i)r[a++]=t[i]}r&&r.length!=a&&(r.length=a)}(i,0,i.length,n,t,e,i),this.changed()}}};function Wn(t,e,i,n,s,o,r){const a=t[e],h=t[e+1],l=t[i]-a,c=t[i+1]-h;let u;if(0===l&&0===c)u=e;else{const d=((s-a)*l+(o-h)*c)/(l*l+c*c);if(d>1)u=i;else{if(d>0){for(let s=0;s<n;++s)r[s]=yt(t[e+s],t[i+s],d);return void(r.length=n)}u=e}}for(let e=0;e<n;++e)r[e]=t[u+e];r.length=n}function jn(t,e,i,n,s){let o=t[e],r=t[e+1];for(e+=n;e<i;e+=n){const i=t[e],n=t[e+1],a=ft(o,r,i,n);a>s&&(s=a),o=i,r=n}return s}function Nn(t,e,i,n,s,o,r,a,h,l,c){if(e==i)return l;let u,d;if(0===s){if(d=ft(r,a,t[e],t[e+1]),d<l){for(u=0;u<n;++u)h[u]=t[e+u];return h.length=n,d}return l}c=c||[NaN,NaN];let g=e+n;for(;g<i;)if(Wn(t,g-n,g,n,r,a,c),d=ft(r,a,c[0],c[1]),d<l){for(l=d,u=0;u<n;++u)h[u]=c[u];h.length=n,g+=n}else g+=n*Math.max((Math.sqrt(d)-Math.sqrt(l))/s|0,1);if(o&&(Wn(t,i-n,e,n,r,a,c),d=ft(r,a,c[0],c[1]),d<l)){for(l=d,u=0;u<n;++u)h[u]=c[u];h.length=n}return l}function Xn(t,e,i,n){for(let s=0,o=i.length;s<o;++s){const o=i[s];for(let i=0;i<n;++i)t[e++]=o[i]}return e}function Yn(t,e){return e*Math.round(t/e)}function Bn(t,e,i,n,s,o,r){if(e==i)return r;let a,h,l=Yn(t[e],s),c=Yn(t[e+1],s);e+=n,o[r++]=l,o[r++]=c;do{if(a=Yn(t[e],s),h=Yn(t[e+1],s),(e+=n)==i)return o[r++]=a,o[r++]=h,r}while(a==l&&h==c);for(;e<i;){const i=Yn(t[e],s),u=Yn(t[e+1],s);if(e+=n,i==a&&u==h)continue;const d=a-l,g=h-c,_=i-l,f=u-c;d*f==g*_&&(d<0&&_<d||d==_||d>0&&_>d)&&(g<0&&f<g||g==f||g>0&&f>g)?(a=i,h=u):(o[r++]=a,o[r++]=h,l=a,c=h,a=i,h=u)}return o[r++]=a,o[r++]=h,r}function Kn(t,e,i,n,s){s=void 0!==s?s:[];let o=0;for(let r=e;r<i;r+=n)s[o++]=t.slice(r,r+n);return s.length=o,s}function Vn(t,e,i,n,s){s=void 0!==s?s:[];let o=0;for(let r=0,a=i.length;r<a;++r){const a=i[r];s[o++]=Kn(t,e,a,n,s[o]),e=a}return s.length=o,s}function Zn(t,e,i,n,s){s=void 0!==s?s:[];let o=0;for(let r=0,a=i.length;r<a;++r){const a=i[r];s[o++]=1===a.length&&a[0]===e?[]:Vn(t,e,a,n,s[o]),e=a[a.length-1]}return s.length=o,s}function Un(t,e,i,n){let s=0,o=t[i-n],r=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];s+=r*i-o*n,o=i,r=n}return s/2}class Hn extends Gn{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new Hn(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<Se(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(jn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Nn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return Un(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Kn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=function(t,e,i,n,s,o,r){const a=(i-e)/n;if(a<3){for(;e<i;e+=n)o[r++]=t[e],o[r++]=t[e+1];return r}const h=new Array(a);h[0]=1,h[a-1]=1;const l=[e,i-n];let c=0;for(;l.length>0;){const i=l.pop(),o=l.pop();let r=0;const a=t[o],u=t[o+1],d=t[i],g=t[i+1];for(let e=o+n;e<i;e+=n){const i=_t(t[e],t[e+1],a,u,d,g);i>r&&(c=e,r=i)}r>s&&(h[(c-e)/n]=1,o+n<c&&l.push(o,c),c+n<i&&l.push(c,i))}for(let i=0;i<a;++i)h[i]&&(o[r++]=t[e+i*n],o[r++]=t[e+i*n+1]);return r}(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new Hn(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Xn(this.flatCoordinates,0,t,this.stride),this.changed()}}const qn=Hn;class Qn extends Gn{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new Qn(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,o=ft(t,e,s[0],s[1]);if(o<n){const t=this.stride;for(let e=0;e<t;++e)i[e]=s[e];return i.length=t,o}return n}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return function(t,e){const i=t[0],n=t[1];return Ie(i,n,i,n,e)}(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Te(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(t,e,i,n){for(let n=0,s=i.length;n<s;++n)t[e++]=i[n];return e}(this.flatCoordinates,0,t,this.stride),this.changed()}}const Jn=Qn;function $n(t,e,i,n,s){return!ke(s,(function(s){return!ts(t,e,i,n,s[0],s[1])}))}function ts(t,e,i,n,s,o){let r=0,a=t[i-n],h=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];h<=o?n>o&&(i-a)*(o-h)-(s-a)*(n-h)>0&&r++:n<=o&&(i-a)*(o-h)-(s-a)*(n-h)<0&&r--,a=i,h=n}return 0!==r}function es(t,e,i,n,s,o){if(0===i.length)return!1;if(!ts(t,e,i[0],n,s,o))return!1;for(let e=1,r=i.length;e<r;++e)if(ts(t,i[e-1],i[e],n,s,o))return!1;return!0}function is(t,e,i,n,s){const o=Fe([1/0,1/0,-1/0,-1/0],t,e,i,n);return!!Ve(s,o)&&(!!Ee(s,o)||o[0]>=s[0]&&o[2]<=s[2]||o[1]>=s[1]&&o[3]<=s[3]||function(t,e,i,n,o){let r;for(e+=n;e<i;e+=n)if(a=t.slice(e-n,e),h=t.slice(e,e+n),r=function(t,e,i){let n=!1;const s=Re(t,e),o=Re(t,i);if(s===ye.INTERSECTING||o===ye.INTERSECTING)n=!0;else{const r=t[0],a=t[1],h=t[2],l=t[3],c=e[0],u=e[1],d=i[0],g=i[1],_=(g-u)/(d-c);let f,m;o&ye.ABOVE&&!(s&ye.ABOVE)&&(f=d-(g-l)/_,n=f>=r&&f<=h),n||!(o&ye.RIGHT)||s&ye.RIGHT||(m=g-(d-h)*_,n=m>=a&&m<=l),n||!(o&ye.BELOW)||s&ye.BELOW||(f=d-(g-a)/_,n=f>=r&&f<=h),n||!(o&ye.LEFT)||s&ye.LEFT||(m=g-(d-r)*_,n=m>=a&&m<=l)}return n}(s,a,h),r)return r;var a,h;return!1}(t,e,i,n))}function ns(t,e,i,n,s){return!!(is(t,e,i,n,s)||ts(t,e,i,n,s[0],s[1])||ts(t,e,i,n,s[0],s[3])||ts(t,e,i,n,s[2],s[1])||ts(t,e,i,n,s[2],s[3]))}function ss(t,e,i,n){for(;e<i-n;){for(let s=0;s<n;++s){const o=t[e+s];t[e+s]=t[i-n+s],t[i-n+s]=o}e+=n,i-=n}}function os(t,e,i,n){let s=0,o=t[i-n],r=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];s+=(i-o)*(n+r),o=i,r=n}return 0===s?void 0:s>0}function rs(t,e,i,n,s){s=void 0!==s&&s;for(let o=0,r=i.length;o<r;++o){const r=i[o],a=os(t,e,r,n);(0===o?s&&a||!s&&!a:s&&!a||!s&&a)&&ss(t,e,r,n),e=r}return e}class as extends Gn{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?h(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new as(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<Se(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,i,n,s){for(let o=0,r=i.length;o<r;++o){const r=i[o];s=jn(t,e,r,n,s),e=r}return s}(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,i,n,s,o,r,a,h,l,c){c=c||[NaN,NaN];for(let u=0,d=i.length;u<d;++u){const d=i[u];l=Nn(t,e,d,n,s,o,r,a,h,l,c),e=d}return l}(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return es(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return function(t,e,i,n){let s=0;for(let o=0,r=i.length;o<r;++o){const r=i[o];s+=Un(t,e,r,n),e=r}return s}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),rs(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Vn(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=ze(this.getExtent());this.flatInteriorPoint_=function(t,e,i,n,s,r,a){let h,l,c,u,d,g,_;const f=s[r+1],m=[];for(let s=0,o=i.length;s<o;++s){const o=i[s];for(u=t[o-n],g=t[o-n+1],h=e;h<o;h+=n)d=t[h],_=t[h+1],(f<=g&&_<=f||g<=f&&f<=_)&&(c=(f-g)/(_-g)*(d-u)+u,m.push(c)),u=d,g=_}let p=NaN,y=-1/0;for(m.sort(o),u=m[0],h=1,l=m.length;h<l;++h){d=m[h];const s=Math.abs(d-u);s>y&&(c=(u+d)/2,es(t,e,i,n,c,f)&&(p=c,y=s)),u=d}return isNaN(p)&&(p=s[r]),a?(a.push(p,f,y),a):[p,f,y]}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Jn(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new qn(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let s=0;for(let o=0,r=i.length;o<r;++o){const r=i[o],a=new qn(e.slice(s,r),t);n.push(a),s=r}return n}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;!function(t,e,i,n,s){s=void 0!==s&&s;for(let o=0,r=i.length;o<r;++o){const r=i[o],a=os(t,e,r,n);if(0===o){if(s&&a||!s&&!a)return!1}else if(s&&!a||!s&&a)return!1;e=r}return!0}(t,0,this.ends_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=rs(this.orientedFlatCoordinates_,0,this.ends_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=function(t,e,i,n,s,o,r,a){for(let h=0,l=i.length;h<l;++h){const l=i[h];r=Bn(t,e,l,n,s,o,r),a.push(r),e=l}return r}(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new as(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return function(t,e,i,n,s){if(!ns(t,e,i[0],n,s))return!1;if(1===i.length)return!0;for(let e=1,o=i.length;e<o;++e)if($n(t,i[e-1],i[e],n,s)&&!is(t,i[e-1],i[e],n,s))return!1;return!0}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=function(t,e,i,n,s){s=s||[];let o=0;for(let r=0,a=i.length;r<a;++r){const a=Xn(t,e,i[r],n);s[o++]=a,e=a}return s.length=o,s}(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}const hs=as;function ls(t){if(Ze(t))throw new Error("Cannot create polygon from empty extent");const e=t[0],i=t[1],n=t[2],s=t[3],o=[e,i,e,s,n,s,n,i,e,i];return new as(o,"XY",[o.length])}function cs(t,e){setTimeout((function(){t(e)}),0)}function us(t){return!(t.sourceCenter&&t.targetCenter&&!vi(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation}function ds(t,e,i,n,s){const o=Math.cos(-s);let r=Math.sin(-s),a=t[0]*o-t[1]*r,h=t[1]*o+t[0]*r;return a+=(e[0]/2-i[0])*n,h+=(i[1]-e[1]/2)*n,r=-r,[a*o-h*r,h*o+a*r]}const gs=class extends L{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Ai(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&function(t){Ii=!(void 0===t||t)}(),t.center&&(t.center=Xi(t.center,this.projection_)),t.extent&&(t.extent=Bi(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const t in wn)delete e[t];this.setProperties(e,!0);const i=function(t){let e,i,n;let s=void 0!==t.minZoom?t.minZoom:0,o=void 0!==t.maxZoom?t.maxZoom:28;const a=void 0!==t.zoomFactor?t.zoomFactor:2,h=void 0!==t.multiWorld&&t.multiWorld,l=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,c=void 0!==t.showFullExtent&&t.showFullExtent,u=Ai(t.projection,"EPSG:3857"),d=u.getExtent();let g=t.constrainOnlyCenter,_=t.extent;if(h||_||!u.isGlobal()||(g=!1,_=d),void 0!==t.resolutions){const a=t.resolutions;i=a[s],n=void 0!==a[o]?a[o]:a[a.length-1],e=t.constrainResolution?function(t,e,i,n){return e=void 0===e||e,function(s,o,a,h){if(void 0!==s){const l=t[0],c=t[t.length-1],u=i?bn(l,i,a,n):l;if(h)return e?Mn(s,u,c):gt(s,c,u);const d=Math.min(u,s),g=Math.floor(r(t,d,o));return t[g]>u&&g<t.length-1?t[g+1]:t[g]}}}(a,l,!g&&_,c):Pn(i,n,l,!g&&_,c)}else{const r=(d?Math.max(Ke(d),Ne(d)):360*ni.degrees/u.getMetersPerUnit())/Tn/Math.pow(2,0),h=r/Math.pow(2,28);i=t.maxResolution,void 0!==i?s=0:i=r/Math.pow(a,s),n=t.minResolution,void 0===n&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(a,o):r/Math.pow(a,o):h),o=s+Math.floor(Math.log(i/n)/Math.log(a)),n=i/Math.pow(a,o-s),e=t.constrainResolution?function(t,e,i,n,s,o){return n=void 0===n||n,i=void 0!==i?i:0,function(r,a,h,l){if(void 0!==r){const c=s?bn(e,s,h,o):e;if(l)return n?Mn(r,c,i):gt(r,i,c);const u=1e-9,d=Math.ceil(Math.log(e/c)/Math.log(t)-u),g=-a*(.5-u)+.5,_=Math.min(c,r),f=Math.floor(Math.log(e/_)/Math.log(t)+g),m=Math.max(d,f);return gt(e/Math.pow(t,m),i,c)}}}(a,i,n,l,!g&&_,c):Pn(i,n,l,!g&&_,c)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:s,zoomFactor:a}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;const n=function(t){if(void 0!==t.extent){const e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Rn(t.extent,t.constrainOnlyCenter,e)}const e=Ai(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,Rn(t,!1,!1)}return In}(t),s=i.constraint,o=function(t){if(void 0===t.enableRotation||t.enableRotation){const i=t.constrainRotation;return void 0===i||!0===i?(e=e||mt(5),function(t,i){return i?t:void 0!==t?Math.abs(t)<=e?0:t:void 0}):!1===i?Ln:"number"==typeof i?function(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}(i):Ln}var e;return Fn}(t);this.constraints_={center:n,resolution:s,rotation:o},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const i=this.getCenterInternal();if(i){const n=t||[0,0,0,0];e=e||[0,0,0,0];const s=this.getResolution(),o=s/2*(n[3]-e[3]+e[1]-n[1]),r=s/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+o,i[1]-r])}}getUpdatedOptions_(t){const e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let t=0;t<e.length;++t){let i=arguments[t];i.center&&(i=Object.assign({},i),i.center=Xi(i.center,this.getProjection())),i.anchor&&(i=Object.assign({},i),i.anchor=Xi(i.anchor,this.getProjection())),e[t]=i}this.animateInternal.apply(this,e)}animateInternal(t){let e,i=arguments.length;i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n<i&&!this.isDef();++n){const t=arguments[n];t.center&&this.setCenterInternal(t.center),void 0!==t.zoom?this.setZoom(t.zoom):t.resolution&&this.setResolution(t.resolution),void 0!==t.rotation&&this.setRotation(t.rotation)}if(n===i)return void(e&&cs(e,!0));let s=Date.now(),o=this.targetCenter_.slice(),r=this.targetResolution_,a=this.targetRotation_;const h=[];for(;n<i;++n){const t=arguments[n],i={start:s,complete:!1,anchor:t.anchor,duration:void 0!==t.duration?t.duration:1e3,easing:t.easing||at,callback:e};if(t.center&&(i.sourceCenter=o,i.targetCenter=t.center.slice(),o=i.targetCenter),void 0!==t.zoom?(i.sourceResolution=r,i.targetResolution=this.getResolutionForZoom(t.zoom),r=i.targetResolution):t.resolution&&(i.sourceResolution=r,i.targetResolution=t.resolution,r=i.targetResolution),void 0!==t.rotation){i.sourceRotation=a;const e=pt(t.rotation-a+Math.PI,2*Math.PI)-Math.PI;i.targetRotation=a+e,a=i.targetRotation}us(i)?i.complete=!0:s+=i.duration,h.push(i)}this.animations_.push(h),this.setHint(0,1),this.updateAnimations_()}getAnimating(){return this.hints_[0]>0}getInteracting(){return this.hints_[1]>0}cancelAnimations(){let t;this.setHint(0,-this.hints_[0]);for(let e=0,i=this.animations_.length;e<i;++e){const i=this.animations_[e];if(i[0].callback&&cs(i[0].callback,!1),!t)for(let e=0,n=i.length;e<n;++e){const n=i[e];if(!n.complete){t=n.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const t=Date.now();let e=!1;for(let i=this.animations_.length-1;i>=0;--i){const n=this.animations_[i];let s=!0;for(let i=0,o=n.length;i<o;++i){const o=n[i];if(o.complete)continue;const r=t-o.start;let a=o.duration>0?r/o.duration:1;a>=1?(o.complete=!0,a=1):s=!1;const h=o.easing(a);if(o.sourceCenter){const t=o.sourceCenter[0],e=o.sourceCenter[1],i=o.targetCenter[0],n=o.targetCenter[1];this.nextCenter_=o.targetCenter;const s=t+h*(i-t),r=e+h*(n-e);this.targetCenter_=[s,r]}if(o.sourceResolution&&o.targetResolution){const t=1===h?o.targetResolution:o.sourceResolution+h*(o.targetResolution-o.sourceResolution);if(o.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,o.anchor)}this.nextResolution_=o.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==o.sourceRotation&&void 0!==o.targetRotation){const t=1===h?pt(o.targetRotation+Math.PI,2*Math.PI)-Math.PI:o.sourceRotation+h*(o.targetRotation-o.sourceRotation);if(o.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,o.anchor)}this.nextRotation_=o.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!o.complete)break}if(s){this.animations_[i]=null,this.setHint(0,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&cs(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();var s,o;return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],xi(i,t-this.getRotation()),o=e,(s=i)[0]+=+o[0],s[1]+=+o[1]),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),s=this.getResolution();return void 0!==n&&void 0!==s&&(i=[e[0]-t*(e[0]-n[0])/s,e[1]-t*(e[1]-n[1])/s]),i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?Ni(t,this.getProjection()):t}getCenterInternal(){return this.get(wn.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){return Yi(this.calculateExtentInternal(t),this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();Pt(e,1);const i=this.getResolution();Pt(void 0!==i,2);const n=this.getRotation();return Pt(void 0!==n,3),We(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(wn.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Bi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=Ke(t)/e[0],n=Ne(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(wn.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const s=this.padding_;if(s){const t=this.getViewportSizeMinusPadding_();n=ds(n,this.getViewportSize_(),[t[0]/2+s[3],t[1]/2+s[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const s=r(this.resolutions_,t,1);n=s,e=this.resolutions_[s],i=s==this.resolutions_.length-1?2:e/this.resolutions_[s+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=gt(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,gt(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(Pt(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))Pt(!Ze(t),25),i=ls(Bi(t,this.getProjection()));else if("Circle"===t.getType()){const e=Bi(t.getExtent(),this.getProjection());i=ls(e),i.rotate(this.getRotation(),ze(e))}else{const e=ji();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),s=t.getFlatCoordinates(),o=t.getStride();let r=1/0,a=1/0,h=-1/0,l=-1/0;for(let t=0,e=s.length;t<e;t+=o){const e=s[t]*i-s[t+1]*n,o=s[t]*n+s[t+1]*i;r=Math.min(r,e),a=Math.min(a,o),h=Math.max(h,e),l=Math.max(l,o)}return[r,a,h,l]}fitInternal(t,e){let i=(e=e||{}).size;i||(i=this.getViewportSizeMinusPadding_());const n=void 0!==e.padding?e.padding:[0,0,0,0],s=void 0!==e.nearest&&e.nearest;let o;o=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.getResolutionForZoom(e.maxZoom):0;const r=this.rotatedExtentForGeometry(t);let a=this.getResolutionForExtentInternal(r,[i[0]-n[1]-n[3],i[1]-n[0]-n[2]]);a=isNaN(a)?o:Math.max(a,o),a=this.getConstrainedResolution(a,s?0:1);const h=this.getRotation(),l=Math.sin(h),c=Math.cos(h),u=ze(r);u[0]+=(n[1]-n[3])/2*a,u[1]+=(n[0]-n[2])/2*a;const g=u[0]*c-u[1]*l,_=u[1]*c+u[0]*l,f=this.getConstrainedCenter([g,_],a),m=e.callback?e.callback:d;void 0!==e.duration?this.animateInternal({resolution:a,center:f,duration:e.duration,easing:e.easing},m):(this.targetResolution_=a,this.targetCenter_=f,this.applyTargetState_(!1,!0),cs(m,!0))}centerOn(t,e,i){this.centerOnInternal(Xi(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(ds(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,n){let s;const o=this.padding_;if(o&&t){const r=this.getViewportSizeMinusPadding_(-i),a=ds(t,n,[r[0]/2+o[3],r[1]/2+o[0]],e,i);s=[t[0]-a[0],t[1]-a[1]]}return s}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(t){const e=Ni(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&Xi(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(s,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=Xi(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t?Xi(t,this.getProjection()):t)}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),s=this.getViewportSize_(n),o=this.constraints_.resolution(this.targetResolution_,0,s,i),r=this.constraints_.center(this.targetCenter_,o,s,i,this.calculateCenterShift(this.targetCenter_,o,n,s));this.get(wn.ROTATION)!==n&&this.set(wn.ROTATION,n),this.get(wn.RESOLUTION)!==o&&(this.set(wn.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),r&&this.get(wn.CENTER)&&vi(this.get(wn.CENTER),r)||this.set(wn.CENTER,r),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=void 0!==t?t:200;const n=e||0,s=this.constraints_.rotation(this.targetRotation_),o=this.getViewportSize_(s),r=this.constraints_.resolution(this.targetResolution_,n,o),a=this.constraints_.center(this.targetCenter_,r,o,!1,this.calculateCenterShift(this.targetCenter_,r,s,o));if(0===t&&!this.cancelAnchor_)return this.targetResolution_=r,this.targetRotation_=s,this.targetCenter_=a,void this.applyTargetState_();i=i||(0===t?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===r&&this.getRotation()===s&&this.getCenterInternal()&&vi(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:a,resolution:r,duration:t,easing:rt,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(1,1)}endInteraction(t,e,i){i=i&&Xi(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(1,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){const i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}};function _s(t,e){if(!t.visible)return!1;const i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const fs=class extends yn{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(pn,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(pn)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(T(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=w(t,m,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;!t&&i&&(t=i.getView()),e=t instanceof gs?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),n=e.layerStatesArray?e.layerStatesArray.find((t=>t.layer===this)):this.getLayerState();const s=this.getExtent();return _s(n,e.viewState)&&(!s||Ve(s,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];let n=e(t instanceof gs?t.getViewStateAndExtent():t);return Array.isArray(n)||(n=[n]),n}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set("map",t)}getMapInternal(){return this.get("map")}setMap(t){this.mapPrecomposeKey_&&(T(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(T(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=w(t,Cn,(function(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);Pt(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=w(this,m,t.render,t),this.changed())}setSource(t){this.set(pn,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}};function ms(t,e){pe.expire()}const ps=class extends s{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){b()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;sn(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),on(n,i)}forEachFeatureAtCoordinate(t,e,i,n,s,o,r,a){let h;const l=e.viewState;function c(t,e,i,n){return s.call(o,e,t?i:null,n)}const u=l.projection,d=Ci(t.slice(),u),g=[[0,0]];if(u.canWrapX()&&n){const t=Ke(u.getExtent());g.push([-t,0],[t,0])}const _=e.layerStatesArray,f=_.length,m=[],p=[];for(let n=0;n<g.length;n++)for(let s=f-1;s>=0;--s){const o=_[s],u=o.layer;if(u.hasRenderer()&&_s(o,l)&&r.call(a,u)){const s=u.getRenderer(),r=u.getSource();if(s&&r){const a=r.getWrapX()?d:t,l=c.bind(null,o.managed);p[0]=a[0]+g[n][0],p[1]=a[1]+g[n][1],h=s.forEachFeatureAtCoordinate(p,e,i,l,m)}if(h)return h}}if(0===m.length)return;const y=1/m.length;return m.forEach(((t,e)=>t.distanceSq+=e*y)),m.sort(((t,e)=>t.distanceSq-e.distanceSq)),m.some((t=>h=t.callback(t.feature,t.layer,t.geometry))),h}hasFeatureAtCoordinate(t,e,i,n,s,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,c,this,s,o)}getMap(){return this.map_}renderFrame(t){b()}flushDeclutterItems(t){}scheduleExpireIconCache(t){pe.canExpireCache()&&t.postRenderFunctions.push(ms)}},ys=class extends e{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}},vs=class extends ps{constructor(t){super(t),this.fontChangeListenerKey_=w(Ut,n,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=$+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0,this.declutterLayers_=[]}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new ys(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){T(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(Cn,t);const e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),i=t.viewState;this.children_.length=0;const n=this.declutterLayers_;n.length=0;let s=null;for(let o=0,r=e.length;o<r;++o){const r=e[o];t.layerIndex=o;const a=r.layer,h=a.getSourceState();if(!_s(r,i)||"ready"!=h&&"undefined"!=h){a.unrender();continue}const l=a.render(t,s);l&&(l!==s&&(this.children_.push(l),s=l),"getDeclutter"in a&&n.push(a))}this.flushDeclutterItems(t),function(t,e){const i=t.childNodes;for(let n=0;;++n){const s=i[n],o=e[n];if(!s&&!o)break;s!==o&&(s?o?t.insertBefore(o,s):(t.removeChild(s),--n):t.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent("postcompose",t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}flushDeclutterItems(t){const e=this.declutterLayers_;for(let i=e.length-1;i>=0;--i)e[i].renderDeclutter(t);e.length=0}};class xs extends e{constructor(t,e){super(t),this.layer=e}}const Cs="layers";class Ss extends yn{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Cs,this.handleLayersChanged_),i?Array.isArray(i)?i=new en(i.slice(),{unique:!0}):Pt("function"==typeof i.getArray,43):i=new en(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(T),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(w(t,Qi,this.handleLayersAdd_,this),w(t,Ji,this.handleLayersRemove_,this));for(const t in this.listenerKeys_)this.listenerKeys_[t].forEach(T);g(this.listenerKeys_);const e=t.getArray();for(let t=0,i=e.length;t<i;t++){const i=e[t];this.registerLayerListeners_(i),this.dispatchEvent(new xs("addlayer",i))}this.changed()}registerLayerListeners_(t){const e=[w(t,n,this.handleLayerChange_,this),w(t,m,this.handleLayerChange_,this)];t instanceof Ss&&e.push(w(t,"addlayer",this.handleLayerGroupAdd_,this),w(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[P(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new xs("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new xs("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new xs("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,i=P(e);this.listenerKeys_[i].forEach(T),delete this.listenerKeys_[i],this.dispatchEvent(new xs("removelayer",e)),this.changed()}getLayers(){return this.get(Cs)}setLayers(t){const e=this.getLayers();if(e){const t=e.getArray();for(let e=0,i=t.length;e<i;++e)this.dispatchEvent(new xs("removelayer",t[e]))}this.set(Cs,t)}getLayersArray(t){return t=void 0!==t?t:[],this.getLayers().forEach((function(e){e.getLayersArray(t)})),t}getLayerStatesArray(t){const e=void 0!==t?t:[],i=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));const n=this.getLayerState();let s=n.zIndex;t||void 0!==n.zIndex||(s=0);for(let t=i,o=e.length;t<o;t++){const i=e[t];i.opacity*=n.opacity,i.visible=i.visible&&n.visible,i.maxResolution=Math.min(i.maxResolution,n.maxResolution),i.minResolution=Math.max(i.minResolution,n.minResolution),i.minZoom=Math.max(i.minZoom,n.minZoom),i.maxZoom=Math.min(i.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==i.extent?i.extent=Xe(i.extent,n.extent):i.extent=n.extent),void 0===i.zIndex&&(i.zIndex=s)}return e}getSourceState(){return"ready"}}const ws=Ss,Es=class extends e{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}},Ts=class extends Es{constructor(t,e,i,n,s,o){super(t,e,s),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=o}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}},Rs={SINGLECLICK:"singleclick",CLICK:y,DBLCLICK:"dblclick",POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Is=class extends f{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===e?1:e,this.down_=null;const i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=w(i,ut,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=w(i,ct,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(C,this.boundHandleTouchMove_,!!Y&&{passive:!1})}emulateClick_(t){let e=new Ts(Rs.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Ts(Rs.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout((()=>{this.clickTimeoutId_=void 0;const e=new Ts(Rs.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==Rs.POINTERUP||e.type==Rs.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=Rs.POINTERDOWN&&e.type!=Rs.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new Ts(Rs.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(T),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new Ts(Rs.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push(w(t,Rs.POINTERMOVE,this.handlePointerMove_,this),w(t,Rs.POINTERUP,this.handlePointerUp_,this),w(this.element_,Rs.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push(w(this.element_.getRootNode(),Rs.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new Ts(Rs.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new Ts(Rs.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(T(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(C,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(T(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(T),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}},bs="layergroup",Ms="size",Ps="target",Fs="view",Ls=1/0,ks=class{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,g(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){Pt(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);return e!=Ls&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,s=e[t],o=i[t],r=t;for(;t<n>>1;){const s=this.getLeftChildIndex_(t),o=this.getRightChildIndex_(t),r=o<n&&i[o]<i[s]?o:s;e[t]=e[r],i[t]=i[r],t=r}e[t]=s,i[t]=o,this.siftDown_(r,t)}siftDown_(t,e){const i=this.elements_,n=this.priorities_,s=i[e],o=n[e];for(;e>t;){const t=this.getParentIndex_(e);if(!(n[t]>o))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=s,n[e]=o}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const s=e.length;let o,r,a;for(r=0;r<s;++r)o=e[r],a=t(o),a==Ls?delete this.queuedElements_[this.keyFunction_(o)]:(i[n]=a,e[n++]=o);e.length=n,i.length=n,this.heapify_()}},As=class extends ks{constructor(t,e){super((function(e){return t.apply(null,e)}),(function(t){return t[0].getKey()})),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(m,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,i=e.getState();if(2===i||3===i||4===i){3!==i&&e.removeEventListener(m,this.boundHandleTileChange_);const t=e.getKey();t in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[t],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let i,n,s,o=0;for(;this.tilesLoading_<t&&o<e&&this.getCount()>0;)n=this.dequeue()[0],s=n.getKey(),i=n.getState(),0!==i||s in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++o,n.load())}},Os=class extends Q{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1);const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",s=void 0!==t.collapseLabel?t.collapseLabel:"›",o=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"==typeof s?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s,this.collapseLabel_.className=o):this.collapseLabel_=s;const r=void 0!==t.label?t.label:"i";"string"==typeof r?(this.label_=document.createElement("span"),this.label_.textContent=r,this.label_.className=n):this.label_=r;const a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(a),this.toggleButton_.addEventListener(y,this.handleClick_.bind(this),!1);const h=e+" "+$+" "+tt+(this.collapsed_&&this.collapsible_?" "+et:"")+(this.collapsible_?"":" ol-uncollapsible"),l=this.element;l.className=h,l.appendChild(this.toggleButton_),l.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=Array.from(new Set(this.getMap().getAllLayers().flatMap((e=>e.getAttributions(t))))),i=!this.getMap().getAllLayers().some((t=>t.getSource()&&!1===t.getSource().getAttributionsCollapsible()));return this.overrideCollapsible_||this.setCollapsible(i),e}updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!l(e,this.renderedAttributions_)){q(this.ulElement_);for(let t=0,i=e.length;t<i;++t){const i=document.createElement("li");i.innerHTML=e[t],this.ulElement_.appendChild(i)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(et),this.collapsed_?U(this.collapseLabel_,this.label_):U(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}},Ds=class extends Q{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"==typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const s=t.tipLabel?t.tipLabel:"Reset rotation",o=document.createElement("button");o.className=e+"-reset",o.setAttribute("type","button"),o.title=s,o.appendChild(this.label_),o.addEventListener(y,this.handleClick_.bind(this),!1);const r=e+" "+$+" "+tt,a=this.element;a.className=r,a.appendChild(o),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(J)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:rt}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(J);t||0!==i?t&&0!==i&&this.element.classList.remove(J):this.element.classList.add(J)}this.label_.style.transform=t}this.rotation_=i}},zs="active";function Gs(t,e,i,n){const s=t.getZoom();if(void 0===s)return;const o=t.getConstrainedZoom(s+e),r=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:r,anchor:i,duration:void 0!==n?n:250,easing:rt})}const Ws=class extends L{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(zs)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(zs,t)}setMap(t){this.map_=t}},js=class extends Ws{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==Rs.DBLCLICK){const i=t.originalEvent,n=t.map,s=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_;Gs(n.getView(),o,s,this.duration_),i.preventDefault(),e=!0}return!e}};function Ns(t){const e=t.length;let i=0,n=0;for(let s=0;s<e;s++)i+=t[s].clientX,n+=t[s].clientY;return{clientX:i/e,clientY:n/e}}const Xs=class extends Ws{constructor(t){super(t=t||{}),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Rs.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==Rs.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==Rs.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==Rs.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}};function Ys(t){const e=arguments;return function(t){let i=!0;for(let n=0,s=e.length;n<s&&(i=i&&e[n](t),i);++n);return i}}const Bs=function(t){const e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Ks=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){const e=t.map.getTargetElement(),i=t.map.getOwnerDocument().activeElement;return e.contains(i)}(t)},Vs=c,Zs=function(t){const e=t.originalEvent;return 0==e.button&&!(G&&W&&e.ctrlKey)},Us=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Hs=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},qs=function(t){const e=t.originalEvent,i=e.target.tagName;return"INPUT"!==i&&"SELECT"!==i&&"TEXTAREA"!==i&&!e.target.isContentEditable},Qs=function(t){const e=t.originalEvent;return Pt(void 0!==e,56),"mouse"==e.pointerType},Js=function(t){const e=t.originalEvent;return Pt(void 0!==e,56),e.isPrimary&&0===e.button},$s=class extends Xs{constructor(t){super({stopDown:u}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:Ys(Us,Js);this.condition_=t.onFocusOnly?Ys(Ks,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const i=this.targetPointers,n=e.getEventPixel(Ns(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const e=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],i=t.map.getView();s=e,o=i.getResolution(),s[0]*=o,s[1]*=o,xi(e,i.getRotation()),i.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();var s,o;this.lastCentroid=n,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const t=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),s=i.getCenterInternal(),o=e.getPixelFromCoordinateInternal(s),r=e.getCoordinateFromPixelInternal([o[0]-t*Math.cos(n),o[1]-t*Math.sin(n)]);i.animateInternal({center:i.getConstrainedCenter(r),duration:500,easing:rt})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}},to=class extends Xs{constructor(t){t=t||{},super({stopDown:u}),this.condition_=t.condition?t.condition:Bs,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!Qs(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===Fn)return;const n=e.getSize(),s=t.pixel,o=Math.atan2(n[1]/2-s[1],s[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=o-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=o}handleUpEvent(t){return!Qs(t)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){return!!Qs(t)&&(!(!Zs(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}},eo=class extends s{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new hs([i])}getGeometry(){return this.geometry_}};class io extends e{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}const no=class extends Xs{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new eo(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:Zs,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],s=i[1]-e[1];return n*n+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new io("boxdrag",t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new io(e?"boxend":"boxcancel",t.coordinate,t)),!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new io("boxstart",t.coordinate,t)),!0)}onBoxEnd(t){}},so=class extends no{constructor(t){super({condition:(t=t||{}).condition?t.condition:Hs,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap().getView();let i=this.getGeometry();if(this.out_){const t=e.rotatedExtentForGeometry(i),n=e.getResolutionForExtentInternal(t),s=e.getResolution()/n;i=i.clone(),i.scale(s*s)}e.fitInternal(i,{duration:this.duration_,easing:rt})}},oo="ArrowLeft",ro="ArrowRight",ao="ArrowDown",ho=class extends Ws{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return Us(t)&&qs(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==v){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==ao||n==oo||n==ro||"ArrowUp"==n)){const s=t.map.getView(),o=s.getResolution()*this.pixelDelta_;let r=0,a=0;n==ao?a=-o:n==oo?r=-o:n==ro?r=o:a=o;const h=[r,a];xi(h,s.getRotation()),function(t,e,i){const n=t.getCenterInternal();if(n){const s=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:ht,center:t.getConstrainedCenter(s)})}}(s,h,this.duration_),i.preventDefault(),e=!0}}return!e}},lo=class extends Ws{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!function(t){const e=t.originalEvent;return W?e.metaKey:e.ctrlKey}(t)&&qs(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==v||t.type==x){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const s=t.map,o="+"===n?this.delta_:-this.delta_;Gs(s.getView(),o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}},co=class{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let i=e-3;for(;i>0&&this.points_[i+2]>t;)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const s=this.points_[e]-this.points_[i],o=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(o,s),this.initialVelocity_=Math.sqrt(s*s+o*o)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}},uo=class extends Ws{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:Vs;this.condition_=t.onFocusOnly?Ys(Ks,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t))return!0;if(t.type!==S)return!0;const e=t.map,i=t.originalEvent;let n;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==S&&(n=i.deltaY,z&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=j),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.lastDelta_=n;const s=Date.now();void 0===this.startTime_&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(n)<4?"trackpad":"wheel");const o=e.getView();if("trackpad"===this.mode_&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-n/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=n;const r=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),r),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-gt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Gs(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}},go=class extends Xs{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=u),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],n=this.targetPointers[1],s=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=s-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=s;const o=t.map,r=o.getView();r.getConstraints().rotation!==Fn&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(Ns(this.targetPointers))),this.rotating_&&(o.render(),r.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}},_o=class extends Xs{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=u),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],n=this.targetPointers[1],s=i.clientX-n.clientX,o=i.clientY-n.clientY,r=Math.sqrt(s*s+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/r),this.lastDistance_=r;const a=t.map,h=a.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(Ns(this.targetPointers))),a.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}};function fo(t){t instanceof fs?t.setMapInternal(null):t instanceof ws&&t.getLayers().forEach(fo)}function mo(t,e){if(t instanceof fs)t.setMapInternal(e);else if(t instanceof ws){const i=t.getLayers().getArray();for(let t=0,n=i.length;t<n;++t)mo(i[t],e)}}const po=class extends L{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=function(t){let e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);const i={},n=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new ws({layers:t.layers});let s,o,r;return i[bs]=n,i[Ps]=t.target,i[Fs]=t.view instanceof gs?t.view:new gs,void 0!==t.controls&&(Array.isArray(t.controls)?s=new en(t.controls.slice()):(Pt("function"==typeof t.controls.getArray,47),s=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?o=new en(t.interactions.slice()):(Pt("function"==typeof t.interactions.getArray,48),o=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?r=new en(t.overlays.slice()):(Pt("function"==typeof t.overlays.getArray,49),r=t.overlays):r=new en,{controls:s,interactions:o,keyboardEventTarget:e,overlays:r,values:i}}(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=void 0!==t.maxTilesLoading?t.maxTilesLoading:16,this.pixelRatio_=void 0!==t.pixelRatio?t.pixelRatio:j,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=[1,0,0,1,0,0],this.pixelToCoordinateTransform_=[1,0,0,1,0,0],this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver((()=>this.updateSize())),this.controls=e.controls||function(t){t=t||{};const e=new en;return(void 0===t.zoom||t.zoom)&&e.push(new lt(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&e.push(new Ds(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&e.push(new Os(t.attributionOptions)),e}(),this.interactions=e.interactions||function(t){t=t||{};const e=new en,i=new co(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new to),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new js({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&e.push(new $s({onFocusOnly:t.onFocusOnly,kinetic:i})),(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new go),(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new _o({duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(e.push(new ho),e.push(new lo({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new uo({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new so({duration:t.zoomDuration})),e}({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new As(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(bs,this.handleLayerGroupChanged_),this.addChangeListener(Fs,this.handleViewChanged_),this.addChangeListener(Ms,this.handleSizeChanged_),this.addChangeListener(Ps,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof gs||t.view.then((function(t){i.setView(new gs(t))})),this.controls.addEventListener(Qi,(t=>{t.element.setMap(this)})),this.controls.addEventListener(Ji,(t=>{t.element.setMap(null)})),this.interactions.addEventListener(Qi,(t=>{t.element.setMap(this)})),this.interactions.addEventListener(Ji,(t=>{t.element.setMap(null)})),this.overlays_.addEventListener(Qi,(t=>{this.addOverlayInternal_(t.element)})),this.overlays_.addEventListener(Ji,(t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)})),this.controls.forEach((t=>{t.setMap(this)})),this.interactions.forEach((t=>{t.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){mo(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t),s=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,o=void 0!==i.layerFilter?i.layerFilter:c,r=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,s,r,e,null,o,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];return function e(i){i.forEach((function(i){i instanceof ws?e(i.getLayers()):t.push(i)}))}(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:c,s=void 0!==e.hitTolerance?e.hitTolerance:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,o,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),i=this.getSize(),n=e.width/i[0],s=e.height/i[1],o="changedTouches"in t?t.changedTouches[0]:t;return[(o.clientX-e.left)/n,(o.clientY-e.top)/s]}getTarget(){return this.get(Ps)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return Ni(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?nn(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(bs)}setLayers(t){const e=this.getLayerGroup();if(t instanceof en)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e];if(!i.visible)continue;const n=i.layer.getRenderer();if(n&&!n.ready)return!0;const s=i.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(t){const e=Xi(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?nn(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(Ms)}getView(){return this.get(Fs)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,i,n){return function(t,e,i,n,s){if(!t||!(i in t.wantedTiles))return Ls;if(!t.wantedTiles[i][e.getKey()])return Ls;const o=t.viewState.center,r=n[0]-o[0],a=n[1]-o[1];return 65536*Math.log(s)+Math.sqrt(r*r+a*a)/s}(this.frameState_,t,e,i,n)}handleBrowserEvent(t,e){e=e||t.type;const i=new Ts(e,this,t);this.handleMapBrowserEvent(i)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,i=e.type;if(i===ut||i===S||i===v){const t=this.getOwnerDocument(),i=this.viewport_.getRootNode?this.viewport_.getRootNode():t,n=e.target;if(this.overlayContainerStopEvent_.contains(n)||!(i===t?t.documentElement:i).contains(n))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t)){const e=this.getInteractions().getArray().slice();for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.getMap()===this&&n.getActive()&&this.getTargetElement()&&(!n.handleEvent(t)||t.propagationStopped))break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[0]||e[1]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(Sn)&&this.renderer_.dispatchRenderEvent(Sn,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new Es(O,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new Es(A,this,t))));const i=this.postRenderFunctions_;for(let e=0,n=i.length;e<n;++e)i[e](this,t);i.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)T(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(p,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(S,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,H(this.viewport_)}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const t=this.targetElement_.getRootNode();t instanceof ShadowRoot&&this.resizeObserver_.unobserve(t.host),this.setSize(void 0)}const t=this.getTarget(),e="string"==typeof t?document.getElementById(t):t;if(this.targetElement_=e,e){e.appendChild(this.viewport_),this.renderer_||(this.renderer_=new vs(this)),this.mapBrowserEventHandler_=new Is(this,this.moveTolerance_);for(const t in Rs)this.mapBrowserEventHandler_.addEventListener(Rs[t],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(p,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(S,this.boundHandleBrowserEvent_,!!Y&&{passive:!1});const t=this.keyboardEventTarget_?this.keyboardEventTarget_:e;this.targetChangeHandlerKeys_=[w(t,v,this.handleBrowserEvent,this),w(t,x,this.handleBrowserEvent,this)];const i=e.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.observe(i.host),this.resizeObserver_.observe(e)}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(T(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(T(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=w(t,n,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=w(t,m,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(T),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new xs("addlayer",t)),this.layerGroupPropertyListenerKeys_=[w(t,n,this.render,this),w(t,m,this.render,this),w(t,"addlayer",this.handleLayerAdd_,this),w(t,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}flushDeclutterItems(){const t=this.frameState_;t&&this.renderer_.flushDeclutterItems(t)}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){fo(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),i=this.getView(),n=this.frameState_;let s=null;if(void 0!==e&&wt(e)&&i&&i.isDef()){const n=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),o=i.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:We(o.center,o.resolution,o.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:o,viewHints:n,wantedTiles:{},mapId:P(this),renderTargets:{}},o.nextCenter&&o.nextResolution){const t=isNaN(o.nextRotation)?o.rotation:o.nextRotation;s.nextExtent=We(o.nextCenter,o.nextResolution,t,e)}}this.frameState_=s,this.renderer_.renderFrame(s),s&&(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),n&&(!this.previousExtent_||!Ze(this.previousExtent_)&&!Me(s.extent,this.previousExtent_))&&(this.dispatchEvent(new Es("movestart",this,n)),this.previousExtent_=be(this.previousExtent_)),this.previousExtent_&&!s.viewHints[0]&&!s.viewHints[1]&&!Me(s.extent,this.previousExtent_)&&(this.dispatchEvent(new Es("moveend",this,s)),Ce(s.extent,this.previousExtent_))),this.dispatchEvent(new Es(k,this,s)),this.renderComplete_=this.hasListener(A)||this.hasListener(O)||this.hasListener(Sn)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new xs("removelayer",e)),this.set(bs,t)}setSize(t){this.set(Ms,t)}setTarget(t){this.set(Ps,t)}setView(t){if(!t||t instanceof gs)return void this.set(Fs,t);this.set(Fs,new gs);const e=this;t.then((function(t){e.setView(new gs(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),s=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(s)||(e=[n,s],!wt(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&Ri("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&l(e,i)||(this.setSize(e),this.updateViewportSize_())}updateViewportSize_(){const t=this.getView();if(t){let e;const i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}}},yo="element",vo="map",xo="offset",Co="position",So="positioning",wo=class extends L{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=void 0===t.insertFirst||t.insertFirst,this.stopEvent=void 0===t.stopEvent||t.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==t.className?t.className:"ol-overlay-container ol-selectable",this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===t.autoPan?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(yo,this.handleElementChanged),this.addChangeListener(vo,this.handleMapChanged),this.addChangeListener(xo,this.handleOffsetChanged),this.addChangeListener(Co,this.handlePositionChanged),this.addChangeListener(So,this.handlePositioningChanged),void 0!==t.element&&this.setElement(t.element),this.setOffset(void 0!==t.offset?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),void 0!==t.position&&this.setPosition(t.position)}getElement(){return this.get(yo)}getId(){return this.id}getMap(){return this.get(vo)||null}getOffset(){return this.get(xo)}getPosition(){return this.get(Co)}getPositioning(){return this.get(So)}handleElementChanged(){q(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&(H(this.element),T(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=w(t,k,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(yo,t)}setMap(t){this.set(vo,t)}setOffset(t){this.set(xo,t)}setPosition(t){this.set(Co,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(Co))return;const i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),s=this.getRect(n,[V(n),Z(n)]),o=void 0===(t=t||{}).margin?20:t.margin;if(!Ee(i,s)){const n=s[0]-i[0],r=i[2]-s[2],a=s[1]-i[1],h=i[3]-s[3],l=[0,0];if(n<0?l[0]=n-o:r<0&&(l[0]=Math.abs(r)+o),a<0?l[1]=a-o:h<0&&(l[1]=Math.abs(h)+o),0!==l[0]||0!==l[1]){const i=e.getView().getCenterInternal(),n=e.getPixelFromCoordinateInternal(i);if(!n)return;const s=[n[0]+l[0],n[1]+l[1]],o=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(s),duration:o.duration,easing:o.easing})}}}getRect(t,e){const i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,s=i.top+window.pageYOffset;return[n,s,n+e[0],s+e[1]]}setPositioning(t){this.set(So,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e)return void this.setVisible(!1);const i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}updateRenderedPosition(t,e){const i=this.element.style,n=this.getOffset(),s=this.getPositioning();this.setVisible(!0);let o="0%",r="0%";"bottom-right"==s||"center-right"==s||"top-right"==s?o="-100%":"bottom-center"!=s&&"center-center"!=s&&"top-center"!=s||(o="-50%"),"bottom-left"==s||"bottom-center"==s||"bottom-right"==s?r="-100%":"center-left"!=s&&"center-center"!=s&&"center-right"!=s||(r="-50%");const a=`translate(${o}, ${r}) translate(${Math.round(t[0]+n[0])+"px"}, ${Math.round(t[1]+n[1])+"px"})`;this.rendered.transform_!=a&&(this.rendered.transform_=a,i.transform=a)}getOptions(){return this.options}},Eo="preload",To="useInterimTilesOnError",Ro=class extends fs{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getPreload(){return this.get(Eo)}setPreload(t){this.set(Eo,t)}getUseInterimTilesOnError(){return this.get(To)}setUseInterimTilesOnError(t){this.set(To,t)}getData(t){return super.getData(t)}},Io=class extends I{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return b()}getData(t){return null}prepareFrame(t){return b()}renderFrame(t,e){return b()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(n,s)=>{const o=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,s,o)}}forEachFeatureAtCoordinate(t,e,i,n,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;2!==e.getState()&&3!==e.getState()||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return 2!=e&&3!=e&&t.addEventListener(m,this.boundHandleImageChange_),0==e&&(t.load(),e=t.getState()),2==e}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}},bo=[];let Mo=null;const Po=class extends Io{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=[1,0,0,1,0,0],this.pixelTransform=[1,0,0,1,0,0],this.inversePixelTransform=[1,0,0,1,0,0],this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){let n;Mo||(Mo=B(1,1,void 0,{willReadFrequently:!0})),Mo.clearRect(0,0,1,1);try{Mo.drawImage(t,e,i,1,1,0,0,1,1),n=Mo.getImageData(0,0,1,1).data}catch(t){return Mo=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let s,o;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&l(Ot(t.style.backgroundColor),Ot(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(o=e.getContext("2d"))}if(o&&o.canvas.style.transform===e?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=n;let t=s.style;t.position="absolute",t.width="100%",t.height="100%",o=B();const e=o.canvas;s.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=s,this.context=o}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=Ye(i),s=Be(i),o=De(i),r=Oe(i);nn(e.coordinateToPixelTransform,n),nn(e.coordinateToPixelTransform,s),nn(e.coordinateToPixelTransform,o),nn(e.coordinateToPixelTransform,r);const a=this.inversePixelTransform;nn(a,n),nn(a,s),nn(a,o),nn(a,r),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.clip()}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const s=new ys(t,this.inversePixelTransform,i,e);n.dispatchEvent(s)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(vn,t,e)}postRender(t,e){this.dispatchRenderEvent_(xn,t,e)}getRenderTransform(t,e,i,n,s,o,r){const a=s/2,h=o/2,l=n/e,c=-l,u=-t[0]+r,d=-t[1];return sn(this.tempTransform,a,h,l,c,-i,u,d)}disposeInternal(){delete this.frameState,super.disposeInternal()}},Fo=class extends f{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=void 0===i.transition?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(m)}release(){3===this.state&&this.setState(4)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(2==t.getState())return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){if(!this.interimTile)return;let t=this.interimTile,e=this;do{if(2==t.getState()){t.interimTile=null;break}1==t.getState()?e=t:0==t.getState()?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(3!==this.state&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){b()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;const n=e-i+1e3/60;return n>=this.transition_?1:ot(n/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}},Lo=class extends Fo{constructor(t,e,i,n,s,o){super(t,e,o),this.crossOrigin_=n,this.src_=i,this.key=i,this.image_=new Image,null!==n&&(this.image_.crossOrigin=n),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(t){this.image_=t,this.state=2,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=3,this.unlistenImage_(),this.image_=function(){const t=B(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=2:this.state=4,this.unlistenImage_(),this.changed()}load(){3==this.state&&(this.state=0,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),0==this.state&&(this.state=1,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=He(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}},ko=class{constructor(t,e,i,n,s,o){this.sourceProj_=t,this.targetProj_=e;let r={};const a=zi(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return r[e]||(r[e]=a(t)),r[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&Ke(n)>=Ke(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Ke(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Ke(this.targetProj_.getExtent()):null;const h=Ye(i),l=Be(i),c=De(i),u=Oe(i),d=this.transformInv_(h),g=this.transformInv_(l),_=this.transformInv_(c),f=this.transformInv_(u),m=10+(o?Math.max(0,Math.ceil(Math.log2(Ae(i)/(o*o*256*256)))):0);if(this.addQuad_(h,l,c,u,d,g,_,f,m),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach((function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach((e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-n<this.sourceWorldWidth_/2&&(e.source=i)}}))}r={}}addTriangle_(t,e,i,n,s,o){this.triangles_.push({source:[n,s,o],target:[t,e,i]})}addQuad_(t,e,i,n,s,o,r,a,h){const l=ve([s,o,r,a]),c=this.sourceWorldWidth_?Ke(l)/this.sourceWorldWidth_:null,u=this.sourceWorldWidth_,d=this.sourceProj_.canWrapX()&&c>.5&&c<1;let g=!1;if(h>0&&(this.targetProj_.isGlobal()&&this.targetWorldWidth_&&(g=Ke(ve([t,e,i,n]))/this.targetWorldWidth_>.25||g),!d&&this.sourceProj_.isGlobal()&&c&&(g=c>.25||g)),!g&&this.maxSourceExtent_&&isFinite(l[0])&&isFinite(l[1])&&isFinite(l[2])&&isFinite(l[3])&&!Ve(l,this.maxSourceExtent_))return;let _=0;if(!(g||isFinite(s[0])&&isFinite(s[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(r[0])&&isFinite(r[1])&&isFinite(a[0])&&isFinite(a[1])))if(h>0)g=!0;else if(_=(isFinite(s[0])&&isFinite(s[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(r[0])&&isFinite(r[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1),1!=_&&2!=_&&4!=_&&8!=_)return;if(h>0){if(!g){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let o;o=d?(pt(s[0],u)+pt(r[0],u))/2-pt(n[0],u):(s[0]+r[0])/2-n[0];const a=(s[1]+r[1])/2-n[1];g=o*o+a*a>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const l=[(e[0]+i[0])/2,(e[1]+i[1])/2],c=this.transformInv_(l),u=[(n[0]+t[0])/2,(n[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,l,u,s,o,c,d,h-1),this.addQuad_(u,l,i,n,d,c,r,a,h-1)}else{const l=[(t[0]+e[0])/2,(t[1]+e[1])/2],c=this.transformInv_(l),u=[(i[0]+n[0])/2,(i[1]+n[1])/2],d=this.transformInv_(u);this.addQuad_(t,l,u,n,s,c,d,a,h-1),this.addQuad_(l,e,i,u,c,o,r,d,h-1)}return}}if(d){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}11&_||this.addTriangle_(t,i,n,s,r,a),14&_||this.addTriangle_(t,i,e,s,r,o),_&&(13&_||this.addTriangle_(e,n,t,o,a,s),7&_||this.addTriangle_(e,n,i,o,a,r))}calculateSourceExtent(){const t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,i,n){const s=e.source;Pe(t,s[0]),Pe(t,s[1]),Pe(t,s[2])})),t}getTriangles(){return this.triangles_}};let Ao;const Oo=[];function Do(t,e,i,n,s){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,s),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,s)),t.restore()}function zo(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function Go(t,e,i,n){const s=Gi(i,e,t);let o=Li(e,n,i);const r=e.getMetersPerUnit();void 0!==r&&(o*=r);const a=t.getMetersPerUnit();void 0!==a&&(o/=a);const h=t.getExtent();if(!h||we(h,s)){const e=Li(t,o,s)/o;isFinite(e)&&e>0&&(o/=e)}return o}const Wo=class extends Fo{constructor(t,e,i,n,s,o,r,a,h,l,c,u){super(s,0,{interpolate:!!u}),this.renderEdges_=void 0!==c&&c,this.pixelRatio_=r,this.gutter_=a,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=n,this.wrappedTileCoord_=o||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const d=n.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let _=this.sourceTileGrid_.getExtent();const f=g?Xe(d,g):d;if(0===Ae(f))return void(this.state=4);const m=t.getExtent();m&&(_=_?Xe(_,m):m);const p=n.getResolution(this.wrappedTileCoord_[0]),y=function(t,e,i,n){const s=ze(i);let o=Go(t,e,s,n);return(!isFinite(o)||o<=0)&&ke(i,(function(i){return o=Go(t,e,i,n),isFinite(o)&&o>0})),o}(t,i,f,p);if(!isFinite(y)||y<=0)return void(this.state=4);const v=void 0!==l?l:.5;if(this.triangulation_=new ko(t,i,f,_,y*v,p),0===this.triangulation_.getTriangles().length)return void(this.state=4);this.sourceZ_=e.getZForResolution(y);let x=this.triangulation_.calculateSourceExtent();if(_&&(t.canWrapX()?(x[1]=gt(x[1],_[1],_[3]),x[3]=gt(x[3],_[1],_[3])):x=Xe(x,_)),Ae(x)){const t=e.getTileRangeForExtentAndZ(x,this.sourceZ_);for(let e=t.minX;e<=t.maxX;e++)for(let i=t.minY;i<=t.maxY;i++){const t=h(this.sourceZ_,e,i,r);t&&this.sourceTiles_.push(t)}0===this.sourceTiles_.length&&(this.state=4)}else this.state=4}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{e&&2==e.getState()&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})})),this.sourceTiles_.length=0,0===t.length)this.state=3;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],s="number"==typeof i?i:i[1],o=this.targetTileGrid_.getResolution(e),r=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=function(t,e,i,n,s,o,r,a,h,l,c,u){const d=B(Math.round(i*t),Math.round(i*e),Oo);if(u||(d.imageSmoothingEnabled=!1),0===h.length)return d.canvas;function g(t){return Math.round(t*i)/i}d.scale(i,i),d.globalCompositeOperation="lighter";const _=[1/0,1/0,-1/0,-1/0];h.forEach((function(t,e,i){var n,s;n=_,(s=t.extent)[0]<n[0]&&(n[0]=s[0]),s[2]>n[2]&&(n[2]=s[2]),s[1]<n[1]&&(n[1]=s[1]),s[3]>n[3]&&(n[3]=s[3])}));const f=Ke(_),m=Ne(_),p=B(Math.round(i*f/n),Math.round(i*m/n),Oo);u||(p.imageSmoothingEnabled=!1);const y=i/n;h.forEach((function(t,e,i){const n=t.extent[0]-_[0],s=-(t.extent[3]-_[3]),o=Ke(t.extent),r=Ne(t.extent);t.image.width>0&&t.image.height>0&&p.drawImage(t.image,l,l,t.image.width-2*l,t.image.height-2*l,n*y,s*y,o*y,r*y)}));const v=Ye(r);return a.getTriangles().forEach((function(t,e,s){const r=t.source,a=t.target;let h=r[0][0],l=r[0][1],c=r[1][0],f=r[1][1],m=r[2][0],y=r[2][1];const x=g((a[0][0]-v[0])/o),C=g(-(a[0][1]-v[1])/o),S=g((a[1][0]-v[0])/o),w=g(-(a[1][1]-v[1])/o),E=g((a[2][0]-v[0])/o),T=g(-(a[2][1]-v[1])/o),R=h,I=l;h=0,l=0,c-=R,f-=I,m-=R,y-=I;const b=function(t){const e=t.length;for(let i=0;i<e;i++){let n=i,s=Math.abs(t[i][i]);for(let o=i+1;o<e;o++){const e=Math.abs(t[o][i]);e>s&&(s=e,n=o)}if(0===s)return null;const o=t[n];t[n]=t[i],t[i]=o;for(let n=i+1;n<e;n++){const s=-t[n][i]/t[i][i];for(let o=i;o<e+1;o++)i==o?t[n][o]=0:t[n][o]+=s*t[i][o]}}const i=new Array(e);for(let n=e-1;n>=0;n--){i[n]=t[n][e]/t[n][n];for(let s=n-1;s>=0;s--)t[s][e]-=t[s][n]*i[n]}return i}([[c,f,0,0,S-x],[m,y,0,0,E-x],[0,0,c,f,w-C],[0,0,m,y,T-C]]);if(b){if(d.save(),d.beginPath(),function(){if(void 0===Ao){const t=B(6,6,Oo);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Do(t,4,5,4,0),Do(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;Ao=zo(e,0)||zo(e,4)||zo(e,8),K(t),Oo.push(t.canvas)}return Ao}()||!u){d.moveTo(S,w);const t=4,e=x-S,i=C-w;for(let n=0;n<t;n++)d.lineTo(S+g((n+1)*e/t),w+g(n*i/(t-1))),n!=t-1&&d.lineTo(S+g((n+1)*e/t),w+g((n+1)*i/(t-1)));d.lineTo(E,T)}else d.moveTo(S,w),d.lineTo(x,C),d.lineTo(E,T);d.clip(),d.transform(b[0],b[2],b[1],b[3],x,C),d.translate(_[0]-R,_[3]-I),d.scale(n/i,-n/i),d.drawImage(p.canvas,0,0),d.restore()}})),K(p),Oo.push(p.canvas),c&&(d.save(),d.globalCompositeOperation="source-over",d.strokeStyle="black",d.lineWidth=1,a.getTriangles().forEach((function(t,e,i){const n=t.target,s=(n[0][0]-v[0])/o,r=-(n[0][1]-v[1])/o,a=(n[1][0]-v[0])/o,h=-(n[1][1]-v[1])/o,l=(n[2][0]-v[0])/o,c=-(n[2][1]-v[1])/o;d.beginPath(),d.moveTo(a,h),d.lineTo(s,r),d.lineTo(l,c),d.closePath(),d.stroke()})),d.restore()),d.canvas}(n,s,this.pixelRatio_,r,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=2}this.changed()}load(){if(0==this.state){this.state=1,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((e=>{const i=e.getState();if(0==i||1==i){t++;const i=w(e,m,(function(n){const s=e.getState();2!=s&&3!=s&&4!=s||(T(i),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(i)}})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,i){0==t.getState()&&t.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(T),this.sourcesListenerKeys_=null}release(){this.canvas_&&(K(this.canvas_.getContext("2d")),Oo.push(this.canvas_),this.canvas_=null),super.release()}};class jo{constructor(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function No(t,e,i,n,s){return void 0!==s?(s.minX=t,s.maxX=e,s.minY=i,s.maxY=n,s):new jo(t,e,i,n)}const Xo=jo,Yo=class extends Po{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=[1/0,1/0,-1/0,-1/0],this.tmpTileRange_=new Xo(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return 2==i||4==i||3==i&&!n}getTile(t,e,i,n){const s=n.pixelRatio,o=n.viewState.projection,r=this.getLayer();let a=r.getSource().getTile(t,e,i,s,o);return 3==a.getState()&&r.getUseInterimTilesOnError()&&r.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(a)||(a=a.getInterimTile()),a}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=nn(e.pixelToCoordinateTransform,t.slice()),s=i.getExtent();if(s&&!we(s,n))return null;const o=e.pixelRatio,r=e.viewState.projection,a=e.viewState,h=i.getRenderSource(),l=h.getTileGridForProjection(a.projection),c=h.getTilePixelRatio(e.pixelRatio);for(let t=l.getZForResolution(a.resolution);t>=l.getMinZoom();--t){const e=l.getTileCoordForCoordAndZ(n,t),i=h.getTile(t,e[1],e[2],o,r);if(!(i instanceof Lo||i instanceof Wo)||i instanceof Wo&&4===i.getState())return null;if(2!==i.getState())continue;const s=l.getOrigin(t),u=Et(l.getTileSize(t)),d=l.getResolution(t),g=Math.floor(c*((n[0]-s[0])/d-e[1]*u[0])),_=Math.floor(c*((s[1]-n[1])/d-e[2]*u[1])),f=Math.round(c*h.getGutterForProjection(a.projection));return this.getImageData(i.getImage(),g+f,_+f)}return null}loadedTileCallback(t,e,i){return!!this.isDrawableTile(i)&&super.loadedTileCallback(t,e,i)}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex],n=t.viewState,s=n.projection,r=n.resolution,a=n.center,h=n.rotation,l=t.pixelRatio,c=this.getLayer(),u=c.getSource(),d=u.getRevision(),g=u.getTileGridForProjection(s),_=g.getZForResolution(r,u.zDirection),f=g.getResolution(_);let m=t.extent;const p=t.viewState.resolution,y=u.getTilePixelRatio(l),v=Math.round(Ke(m)/p*l),x=Math.round(Ne(m)/p*l),C=i.extent&&Bi(i.extent);C&&(m=Xe(m,Bi(i.extent)));const S=f*v/2/y,w=f*x/2/y,E=[a[0]-S,a[1]-w,a[0]+S,a[1]+w],T=g.getTileRangeForExtentAndZ(m,_),R={};R[_]={};const I=this.createLoadedTileFinder(u,s,R),b=this.tmpExtent,M=this.tmpTileRange_;this.newTiles_=!1;const F=h?je(n.center,p,h,t.size):void 0;for(let e=T.minX;e<=T.maxX;++e)for(let n=T.minY;n<=T.maxY;++n){if(h&&!g.tileCoordIntersectsViewport([_,e,n],F))continue;const s=this.getTile(_,e,n,t);if(this.isDrawableTile(s)){const e=P(this);if(2==s.getState()){R[_][s.tileCoord.toString()]=s;let t=s.inTransition(e);t&&1!==i.opacity&&(s.endTransition(e),t=!1),this.newTiles_||!t&&this.renderedTiles.includes(s)||(this.newTiles_=!0)}if(1===s.getAlpha(e,t.time))continue}const o=g.getTileCoordChildTileRange(s.tileCoord,M,b);let r=!1;o&&(r=I(_+1,o)),r||g.forEachTileCoordParentTileRange(s.tileCoord,I,M,b)}const L=f/r*l/y;sn(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/l,1/l,h,-v/2,-x/2);const k=an(this.pixelTransform);this.useContainer(e,k,this.getBackground(t));const A=this.context,O=A.canvas;on(this.inversePixelTransform,this.pixelTransform),sn(this.tempTransform,v/2,x/2,L,L,0,-v/2,-x/2),O.width!=v||O.height!=x?(O.width=v,O.height=x):this.containerReused||A.clearRect(0,0,v,x),C&&this.clipUnrotated(A,t,C),u.getInterpolate()||(A.imageSmoothingEnabled=!1),this.preRender(A,t),this.renderedTiles.length=0;let D,z,G,W=Object.keys(R).map(Number);W.sort(o),1!==i.opacity||this.containerReused&&!u.getOpaque(t.viewState.projection)?(D=[],z=[]):W=W.reverse();for(let e=W.length-1;e>=0;--e){const i=W[e],n=u.getTilePixelSize(i,l,s),o=g.getResolution(i)/f,r=n[0]*o*L,a=n[1]*o*L,h=g.getTileCoordForCoordAndZ(Ye(E),i),c=g.getTileCoordExtent(h),d=nn(this.tempTransform,[y*(c[0]-E[0])/f,y*(E[3]-c[3])/f]),m=y*u.getGutterForProjection(s),p=R[i];for(const e in p){const n=p[e],s=n.tileCoord,o=h[1]-s[1],l=Math.round(d[0]-(o-1)*r),c=h[2]-s[2],g=Math.round(d[1]-(c-1)*a),f=Math.round(d[0]-o*r),y=Math.round(d[1]-c*a),v=l-f,x=g-y,C=_===i,S=C&&1!==n.getAlpha(P(this),t.time);let w=!1;if(!S)if(D){G=[f,y,f+v,y,f+v,y+x,f,y+x];for(let t=0,e=D.length;t<e;++t)if(_!==i&&i<z[t]){const e=D[t];Ve([f,y,f+v,y+x],[e[0],e[3],e[4],e[7]])&&(w||(A.save(),w=!0),A.beginPath(),A.moveTo(G[0],G[1]),A.lineTo(G[2],G[3]),A.lineTo(G[4],G[5]),A.lineTo(G[6],G[7]),A.moveTo(e[6],e[7]),A.lineTo(e[4],e[5]),A.lineTo(e[2],e[3]),A.lineTo(e[0],e[1]),A.clip())}D.push(G),z.push(i)}else A.clearRect(f,y,v,x);this.drawTileImage(n,t,f,y,v,x,m,C),D&&!S?(w&&A.restore(),this.renderedTiles.unshift(n)):this.renderedTiles.push(n),this.updateUsedTiles(t.usedTiles,u,n)}}return this.renderedRevision=d,this.renderedResolution=f,this.extentChanged=!this.renderedExtent_||!Me(this.renderedExtent_,E),this.renderedExtent_=E,this.renderedPixelRatio=l,this.renderedProjection=s,this.manageTilePyramid(t,u,g,l,s,m,_,c.getPreload()),this.scheduleExpireCache(t,u),this.postRender(A,t),i.extent&&A.restore(),A.imageSmoothingEnabled=!0,k!==O.style.transform&&(O.style.transform=k),this.container}drawTileImage(t,e,i,n,s,o,r,a){const h=this.getTileImage(t);if(!h)return;const l=P(this),c=e.layerStatesArray[e.layerIndex],u=c.opacity*(a?t.getAlpha(l,e.time):1),d=u!==this.context.globalAlpha;d&&(this.context.save(),this.context.globalAlpha=u),this.context.drawImage(h,r,r,h.width-2*r,h.height-2*r,i,n,s,o),d&&this.context.restore(),u!==c.opacity?e.animate=!0:a&&t.endTransition(l)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const i=function(t,e,i){const n=P(t);n in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[n])}.bind(null,e);t.postRenderFunctions.push(i)}}updateUsedTiles(t,e,i){const n=P(e);n in t||(t[n]={}),t[n][i.getKey()]=!0}manageTilePyramid(t,e,i,n,s,o,r,a,h){const l=P(e);l in t.wantedTiles||(t.wantedTiles[l]={});const c=t.wantedTiles[l],u=t.tileQueue,d=i.getMinZoom(),g=t.viewState.rotation,_=g?je(t.viewState.center,t.viewState.resolution,g,t.size):void 0;let f,m,p,y,v,x,C=0;for(x=d;x<=r;++x)for(m=i.getTileRangeForExtentAndZ(o,x,m),p=i.getResolution(x),y=m.minX;y<=m.maxX;++y)for(v=m.minY;v<=m.maxY;++v)g&&!i.tileCoordIntersectsViewport([x,y,v],_)||(r-x<=a?(++C,f=e.getTile(x,y,v,n,s),0==f.getState()&&(c[f.getKey()]=!0,u.isKeyQueued(f.getKey())||u.enqueue([f,l,i.getTileCoordCenter(f.tileCoord),p])),void 0!==h&&h(f)):e.useTile(x,y,v,s));e.updateCacheSize(C,s)}},Bo=class extends Ro{constructor(t){super(t)}createRenderer(){return new Yo(this)}};var Ko=i(341);function Vo(t){return new fe({fill:Zo(t,""),stroke:Uo(t,""),text:Ho(t),image:qo(t)})}function Zo(t,e){const i=t[e+"fill-color"];if(i)return"none"===i?null:new he({color:i})}function Uo(t,e){const i=t[e+"stroke-width"],n=t[e+"stroke-color"];if(i||n)return new ce({width:i,color:n,lineCap:t[e+"stroke-line-cap"],lineJoin:t[e+"stroke-line-join"],lineDash:t[e+"stroke-line-dash"],lineDashOffset:t[e+"stroke-line-dash-offset"],miterLimit:t[e+"stroke-miter-limit"]})}function Ho(t){const e=t["text-value"];if(e)return new ii({text:e,font:t["text-font"],maxAngle:t["text-max-angle"],offsetX:t["text-offset-x"],offsetY:t["text-offset-y"],overflow:t["text-overflow"],placement:t["text-placement"],repeat:t["text-repeat"],scale:t["text-scale"],rotateWithView:t["text-rotate-with-view"],rotation:t["text-rotation"],textAlign:t["text-align"],justify:t["text-justify"],textBaseline:t["text-baseline"],padding:t["text-padding"],fill:Zo(t,"text-"),backgroundFill:Zo(t,"text-background-"),stroke:Uo(t,"text-"),backgroundStroke:Uo(t,"text-background-")})}function qo(t){const e=t["icon-src"],i=t["icon-img"];if(e||i)return new ti({src:e,img:i,imgSize:t["icon-img-size"],anchor:t["icon-anchor"],anchorOrigin:t["icon-anchor-origin"],anchorXUnits:t["icon-anchor-x-units"],anchorYUnits:t["icon-anchor-y-units"],color:t["icon-color"],crossOrigin:t["icon-cross-origin"],offset:t["icon-offset"],displacement:t["icon-displacement"],opacity:t["icon-opacity"],scale:t["icon-scale"],width:t["icon-width"],height:t["icon-height"],rotation:t["icon-rotation"],rotateWithView:t["icon-rotate-with-view"],size:t["icon-size"],declutterMode:t["icon-declutter-mode"]});const n=t["shape-points"];if(n){const e="shape-";return new se({points:n,fill:Zo(t,e),stroke:Uo(t,e),radius:t["shape-radius"],radius1:t["shape-radius1"],radius2:t["shape-radius2"],angle:t["shape-angle"],displacement:t["shape-displacement"],rotation:t["shape-rotation"],rotateWithView:t["shape-rotate-with-view"],scale:t["shape-scale"],declutterMode:t["shape-declutter-mode"]})}const s=t["circle-radius"];if(s){const e="circle-";return new re({radius:s,fill:Zo(t,e),stroke:Uo(t,e),displacement:t["circle-displacement"],scale:t["circle-scale"],rotation:t["circle-rotation"],rotateWithView:t["circle-rotate-with-view"],declutterMode:t["circle-declutter-mode"]})}}const Qo="renderOrder",Jo=class extends fs{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=void 0!==t.declutter&&t.declutter,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Qo)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new Ko(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(Qo,t)}setStyle(t){let e;if(void 0===t)e=ge;else if(null===t)e=null;else if("function"==typeof t)e=t;else if(t instanceof fe)e=t;else if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let e=0;e<i;++e){const i=t[e];n[e]=i instanceof fe?i:Vo(i)}e=n}else e=Vo(t);this.style_=e,this.styleFunction_=null===t?void 0:function(t){let e;if("function"==typeof t)e=t;else{let i;Array.isArray(t)?i=t:(Pt("function"==typeof t.getZIndex,41),i=[t]),e=function(){return i}}return e}(this.style_),this.changed()}},$o={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},tr=[$o.FILL],er=[$o.STROKE],ir=[$o.BEGIN_PATH],nr=[$o.CLOSE_PATH],sr=$o,or=class{drawCustom(t,e,i,n){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}},rr=class extends or{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,s=this.coordinates;let o=s.length;for(let r=0,a=t.length;r<a;r+=e)n[0]=t[r],n[1]=t[r+1],we(i,n)&&(s[o++]=n[0],s[o++]=n[1]);return o}appendFlatLineCoordinates(t,e,i,n,s,o){const r=this.coordinates;let a=r.length;const h=this.getBufferedMaxExtent();o&&(e+=n);let l=t[e],c=t[e+1];const u=this.tmpCoordinate_;let d,g,_,f=!0;for(d=e+n;d<i;d+=n)u[0]=t[d],u[1]=t[d+1],_=Re(h,u),_!==g?(f&&(r[a++]=l,r[a++]=c,f=!1),r[a++]=u[0],r[a++]=u[1]):_===ye.INTERSECTING?(r[a++]=u[0],r[a++]=u[1],f=!1):f=!0,l=u[0],c=u[1],g=_;return(s&&f||d===e+n)&&(r[a++]=l,r[a++]=c),a}drawCustomCoordinates_(t,e,i,n,s){for(let o=0,r=i.length;o<r;++o){const r=i[o],a=this.appendFlatLineCoordinates(t,e,r,n,!1,!1);s.push(a),e=r}return e}drawCustom(t,e,i,n){this.beginGeometry(t,e);const s=t.getType(),o=t.getStride(),r=this.coordinates.length;let a,h,l,c,u;switch(s){case"MultiPolygon":a=t.getOrientedFlatCoordinates(),c=[];const e=t.getEndss();u=0;for(let t=0,i=e.length;t<i;++t){const i=[];u=this.drawCustomCoordinates_(a,u,e[t],o,i),c.push(i)}this.instructions.push([sr.CUSTOM,r,c,t,i,Zn]),this.hitDetectionInstructions.push([sr.CUSTOM,r,c,t,n||i,Zn]);break;case"Polygon":case"MultiLineString":l=[],a="Polygon"==s?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),u=this.drawCustomCoordinates_(a,0,t.getEnds(),o,l),this.instructions.push([sr.CUSTOM,r,l,t,i,Vn]),this.hitDetectionInstructions.push([sr.CUSTOM,r,l,t,n||i,Vn]);break;case"LineString":case"Circle":a=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(a,0,a.length,o,!1,!1),this.instructions.push([sr.CUSTOM,r,h,t,i,Kn]),this.hitDetectionInstructions.push([sr.CUSTOM,r,h,t,n||i,Kn]);break;case"MultiPoint":a=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(a,o),h>r&&(this.instructions.push([sr.CUSTOM,r,h,t,i,Kn]),this.hitDetectionInstructions.push([sr.CUSTOM,r,h,t,n||i,Kn]));break;case"Point":a=t.getFlatCoordinates(),this.coordinates.push(a[0],a[1]),h=this.coordinates.length,this.instructions.push([sr.CUSTOM,r,h,t,i]),this.hitDetectionInstructions.push([sr.CUSTOM,r,h,t,n||i])}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[sr.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[sr.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let n,s,o=-1;for(e=0;e<i;++e)n=t[e],s=n[0],s==sr.END_GEOMETRY?o=e:s==sr.BEGIN_GEOMETRY&&(n[2]=e,a(this.hitDetectionInstructions,o,e),o=-1)}setFillStrokeStyle(t,e){const i=this.state;if(t){const e=t.getColor();i.fillStyle=Gt(e||jt)}else i.fillStyle=void 0;if(e){const t=e.getColor();i.strokeStyle=Gt(t||Bt);const n=e.getLineCap();i.lineCap=void 0!==n?n:Nt;const s=e.getLineDash();i.lineDash=s?s.slice():Xt;const o=e.getLineDashOffset();i.lineDashOffset=o||0;const r=e.getLineJoin();i.lineJoin=void 0!==r?r:Yt;const a=e.getWidth();i.lineWidth=void 0!==a?a:1;const h=e.getMiterLimit();i.miterLimit=void 0!==h?h:10,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[sr.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[sr.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,s=t.lineDash,o=t.lineDashOffset,r=t.lineJoin,a=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||s!=t.currentLineDash&&!l(t.currentLineDash,s)||t.currentLineDashOffset!=o||t.currentLineJoin!=r||t.currentLineWidth!=a||t.currentMiterLimit!=h)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=s,t.currentLineDashOffset=o,t.currentLineJoin=r,t.currentLineWidth=a,t.currentMiterLimit=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[sr.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Ce(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;xe(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}},ar=class extends rr{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinatess_(t,e,i,n){const s=this.state,o=void 0!==s.fillStyle,r=void 0!==s.strokeStyle,a=i.length;this.instructions.push(ir),this.hitDetectionInstructions.push(ir);for(let s=0;s<a;++s){const o=i[s],a=this.coordinates.length,h=this.appendFlatLineCoordinates(t,e,o,n,!0,!r),l=[sr.MOVE_TO_LINE_TO,a,h];this.instructions.push(l),this.hitDetectionInstructions.push(l),r&&(this.instructions.push(nr),this.hitDetectionInstructions.push(nr)),e=o}return o&&(this.instructions.push(tr),this.hitDetectionInstructions.push(tr)),r&&(this.instructions.push(er),this.hitDetectionInstructions.push(er)),e}drawCircle(t,e){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(void 0===n&&void 0===s)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([sr.SET_FILL_STYLE,jt]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([sr.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Xt,0]);const o=t.getFlatCoordinates(),r=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,r,!1,!1);const h=[sr.CIRCLE,a];this.instructions.push(ir,h),this.hitDetectionInstructions.push(ir,h),void 0!==i.fillStyle&&(this.instructions.push(tr),this.hitDetectionInstructions.push(tr)),void 0!==i.strokeStyle&&(this.instructions.push(er),this.hitDetectionInstructions.push(er)),this.endGeometry(e)}drawPolygon(t,e){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(void 0===n&&void 0===s)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([sr.SET_FILL_STYLE,jt]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([sr.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Xt,0]);const o=t.getEnds(),r=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(r,0,o,a),this.endGeometry(e)}drawMultiPolygon(t,e){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(void 0===n&&void 0===s)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([sr.SET_FILL_STYLE,jt]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([sr.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Xt,0]);const o=t.getEndss(),r=t.getOrientedFlatCoordinates(),a=t.getStride();let h=0;for(let t=0,e=o.length;t<e;++t)h=this.drawFlatCoordinatess_(r,h,o[t],a);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(0!==t){const e=this.coordinates;for(let i=0,n=e.length;i<n;++i)e[i]=Yn(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)}};function hr(t,e,i,n,s){const o=[];let r=i,a=0,h=e.slice(i,2);for(;a<t&&r+s<n;){const[i,n]=h.slice(-2),l=e[r+s],c=e[r+s+1],u=Math.sqrt((l-i)*(l-i)+(c-n)*(c-n));if(a+=u,a>=t){const e=(t-a+u)/u,d=yt(i,l,e),g=yt(n,c,e);h.push(d,g),o.push(h),h=[d,g],a==t&&(r+=s),a=0}else if(a<t)h.push(e[r+s],e[r+s+1]),r+=s;else{const t=u-a,e=yt(i,l,t/u),d=yt(n,c,t/u);h.push(e,d),o.push(h),h=[e,d],a=0,r+=s}}return a>0&&o.push(h),o}function lr(t,e,i,n,s){let o,r,a,h,l,c,u,d,g,_,f=i,m=i,p=0,y=0,v=i;for(r=i;r<n;r+=s){const i=e[r],n=e[r+1];void 0!==l&&(g=i-l,_=n-c,h=Math.sqrt(g*g+_*_),void 0!==u&&(y+=a,o=Math.acos((u*g+d*_)/(a*h)),o>t&&(y>p&&(p=y,f=v,m=r),y=0,v=r-s)),a=h,u=g,d=_),l=i,c=n}return y+=h,y>p?[v,r]:[f,m]}const cr={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},ur={Circle:ar,Default:rr,Image:class extends rr{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([sr.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([sr.DRAW_IMAGE,s,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([sr.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([sr.DRAW_IMAGE,s,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),n=t.getSize(),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}},LineString:class extends rr{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinates_(t,e,i,n){const s=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),r=[sr.MOVE_TO_LINE_TO,s,o];return this.instructions.push(r),this.hitDetectionInstructions.push(r),i}drawLineString(t,e){const i=this.state,n=i.strokeStyle,s=i.lineWidth;if(void 0===n||void 0===s)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([sr.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Xt,0],ir);const o=t.getFlatCoordinates(),r=t.getStride();this.drawFlatCoordinates_(o,0,o.length,r),this.hitDetectionInstructions.push(er),this.endGeometry(e)}drawMultiLineString(t,e){const i=this.state,n=i.strokeStyle,s=i.lineWidth;if(void 0===n||void 0===s)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([sr.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Xt,0],ir);const o=t.getEnds(),r=t.getFlatCoordinates(),a=t.getStride();let h=0;for(let t=0,e=o.length;t<e;++t)h=this.drawFlatCoordinates_(r,h,o[t],a);this.hitDetectionInstructions.push(er),this.endGeometry(e)}finish(){const t=this.state;return null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(er),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(er),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(ir)}},Polygon:ar,Text:class extends rr{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[jt]={fillStyle:jt},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const i=this.textFillState_,n=this.textStrokeState_,s=this.textState_;if(""===this.text_||!s||!i&&!n)return;const o=this.coordinates;let r=o.length;const a=t.getType();let h=null,l=t.getStride();if("line"!==s.placement||"LineString"!=a&&"MultiLineString"!=a&&"Polygon"!=a&&"MultiPolygon"!=a){let i=s.overflow?null:[];switch(a){case"Point":case"MultiPoint":h=t.getFlatCoordinates();break;case"LineString":h=t.getFlatMidpoint();break;case"Circle":h=t.getCenter();break;case"MultiLineString":h=t.getFlatMidpoints(),l=2;break;case"Polygon":h=t.getFlatInteriorPoint(),s.overflow||i.push(h[2]/this.resolution),l=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();h=[];for(let t=0,n=e.length;t<n;t+=3)s.overflow||i.push(e[t+2]/this.resolution),h.push(e[t],e[t+1]);if(0===h.length)return;l=2}const n=this.appendFlatPointCoordinates(h,l);if(n===r)return;if(i&&(n-r)/2!=h.length/l){let t=r/2;i=i.filter(((e,i)=>{const n=o[2*(t+i)]===h[i*l]&&o[2*(t+i)+1]===h[i*l+1];return n||--t,n}))}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&this.updateFillStyle(this.state,this.createFill),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let c=s.padding;if(c!=Zt&&(s.scale[0]<0||s.scale[1]<0)){let t=s.padding[0],e=s.padding[1],i=s.padding[2],n=s.padding[3];s.scale[0]<0&&(e=-e,n=-n),s.scale[1]<0&&(t=-t,i=-i),c=[t,e,i,n]}const u=this.pixelRatio;this.instructions.push([sr.DRAW_IMAGE,r,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,c==Zt?Zt:c.map((function(t){return t*u})),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]);const d=1/u,g=this.state.fillStyle;s.backgroundFill&&(this.state.fillStyle=jt,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([sr.DRAW_IMAGE,r,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[d,d],NaN,void 0,this.declutterImageWithText_,c,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?jt:this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]),s.backgroundFill&&(this.state.fillStyle=g,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}else{if(!Ve(this.getBufferedMaxExtent(),t.getExtent()))return;let i;if(h=t.getFlatCoordinates(),"LineString"==a)i=[h.length];else if("MultiLineString"==a)i=t.getEnds();else if("Polygon"==a)i=t.getEnds().slice(0,1);else if("MultiPolygon"==a){const e=t.getEndss();i=[];for(let t=0,n=e.length;t<n;++t)i.push(e[t][0])}this.beginGeometry(t,e);const n=s.repeat,c=n?void 0:s.textAlign;let u=0;for(let t=0,e=i.length;t<e;++t){let e;e=n?hr(n*this.resolution,h,u,i[t],l):[h.slice(u,i[t])];for(let n=0,a=e.length;n<a;++n){const a=e[n];let h=0,d=a.length;if(null==c){const t=lr(s.maxAngle,a,0,a.length,2);h=t[0],d=t[1]}for(let t=h;t<d;t+=l)o.push(a[t],a[t+1]);const g=o.length;u=i[t],this.drawChars_(r,g),r=g}}this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:e.font,textAlign:e.textAlign||Kt,justify:e.justify,textBaseline:e.textBaseline||Vt,scale:e.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,n=this.textState_,s=this.strokeKey_,o=this.textKey_,r=this.fillKey_;this.saveTextStates_();const a=this.pixelRatio,h=cr[n.textBaseline],l=this.textOffsetY_*a,c=this.text_,u=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([sr.DRAW_CHARS,t,e,h,n.overflow,r,n.maxAngle,a,l,s,u*a,c,o,1]),this.hitDetectionInstructions.push([sr.DRAW_CHARS,t,e,h,n.overflow,r?jt:r,n.maxAngle,1,l,s,u,c,o,1/a])}setTextStyle(t,e){let i,n,s;if(t){const e=t.getFill();e?(n=this.textFillState_,n||(n={},this.textFillState_=n),n.fillStyle=Gt(e.getColor()||jt)):(n=null,this.textFillState_=n);const o=t.getStroke();if(o){s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const t=o.getLineDash(),e=o.getLineDashOffset(),i=o.getWidth(),n=o.getMiterLimit();s.lineCap=o.getLineCap()||Nt,s.lineDash=t?t.slice():Xt,s.lineDashOffset=void 0===e?0:e,s.lineJoin=o.getLineJoin()||Yt,s.lineWidth=void 0===i?1:i,s.miterLimit=void 0===n?10:n,s.strokeStyle=Gt(o.getColor()||Bt)}else s=null,this.textStrokeState_=s;i=this.textState_;const r=t.getFont()||Wt;Jt(r);const a=t.getScaleArray();i.overflow=t.getOverflow(),i.font=r,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||Vt,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Zt,i.scale=void 0===a?[1,1]:a;const h=t.getOffsetX(),l=t.getOffsetY(),c=t.getRotateWithView(),u=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===h?0:h,this.textOffsetY_=void 0===l?0:l,this.textRotateWithView_=void 0!==c&&c,this.textRotation_=void 0===u?0:u,this.strokeKey_=s?("string"==typeof s.strokeStyle?s.strokeStyle:P(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+P(n.fillStyle):""}else this.text_="";this.declutterImageWithText_=e}}},dr=class{constructor(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const n in i){const s=i[n].finish();t[e][n]=s}}return t}getBuilder(t,e){const i=void 0!==t?t.toString():"0";let n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);let s=n[e];return void 0===s&&(s=new(0,ur[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=s),s}};function gr(t,e,i,n,s,o,r,a,h,l,c,u){let d=t[e],g=t[e+1],_=0,f=0,m=0,p=0;function y(){_=d,f=g,d=t[e+=n],g=t[e+1],p+=m,m=Math.sqrt((d-_)*(d-_)+(g-f)*(g-f))}do{y()}while(e<i-n&&p+m<o);let v=0===m?0:(o-p)/m;const x=yt(_,d,v),C=yt(f,g,v),S=e-n,w=p,E=o+a*h(l,s,c);for(;e<i-n&&p+m<E;)y();v=0===m?0:(E-p)/m;const T=yt(_,d,v),R=yt(f,g,v);let I;if(u){const t=[x,C,T,R];An(t,0,4,2,u,t,t),I=t[0]>t[2]}else I=x>T;const b=Math.PI,M=[],P=S+n===e;let F;if(m=0,p=w,d=t[e=S],g=t[e+1],P){y(),F=Math.atan2(g-f,d-_),I&&(F+=F>0?-b:b);const t=(T+x)/2,e=(R+C)/2;return M[0]=[t,e,(E-o)/2,F,s],M}for(let t=0,u=(s=s.replace(/\n/g," ")).length;t<u;){y();let x=Math.atan2(g-f,d-_);if(I&&(x+=x>0?-b:b),void 0!==F){let t=x-F;if(t+=t>b?-2*b:t<-b?2*b:0,Math.abs(t)>r)return null}F=x;const C=t;let S=0;for(;t<u;++t){const r=a*h(l,s[I?u-t-1:t],c);if(e+n<i&&p+m<o+S+r/2)break;S+=r}if(t===C)continue;const w=I?s.substring(u-C,u-t):s.substring(C,t);v=0===m?0:(o+S/2-p)/m;const E=yt(_,d,v),T=yt(f,g,v);M.push([E,T,S/2,x,w]),o+=S}return M}function _r(t,e,i,n){let s=t[e],o=t[e+1],r=0;for(let a=e+n;a<i;a+=n){const e=t[a],i=t[a+1];r+=Math.sqrt((e-s)*(e-s)+(i-o)*(i-o)),s=e,o=i}return r}const fr=[1/0,1/0,-1/0,-1/0],mr=[],pr=[],yr=[],vr=[];function xr(t){return t[3].declutterBox}const Cr=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function Sr(t,e){return"start"===e?e=Cr.test(t)?"right":"left":"end"===e&&(e=Cr.test(t)?"left":"right"),cr[e]}function wr(t,e,i){return i>0&&t.push("\n",""),t.push(e,""),t}const Er=class{constructor(t,e,i,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,i,n){const s=t+e+i+n;if(this.labels_[s])return this.labels_[s];const o=n?this.strokeStates[n]:null,r=i?this.fillStates[i]:null,a=this.textStates[e],h=this.pixelRatio,l=[a.scale[0]*h,a.scale[1]*h],c=Array.isArray(t),u=a.justify?cr[a.justify]:Sr(Array.isArray(t)?t[0]:t,a.textAlign||Kt),d=n&&o.lineWidth?o.lineWidth:0,g=c?t:t.split("\n").reduce(wr,[]),{width:_,height:f,widths:m,heights:p,lineWidths:y}=function(t,e){const i=[],n=[],s=[];let o=0,r=0,a=0,h=0;for(let l=0,c=e.length;l<=c;l+=2){const u=e[l];if("\n"===u||l===c){o=Math.max(o,r),s.push(r),r=0,a+=h;continue}const d=e[l+1]||t.font,g=ee(d,u);i.push(g),r+=g;const _=$t(d);n.push(_),h=Math.max(h,_)}return{width:o,height:a,widths:i,heights:n,lineWidths:s}}(a,g),v=_+d,x=[],C=(v+2)*l[0],S=(f+d)*l[1],w={width:C<0?Math.floor(C):Math.ceil(C),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:x};1==l[0]&&1==l[1]||x.push("scale",l),n&&(x.push("strokeStyle",o.strokeStyle),x.push("lineWidth",d),x.push("lineCap",o.lineCap),x.push("lineJoin",o.lineJoin),x.push("miterLimit",o.miterLimit),x.push("setLineDash",[o.lineDash]),x.push("lineDashOffset",o.lineDashOffset)),i&&x.push("fillStyle",r.fillStyle),x.push("textBaseline","middle"),x.push("textAlign","center");const E=.5-u;let T=u*v+E*d;const R=[],I=[];let b,M=0,P=0,F=0,L=0;for(let t=0,e=g.length;t<e;t+=2){const e=g[t];if("\n"===e){P+=M,M=0,T=u*v+E*d,++L;continue}const s=g[t+1]||a.font;s!==b&&(n&&R.push("font",s),i&&I.push("font",s),b=s),M=Math.max(M,p[F]);const o=[e,T+E*m[F]+u*(m[F]-y[L]),.5*(d+M)+P];T+=m[F],n&&R.push("strokeText",o),i&&I.push("fillText",o),++F}return Array.prototype.push.apply(x,R),Array.prototype.push.apply(x,I),this.labels_[s]=w,w}replayTextBackground_(t,e,i,n,s,o,r){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,s),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),r&&(this.setStrokeStyle_(t,r),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,n,s,o,r,a,h,l,c,u,d,g,_,f){let m=i-(r*=u[0]),p=n-(a*=u[1]);const y=s+h>t?t-h:s,v=o+l>e?e-l:o,x=g[3]+y*u[0]+g[1],C=g[0]+v*u[1]+g[2],S=m-g[3],w=p-g[0];let E;return(_||0!==c)&&(mr[0]=S,vr[0]=S,mr[1]=w,pr[1]=w,pr[0]=S+x,yr[0]=pr[0],yr[1]=w+C,vr[1]=yr[1]),0!==c?(E=sn([1,0,0,1,0,0],i,n,1,1,c,-i,-n),nn(E,mr),nn(E,pr),nn(E,yr),nn(E,vr),Ie(Math.min(mr[0],pr[0],yr[0],vr[0]),Math.min(mr[1],pr[1],yr[1],vr[1]),Math.max(mr[0],pr[0],yr[0],vr[0]),Math.max(mr[1],pr[1],yr[1],vr[1]),fr)):Ie(Math.min(S,S+x),Math.min(w,w+C),Math.max(S,S+x),Math.max(w,w+C),fr),d&&(m=Math.round(m),p=Math.round(p)),{drawImageX:m,drawImageY:p,drawImageW:y,drawImageH:v,originX:h,originY:l,declutterBox:{minX:fr[0],minY:fr[1],maxX:fr[2],maxY:fr[3],value:f},canvasTransform:E,scale:u}}replayImageOrLabel_(t,e,i,n,s,o,r){const a=!(!o&&!r),h=n.declutterBox,l=t.canvas,c=r?r[2]*n.scale[0]/2:0;return h.minX-c<=l.width/e&&h.maxX+c>=0&&h.minY-c<=l.height/e&&h.maxY+c>=0&&(a&&this.replayTextBackground_(t,mr,pr,yr,vr,o,r),function(t,e,i,n,s,o,r,a,h,l,c){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(h,l),t.scale(c[0],c[1]),function(t,e){const i=t.contextInstructions;for(let t=0,n=i.length;t<n;t+=2)Array.isArray(i[t+1])?e[i[t]].apply(e,i[t+1]):e[i[t]]=i[t+1]}(n,t)):c[0]<0||c[1]<0?(t.translate(h,l),t.scale(c[0],c[1]),t.drawImage(n,s,o,r,a,0,0,r,a)):t.drawImage(n,s,o,r,a,h,l,r*c[0],a*c[1]),t.restore()}(t,n.canvasTransform,s,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){if(this.alignFill_){const e=nn(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const s=this.textStates[e],o=this.createLabel(t,e,n,i),r=this.strokeStates[i],a=this.pixelRatio,h=Sr(Array.isArray(t)?t[0]:t,s.textAlign||Kt),l=cr[s.textBaseline||Vt],c=r&&r.lineWidth?r.lineWidth:0;return{label:o,anchorX:h*(o.width/a-2*s.scale[0])+2*(.5-h)*c,anchorY:l*o.height/a+2*(.5-l)*c}}execute_(t,e,i,n,s,o,r,a){let h;var c,u;this.pixelCoordinates_&&l(i,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=kn(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),u=i,(c=this.renderedTransform_)[0]=u[0],c[1]=u[1],c[2]=u[2],c[3]=u[3],c[4]=u[4],c[5]=u[5]);let d=0;const g=n.length;let _,f,m,p,y,v,x,C,S,w,E,T,R=0,I=0,b=0,M=null,P=null;const F=this.coordinateCache_,L=this.viewRotation_,k=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,A={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:L},O=this.instructions!=n||this.overlaps?0:200;let D,z,G,W;for(;d<g;){const i=n[d];switch(i[0]){case sr.BEGIN_GEOMETRY:D=i[1],W=i[3],D.getGeometry()?void 0===r||Ve(r,W.getExtent())?++d:d=i[2]+1:d=i[2];break;case sr.BEGIN_PATH:I>O&&(this.fill_(t),I=0),b>O&&(t.stroke(),b=0),I||b||(t.beginPath(),p=NaN,y=NaN),++d;break;case sr.CIRCLE:R=i[1];const n=h[R],l=h[R+1],c=h[R+2]-n,u=h[R+3]-l,g=Math.sqrt(c*c+u*u);t.moveTo(n+g,l),t.arc(n,l,g,0,2*Math.PI,!0),++d;break;case sr.CLOSE_PATH:t.closePath(),++d;break;case sr.CUSTOM:R=i[1],_=i[2];const j=i[3],N=i[4],X=6==i.length?i[5]:void 0;A.geometry=j,A.feature=D,d in F||(F[d]=[]);const Y=F[d];X?X(h,R,_,2,Y):(Y[0]=h[R],Y[1]=h[R+1],Y.length=2),N(Y,A),++d;break;case sr.DRAW_IMAGE:R=i[1],_=i[2],C=i[3],f=i[4],m=i[5];let B=i[6];const K=i[7],V=i[8],Z=i[9],U=i[10];let H=i[11];const q=i[12];let Q=i[13];const J=i[14],$=i[15];if(!C&&i.length>=20){S=i[19],w=i[20],E=i[21],T=i[22];const t=this.drawLabelWithPointPlacement_(S,w,E,T);C=t.label,i[3]=C;const e=i[23];f=(t.anchorX-e)*this.pixelRatio,i[4]=f;const n=i[24];m=(t.anchorY-n)*this.pixelRatio,i[5]=m,B=C.height,i[6]=B,Q=C.width,i[13]=Q}let tt,et,it,nt;i.length>25&&(tt=i[25]),i.length>17?(et=i[16],it=i[17],nt=i[18]):(et=Zt,it=!1,nt=!1),U&&k?H+=L:U||k||(H-=L);let st=0;for(;R<_;R+=2){if(tt&&tt[st++]<Q/this.pixelRatio)continue;const i=this.calculateImageOrLabelDimensions_(C.width,C.height,h[R],h[R+1],Q,B,f,m,V,Z,H,q,s,et,it||nt,D),n=[t,e,C,i,K,it?M:null,nt?P:null];if(a){if("none"===J)continue;if("obstacle"===J){a.insert(i.declutterBox);continue}{let t,e;if($){const i=_-R;if(!$[i]){$[i]=n;continue}if(t=$[i],delete $[i],e=xr(t),a.collides(e))continue}if(a.collides(i.declutterBox))continue;t&&(a.insert(e),this.replayImageOrLabel_.apply(this,t)),a.insert(i.declutterBox)}}this.replayImageOrLabel_.apply(this,n)}++d;break;case sr.DRAW_CHARS:const ot=i[1],rt=i[2],at=i[3],ht=i[4];T=i[5];const lt=i[6],ct=i[7],ut=i[8];E=i[9];const dt=i[10];S=i[11],w=i[12];const gt=[i[13],i[13]],_t=this.textStates[w],ft=_t.font,mt=[_t.scale[0]*ct,_t.scale[1]*ct];let pt;ft in this.widths_?pt=this.widths_[ft]:(pt={},this.widths_[ft]=pt);const yt=_r(h,ot,rt,2),vt=Math.abs(mt[0])*ie(ft,S,pt);if(ht||vt<=yt){const i=gr(h,ot,rt,2,S,(yt-vt)*Sr(S,this.textStates[w].textAlign),lt,Math.abs(mt[0]),ie,ft,pt,k?0:this.viewRotation_);t:if(i){const n=[];let s,o,r,h,l;if(E)for(s=0,o=i.length;s<o;++s){l=i[s],r=l[4],h=this.createLabel(r,w,"",E),f=l[2]+(mt[0]<0?-dt:dt),m=at*h.height+2*(.5-at)*dt*mt[1]/mt[0]-ut;const o=this.calculateImageOrLabelDimensions_(h.width,h.height,l[0],l[1],h.width,h.height,f,m,0,0,l[3],gt,!1,Zt,!1,D);if(a&&a.collides(o.declutterBox))break t;n.push([t,e,h,o,1,null,null])}if(T)for(s=0,o=i.length;s<o;++s){l=i[s],r=l[4],h=this.createLabel(r,w,T,""),f=l[2],m=at*h.height-ut;const o=this.calculateImageOrLabelDimensions_(h.width,h.height,l[0],l[1],h.width,h.height,f,m,0,0,l[3],gt,!1,Zt,!1,D);if(a&&a.collides(o.declutterBox))break t;n.push([t,e,h,o,1,null,null])}a&&a.load(n.map(xr));for(let t=0,e=n.length;t<e;++t)this.replayImageOrLabel_.apply(this,n[t])}}++d;break;case sr.END_GEOMETRY:if(void 0!==o){D=i[1];const t=o(D,W);if(t)return t}++d;break;case sr.FILL:O?I++:this.fill_(t),++d;break;case sr.MOVE_TO_LINE_TO:for(R=i[1],_=i[2],z=h[R],G=h[R+1],v=z+.5|0,x=G+.5|0,v===p&&x===y||(t.moveTo(z,G),p=v,y=x),R+=2;R<_;R+=2)z=h[R],G=h[R+1],v=z+.5|0,x=G+.5|0,R!=_-2&&v===p&&x===y||(t.lineTo(z,G),p=v,y=x);++d;break;case sr.SET_FILL_STYLE:M=i,this.alignFill_=i[2],I&&(this.fill_(t),I=0,b&&(t.stroke(),b=0)),t.fillStyle=i[1],++d;break;case sr.SET_STROKE_STYLE:P=i,b&&(t.stroke(),b=0),this.setStrokeStyle_(t,i),++d;break;case sr.STROKE:O?b++:t.stroke(),++d;break;default:++d}}I&&this.fill_(t),b&&t.stroke()}execute(t,e,i,n,s,o){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,s,void 0,void 0,o)}executeHitDetection(t,e,i,n,s){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,n,s)}},Tr=["Polygon","Circle","LineString","Image","Text","Default"],Rr={},Ir=class{constructor(t,e,i,n,s,o){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(s)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t){for(const e in t){let i=this.executorsByZIndex_[e];void 0===i&&(i={},this.executorsByZIndex_[e]=i);const n=t[e];for(const t in n){const e=n[t];i[t]=new Er(this.resolution_,this.pixelRatio_,this.overlaps_,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let e=0,n=t.length;e<n;++e)if(t[e]in i)return!0}return!1}forEachFeatureAtCoordinate(t,e,i,n,s,r){const a=2*(n=Math.round(n))+1,h=sn(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=B(a,a,void 0,{willReadFrequently:!0}));const c=this.hitDetectionContext_;let u;c.canvas.width!==a||c.canvas.height!==a?(c.canvas.width=a,c.canvas.height=a):l||c.clearRect(0,0,a,a),void 0!==this.renderBuffer_&&(u=[1/0,1/0,-1/0,-1/0],Pe(u,t),xe(u,e*(this.renderBuffer_+n),u));const d=function(t){if(void 0!==Rr[t])return Rr[t];const e=2*t+1,i=t*t,n=new Array(i+1);for(let s=0;s<=t;++s)for(let o=0;o<=t;++o){const r=s*s+o*o;if(r>i)break;let a=n[r];a||(a=[],n[r]=a),a.push(4*((t+s)*e+(t+o))+3),s>0&&a.push(4*((t-s)*e+(t+o))+3),o>0&&(a.push(4*((t+s)*e+(t-o))+3),s>0&&a.push(4*((t-s)*e+(t-o))+3))}const s=[];for(let t=0,e=n.length;t<e;++t)n[t]&&s.push(...n[t]);return Rr[t]=s,s}(n);let g;function _(t,e){const i=c.getImageData(0,0,a,a).data;for(let o=0,h=d.length;o<h;o++)if(i[d[o]]>0){if(!r||"Image"!==g&&"Text"!==g||r.includes(t)){const i=(d[o]-3)/4,r=n-i%a,h=n-(i/a|0),l=s(t,e,r*r+h*h);if(l)return l}c.clearRect(0,0,a,a);break}}const f=Object.keys(this.executorsByZIndex_).map(Number);let m,p,y,v,x;for(f.sort(o),m=f.length-1;m>=0;--m){const t=f[m].toString();for(y=this.executorsByZIndex_[t],p=Tr.length-1;p>=0;--p)if(g=Tr[p],v=y[g],void 0!==v&&(x=v.executeHitDetection(c,h,i,_,u),x))return x}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],s=e[2],o=e[3],r=[i,n,i,o,s,o,s,n];return kn(r,0,8,2,t,r),r}isEmpty(){return _(this.executorsByZIndex_)}execute(t,e,i,n,s,r,a){const h=Object.keys(this.executorsByZIndex_).map(Number);let l,c,u,d,g,_;for(h.sort(o),this.maxExtent_&&(t.save(),this.clip(t,i)),r=r||Tr,a&&h.reverse(),l=0,c=h.length;l<c;++l){const o=h[l].toString();for(g=this.executorsByZIndex_[o],u=0,d=r.length;u<d;++u)_=g[r[u]],void 0!==_&&_.execute(t,e,i,n,s,a)}this.maxExtent_&&t.restore()}},br=class extends or{constructor(t,e,i,n,s,o,r){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?vt(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=o,this.userTransform_=r,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=[1,0,0,1,0,0]}drawImages_(t,e,i,n){if(!this.image_)return;const s=kn(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,r=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);let h=this.imageRotation_;0===this.transformRotation_&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let t=0,e=s.length;t<e;t+=2){const e=s[t]-this.imageAnchorX_,i=s[t+1]-this.imageAnchorY_;if(0!==h||1!=this.imageScale_[0]||1!=this.imageScale_[1]){const t=e+this.imageAnchorX_,n=i+this.imageAnchorY_;sn(r,t,n,1,1,h,-t,-n),o.setTransform.apply(o,r),o.translate(t,n),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,e,i,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=a)}drawText_(t,e,i,n){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=kn(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_;let r=this.textRotation_;for(0===this.transformRotation_&&(r-=this.viewRotation_),this.textRotateWithView_&&(r+=this.viewRotation_);e<i;e+=n){const t=s[e]+this.textOffsetX_,i=s[e+1]+this.textOffsetY_;0!==r||1!=this.textScale_[0]||1!=this.textScale_[1]?(o.translate(t-this.textOffsetX_,i-this.textOffsetY_),o.rotate(r),o.translate(this.textOffsetX_,this.textOffsetY_),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&o.strokeText(this.text_,t,i),this.textFillState_&&o.fillText(this.text_,t,i))}}moveToLineTo_(t,e,i,n,s){const o=this.context_,r=kn(t,e,i,n,this.transform_,this.pixelCoordinates_);o.moveTo(r[0],r[1]);let a=r.length;s&&(a-=2);for(let t=2;t<a;t+=2)o.lineTo(r[t],r[t+1]);return s&&o.closePath(),i}drawRings_(t,e,i,n){for(let s=0,o=i.length;s<o;++s)e=this.moveToLineTo_(t,e,i[s],n,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Ve(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=function(t,e,i){const n=t.getFlatCoordinates();if(!n)return null;const s=t.getStride();return kn(n,0,n.length,s,e,i)}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],s=Math.sqrt(i*i+n*n),o=this.context_;o.beginPath(),o.arc(e[0],e[1],s,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}}drawFeature(t,e){const i=e.getGeometryFunction()(t);i&&(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let t=0,i=e.length;t<i;++t)this.drawGeometry(e[t])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Ve(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(Ve(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();let n=0;const s=t.getEnds(),o=t.getStride();e.beginPath();for(let t=0,e=s.length;t<e;++t)n=this.moveToLineTo_(i,n,s[t],o,!1);e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoints();this.drawText_(e,0,e.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Ve(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Ve(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getOrientedFlatCoordinates();let n=0;const s=t.getEndss(),o=t.getStride();e.beginPath();for(let t=0,e=s.length;t<e;++t){const e=s[t];n=this.drawRings_(i,n,e,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),l(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:Kt;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(t){const e=t.getColor();this.fillState_={fillStyle:Gt(e||jt)}}else this.fillState_=null;if(e){const t=e.getColor(),i=e.getLineCap(),n=e.getLineDash(),s=e.getLineDashOffset(),o=e.getLineJoin(),r=e.getWidth(),a=e.getMiterLimit(),h=n||Xt;this.strokeState_={lineCap:void 0!==i?i:Nt,lineDash:1===this.pixelRatio_?h:h.map((t=>t*this.pixelRatio_)),lineDashOffset:(s||0)*this.pixelRatio_,lineJoin:void 0!==o?o:Yt,lineWidth:(void 0!==r?r:1)*this.pixelRatio_,miterLimit:void 0!==a?a:10,strokeStyle:Gt(t||Bt)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const o=t.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:Gt(t||jt)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),s=i.getLineDashOffset(),o=i.getLineJoin(),r=i.getWidth(),a=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:Nt,lineDash:n||Xt,lineDashOffset:s||0,lineJoin:void 0!==o?o:Yt,lineWidth:void 0!==r?r:1,miterLimit:void 0!==a?a:10,strokeStyle:Gt(t||Bt)}}else this.textStrokeState_=null;const n=t.getFont(),s=t.getOffsetX(),o=t.getOffsetY(),r=t.getRotateWithView(),a=t.getRotation(),h=t.getScaleArray(),l=t.getText(),c=t.getTextAlign(),u=t.getTextBaseline();this.textState_={font:void 0!==n?n:Wt,textAlign:void 0!==c?c:Kt,textBaseline:void 0!==u?u:Vt},this.text_=void 0!==l?Array.isArray(l)?l.reduce(((t,e,i)=>t+(i%2?" ":e)),""):l:"",this.textOffsetX_=void 0!==s?this.pixelRatio_*s:0,this.textOffsetY_=void 0!==o?this.pixelRatio_*o:0,this.textRotateWithView_=void 0!==r&&r,this.textRotation_=void 0!==a?a:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}else this.text_=""}},Mr=.5,Pr={Point:function(t,e,i,n,s){const o=i.getImage(),r=i.getText();let a;if(o){if(2!=o.getImageState())return;let h=t;if(s){const l=o.getDeclutterMode();if("none"!==l)if(h=s,"obstacle"===l){const s=t.getBuilder(i.getZIndex(),"Image");s.setImageStyle(o,a),s.drawPoint(e,n)}else r&&r.getText()&&(a={})}const l=h.getBuilder(i.getZIndex(),"Image");l.setImageStyle(o,a),l.drawPoint(e,n)}if(r&&r.getText()){let o=t;s&&(o=s);const h=o.getBuilder(i.getZIndex(),"Text");h.setTextStyle(r,a),h.drawText(e,n)}},LineString:function(t,e,i,n,s){const o=i.getStroke();if(o){const s=t.getBuilder(i.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawLineString(e,n)}const r=i.getText();if(r&&r.getText()){const o=(s||t).getBuilder(i.getZIndex(),"Text");o.setTextStyle(r),o.drawText(e,n)}},Polygon:function(t,e,i,n,s){const o=i.getFill(),r=i.getStroke();if(o||r){const s=t.getBuilder(i.getZIndex(),"Polygon");s.setFillStrokeStyle(o,r),s.drawPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const o=(s||t).getBuilder(i.getZIndex(),"Text");o.setTextStyle(a),o.drawText(e,n)}},MultiPoint:function(t,e,i,n,s){const o=i.getImage(),r=i.getText();let a;if(o){if(2!=o.getImageState())return;let h=t;if(s){const l=o.getDeclutterMode();if("none"!==l)if(h=s,"obstacle"===l){const s=t.getBuilder(i.getZIndex(),"Image");s.setImageStyle(o,a),s.drawMultiPoint(e,n)}else r&&r.getText()&&(a={})}const l=h.getBuilder(i.getZIndex(),"Image");l.setImageStyle(o,a),l.drawMultiPoint(e,n)}if(r&&r.getText()){let o=t;s&&(o=s);const h=o.getBuilder(i.getZIndex(),"Text");h.setTextStyle(r,a),h.drawText(e,n)}},MultiLineString:function(t,e,i,n,s){const o=i.getStroke();if(o){const s=t.getBuilder(i.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawMultiLineString(e,n)}const r=i.getText();if(r&&r.getText()){const o=(s||t).getBuilder(i.getZIndex(),"Text");o.setTextStyle(r),o.drawText(e,n)}},MultiPolygon:function(t,e,i,n,s){const o=i.getFill(),r=i.getStroke();if(r||o){const s=t.getBuilder(i.getZIndex(),"Polygon");s.setFillStrokeStyle(o,r),s.drawMultiPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const o=(s||t).getBuilder(i.getZIndex(),"Text");o.setTextStyle(a),o.drawText(e,n)}},GeometryCollection:function(t,e,i,n,s){const o=e.getGeometriesArray();let r,a;for(r=0,a=o.length;r<a;++r)(0,Pr[o[r].getType()])(t,o[r],i,n,s)},Circle:function(t,e,i,n,s){const o=i.getFill(),r=i.getStroke();if(o||r){const s=t.getBuilder(i.getZIndex(),"Circle");s.setFillStrokeStyle(o,r),s.drawCircle(e,n)}const a=i.getText();if(a&&a.getText()){const o=(s||t).getBuilder(i.getZIndex(),"Text");o.setTextStyle(a),o.drawText(e,n)}}};function Fr(t,e){return parseInt(P(t),10)-parseInt(P(e),10)}function Lr(t,e){return.5*t/e}function kr(t,e,i,n,s,o,r){let a=!1;const h=i.getImage();if(h){const t=h.getImageState();2==t||3==t?h.unlistenImageChange(s):(0==t&&h.load(),h.listenImageChange(s),a=!0)}return function(t,e,i,n,s,o){const r=i.getGeometryFunction()(e);if(!r)return;const a=r.simplifyTransformed(n,s);i.getRenderer()?Ar(t,a,i,e):(0,Pr[a.getType()])(t,a,i,e,o)}(t,e,i,n,o,r),a}function Ar(t,e,i,n){if("GeometryCollection"!=e.getType())t.getBuilder(i.getZIndex(),"Default").drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer());else{const s=e.getGeometries();for(let e=0,o=s.length;e<o;++e)Ar(t,s[e],i,n)}}const Or=class extends Po{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=[1/0,1/0,-1/0,-1/0],this.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,s=e.viewState,o=s.center,r=s.resolution,a=s.projection,h=s.rotation,l=a.getExtent(),c=this.getLayer().getSource(),u=e.pixelRatio,d=e.viewHints,g=!(d[0]||d[1]),_=this.compositionContext_,f=Math.round(e.size[0]*u),m=Math.round(e.size[1]*u),p=c.getWrapX()&&a.canWrapX(),y=p?Ke(l):null,v=p?Math.ceil((n[2]-l[2])/y)+1:1;let x=p?Math.floor((n[0]-l[0])/y):0;do{const e=this.getRenderTransform(o,r,h,u,f,m,x*y);t.execute(_,1,e,h,g,void 0,i)}while(++x<v)}setupCompositionContext_(){if(1!==this.opacity_){const t=B(this.context.canvas.width,this.context.canvas.height,bo);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(1!==this.opacity_){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,K(this.compositionContext_),bo.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const i=t.pixelRatio,n=t.layerStatesArray[t.layerIndex];!function(t,e,i){!function(t,e,i,n,s,o,r){t[0]=e,t[1]=i,t[2]=n,t[3]=s,t[4]=o,t[5]=r}(t,e,0,0,i,0,0)}(this.pixelTransform,1/i,1/i),on(this.inversePixelTransform,this.pixelTransform);const s=an(this.pixelTransform);this.useContainer(e,s,this.getBackground(t));const o=this.context,r=o.canvas,a=this.replayGroup_,h=this.declutterExecutorGroup;let l=a&&!a.isEmpty()||h&&!h.isEmpty();if(!l&&!this.getLayer().hasListener(vn)&&!this.getLayer().hasListener(xn))return null;const c=Math.round(t.size[0]*i),u=Math.round(t.size[1]*i);r.width!=c||r.height!=u?(r.width=c,r.height=u,r.style.transform!==s&&(r.style.transform=s)):this.containerReused||o.clearRect(0,0,c,u),this.preRender(o,t);const d=t.viewState;d.projection;this.opacity_=n.opacity,this.setupCompositionContext_();let g=!1;if(l&&n.extent&&this.clipping){const e=Bi(n.extent);l=Ve(e,t.extent),g=l&&!Ee(e,t.extent),g&&this.clipUnrotated(this.compositionContext_,t,e)}return l&&this.renderWorlds(a,t),g&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(o,t),this.renderedRotation_!==d.rotation&&(this.renderedRotation_=d.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise((e=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=[this.context.canvas.width,this.context.canvas.height];nn(this.pixelTransform,t);const e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,s=this.renderedProjection_,r=this.wrappedRenderedExtent_,a=this.getLayer(),h=[],l=t[0]*Mr,c=t[1]*Mr;h.push(this.getRenderTransform(e,i,n,Mr,l,c,0).slice());const u=a.getSource(),d=s.getExtent();if(u.getWrapX()&&s.canWrapX()&&!Ee(d,r)){let t=r[0];const s=Ke(d);let o,a=0;for(;t<d[0];)--a,o=s*a,h.push(this.getRenderTransform(e,i,n,Mr,l,c,o).slice()),t+=s;for(a=0,t=r[2];t>d[2];)++a,o=s*a,h.push(this.getRenderTransform(e,i,n,Mr,l,c,o).slice()),t-=s}this.hitDetectionImageData_=function(t,e,i,n,s,r,a){const h=B(t[0]*Mr,t[1]*Mr);h.imageSmoothingEnabled=!1;const l=h.canvas,c=new br(h,Mr,s,null,a),u=i.length,d=Math.floor(16777215/u),g={};for(let t=1;t<=u;++t){const e=i[t-1],o=e.getStyleFunction()||n;if(!o)continue;let a=o(e,r);if(!a)continue;Array.isArray(a)||(a=[a]);const h=(t*d).toString(16).padStart(7,"#00000");for(let t=0,i=a.length;t<i;++t){const i=a[t],n=i.getGeometryFunction()(e);if(!n||!Ve(s,n.getExtent()))continue;const o=i.clone(),r=o.getFill();r&&r.setColor(h);const l=o.getStroke();l&&(l.setColor(h),l.setLineDash(null)),o.setText(void 0);const c=i.getImage();if(c){const t=c.getImageSize();if(!t)continue;const e=B(t[0],t[1],void 0,{alpha:!1}),i=e.canvas;e.fillStyle=h,e.fillRect(0,0,i.width,i.height),o.setImage(new ti({img:i,imgSize:t,anchor:c.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:c.getOrigin(),opacity:1,size:c.getSize(),scale:c.getScale(),rotation:c.getRotation(),rotateWithView:c.getRotateWithView()}))}const u=o.getZIndex()||0;let d=g[u];d||(d={},g[u]=d,d.Polygon=[],d.Circle=[],d.LineString=[],d.Point=[]);const _=n.getType();if("GeometryCollection"===_){const t=n.getGeometriesArrayRecursive();for(let e=0,i=t.length;e<i;++e){const i=t[e];d[i.getType().replace("Multi","")].push(i,o)}}else d[_.replace("Multi","")].push(n,o)}}const _=Object.keys(g).map(Number).sort(o);for(let t=0,i=_.length;t<i;++t){const i=g[_[t]];for(const t in i){const n=i[t];for(let t=0,i=n.length;t<i;t+=2){c.setStyle(n[t+1]);for(let i=0,s=e.length;i<s;++i)c.setTransform(e[i]),c.drawGeometry(n[t])}}}return h.getImageData(0,0,l.width,l.height)}(t,h,this.renderedFeatures_,a.getStyleFunction(),r,i,n)}e(function(t,e,i){const n=[];if(i){const s=Math.floor(Math.round(t[0])*Mr),o=Math.floor(Math.round(t[1])*Mr),r=4*(gt(s,0,i.width-1)+gt(o,0,i.height-1)*i.width),a=i.data[r],h=i.data[r+1],l=i.data[r+2]+256*(h+256*a),c=Math.floor(16777215/e.length);l&&l%c==0&&n.push(e[l/c-1])}return n}(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,s){if(!this.replayGroup_)return;const o=e.viewState.resolution,r=e.viewState.rotation,a=this.getLayer(),h={},l=function(t,e,i){const o=P(t),r=h[o];if(r){if(!0!==r&&i<r.distanceSq){if(0===i)return h[o]=!0,s.splice(s.lastIndexOf(r),1),n(t,a,e);r.geometry=e,r.distanceSq=i}}else{if(0===i)return h[o]=!0,n(t,a,e);s.push(h[o]={feature:t,layer:a,geometry:e,distanceSq:i,callback:n})}};let c;const u=[this.replayGroup_];return this.declutterExecutorGroup&&u.push(this.declutterExecutorGroup),u.some((n=>c=n.forEachFeatureAtCoordinate(t,o,r,i,l,n===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((t=>t.value)):null))),c}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[0],s=t.viewHints[1],o=e.getUpdateWhileAnimating(),r=e.getUpdateWhileInteracting();if(this.ready&&!o&&n||!r&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const a=t.extent,h=t.viewState,c=h.projection,u=h.resolution,d=t.pixelRatio,g=e.getRevision(),_=e.getRenderBuffer();let f=e.getRenderOrder();void 0===f&&(f=Fr);const m=h.center.slice(),p=xe(a,_*u),y=p.slice(),v=[p.slice()],x=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!Ee(x,t.extent)){const t=Ke(x),e=Math.max(Ke(p)/2,t);p[0]=x[0]-e,p[2]=x[2]+e,Ci(m,c);const i=Ue(v[0],c);i[0]<x[0]&&i[2]<x[2]?v.push([i[0]+t,i[1],i[2]+t,i[3]]):i[0]>x[0]&&i[2]>x[2]&&v.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==g&&this.renderedRenderOrder_==f&&Ee(this.wrappedRenderedExtent_,p))return l(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const C=new dr(Lr(u,d),p,u,d);let S;this.getLayer().getDeclutter()&&(S=new dr(Lr(u,d),p,u,d));const w=ji();let E;if(w){for(let t=0,e=v.length;t<e;++t){const e=Yi(v[t]);i.loadFeatures(e,Ki(u),w)}E=Di(w,c)}else for(let t=0,e=v.length;t<e;++t)i.loadFeatures(v[t],u,c);const T=function(t,e){const i=Lr(t,e);return i*i}(u,d);let R=!0;const I=t=>{let i;const n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,u)),i){const e=this.renderFeature(t,T,i,C,E,S);R=R&&!e}},b=Yi(p),M=i.getFeaturesInExtent(b);f&&M.sort(f);for(let t=0,e=M.length;t<e;++t)I(M[t]);this.renderedFeatures_=M,this.ready=R;const P=C.finish(),F=new Ir(p,u,d,i.getOverlaps(),P,e.getRenderBuffer());return S&&(this.declutterExecutorGroup=new Ir(p,u,d,i.getOverlaps(),S.finish(),e.getRenderBuffer())),this.renderedResolution_=u,this.renderedRevision_=g,this.renderedRenderOrder_=f,this.renderedExtent_=y,this.wrappedRenderedExtent_=p,this.renderedCenter_=m,this.renderedProjection_=c,this.replayGroup_=F,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,i,n,s,o){if(!i)return!1;let r=!1;if(Array.isArray(i))for(let a=0,h=i.length;a<h;++a)r=kr(n,t,i[a],e,this.boundHandleStyleImageChange_,s,o)||r;else r=kr(n,t,i,e,this.boundHandleStyleImageChange_,s,o);return r}},Dr=class extends Jo{constructor(t){super(t)}createRenderer(){return new Or(this)}},zr=class{constructor(t){this.rbush_=new Ko(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[P(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,s=e.length;n<s;n++){const s=t[n],o=e[n],r={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:o};i[n]=r,this.items_[P(o)]=r}this.rbush_.load(i)}remove(t){const e=P(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)}update(t,e){const i=this.items_[P(e)];Me([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map((function(t){return t.value}))}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let i;for(let n=0,s=t.length;n<s;n++)if(i=e(t[n]),i)return i;return i}isEmpty(){return _(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return Ie(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}};function Gr(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const Wr=class extends L{constructor(t){super(),this.projection=Fi(t.projection),this.attributions_=Gr(t.attributions),this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Gr(t),this.changed()}setState(t){this.state_=t,this.changed()}},jr="addfeature",Nr="removefeature";function Xr(t,e){return[[-1/0,-1/0,1/0,1/0]]}function Yr(t,e){return function(i,n,s,o,r){const a=this;!function(t,e,i,n,s,o,r){const a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,n,s):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=!1,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){const t=e.getType();let n;"json"==t||"text"==t?n=a.responseText:"xml"==t?(n=a.responseXML,n||(n=(new DOMParser).parseFromString(a.responseText,"application/xml"))):"arraybuffer"==t&&(n=a.response),n?o(e.readFeatures(n,{extent:i,featureProjection:s}),e.readProjection(n)):r()}else r()},a.onerror=r,a.send()}(t,e,i,n,s,(function(t,e){a.addFeatures(t),void 0!==o&&o(t)}),r||d)}}class Br extends e{constructor(t,e,i){super(t),this.feature=e,this.features=i}}const Kr=class extends Wr{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=d,this.format_=t.format,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&(Pt(this.format_,7),this.loader_=Yr(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:Xr;const e=void 0===t.useSpatialIndex||t.useSpatialIndex;let i,n;this.featuresRtree_=e?new zr:null,this.loadedExtentsRtree_=new zr,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?n=t.features:t.features&&(i=t.features,n=i.getArray()),e||void 0!==i||(i=new en(n)),void 0!==n&&this.addFeaturesInternal(n),void 0!==i&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=P(t);if(!this.addToIndex_(e,t))return void(this.featuresCollection_&&this.featuresCollection_.remove(t));this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Br(jr,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[w(e,m,this.handleFeatureChange_,this),w(e,n,this.handleFeatureChange_,this)]}addToIndex_(t,e){let i=!0;const n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=e),i&&(Pt(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let e=0,n=t.length;e<n;e++){const n=t[e],s=P(n);this.addToIndex_(s,n)&&i.push(n)}for(let t=0,s=i.length;t<s;t++){const s=i[t],o=P(s);this.setupChangeEvents_(o,s);const r=s.getGeometry();if(r){const t=r.getExtent();e.push(t),n.push(s)}else this.nullGeometryFeatures_[o]=s}if(this.featuresRtree_&&this.featuresRtree_.load(e,n),this.hasListener(jr))for(let t=0,e=i.length;t<e;t++)this.dispatchEvent(new Br(jr,i[t]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(jr,(function(i){e||(e=!0,t.push(i.feature),e=!1)})),this.addEventListener(Nr,(function(i){e||(e=!0,t.remove(i.feature),e=!1)})),t.addEventListener(Qi,(t=>{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener(Ji,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_)this.featureChangeKeys_[t].forEach(T);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const t=t=>{this.removeFeatureInternal(t)};this.featuresRtree_.forEach(t);for(const t in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new Br("clear");this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){if(i.getGeometry().intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){if(i.getGeometry().intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),_(this.nullGeometryFeatures_)||h(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=function(t,e){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];Ue(t,e);const n=Ke(i);if(Ke(t)>n)return[[i[0],t[1],i[2],t[3]]];if(t[0]<i[0])return[[t[0]+n,t[1],i[2],t[3]],[i[0],t[1],t[2],t[3]]];if(t[2]>i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-n,t[3]]]}return[t]}(t,e);return[].concat(...i.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let s=null;const o=[NaN,NaN];let r=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||c,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),h=r;if(r=e.closestPointXY(i,n,o,r),r<h){s=t;const e=Math.sqrt(r);a[0]=i-e,a[1]=n-e,a[2]=i+e,a[3]=n+e}}})),s}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return void 0!==e?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return void 0!==e?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,i=P(e),n=e.getGeometry();if(n){const t=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(t,e)):this.featuresRtree_&&this.featuresRtree_.update(t,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);const s=e.getId();if(void 0!==s){const t=s.toString();this.idIndex_[t]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[t]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new Br("changefeature",e))}hasFeature(t){const e=t.getId();return void 0!==e?e in this.idIndex_:P(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&_(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}loadFeatures(t,e,i){const n=this.loadedExtentsRtree_,s=this.strategy_(t,e,i);for(let t=0,o=s.length;t<o;++t){const o=s[t];n.forEachInExtent(o,(function(t){return Ee(t.extent,o)}))||(++this.loadingExtentsCount_,this.dispatchEvent(new Br("featuresloadstart")),this.loader_.call(this,o,e,i,(t=>{--this.loadingExtentsCount_,this.dispatchEvent(new Br("featuresloadend",void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Br("featuresloaderror"))})),n.insert(o,{extent:o.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if(Me(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeature(t){if(!t)return;const e=P(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=P(t),i=this.featureChangeKeys_[e];if(!i)return;i.forEach(T),delete this.featureChangeKeys_[e];const n=t.getId();return void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Br(Nr,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){Pt(this.format_,7),this.url_=t,this.setLoader(Yr(t,this.format_))}},Vr=class{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return Pt(void 0!==i,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return Pt(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t}getValues(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){if(this.containsKey(t))return this.entries_[t].value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){Pt(!(t in this.entries_),16);const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}};function Zr(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function Ur(t,e,i){return t+"/"+e+"/"+i}function Hr(t){return Ur(t[0],t[1],t[2])}const qr=class extends Vr{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(0===this.getCount())return;const t=this.peekFirstKey().split("/").map(Number)[0];this.forEach((e=>{e.tileCoord[0]!==t&&(this.remove(Hr(e.tileCoord)),e.release())}))}},Qr=[0,0,0],Jr=class{constructor(t){let e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,Pt(function(t,e,i){const n=function(t,e){return e-t}||o;return t.every((function(e,i){if(0===i)return!0;const s=n(t[i-1],e);return!(s>0||0===s)}))}(this.resolutions_),17),!t.origins)for(let t=0,i=this.resolutions_.length-1;t<i;++t)if(e){if(this.resolutions_[t]/this.resolutions_[t+1]!==e){e=void 0;break}}else e=this.resolutions_[t]/this.resolutions_[t+1];this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,Pt(this.origins_.length==this.resolutions_.length,20));const i=t.extent;void 0===i||this.origin_||this.origins_||(this.origin_=Ye(i)),Pt(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,Pt(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:Tn,Pt(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==i?i:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){const n=new Xo(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(i){const t=this.getTileRangeForExtentAndZ(i,e);n.minX=Math.max(t.minX,n.minX),n.maxX=Math.min(t.maxX,n.maxX),n.minY=Math.max(t.minY,n.minY),n.maxY=Math.min(t.maxY,n.maxY)}return n}),this):i&&this.calculateTileRanges_(i)}forEachTileCoord(t,e,i){const n=this.getTileRangeForExtentAndZ(t,e);for(let t=n.minX,s=n.maxX;t<=s;++t)for(let s=n.minY,o=n.maxY;s<=o;++s)i([e,t,s])}forEachTileCoordParentTileRange(t,e,i,n){let s,o,r,a=null,h=t[0]-1;for(2===this.zoomFactor_?(o=t[1],r=t[2]):a=this.getTileCoordExtent(t,n);h>=this.minZoom;){if(2===this.zoomFactor_?(o=Math.floor(o/2),r=Math.floor(r/2),s=No(o,o,r,r,i)):s=this.getTileRangeForExtentAndZ(a,h,i),e(h,s))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){const i=2*t[1],n=2*t[2];return No(i,i+1,n,n+1,e)}const n=this.getTileCoordExtent(t,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(n,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,i){if(e>this.maxZoom||e<this.minZoom)return null;const n=t[0],s=t[1],o=t[2];if(e===n)return No(s,o,s,o,i);if(this.zoomFactor_){const t=Math.pow(this.zoomFactor_,e-n),r=Math.floor(s*t),a=Math.floor(o*t);return e<n?No(r,r,a,a,i):No(r,Math.floor(t*(s+1))-1,a,Math.floor(t*(o+1))-1,i)}const r=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(r,e,i)}getTileRangeForExtentAndZ(t,e,i){this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,Qr);const n=Qr[1],s=Qr[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,Qr),No(n,Qr[1],s,Qr[2],i)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=Et(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]-(t[2]+.5)*n[1]*i]}getTileCoordExtent(t,e){const i=this.getOrigin(t[0]),n=this.getResolution(t[0]),s=Et(this.getTileSize(t[0]),this.tmpSize_),o=i[0]+t[1]*s[0]*n,r=i[1]-(t[2]+1)*s[1]*n;return Ie(o,r,o+s[0]*n,r+s[1]*n,e)}getTileCoordForCoordAndResolution(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)}getTileCoordForXYAndResolution_(t,e,i,n,s){const o=this.getZForResolution(i),r=i/this.getResolution(o),a=this.getOrigin(o),h=Et(this.getTileSize(o),this.tmpSize_);let l=r*(t-a[0])/i/h[0],c=r*(a[1]-e)/i/h[1];return n?(l=Ct(l,5)-1,c=Ct(c,5)-1):(l=xt(l,5),c=xt(c,5)),Zr(o,l,c,s)}getTileCoordForXYAndZ_(t,e,i,n,s){const o=this.getOrigin(i),r=this.getResolution(i),a=Et(this.getTileSize(i),this.tmpSize_);let h=(t-o[0])/r/a[0],l=(o[1]-e)/r/a[1];return n?(h=Ct(h,5)-1,l=Ct(l,5)-1):(h=xt(h,5),l=xt(l,5)),Zr(i,h,l,s)}getTileCoordForCoordAndZ(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)}getTileCoordResolution(t){return this.resolutions_[t[0]]}getTileSize(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]}getFullTileRange(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null}getZForResolution(t,e){return gt(r(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return ns(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,i=new Array(e);for(let n=this.minZoom;n<e;++n)i[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=i}};function $r(t){let e=t.getDefaultTileGrid();return e||(e=function(t,e,i,n){return function(t,e,i,n){n=void 0!==n?n:"top-left";const s=ta(t,e,i);return new Jr({extent:t,origin:Ge(t,n),resolutions:s,tileSize:i})}(ea(t),void 0,void 0,void 0)}(t),t.setDefaultTileGrid(e)),e}function ta(t,e,i,n){e=void 0!==e?e:En,i=Et(void 0!==i?i:Tn);const s=Ne(t),o=Ke(t);n=n>0?n:Math.max(o/i[0],s/i[1]);const r=e+1,a=new Array(r);for(let t=0;t<r;++t)a[t]=n/Math.pow(2,t);return a}function ea(t){let e=(t=Fi(t)).getExtent();if(!e){const i=180*ni.degrees/t.getMetersPerUnit();e=Ie(-i,-i,i,i)}return e}class ia extends e{constructor(t,e){super(t),this.tile=e}}const na=class extends Wr{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=void 0!==t.opaque&&t.opaque,this.tilePixelRatio_=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null;this.tileGrid&&Et(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),[256,256]),this.tileCache=new qr(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const i=this.getTileCacheForProjection(t);i&&i.expireCache(e)}forEachLoadedTile(t,e,i,n){const s=this.getTileCacheForProjection(t);if(!s)return!1;let o,r,a,h=!0;for(let t=i.minX;t<=i.maxX;++t)for(let l=i.minY;l<=i.maxY;++l)r=Ur(e,t,l),a=!1,s.containsKey(r)&&(o=s.get(r),a=2===o.getState(),a&&(a=!1!==n(o))),a||(h=!1);return h}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(t){const e=t?this.getTileGridForProjection(t):this.tileGrid;return e?e.getResolutions():null}getTile(t,e,i,n,s){return b()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:$r(t)}getTileCacheForProjection(t){const e=this.getProjection();return Pt(null===e||Oi(e,t),68),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,i){const n=this.getTileGridForProjection(i),s=this.getTilePixelRatio(e),o=Et(n.getTileSize(t),this.tmpSize);return 1==s?o:(r=o,a=s,void 0===(h=this.tmpSize)&&(h=[0,0]),h[0]=r[0]*a+.5|0,h[1]=r[1]*a+.5|0,h);var r,a,h}getTileCoordForTileUrlFunction(t,e){e=void 0!==e?e:this.getProjection();const i=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=function(t,e,i){const n=e[0],s=t.getTileCoordCenter(e),o=ea(i);if(!we(o,s)){const e=Ke(o),i=Math.ceil((o[0]-s[0])/e);return s[0]+=e*i,t.getTileCoordForCoordAndZ(s,n)}return e}(i,t,e)),function(t,e){const i=t[0],n=t[1],s=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;const o=e.getFullTileRange(i);return!o||o.containsXY(n,s)}(t,i)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)}useTile(t,e,i,n){}};function sa(t,e){const i=/\{z\}/g,n=/\{x\}/g,s=/\{y\}/g,o=/\{-y\}/g;return function(r,a,h){if(r)return t.replace(i,r[0].toString()).replace(n,r[1].toString()).replace(s,r[2].toString()).replace(o,(function(){const t=r[0],i=e.getFullTileRange(t);return Pt(i,55),(i.getHeight()-r[2]-1).toString()}))}}class oa extends na{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===oa.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){const e=t.target,i=P(e),n=e.getState();let s;1==n?(this.tileLoadingKeys_[i]=!0,s="tileloadstart"):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],s=3==n?"tileloaderror":2==n?"tileloadend":void 0),null!=s&&this.dispatchEvent(new ia(s,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()}setUrl(t){const e=function(t){const e=[];let i=/\{([a-z])-([a-z])\}/.exec(t);if(i){const n=i[1].charCodeAt(0),s=i[2].charCodeAt(0);let o;for(o=n;o<=s;++o)e.push(t.replace(i[0],String.fromCharCode(o)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t),i){const n=parseInt(i[2],10);for(let s=parseInt(i[1],10);s<=n;s++)e.push(t.replace(i[0],s.toString()));return e}return e.push(t),e}(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(function(t,e){const i=t.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=sa(t[s],e);return function(t){return 1===t.length?t[0]:function(e,i,n){if(!e)return;const s=function(t){return(t[1]<<t[0])+t[2]}(e),o=pt(s,t.length);return t[o](e,i,n)}}(n)}(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}useTile(t,e,i){const n=Ur(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)}}const ra=oa;function aa(t,e){t.getImage().src=e}const ha=class extends ra{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:aa,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:void 0===t.interpolate||t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=void 0!==t.tileClass?t.tileClass:Lo,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?e:{});for(const t in this.tileCacheForProjection){const n=this.tileCacheForProjection[t];n.expireCache(n==i?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!Oi(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return!(this.getProjection()&&t&&!Oi(this.getProjection(),t))&&super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||Oi(e,t)))return this.tileGrid;const i=P(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=$r(t)),this.tileGridForProjection[i]}getTileCacheForProjection(t){const e=this.getProjection();if(!e||Oi(e,t))return this.tileCache;const i=P(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new qr(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]}createTile_(t,e,i,n,s,o){const r=[t,e,i],a=this.getTileCoordForTileUrlFunction(r,s),h=a?this.tileUrlFunction(a,n,s):void 0,l=new this.tileClass(r,void 0!==h?0:4,void 0!==h?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return l.key=o,l.addEventListener(m,this.handleTileChange.bind(this)),l}getTile(t,e,i,n,s){const o=this.getProjection();if(!o||!s||Oi(o,s))return this.getTileInternal(t,e,i,n,o||s);const r=this.getTileCacheForProjection(s),a=[t,e,i];let h;const l=Hr(a);r.containsKey(l)&&(h=r.get(l));const c=this.getKey();if(h&&h.key==c)return h;const u=this.getTileGridForProjection(o),d=this.getTileGridForProjection(s),g=this.getTileCoordForTileUrlFunction(a,s),_=new Wo(o,u,s,d,a,g,this.getTilePixelRatio(n),this.getGutter(),((t,e,i,n)=>this.getTileInternal(t,e,i,n,o)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return _.key=c,h?(_.interimTile=h,_.refreshInterimChain(),r.replace(l,_)):r.set(l,_),_}getTileInternal(t,e,i,n,s){let o=null;const r=Ur(t,e,i),a=this.getKey();if(this.tileCache.containsKey(r)){if(o=this.tileCache.get(r),o.key!=a){const h=o;o=this.createTile_(t,e,i,n,s,a),0==h.getState()?o.interimTile=h.interimTile:o.interimTile=h,o.refreshInterimChain(),this.tileCache.replace(r,o)}}else o=this.createTile_(t,e,i,n,s,a),this.tileCache.set(r,o);return o}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(t,e){const i=Fi(t);if(i){const t=P(i);t in this.tileGridForProjection||(this.tileGridForProjection[t]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}},la=class extends ha{constructor(t){const e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",i=void 0!==t.tileGrid?t.tileGrid:function(t){const e=t||{},i=e.extent||Fi("EPSG:3857").getExtent(),n={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:ta(i,e.maxZoom,e.tileSize,e.maxResolution)};return new Jr(n)}({extent:ea(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0}getGutter(){return this.gutter_}};window.EventPost=window.EventPost||{},window.EventPost.OL={Zoom:lt,ZoomSlider:St,Style:fe,Icon:ti,Fill:he,Text:ii,transform:Gi,Feature:qi,Map:po,Overlay:wo,Point:Jn,Projection:si,TileLayer:Bo,VectorLayer:Dr,VectorSource:Kr,View:gs,XYZ:la},jQuery(document).ready((function(){if(void 0!==po){const t=[],e=[],i=[],n=[],s=[],o=[],r=new si({code:"EPSG:4326"}),a=new si({code:"EPSG:900913"}),h=window.EventPost.front.map_interactions,l=window.retina||window.devicePixelRatio>1.5;function c(t){return window.EventPost.front.maptiles[t].urls_retina&&l}function u(e,s){jQuery(i[e]).hide(0);var o=t[e].getView(),r=s.getGeometry().getCoordinates();o.animate({duration:1e3,center:r}),n[e].setPosition(r);let a=jQuery(".event_geolist");var h;if(1===a.data("pop_element_schema")){let t,e=a.data("htmlpop_element_schema");t="undefined"===jQuery.type(s.get("desc"))?'<span class="desc-to-delete">'+s.get("desc")+"</span>":s.get("desc"),e=e.replace(/\%title\%/,s.get("name")).replace(/\%address\%/,s.get("address")).replace(/\%link\%/,s.get("link")).replace(/\%thumbnail\%/,s.get("thumbnail")).replace(/\%desc\%/,t),h=e}else{var l=""!==s.get("price")?'<span class="event-price">'+s.get("price")+"</span><br>":"";h='<a href="'+s.get("link")+'">'+(""!==s.get("thumbnail")&&void 0!==s.get("thumbnail")?'<img src="'+s.get("thumbnail")+'">':"")+"<strong>"+s.get("name")+"</strong><br>"+l+"<time>"+s.get("date")+"</time><br><address>"+s.get("address")+"</address>"+(""!==s.get("desc")&&void 0!==s.get("desc")?"<p>"+s.get("desc")+"</p>":"")+"</a>"}jQuery(i[e]).delay(500).html(h).show(500),jQuery(".desc-to-delete").parent().remove(),"undefined"===jQuery.type(s.get("thumbnail"))&&jQuery("img",".event_map_popup").remove()}jQuery("a.event_link.gps").on("click",(function(i){if(void 0!==jQuery(this).parent().data("latitude")&&void 0!==jQuery(this).parent().data("longitude")){i.preventDefault();var n=jQuery(this).parent().data("latitude"),s=jQuery(this).parent().data("longitude"),h=jQuery(this).parent().data("color"),l=jQuery(this).parent().data("icon"),u=jQuery(this).parent().data("iconcode"),d=jQuery(this).parent().data("marker"),g="event_map"+jQuery(this).parent().data("id"),_=Gi([s,n],r,a);if(0===jQuery("#"+g).length){jQuery(this).parent().append('<div id="'+g+'-wrap"><div id="'+g+'" class="event_map"></div></div>'),jQuery("#"+g+"-wrap").css({height:"400px",margin:"auto",clear:"both"}),jQuery("#"+g).height(400),e[g]=new Kr,t[g]=new po({target:g,layers:[new Bo({source:new la({urls:c(window.EventPost.front.defaulttile)?window.EventPost.front.maptiles[window.EventPost.front.defaulttile].urls_retina:window.EventPost.front.maptiles[window.EventPost.front.defaulttile].urls,tilePixelRatio:c(window.EventPost.front.defaulttile)?2:1,attribution:window.EventPost.front.maptiles[window.EventPost.front.defaulttile].attribution})}),new Dr({source:e[g]})],view:new gs({center:_,zoom:window.EventPost.front.zoom})}),t[g].addControl(new lt);var f=new qi({geometry:new Jn(_)});""!=d?(void 0===o[d]&&(o[d]=new fe({image:new ti({anchor:[16,32],anchorXUnits:"pixels",anchorYUnits:"pixels",opacity:1,src:d})})),f.setStyle(o[d])):(void 0===o[u+h]&&(o[u+h]=new fe({text:new ii({text:l,font:"normal 30px 'dashicons'",fill:new he({color:h})})})),f.setStyle(o[u+h])),e[g].addFeature(f)}else jQuery("#"+g+"-wrap").animate({height:"toggle"},1e3,(function(){t[g].getView().setCenter(_)}));return!1}})),jQuery(".event_geolist").each((function(){var l=jQuery(this).attr("id"),d="event_map_all"+l,g=jQuery(this).data("width"),_=jQuery(this).data("height"),f=jQuery(this).data("zoom"),m=jQuery(this).data("tile");""===m&&(m=window.EventPost.front.defaulttile);var p=jQuery(this).data("disabled-interactions"),y='<div id="'+d+'" class="event_map map"></div><div id="'+d+'-popup" class="event_map_popup"></div>';jQuery(this).addClass("event_geolist_parsed");var v=!1;jQuery(this).hasClass("has-list")&&(v=jQuery(this).data("list"),jQuery(".event_item",jQuery(this)).wrapAll('<div class="eventpost-item-list">'),jQuery(".eventpost-item-list a:not(.gps-geo-link)",jQuery(this)).on("click",(function(t){t.preventDefault();var e=l+"-"+jQuery(this).parents(".event_item").first().data("id");return"undefined"!==s[e]&&u(d,s[e]),!1}))),"below"===v||"right"===v?jQuery(this).prepend(y):jQuery(this).append(y);const x={margin:"auto",clear:"both"};"auto"!==g&&(x.width=g),"auto"!==_&&(x.height=_),"left"!==v&&"right"!==v||(x.width="70%"),"above"!==v&&"below"!==v||jQuery(this).css({height:"auto"}),jQuery("#"+d).css(x),e[d]=new Kr,i[d]=document.getElementById(d+"-popup"),n[d]=new wo({element:i[d],positioning:"bottom-center",stopEvent:!1});const C={target:d,layers:[new Bo({source:new la({urls:c(m)?window.EventPost.front.maptiles[m].urls_retina:window.EventPost.front.maptiles[m].urls,tilePixelRatio:c(m)?2:1,attribution:window.EventPost.front.maptiles[m].attribution})}),new Dr({source:e[d]})],view:new gs({center:[0,0],zoom:isNaN(f)?12:f,maxZoom:18}),overlays:[n[d]]};t[d]=new po(C),t[d].addControl(new St),t[d].on("click",(function(e){var n=t[d].forEachFeatureAtPixel(e.pixel,(function(t,e){return t}));n?u(d,n):jQuery(i[d]).hide(200)}));var S=0;jQuery(this).find("address").each((function(){S++;var t=parseFloat(jQuery(this).data("latitude")),i=parseFloat(jQuery(this).data("longitude"));if(jQuery(this).parents(".event_item").first().data("id",S),void 0!==t&&void 0!==i){var n=jQuery(this).parent().parent(),h=jQuery(this).data("color"),c=jQuery(this).data("icon"),u=jQuery(this).data("iconcode"),g=jQuery(this).data("marker"),_=(jQuery(this).data("id"),Gi([i,t],r,a)),f={geometry:new Jn(_),price:n.find(".event_price").html(),name:n.find("h5").text(),address:jQuery(this).html(),date:n.find("time").text(),link:n.find("a").attr("href"),desc:n.find(".event_exerpt").html()};n.find("img").length>0&&(f.thumbnail=n.find("img").attr("src"));var m=l+"-"+S;s[m]=new qi(f),""!=g?(void 0===o[g]&&(o[g]=new fe({image:new ti({anchor:[16,32],anchorXUnits:"pixels",anchorYUnits:"pixels",opacity:1,src:g})})),s[m].setStyle(o[g])):(void 0===o[u+h]&&(o[u+h]=new fe({text:new ii({text:c,font:"normal 30px 'dashicons'",fill:new he({color:h})})})),s[m].setStyle(o[u+h])),e[d].addFeature(s[m])}}));let w=jQuery(this).data("map_position"),E=jQuery(this).data("longitude"),T=jQuery(this).data("latitude");if(1===w){var R=Gi([E,T],r,a);t[d].getView().setCenter(R)}else t[d].getView().fit(e[d].getExtent(),t[d].getSize()),f=f||t[d].getView().getZoom()-4*t[d].getView().getZoom()/100,!isNaN(f)&&""!==f&&f>0&&t[d].getView().setZoom(f);var I,b=0;for(I in h)p.indexOf(I+",")>-1&&t[d].getInteractions().getArray()[b].setActive(!1),b++}))}else jQuery(".event_geolist").hide()}))})()})();;(()=>{"use strict";jQuery(document).ready((function(){function t(){jQuery(".eventpost_calendar table td h4").each((function(){var t=jQuery(this).next(".event_data");jQuery(this).css({borderColor:t.css("border-left-color"),color:t.css("border-left-color"),backgroundColor:t.css("background-color")})})),jQuery(".eventpost_cal_bt").on("click",(function(){var a=jQuery(this).parents(".eventpost_calendar");a.attr("data-current-date",jQuery(this).data("date")).trigger("UpdateCalendar"),jQuery.get(window.EventPost.front.ajaxurl,{action:"EventPostCalendar",date:jQuery(this).data("date"),cat:a.data("cat"),mf:a.data("mf"),dp:a.data("dp"),color:a.data("color"),display_title:a.data("title"),thumbnail:a.data("thumbnail"),tax_name:a.data("tax_name"),tax_term:a.data("tax_term")},(function(e){a.html(e),a.trigger("UpdatedCalendar"),t()}))})),jQuery(".eventpost_cal_link").on("click",(function(){var t=jQuery(this).parents(".eventpost_calendar");t.attr("data-current-day",jQuery(this).data("date")),jQuery(".eventpost_cal_list",t).fadeOut((function(){jQuery(this).remove()})),jQuery.get(window.EventPost.front.ajaxurl,{action:"EventPostCalendarDate",date:jQuery(this).data("date"),cat:t.data("cat"),mf:t.data("mf"),dp:t.data("dp"),color:t.data("color"),display_title:t.data("title"),thumbnail:t.data("thumbnail"),tax_name:t.data("tax_name"),tax_term:t.data("tax_term")},(function(a){t.append('<div class="eventpost_cal_list"><button class="eventpost_cal_close">x</button>'+a+"</div>"),t.find(".eventpost_cal_list").hide(1).fadeIn(500),t.find(".eventpost_cal_close").on("click",(function(){jQuery(this).parent().hide(500).remove(),t.attr("data-current-day","").trigger("CloseDay")})),t.trigger("OpenDay")}))}))}jQuery(".eventpost_calendar").each((function(){var a=jQuery(this);a.html('<img src="'+window.EventPost.front.imgpath+'cal-loader.gif" class="eventpost_cal_loader"/>').attr("data-current-date",jQuery(this).data("date")),jQuery.get(window.EventPost.front.ajaxurl,{action:"EventPostCalendar",date:jQuery(this).data("date"),cat:jQuery(this).data("cat"),mf:jQuery(this).data("mf"),dp:jQuery(this).data("dp"),color:jQuery(this).data("color"),display_title:jQuery(this).data("title"),thumbnail:jQuery(this).data("thumbnail"),tax_name:jQuery(this).data("tax_name"),tax_term:jQuery(this).data("tax_term")},(function(e){a.html(e).trigger("PrintCalendar"),t()}))}))}))})();function launch_chaty(t){(void 0==t||"widget_index"==t)&&(t=1),jQuery("#chaty-widget-_"+t).length&&jQuery("#chaty-widget-_"+t+" .chaty-cta-button .open-chaty").trigger("click")}!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t,e){var a,c,i=[],n="",s=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))?1:0,o=["System Stack","Arial","Tahoma","Verdana","Helvetica","Times New Roman","Trebuchet MS","Georgia","-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"],l=!1,h=!1,r=0,d=!1,g=!1,y=[],p=0,_=0,f="",u=0,v="",m=0;function $(a){if(e!=t("#chaty-widget-"+a).data("animation")&&"none"!=t("#chaty-widget-"+a).data("animation")){var c="chaty-animation-"+t("#chaty-widget-"+a).data("animation");t("#chaty-widget-"+a+" ."+c).removeClass(c)}t("#chaty-widget-"+a+" .ch-pending-msg").remove()}function w(){var e=!1;i.length&&t.each(i,function(t,a){O(a.triggers.has_countries)&&!I(a.triggers.countries)&&a.triggers.countries.length&&(e=!0)}),e?""!=(n=G())?b():t.get("https://www.cloudflare.com/cdn-cgi/trace",function(t){var e,a=t.match("loc=(.*)");a.length>1&&(a=a[1])&&(""==(a=a.toUpperCase())&&(a="-"),e=a,"undefined"!=typeof Storage?null==window.sessionStorage.getItem("chaty_user_country_code")&&window.sessionStorage.setItem("chaty_user_country_code",e):X("chaty_user_country_code")||R("chaty_user_country_code",e,365),b())}):b()}function b(){i.length&&(t("body").append('<svg width="39" height="39" viewBox="0 0 39 39" class="hide-cht-svg-bg" fill="none" xmlns="http://www.w3.org/2000/svg"><defs> <linearGradient id="linear-gradient" x1="0.892" y1="0.192" x2="0.128" y2="0.85" gradientUnits="objectBoundingBox"> <stop offset="0" stop-color="#4a64d5"/> <stop offset="0.322" stop-color="#9737bd"/> <stop offset="0.636" stop-color="#f15540"/> <stop offset="1" stop-color="#fecc69"/> </linearGradient> </defs>'),t.each(i,function(e,a){var c,l="",y="",p=0,_={},f=(c=a,!O(c.triggers.has_countries)||!!I(c.triggers.countries)||!c.triggers.countries.length||"-"==(n=G())||-1!=t.inArray(n,c.triggers.countries));if(f=(f=f&&function t(e){if(e.triggers.has_date_scheduling_rules){var a=e.triggers.date_scheduling_rules.start_date_time,c=e.triggers.date_scheduling_rules.end_date_time,i=new Date,n=(i=Z(i,e.triggers.time_diff)).getFullYear()+"-"+V(i.getMonth()+1)+"-"+V(i.getDate())+" "+V(i.getHours())+":"+V(i.getMinutes())+":"+V(i.getSeconds());return""==c&&!!(a<=n)||""==a&&!!(c>=n)||""!=a&&""!=c&&!!(a<=n)&&!!(c>=n)}return!0}(a))&&function t(e){var a=!0;if(O(e.triggers.has_day_hours_scheduling_rules)&&e.triggers.day_hours_scheduling_rules.length>0){var c=e.triggers.day_hours_scheduling_rules;if(c.length>0){a=!1;for(var i=new Date,n=(i=Z(i,e.triggers.day_time_diff)).getHours(),s=i.getMinutes(),o=i.getDay(),l=0;l<c.length;l++){var h=0,r=0,d=0;-1==c[l].days?d=1:c[l].days>=0&&c[l].days<=6?c[l].days==o&&(d=1):7==c[l].days?o>=0&&o<=4&&(d=1):8==c[l].days?o>=1&&o<=5&&(d=1):9==c[l].days&&(6==o||0==o)&&(d=1),1==d&&(n>c[l].start_hours&&n<c[l].end_hours?h=1:n==c[l].start_hours&&n<c[l].end_hours?s>=c[l].start_min&&(h=1):n>c[l].start_hours&&n==c[l].end_hours?s<=c[l].end_min&&(h=1):n==c[l].start_hours&&n==c[l].end_hours&&s>=c[l].start_min&&s<=c[l].end_min&&(h=1),1==h&&s>=c[l].start_min&&s<=c[l].end_min&&(r=1)),1==h&&1==d&&(a=1),1==a&&(l=c.length+1)}}}return a}(a),t.each(a.channels,function(t,e){k(e)&&(p++,_=e)}),"open"==a.settings.default_state&&1==p&&(a.settings.default_state="click",i[e].settings.default_state="click"),f&&p>0&&!t("#chaty-widget-"+a.id).length){var u,v=U(a.settings);v="right"==v?"right":"left";var m=(u=a,"vertical"!=u.settings.icon_view?"top":"right"==U(u.settings)?"left":"right");if("chat-view"==a.settings.cta_type){var $,w,b,M,T,B,L,z="<div style='display: none' class='chaty chaty-has-chat-view chaty-id-"+a.id+" chaty-widget-"+a.id+" chaty-key-"+e+"' id='chaty-widget-"+a.id+"' data-key='"+e+"' data-id='"+a.id+"' data-identifier='"+a.identifier+"' data-nonce='"+a.settings.widget_token+"' ><div class='chaty-widget "+v+"-position'><div class='chaty-channels'><div class='chaty-i-trigger'></div></div></div></div>";t("body").append(z),w=($=a).id,null==(b=q(w))&&(b=-1),M=$.settings.cta_body,T=$.settings.cta_head,B=t("title").text(),I(B)?(M=M.replace(/{title}/g,""),T=T.replace(/{title}/g,"")):(M=M.replace(/{title}/g,B),T=T.replace(/{title}/g,B)),M=M.replace(/{url}/g,"<a target='_blank' href='"+window.location.href+"'>"+window.location.href+"</a>"),T=T.replace(/{url}/g,"<a target='_blank' href='"+window.location.href+"'>"+window.location.href+"</a>"),L="",L+="<div style='display:none;' class='chaty-chat-view chaty-chat-view-"+w+" chaty-form-"+w+"' data-channel='chaty-chat-view' id='chaty-form-"+w+"-chaty-chat-view' data-widget='"+w+"' data-index='"+b+"'>",L+="<div class='chaty-view-body'>",L+="<div class='chaty-view-header'>"+T,L+="<div role='button' class='chaty-close-view-list'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 330 330'><path d='M325.607 79.393c-5.857-5.857-15.355-5.858-21.213.001l-139.39 139.393L25.607 79.393c-5.857-5.857-15.355-5.858-21.213.001s-5.858 15.355 0 21.213l150.004 150a15 15 0 0 0 21.212-.001l149.996-150c5.859-5.857 5.859-15.355.001-21.213z'/></svg></div>",L+="</div>",L+="<div class='chaty-view-content'>",L+="<div class='chaty-top-content'>",L+=M,L+="</div>",L+="<div class='chaty-view-channels'>",L+="</div>",L+="</div>",L+="</div>",L+="</div>",t("#chaty-widget-"+w).append(L)}else{var z="<div style='display: none' class='chaty chaty-id-"+a.id+" chaty-widget-"+a.id+" chaty-key-"+e+"' id='chaty-widget-"+a.id+"' data-key='"+e+"' data-id='"+a.id+"' data-identifier='"+a.identifier+"' data-nonce='"+a.settings.widget_token+"' ><div class='chaty-widget "+v+"-position'><div class='chaty-channels'><div class='chaty-channel-list'></div><div class='chaty-i-trigger'></div></div></div></div>";t("body").append(z)}O(a.triggers.auto_hide_widget)&&parseInt(a.triggers.hide_after)>0&&(t("#chaty-widget-"+a.id).addClass("auto-hide-chaty"),t("#chaty-widget-"+a.id).attr("data-time",a.triggers.hide_after));var W=N(a.id,"c-widget");if(t("#chaty-widget-"+a.id).addClass(a.settings.show_cta),1==p&&"chat-view"!=a.settings.cta_type){"vertical"!=a.settings.icon_view&&(m="right"!=v?"right":"left");var A=S(_,a.id,m);t("#chaty-widget-"+a.id+" .chaty-i-trigger").html(A),t("#chaty-widget-"+a.id+" .chaty-i-trigger").addClass("single-channel"),t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel").addClass("single"),t("#chaty-widget-"+a.id+" .chaty-widget").addClass("has-single");var P=a.settings.cta_text;I(P)||(P=x(P)),"first_click"==a.settings.show_cta&&(W?(t("#chaty-widget-"+a.id+" .chaty-tooltip").removeClass("chaty-tooltip"),t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel").addClass("active").addClass("chaty-tooltip").addClass("pos-"+m),t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel").append("<span class='on-hover-text'>"+P+"</span>").addClass("active").addClass("has-on-hover"),t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel a").append("<span class='on-hover-text'>"+P+"</span>").addClass("has-on-hover"),t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel a").attr("data-text",P)):t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel a").append("<span class='on-hover-text'>"+P+"</span>").removeClass("active").addClass("has-on-hover")),"all_time"==a.settings.show_cta&&(t("#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-tooltip").append("<span class='on-hover-text'>"+P+"</span>").addClass("active").addClass("has-on-hover"),t("#chaty-widget-"+a.id+" .chaty-i-trigger.single-channel .chaty-channel a").attr("data-text",P));var D=_;("Instagram"!=D.channel_type||"#ffffff"!=D.icon_color&&"#fff"!=D.icon_color)&&(l+="#chaty-widget-"+a.id+" ."+D.channel_type+"-channel .color-element{ fill: "+D.icon_color+"; color: "+D.icon_color+";}",l+="#chaty-widget-"+a.id+" .channel-icon-"+D.channel_type+" .color-element{ fill: "+D.icon_color+"; color: "+D.icon_color+";}"),l+="#chaty-widget-"+a.id+" ."+D.channel_type+"-channel .chaty-custom-icon { background-color: "+D.icon_color+"; }",l+="#chaty-widget-"+a.id+" ."+D.channel_type+"-channel .chaty-svg { background-color: "+D.icon_color+";}",l+="#chaty-widget-"+a.id+" .channel-icon-"+D.channel_type+" .chaty-svg { background-color: "+D.icon_color+";}","Contact_Us"==D.channel_type&&(l+=".chaty-contact-form-box #chaty-submit-button-"+a.id+" {background-color: "+D.contact_form_settings.button_bg_color+"; color: "+D.contact_form_settings.button_text_color+";} ",l+="#chaty-form-"+a.id+"-Contact_Us .chaty-contact-form-title {background-color: "+D.contact_form_settings.title_bg_color+"; } ");var F='<div class="chaty-channel chaty-cta-close chaty-tooltip pos-'+m+'" data-hover="'+a.settings.close_text+'"><div class="chaty-cta-button"><button type="button"><span class="chaty-svg"><svg viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"><ellipse cx="26" cy="26" rx="26" ry="26" fill="'+a.settings.widget_color+'"></ellipse><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="'+a.settings.widget_icon_color+'"></rect><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="'+a.settings.widget_icon_color+'"></rect></svg></span><span class="sr-only">Hide chaty</span></button></div></div>';t("#chaty-widget-"+a.id+" .chaty-i-trigger").append(F)}else{t.each(a.channels,function(e,c){if(k(c)){if(E(c.channel_type)&&(c.channel_type=c.channel),"chat-view"==a.settings.cta_type){var i=S(c,a.id,"top");t(".chaty-chat-view-"+a.id+" .chaty-view-channels").append(i)}else{var i=S(c,a.id,m);t("#chaty-widget-"+a.id+" .chaty-channel-list").append(i)}("Instagram"!=c.channel_type||"#ffffff"!=c.icon_color&&"#fff"!=c.icon_color)&&(l+="#chaty-widget-"+a.id+" ."+c.channel_type+"-channel .color-element{ fill: "+c.icon_color+"; color: "+c.icon_color+";}",l+="#chaty-widget-"+a.id+" .channel-icon-"+c.channel_type+" .color-element{ fill: "+c.icon_color+"; color: "+c.icon_color+";}"),l+="#chaty-widget-"+a.id+" ."+c.channel_type+"-channel .chaty-custom-icon { background-color: "+c.icon_color+"; }",l+="#chaty-widget-"+a.id+" ."+c.channel_type+"-channel .chaty-svg { background-color: "+c.icon_color+";}",l+="#chaty-widget-"+a.id+" .channel-icon-"+c.channel_type+" .chaty-svg { background-color: "+c.icon_color+";}",l+=".chaty-chat-view-"+a.id+" ."+c.channel_type+"-channel .chaty-custom-icon { background-color: "+c.icon_color+"; }",l+=".chaty-chat-view-"+a.id+" ."+c.channel_type+"-channel .chaty-svg { background-color: "+c.icon_color+";}",l+=".chaty-chat-view-"+a.id+" .channel-icon-"+c.channel_type+" .chaty-svg { background-color: "+c.icon_color+";}","Contact_Us"==c.channel_type&&(l+=".chaty-contact-form-box #chaty-submit-button-"+a.id+" {background-color: "+c.contact_form_settings.button_bg_color+"; color: "+c.contact_form_settings.button_text_color+";} ",l+="#chaty-form-"+a.id+"-Contact_Us .chaty-contact-form-title {background-color: "+c.contact_form_settings.title_bg_color+"; } ")}});var R,Y,X=(R=a.settings,Y=a.id,(""==R.widget_icon?R.widget_icon="chat-base":"chat-image"==R.widget_icon&&I(R.widget_icon_url)?R.widget_icon="chat-base":"chat-fa-icon"==R.widget_icon&&I(R.widget_fa_icon)&&(R.widget_icon="chat-base"),"chat-image"==R.widget_icon)?"<span class='chaty-svg' style='background-color: "+R.widget_color+"'><img src='"+R.widget_icon_url+"' alt='Chaty Widget' /></span>":"chat-fa-icon"==R.widget_icon?"<span class='chaty-svg' style='background-color: "+R.widget_color+"'><i class='"+R.widget_fa_icon+" widget-fa-icon' style='color: "+R.widget_icon_color+"'></i></span>":'<span class="chaty-svg">'+function t(e,a,c,i){switch(e){case"chat-smile":return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.8 507.1 54 54" style="enable-background-color:new -496.8 507.1 54 54;" xml:space="preserve"><style type="text/css">.chaty-sts1-'+i+"{fill:"+c+';} .chaty-sts2{fill:none;stroke:#808080;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}</style><g><circle cx="-469.8" cy="534.1" r="27" fill="'+a+'"/></g><path class="chaty-sts1-'+i+'" d="M-459.5,523.5H-482c-2.1,0-3.7,1.7-3.7,3.7v13.1c0,2.1,1.7,3.7,3.7,3.7h19.3l5.4,5.4c0.2,0.2,0.4,0.2,0.7,0.2c0.2,0,0.2,0,0.4,0c0.4-0.2,0.6-0.6,0.6-0.9v-21.5C-455.8,525.2-457.5,523.5-459.5,523.5z"/><path class="chaty-sts2" d="M-476.5,537.3c2.5,1.1,8.5,2.1,13-2.7"/><path class="chaty-sts2" d="M-460.8,534.5c-0.1-1.2-0.8-3.4-3.3-2.8"/></svg>';case"chat-bubble":return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.9 507.1 54 54" style="enable-background-color:new -496.9 507.1 54 54;" xml:space="preserve"><style type="text/css">.chaty-sts2-'+i+"{fill:"+c+';}</style><g><circle  cx="-469.9" cy="534.1" r="27" fill="'+a+'"/></g><path class="chaty-sts2-'+i+'" d="M-472.6,522.1h5.3c3,0,6,1.2,8.1,3.4c2.1,2.1,3.4,5.1,3.4,8.1c0,6-4.6,11-10.6,11.5v4.4c0,0.4-0.2,0.7-0.5,0.9   c-0.2,0-0.2,0-0.4,0c-0.2,0-0.5-0.2-0.7-0.4l-4.6-5c-3,0-6-1.2-8.1-3.4s-3.4-5.1-3.4-8.1C-484.1,527.2-478.9,522.1-472.6,522.1z   M-462.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-464.6,534.6-463.9,535.3-462.9,535.3z   M-469.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-471.7,534.6-471,535.3-469.9,535.3z   M-477,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-478.8,534.6-478.1,535.3-477,535.3z"/></svg>';case"chat-db":return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.1 54 54" style="enable-background-color:new -496 507.1 54 54;" xml:space="preserve"><style type="text/css">.chaty-sts3-'+i+"{fill:"+c+';}</style><g><circle  cx="-469" cy="534.1" r="27" fill="'+a+'"/></g><path class="chaty-sts3-'+i+'" d="M-464.6,527.7h-15.6c-1.9,0-3.5,1.6-3.5,3.5v10.4c0,1.9,1.6,3.5,3.5,3.5h12.6l5,5c0.2,0.2,0.3,0.2,0.7,0.2c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18.2C-461.1,529.3-462.7,527.7-464.6,527.7z"/><path class="chaty-sts3-'+i+'" d="M-459.4,522.5H-475c-1.9,0-3.5,1.6-3.5,3.5h13.9c2.9,0,5.2,2.3,5.2,5.2v11.6l1.9,1.9c0.2,0.2,0.3,0.2,0.7,0.2c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18C-455.9,524.1-457.5,522.5-459.4,522.5z"/></svg>';default:return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background-color:new -496 507.7 54 54;" xml:space="preserve"><style type="text/css">.chaty-sts4-'+i+"{fill: "+c+';}.chaty-st0{fill: #808080;}</style><g><circle cx="-469" cy="534.7" r="27" fill="'+a+'"/></g><path class="chaty-sts4-'+i+'" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/><path class="chaty-st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,530.8-478.2,530.5-477.7,530.5z"/><path class="chaty-st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,533.9-478.2,533.5-477.7,533.5z"/></svg>'}}(R.widget_icon,R.widget_color,R.widget_icon_color,Y)+"</span>"),P=a.settings.cta_text;"first_click"!=a.settings.show_cta||W||(P="");var J=m;"horizontal"==a.settings.icon_view&&(J="left"==v?"right":"left"),I(P)||(P=x(P));var Q='<div class="chaty-channel chaty-cta-main chaty-tooltip has-on-hover pos-'+J+' active" data-widget="'+a.id+'" ><span class="on-hover-text">'+P+'</span><div class="chaty-cta-button"><button type="button" class="open-chaty">'+X+'<span class="sr-only">Open chaty</span></button><button type="button" class="open-chaty-channel"><span class="sr-only">chaty button</span></button></div></div>';t("#chaty-widget-"+a.id+" .chaty-i-trigger").html(Q);var F='<div class="chaty-channel chaty-cta-close chaty-tooltip pos-'+m+'" data-hover="'+a.settings.close_text+'"><div class="chaty-cta-button"><button type="button"><span class="chaty-svg"><svg viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"><ellipse cx="26" cy="26" rx="26" ry="26" fill="'+a.settings.widget_color+'"></ellipse><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="'+a.settings.widget_icon_color+'"></rect><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="'+a.settings.widget_icon_color+'"></rect></svg></span><span class="sr-only">Hide chaty</span></button></div></div>';t("#chaty-widget-"+a.id+" .chaty-i-trigger").append(F)}t.each(a.channels,function(t,e){"Contact_Us"==e.channel_type&&"yes"==e.hide_recaptcha_badge&&(l+=".grecaptcha-badge {visibility: hidden;}")});var K,tt,te,ta,W=N(a.id,"c-widget");W&&("open"!=a.settings.default_state||1==p)&&(K=a.settings,N(tt=a.id,"c-widget")&&O(K.is_pending_mesg_enabled)&&parseInt(K.pending_mesg_count)>0&&(t("#chaty-widget-"+tt+" .chaty-widget").hasClass("has-single")?"sheen"==K.attention_effect||"spin"==K.attention_effect||"pulse"==K.attention_effect?t("#chaty-widget-"+tt+" .chaty-i-trigger .chaty-channel").append("<span class='ch-pending-msg'>"+K.pending_mesg_count+"</span>"):t("#chaty-widget-"+tt+" .chaty-i-trigger .chaty-channel .chaty-svg").append("<span class='ch-pending-msg'>"+K.pending_mesg_count+"</span>"):"jump"==K.attention_effect||"waggle"==K.attention_effect||"blink"==K.attention_effect||"pulse-icon"==K.attention_effect||"floating"==K.attention_effect?t("#chaty-widget-"+tt+" .chaty-i-trigger .chaty-cta-main .chaty-cta-button").append("<span class='ch-pending-msg'>"+K.pending_mesg_count+"</span>"):t("#chaty-widget-"+tt+" .chaty-i-trigger .chaty-cta-main").append("<span class='ch-pending-msg'>"+K.pending_mesg_count+"</span>")),te=a.settings,N(ta=a.id,"c-widget")&&"none"!=te.attention_effect&&""!=te.attention_effect&&(t("#chaty-widget-"+ta).attr("data-animation",te.attention_effect),t("#chaty-widget-"+ta+" .chaty-widget").hasClass("has-single")?t("#chaty-widget-"+ta+" .chaty-i-trigger .chaty-channel .chaty-svg").addClass("chaty-animation-"+te.attention_effect):t("#chaty-widget-"+ta+" .chaty-i-trigger .chaty-cta-main .chaty-cta-button").addClass("chaty-animation-"+te.attention_effect)));var tc,ti,tn=0;"open"!=a.settings.default_state||O(a.settings.show_close_button)||(t("#chaty-widget-"+a.id+" .chaty-widget").addClass("chaty-no-close-button").addClass("chaty-open"),tn=1),O(a.settings.is_google_analytics_enabled)&&(t("#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel > a").addClass("has-gae"),t("#chaty-form-"+a.id+"-chaty-chat-view .chaty-channel > a").addClass("has-gae"),t("#chaty-widget-"+a.id+" .chaty-i-trigger.single-channel .chaty-channel > a").addClass("has-gae"),t(".chaty-outer-forms.chaty-whatsapp-btn-form.chaty-form-"+a.id+" form.add-analytics").addClass("form-google-analytics"),t(".whatsapp-chaty-form-"+a.id).addClass("has-form-gae")),O(a.settings.has_custom_css)&&!I(a.settings.custom_css)&&(y+=a.settings.custom_css),"hover"==a.settings.default_state?t("#chaty-widget-"+a.id).addClass("open-on-hover"):"open"!=a.settings.default_state||(t("#chaty-widget-"+a.id+" .chaty-widget").addClass("default-open"),(W||!O(a.settings.show_close_button))&&t("#chaty-widget-"+a.id+" .chaty-widget:not(.has-single)").addClass("chaty-open"),W||t("#chaty-widget-"+a.id+" .chaty-widget").removeClass("default-open")),t("#chaty-widget-"+a.id+" .chaty-widget:not(.has-single):not(.chaty-no-close-button)").hasClass("default-open")?O(a.settings.bg_blur_effect)&&(console.log("@323"),t("body").addClass("add-bg-blur-effect")):t("body").removeClass("add-bg-blur-effect"),O(a.settings.bg_blur_effect)&&t("#chaty-widget-"+a.id+" .chaty-widget:not(.chaty-no-close-button)").addClass("has-bg-blur-effect");var ts=(tc=a.settings.widget_size,ti=a.settings.custom_widget_size,tc);if(ts=parseInt(ts),l+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel {width: "+ts+"px; height: "+ts+"px; }",l+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel > a {width: "+ts+"px; height: "+ts+"px; }",l+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel > a .chaty-custom-icon {display:block; width: "+ts+"px; height: "+ts+"px; line-height: "+ts+"px; font-size: "+parseInt(ts/2)+"px; }",l+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel button {width: "+ts+"px; height: "+ts+"px; margin: 0; padding:0; outline: none; border-radius: 50%;}",l+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel .chaty-svg {width: "+ts+"px; height: "+ts+"px; }",l+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel .chaty-svg img {width: "+ts+"px; height: "+ts+"px; }",l+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel span.chaty-icon {width: "+ts+"px; height: "+ts+"px; }",l+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel a {width: "+ts+"px; height: "+ts+"px; }",l+="#chaty-widget-"+a.id+" .chaty-channel-list .chaty-channel .chaty-svg .chaty-custom-channel-icon {width: "+ts+"px; height: "+ts+"px; line-height: "+ts+"px; display: block; font-size:"+parseInt(ts/2)+"px; }",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-cta-button {background-color: "+a.settings.widget_color+"; }",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-cta-button button {background-color: "+a.settings.widget_color+"; }",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel {width: "+ts+"px; height: "+ts+"px; }",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel > a {width: "+ts+"px; height: "+ts+"px; }",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel > a .chaty-custom-icon {display:block; width: "+ts+"px; height: "+ts+"px; line-height: "+ts+"px; font-size: "+parseInt(ts/2)+"px; }",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel button {width: "+ts+"px; height: "+ts+"px; margin: 0; padding:0; outline: none; border-radius: 50%;}",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel .chaty-svg {width: "+ts+"px; height: "+ts+"px; }",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel .chaty-svg img {width: "+ts+"px; height: "+ts+"px; }",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel span.chaty-icon {width: "+ts+"px; height: "+ts+"px; }",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel a {width: "+ts+"px; height: "+ts+"px; }",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel .chaty-svg .chaty-custom-channel-icon {width: "+ts+"px; height: "+ts+"px; line-height: "+ts+"px; display: block; font-size:"+parseInt(ts/2)+"px; }",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .ch-pending-msg {background-color: "+a.settings.pending_mesg_count_bgcolor+"; color: "+a.settings.pending_mesg_count_color+"; }",l+="#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel .chaty-svg .widget-fa-icon {line-height: "+ts+"px; font-size:"+parseInt(ts/2)+"px; }","vertical"==a.settings.icon_view){l+="#chaty-widget-"+a.id+" .chaty-channel-list {height: "+p*(ts+8)+"px; }",l+="#chaty-widget-"+a.id+" .chaty-channel-list {width: "+(ts+8)+"px; }";for(var to=0;to<=p;to++)l+="#chaty-widget-"+a.id+" .chaty-open .chaty-channel-list .chaty-channel:nth-child("+(to+1)+") {-webkit-transform: translateY(-"+(ts+8)*(p-to-tn)+"px); transform: translateY(-"+(ts+8)*(p-to-tn)+"px);}"}else{t("#chaty-widget-"+a.id+" .chaty-widget").addClass("hor-mode"),l+="#chaty-widget-"+a.id+" .chaty-channel-list {width: "+p*(ts+8)+"px; }",l+="#chaty-widget-"+a.id+" .chaty-channel-list {height: "+ts+"px; }";for(var to=0;to<=p;to++)l+="#chaty-widget-"+a.id+" .chaty-widget.left-position.hor-mode.chaty-open .chaty-channel-list .chaty-channel:nth-child("+(to+1)+") {-webkit-transform: translateX("+(ts+8)*(p-to-tn)+"px); transform: translateX("+(ts+8)*(p-to-tn)+"px);}",l+="#chaty-widget-"+a.id+" .chaty-widget.right-position.hor-mode.chaty-open .chaty-channel-list .chaty-channel:nth-child("+(to+1)+") {-webkit-transform: translateX(-"+(ts+8)*(p-to-tn)+"px); transform: translateX(-"+(ts+8)*(p-to-tn)+"px);}"}var tl=a.settings.bottom_spacing,th=a.settings.side_spacing;l+="#chaty-widget-"+a.id+" .chaty-widget {bottom: "+tl+"px}","left"==v?(l+="#chaty-widget-"+a.id+" .chaty-widget {left: "+th+"px; right: auto;}",l+=".chaty-outer-forms.pos-left.chaty-form-"+a.id+" {left: "+th+"px}",t(".chaty-form-"+a.id).addClass("pos-left")):(l+="#chaty-widget-"+a.id+" .chaty-widget {right: "+th+"px; left:auto;}",t(".chaty-form-"+a.id).addClass("pos-right"),l+=".chaty-outer-forms.pos-right.chaty-form-"+a.id+" {right: "+th+"px; left:auto;}"),t(".chaty-form-"+a.id).show();var tr=ts+15+parseInt(tl);l+=".chaty-outer-forms.active.chaty-form-"+a.id+" {-webkit-transform: translateY(-"+tr+"px); transform: translateY(-"+tr+"px)} ",l+="#chaty-widget-"+a.id+".chaty:not(.form-open) .chaty-widget.chaty-open + .chaty-chat-view {-webkit-transform: translateY(-"+tr+"px); transform: translateY(-"+tr+"px)} ",l+="#chaty-widget-"+a.id+" .chaty-tooltip:after {background-color: "+a.settings.cta_bg_color+"; color: "+a.settings.cta_text_color+"}",l+="#chaty-widget-"+a.id+" .chaty-tooltip.pos-top:before {border-top-color: "+a.settings.cta_bg_color+"; }",l+="#chaty-widget-"+a.id+" .chaty-tooltip.pos-left:before {border-left-color: "+a.settings.cta_bg_color+"; }",l+="#chaty-widget-"+a.id+" .chaty-tooltip.pos-right:before {border-right-color: "+a.settings.cta_bg_color+";}",l+="#chaty-widget-"+a.id+" .on-hover-text {background-color: "+a.settings.cta_bg_color+"; color: "+a.settings.cta_text_color+"}",l+="#chaty-widget-"+a.id+" .chaty-tooltip.pos-top .on-hover-text:before {border-top-color: "+a.settings.cta_bg_color+"; }",l+="#chaty-widget-"+a.id+" .chaty-tooltip.pos-left .on-hover-text:before {border-left-color: "+a.settings.cta_bg_color+"; }",l+="#chaty-widget-"+a.id+" .chaty-tooltip.pos-right .on-hover-text:before {border-right-color: "+a.settings.cta_bg_color+";}";var td=tr+72+ts;td>0&&(l+=".chaty-outer-forms.chaty-form-"+a.id+" .chaty-agent-body {max-height: calc(100vh - "+td+"px); overflow-y: auto; } "),l+="#chaty-form-"+a.id+"-chaty-chat-view .chaty-view-header {background-color: "+a.settings.cta_head_bg_color+";}",l+="#chaty-form-"+a.id+"-chaty-chat-view .chaty-view-header {color: "+a.settings.cta_head_text_color+";}",l+="#chaty-form-"+a.id+"-chaty-chat-view .chaty-view-header svg {fill : "+a.settings.cta_head_text_color+";}";var tg=tr+82+ts;tg>0&&(l+=".chaty-outer-forms.chaty-contact-form-box.chaty-form-"+a.id+" .chaty-contact-inputs {max-height: calc(100vh - "+tg+"px); overflow-y: auto; } "),(25!=tl||25!=th)&&(t(".chaty-outer-forms.chaty-form-"+a.id).addClass("custom-cht-pos"),t("#chaty-widget-"+a.id).addClass("has-custom-pos"));var ty=parseInt(t("#chaty-form-"+a.id+"-Whatsapp .chaty-whatsapp-header").outerHeight())+parseInt(t("#chaty-form-"+a.id+"-Whatsapp .chaty-whatsapp-footer").outerHeight())+parseInt(ts)+parseInt(tl)+20;if(l+="#chaty-form-"+a.id+"-Whatsapp .chaty-whatsapp-body { max-height: calc(100vh - "+ty+"px); overflow-y: auto; }",N(a.id,"v-widget")&&(O(a.triggers.exit_intent)||O(a.triggers.has_time_delay)||O(a.triggers.has_display_after_page_scroll)>0)?(O(a.triggers.has_time_delay)&&0==parseInt(a.triggers.time_delay)?(j(a.id),t("#chaty-widget-"+a.id).addClass("active")):O(a.triggers.has_time_delay)&&parseInt(a.triggers.time_delay)>0&&(h=!0,parseInt(a.triggers.time_delay)>r&&(r=a.triggers.time_delay),t("#chaty-widget-"+a.id).addClass("on-chaty-delay"),t("#chaty-widget-"+a.id).addClass("delay-time-"+parseInt(a.triggers.time_delay)),t("#chaty-widget-"+a.id).attr("data-time",parseInt(a.triggers.time_delay))),O(a.triggers.has_display_after_page_scroll)&&0==parseInt(a.triggers.display_after_page_scroll)?(j(a.id),t("#chaty-widget-"+a.id).addClass("active")):O(a.triggers.has_display_after_page_scroll)&&parseInt(a.triggers.display_after_page_scroll)>0&&(d=!0,t("#chaty-widget-"+a.id).addClass("on-chaty-scroll"),t("#chaty-widget-"+a.id).addClass("page-scroll-"+parseInt(a.triggers.display_after_page_scroll)),t("#chaty-widget-"+a.id).attr("data-scroll",parseInt(a.triggers.display_after_page_scroll))),O(a.triggers.exit_intent)&&(g=!0,t("#chaty-widget-"+a.id).addClass("on-chaty-exit-intent"))):(j(a.id),t("#chaty-widget-"+a.id).addClass("active")),!I(a.settings.font_family)&&"none"!=a.settings.font_family){var tp=a.settings.font_family;-1!=t.inArray(tp,o)?"System Stack"==tp&&(tp="-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"):(t("head").append('<link rel="preload" as="style" href="https://fonts.googleapis.com/css?family='+tp+'&display=swap">'),t("head").append('<link rel="stylesheet" href="https://fonts.googleapis.com/css?family='+tp+'&display=swap">')),l+="#chaty-widget-"+a.id+", #chaty-widget-"+a.id+" .chaty-tooltip:after {font-family: "+tp+"}"}}g&&(s?function e(){if(window.history&&window.history.pushState&&g){function a(){g&&""!==location.hash.split("#!/")[1]&&""===window.location.hash&&H()}var c=100;window.history.state&&window.history.state.page&&(c=window.history.state.page),window.history.pushState({page:c+1},""),window.history.pushState({page:c+2},""),window.onpopstate=function(){a()},window.history.onpopstate=function(){a()},window.addEventListener("popstate",function(){a()}),document.addEventListener("backbutton",function(){a()}),window.addEventListener("backbutton",function(){a()}),t(window).on("popstate",function(){a()})}}():t(document).mouseleave(function(t){var e,a,c="mouseout";e=document,a=function(t){null==t.toElement&&null==t.relatedTarget&&H()},e.addEventListener?(e.addEventListener(c,a,!1),H()):e.attachEvent&&e.attachEvent("on"+c,a)})),""!=l&&(t("#custom-chaty-css").length||t("head").append("<style id='custom-chaty-css'></style>"),t("#custom-chaty-css").append(l)),""!=y&&(t("#custom-advance-chaty-css").length||t("head").append("<style id='custom-advance-chaty-css'></style>"),t("#custom-advance-chaty-css").append(y)),i.length,t(".chaty-sms-channel").length&&t(".chaty-sms-channel").each(function(){var e=t(this).attr("href");e=(e=e.replace(/{title}/g,C())).replace(/{url}/g,window.location.href),t(this).attr("href",e)}),t(document).on("click","#chaty-widget-"+a.id+" .chaty-i-trigger .chaty-channel",function(){t(this).closest(".chaty-widget").hasClass("has-single")?t(this).closest(".chaty").hasClass("form-open")&&(O(a.settings.bg_blur_effect)?(t("body").addClass("add-bg-blur-effect"),console.log("@3233")):t("body").removeClass("add-bg-blur-effect")):t(this).closest(".chaty-widget").hasClass("chaty-open")?t("body").removeClass("add-bg-blur-effect"):!t(this).closest(".chaty-widget").hasClass("chaty-no-close-button")&&O(a.settings.bg_blur_effect)&&(t("body").addClass("add-bg-blur-effect"),console.log("@32334"))})}),t("#custom-advance-chaty-css").length||t("head").append("<style id='custom-advance-chaty-css'></style>"),t("#custom-advance-chaty-css").append(f),(t(".v3_site_key").length&&!I(t(".v3_site_key").val())||t(".v2_site_key").length&&!I(t(".v2_site_key").val()))&&function t(){if(jQuery(".v2_site_key").length&&""!=jQuery(".v2_site_key").val()){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://www.google.com/recaptcha/api.js?onload=onloadChatyCallback&render=explicit&hl=en",(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(e)}jQuery(".v3_site_key").length&&""!=jQuery(".v3_site_key").val()&&jQuery(".v3_site_key").length&&""!=jQuery(".v3_site_key").val()&&jQuery(".front-google-captcha").length&&jQuery(".front-google-captcha:not(.loaded)").each(function(){jQuery(this).addClass("loaded");var t=jQuery(".v3_site_key").val(),e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://www.google.com/recaptcha/api.js?onload=onloadCallbackChatyV3&render="+t,(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(e),e.loadEventEnd=function(){}})}()),t(".chaty-tooltip").each(function(){""==t(this).data("hover")&&t(this).removeClass("left").removeClass("right").removeClass("top").removeClass("chaty-tooltip")}),t(".chaty.auto-hide-chaty").length&&(c=setInterval(function(){var e=++u;if(t(".chaty.auto-hide-chaty.hide-after-"+u).length){var a=t(".chaty.auto-hide-chaty.hide-after-"+e).data("id");t(".chaty-form-"+a).removeClass("active"),t(".chaty.auto-hide-chaty.hide-after-"+e).removeClass("active"),t("#chaty-widget-"+a).removeClass("auto-hide-chaty"),t("body").removeClass("add-bg-blur-effect")}0==t(".chaty.auto-hide-chaty").length&&clearInterval(c)},1e3)),h&&(a=setInterval(function(){if(t(".chaty.delay-time-"+ ++p).length){var e=t(".chaty.delay-time-"+p).data("id");D(e)}},1e3)),d&&(t(window).on("scroll",function(){if(d){var e=t(document).height()-t(window).height(),a=t(window).scrollTop();if(0!=e){var c=parseInt(a/e*100);if(_<=c){var i=_;_=c;for(var n=i;n<=c;n++)-1==t.inArray(n,y)&&t(".chaty.on-chaty-scroll.page-scroll-"+n).length&&t(".chaty.on-chaty-scroll.page-scroll-"+n).each(function(){var e=t(this).data("id");t(this).removeClass("on-chaty-scroll"),D(e)});_=c}}}}),window.innerWidth,document.documentElement.clientWidth)}function C(){return t("title").length?t("title").text():""}function x(t){return new DOMParser().parseFromString(t,"text/html").documentElement.textContent}function k(t){if(O(t.is_agent)){if(t.agent_data.length&&(!s&&O(t.is_agent_desktop)||s&&O(t.is_agent_mobile)))return!0}else if((!s&&O(t.is_desktop)||s&&O(t.is_mobile))&&(""!=t.value||"Contact_Us"==t.channel))return!0;return!1}function j(e){if(t("#chaty-widget-"+e+" .chaty-channel.chaty-default-open").length){var a=t("#chaty-widget-"+e+" .chaty-channel.chaty-default-open a.chaty-whatsapp-btn-form").data("form");if(!I(a)){var c=N(e,"c-"+t("#chaty-widget-"+e+" .chaty-channel.chaty-default-open").data("channel"));if(c&&(t("#"+a).addClass("is-active"),t("#"+a).length)){var n=t("#chaty-widget-"+e+" .chaty-channel.chaty-default-open a.chaty-whatsapp-btn-form").html()+"<span class='hide-cht-svg-bg'>"+chaty_settings.lang.hide_whatsapp_form+"</span>";if($(e),t("#chaty-widget-"+e).find(".ch-pending-msg").remove(),t("#chaty-widget-"+e+" .chaty-widget").removeClass("chaty-open"),t("#chaty-widget-"+e).addClass("form-open"),t("#"+a).addClass("active"),t("#chaty-widget-"+e+" .chaty-widget:not(.chaty-no-close-button)").hasClass("has-bg-blur-effect")&&(t("body").addClass("add-bg-blur-effect"),console.log("@32333")),setTimeout(function(){t(".chaty-whatsapp-btn-form.active .chaty-whatsapp-input").focus()},100),t("#chaty-widget-"+e+" .open-chaty-channel").html(n),t("#chaty-widget-"+e).addClass("active"),t("#chaty-widget-"+e).addClass("active"),t("#chaty-widget-"+e).hasClass("auto-hide-chaty")){var o=parseInt(t("#chaty-widget-"+e).data("time"));o>0&&(o+=u,t("#chaty-widget-"+e).addClass("hide-after-"+o))}if("on"==chaty_settings.data_analytics_settings){var h=[],r=t("#chaty-widget-"+e+" .chaty-channel.chaty-default-open").data("channel"),d=N(e,"v-"+r);if(d&&void 0!==r&&(F(e,"v-"+r),h.push(r)),!l&&h.length){var g=t("#chaty-widget-"+e).data("nonce");t.ajax({url:chaty_settings.ajax_url,data:{widgetId:e,channels:h,userId:e,isMobile:s,widgetNonce:g,action:"update_chaty_channel_views"},type:"post",dataType:"json",success:function(t){},error:function(t,e,a){monitorErrorLog(t,e,a)}})}}return}}}if(t("#chaty-widget-"+e).addClass("active"),t("#chaty-widget-"+e).hasClass("auto-hide-chaty")){var o=parseInt(t("#chaty-widget-"+e).data("time"));o>0&&(o+=u,t("#chaty-widget-"+e).addClass("hide-after-"+o))}var y=N(e,"v-widget");if(y){F(e,"v-widget"),t("#chaty-widget-"+e).data("user");var r,h=[],p=0,_=0;i[t("#chaty-widget-"+e).data("key")];var f=Y("activechatyWidgets");if(null!=f?(f=f.split(","),-1==t.inArray(e,f)&&(f.push(e),R("activechatyWidgets",f=f.join(","),1))):(f=e,R("activechatyWidgets",f,1)),t("#chaty-widget-"+e+" .chaty-widget").hasClass("has-single")){p=1,r=t("#chaty-widget-"+e+" .chaty-channel").data("channel");var d=N(e,"v-"+r);d&&void 0!==r&&(F(e,"v-"+r),h.push(r))}else t("#chaty-widget-"+e+" .chaty-widget").hasClass("chaty-open")&&(_=1,t("#chaty-widget-"+e).hasClass("chaty-has-chat-view")?t(".chaty-chat-view.chaty-chat-view-"+e+" .chaty-view-channels").find(".chaty-channel").each(function(){chatyChannel=t(this).data("channel"),(c=N(e,"v-"+chatyChannel))&&"undefined"!=typeof chatyChannel&&(F(e,"v-"+chatyChannel),h.push(chatyChannel))}):t("#chaty-widget-"+e+" .chaty-channel-list .chaty-channel").each(function(){r=t(this).data("channel"),N(e,"v-"+r)&&void 0!==r&&(F(e,"v-"+r),h.push(r))}));if(y&&!l){var g=t("#chaty-widget-"+e).data("nonce");l||t.ajax({url:chaty_settings.ajax_url,data:{widgetId:e,channels:h,userId:e,isMobile:s,isOpen:_,isSingle:p,widgetNonce:g,action:"update_chaty_widget_views"},type:"post",dataType:"json",success:function(t){},error:function(t,e,a){monitorErrorLog(t,e,a)}})}}}function M(e){var a=t("#chaty-widget-"+e).data("user");chatySaasCheckCookie("triggeredFor"+a)||R("triggeredFor"+a,e,2)}function T(t,e){return t}function S(e,a,c){var i="";if(O(e.is_agent)){if(e.agent_data.length){var n=0,o=[];if(t.each(e.agent_data,function(t,e){""!=e.value&&(n++,o=e)}),n>0){var l,h,r,d,g,y,p=q(a);return null==p&&(p=-1),r=e,d=a,g="",null==(y=q(d))&&(y=-1),g+="<div style='display:none;' class='chaty-outer-forms chaty-agent-data chaty-agent-data-"+d+" chaty-form-"+d+"' data-channel='"+r.channel_type+"' id='chaty-form-"+d+"-"+r.channel_type+"' data-widget='"+d+"' data-index='"+y+"'>",g+="<div class='chaty-form'>",g+="<div class='chaty-form-body'>",g+="<div role='button' class='chaty-close-agent-list'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 330 330'><path d='M325.607 79.393c-5.857-5.857-15.355-5.858-21.213.001l-139.39 139.393L25.607 79.393c-5.857-5.857-15.355-5.858-21.213.001s-5.858 15.355 0 21.213l150.004 150a15 15 0 0 0 21.212-.001l149.996-150c5.859-5.857 5.859-15.355.001-21.213z'/></svg></div>",g+="<div class='chaty-agent-header agent-info-"+d+"-"+r.channel+"'>",I(r.header_text)||(g+="<div class='agent-main-header'>"+r.header_text+"</div>"),I(r.header_sub_text)||(g+="<div class='agent-sub-header'>"+r.header_sub_text+"</div>"),g+="</div>",g+="<div class='chaty-agent-body agents-body-"+d+" agent-body-"+d+"-"+r.channel+"'>",t.each(r.agent_data,function(e,a){if(""!=a.value){var c=a.svg_icon;I(a.agent_image)||(c="<img class='chaty-agent-img' src='"+a.agent_image+"' alt='"+a.agent_title+"' />");var i=function e(a,c,i,n,o,l){var h=a.value,r="_blank";if("Whatsapp"==c.channel_type){var d=L(a.value),g="";if(!I(a.pre_set_message)){g=decodeURI(a.pre_set_message);var y=t("title").text();g=(g=I(y)?g.replace(/{title}/g,""):g.replace(/{title}/g,y)).replace(/{url}/g,window.location),g=encodeURIComponent(g)}s?(r="",h="https://wa.me/"+d+"?text="+g):(r="_blank",h=O(a.use_whatsapp_web)?"https://web.whatsapp.com/send?phone="+d+"&text="+g:"https://wa.me/"+d+"?text="+g)}else"WeChat"==c.channel_type?(r="",h="javascript:;"):"Email"==c.channel_type?(r="",h="mailto:"+a.value):"Facebook_Messenger"==c.channel_type?r=s?"":"_blank":"SMS"==c.channel_type?(r="",h="sms:"+a.value):"Telegram"==c.channel_type?(h="https://telegram.me/"+(h=z(a.value,"@")),r="_blank"):"Twitter"==c.channel_type?h="https://twitter.com/"+t.trim(a.value):"Instagram"==c.channel_type?h="https://www.instagram.com/"+t.trim(a.value):"Phone"==c.channel_type?(r="",h="tel:"+t.trim(a.value)):"Skype"==c.channel_type?(r="",h="skype:"+t.trim(a.value)+"?chat"):"Snapchat"==c.channel_type?h="https://www.snapchat.com/add/"+t.trim(a.value):"Vkontakte"==c.channel_type?h="https://vk.me/"+t.trim(a.value):"Linkedin"==c.channel_type?h="personal"==a.link_type?"https://www.linkedin.com/in/"+t.trim(a.value):"https://www.linkedin.com/company/"+t.trim(a.value):"Viber"==c.channel_type?(""!=a.viber_url?h="viber://pa?chatURI="+a.value:isNaN(h=z(a.value,"+"))||(h=h.replace("+",""),navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(h="+"+h),h="viber://chat?number="+h),r=""):"TikTok"==c.channel_type&&(h="https://www.tiktok.com/@"+(h=z(t.trim(a.value),"@")),r="");return"<a href='"+h+"' target='"+r+"'><span class='chaty-agent-icon'>"+o+"</span><span class='chaty-agent-title'>"+l+"</span></a>"}(a,r,d,e,c,a.agent_title);g+="<div class='chaty-agent agent-info-"+d+"-"+r.channel+" agent-info-"+e+"'>"+i+"</div>"}f+=".agent-info-"+d+"-"+r.channel+".agent-info-"+e+" .chaty-agent-icon img { background-color: "+a.agent_bg_color+"; } ",("Instagram"!=r.channel||"#ffffff"!=a.agent_bg_color&&"#fff"!=a.agent_bg_color)&&(f+=".agent-info-"+d+"-"+r.channel+".agent-info-"+e+" .chaty-agent-icon .color-element { fill: "+a.agent_bg_color+"; } "),f+=".agent-info-"+d+"-"+r.channel+".agent-info-"+e+" .chaty-custom-icon { background-color: "+a.agent_bg_color+"; } "}),g+="</div>",g+="</div>",g+="</div>",g+="</div>",f+=".chaty-agent-header.agent-info-"+d+"-"+r.channel+" { background-color: "+r.header_bg_color+"; color: "+r.header_text_color+" } ",f+=".agent-info-"+d+"-"+r.channel+" .chaty-close-agent-list svg { fill: "+r.header_text_color+" } ",t("body").append(g),l=A(e,a),h=W(e,l,c,a),("Instagram"!=e.channel||"#ffffff"!=e.icon_color&&"#fff"!=e.icon_color)&&(f+=".chaty-agent-"+a+"-"+e.channel+" .color-element {fill: "+e.icon_color+"; color: "+e.icon_color+";}"),f+=".chaty-agent-"+a+"-"+e.channel+" .chaty-custom-icon { background-color: "+e.icon_color+";}",f+=".chaty-agent-"+a+"-"+e.channel+" .chaty-svg-img { background-color: "+e.icon_color+";}","<div data-form='chaty-form-"+a+"-"+e.channel_type+"' class='chaty-channel chaty-agent-button chaty-agent-"+a+"-"+e.channel+" "+e.channel+"-channel"+i+"' id='"+e.channel+"-"+a+"-channel' data-id='"+e.channel_type+"-"+a+"' data-widget='"+a+"' data-channel='"+e.channel+"'>"+h+"</div>"}}}else{E(e.channel_type)&&(e.channel_type=e.channel);var l=A(e,a),h=W(e,l,c,a);return"Contact_Us"==e.channel_type?i+=" has-chaty-box chaty-contact-form":"Whatsapp"==e.channel_type&&O(e.is_default_open)&&N(a,"c-"+e.channel_type)&&(i+=" chaty-default-open"),"<div class='chaty-channel "+e.channel+"-channel"+i+"' id='"+e.channel+"-"+a+"-channel' data-id='"+e.channel_type+"-"+a+"' data-widget='"+a+"' data-channel='"+e.channel+"'>"+h+"</div>"}}function B(e,a,c,i,n){var o=a.value,l="_blank";if("Whatsapp"==e.channel_type){var h=L(a.value);s?(l="",o="https://wa.me/"+h):(l="_blank",o="https://web.whatsapp.com/send?phone="+h)}else"WeChat"==e.channel_type?(l="",o="javascript:;"):"Email"==e.channel_type?(l="",o="mailto:"+a.value):"Facebook_Messenger"==e.channel_type?l=s?"":"_blank":"SMS"==e.channel_type?(l="",o="sms:"+a.value):"Telegram"==e.channel_type?(o="https://telegram.me/"+(o=z(a.value,"@")),l="_blank"):"Twitter"==e.channel_type?o="https://twitter.com/"+t.trim(a.value):"Phone"==e.channel_type?(l="",o="tel:"+t.trim(a.value)):"Skype"==e.channel_type?(l="",o="skype:"+t.trim(a.value)+"?chat"):"Snapchat"==e.channel_type?o="https://www.snapchat.com/add/"+t.trim(a.value):"Vkontakte"==e.channel_type?o="https://vk.me/"+t.trim(a.value):"Linkedin"==e.channel_type?o="personal"==a.link_type?"https://www.linkedin.com/in/"+t.trim(a.value):"https://www.linkedin.com/company/"+t.trim(a.value):"Viber"==e.channel_type?(""!=a.viber_url?o="viber://pa?chatURI="+a.value:isNaN(o=z(a.value,"+"))||(o=o.replace("+",""),navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(o="+"+o),o="viber://chat?number="+o),l=""):"TikTok"==e.channel_type&&(o="https://www.tiktok.com/@"+(o=z(t.trim(a.value),"@")),l="");return"<a href='"+o+"' target='"+l+"' class='chaty-tooltip pos-"+n+"' data-form='chaty-form-"+c+"-"+e.channel_type+"' data-hover='"+e.hover_text+"'>"+i+"</a>"}function L(t){return t=(t=(t=(t=z(t,"+")).replace(/ /g,"")).replace(/-/g,"")).replace(/_/g,"")}function z(e,a){for(e=t.trim(e);e.charAt(0)==a;)e=e.substring(1);for(;e.charAt(e.length-1)==a;)e=e.substring(0,e.length-1);return e}function W(e,a,c,i){var n,o,l,h,r,d,g,y,p,_,f="";if(O(e.is_agent))e.url="javascript:;",e.target="";else if("Whatsapp"==e.channel_type){if(O(e.has_welcome_message))e.url="javascript:;",e.target="",f+=" has-chaty-box chaty-whatsapp-btn-form",function e(a,c){let i=new Date;var n=10>i.getMinutes()?"0"+i.getMinutes():i.getMinutes(),o=10>i.getHours()?"0"+i.getHours():i.getHours(),l="",h=q(c);null==h&&(h=-1);var r="https://web.whatsapp.com/send",d="";s?r="https://wa.me/"+a.value:(r=O(a.is_use_web_version)?"https://web.whatsapp.com/send":"https://wa.me/"+a.value,d="_blank"),l+="<div style='display:none;' class='chaty-outer-forms chaty-popup-whatsapp-form chaty-whatsapp-btn-form chaty-form-"+c+"' data-channel='"+a.channel_type+"' id='chaty-form-"+c+"-"+a.channel_type+"' data-widget='"+c+"' data-index='"+h+"'>",l+="<div class='chaty-whatsapp-form'>";var g=I(a.wp_popup_headline)?"":a.wp_popup_headline;if(l+="<div class='chaty-whatsapp-header'>",l+="<div class='header-wp-icon'>",l+='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="33" viewBox="0 0 32 33" fill="none"> <g filter="url(#filter0_f_9477_7201)"> <path d="M9.95924 25.2858L10.3674 25.5276C12.0818 26.545 14.0475 27.0833 16.052 27.0842H16.0562C22.2122 27.0842 27.2221 22.0753 27.2247 15.919C27.2258 12.9357 26.0652 10.1303 23.9565 8.01998C22.9223 6.97924 21.6919 6.15397 20.3365 5.59195C18.9812 5.02992 17.5278 4.74231 16.0606 4.74576C9.89989 4.74576 4.88975 9.75407 4.88756 15.91C4.88453 18.0121 5.47648 20.0722 6.59498 21.852L6.86071 22.2742L5.73223 26.394L9.95924 25.2858ZM2.50586 29.5857L4.41235 22.6249C3.23657 20.5878 2.618 18.2768 2.61873 15.9091C2.62183 8.50231 8.64941 2.47656 16.0564 2.47656C19.6508 2.47839 23.0245 3.87717 25.5618 6.41629C28.0991 8.95542 29.4952 12.3305 29.4939 15.9199C29.4906 23.3262 23.4621 29.353 16.0562 29.353H16.0504C13.8016 29.3521 11.592 28.788 9.62923 27.7177L2.50586 29.5857Z" fill="#B3B3B3"/> </g> <path d="M2.36719 29.447L4.27368 22.4862C3.09587 20.4442 2.47721 18.1278 2.48005 15.7705C2.48316 8.36364 8.51074 2.33789 15.9177 2.33789C19.5121 2.33972 22.8859 3.73849 25.4232 6.27762C27.9605 8.81675 29.3565 12.1918 29.3552 15.7812C29.3519 23.1875 23.3234 29.2143 15.9175 29.2143H15.9117C13.663 29.2134 11.4533 28.6493 9.49056 27.5791L2.36719 29.447Z" fill="white"/> <path d="M15.715 3.84769C9.17146 3.84769 3.85 9.16696 3.84767 15.7051C3.84445 17.9377 4.47318 20.1257 5.66119 22.016L5.94343 22.4646L4.48888 27.2525L9.23469 25.663L9.66824 25.9199C11.4891 27.0005 13.5769 27.5719 15.7061 27.5731H15.7105C22.249 27.5731 27.5705 22.2532 27.573 15.7146C27.5779 14.1562 27.2737 12.6123 26.6778 11.1722C26.082 9.73214 25.2064 8.42458 24.1017 7.3252C23.0032 6.21981 21.6963 5.34329 20.2567 4.74637C18.8171 4.14946 17.2734 3.844 15.715 3.84769Z" fill="#25D366"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M12.0858 9.60401C11.8138 9.00922 11.5276 8.99717 11.2692 8.98687L10.5736 8.97852C10.3316 8.97852 9.93846 9.0679 9.60608 9.42544C9.27369 9.78297 8.33594 10.6471 8.33594 12.4046C8.33594 14.1622 9.63628 15.8605 9.81747 16.0991C9.99866 16.3377 12.3277 20.0594 16.0162 21.4913C19.0813 22.6813 19.705 22.4446 20.3706 22.3852C21.0361 22.3257 22.5175 21.521 22.8197 20.6869C23.1219 19.8527 23.1221 19.138 23.0315 18.9886C22.9409 18.8391 22.6989 18.7503 22.3357 18.5716C21.9725 18.3928 20.1888 17.5287 19.8562 17.4094C19.5236 17.2901 19.2818 17.2308 19.0396 17.5883C18.7975 17.9459 18.1029 18.7501 17.8911 18.9886C17.6793 19.227 17.4679 19.2569 17.1047 19.0783C16.7416 18.8998 15.5731 18.5224 14.1867 17.3054C13.108 16.3585 12.3799 15.1892 12.1679 14.8318C11.9559 14.4745 12.1454 14.2809 12.3274 14.1029C12.4902 13.9428 12.6901 13.6858 12.8719 13.4773C13.0537 13.2688 13.1135 13.1197 13.2343 12.8817C13.3551 12.6437 13.2949 12.4346 13.2041 12.256C13.1133 12.0774 12.4083 10.3105 12.0858 9.60401Z" fill="white"/> <defs> <filter id="filter0_f_9477_7201" x="1.21611" y="1.18682" width="29.5678" height="29.6889" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> <feFlood flood-opacity="0" result="BackgroundImageFix"/> <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/> <feGaussianBlur stdDeviation="0.644873" result="effect1_foregroundBlur_9477_7201"/> </filter> </defs> </svg>',l+="</div>",l+="<div class='header-wp-title'>",l+=g,l+="</div>",l+="<div class='whatsapp-form-close-btn'>",l+='<svg width="15" height="9" viewBox="0 0 15 9" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M1 1L7.31429 8L14 1" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </svg>',l+="</div>",l+="</div>",l+="<div class='chaty-whatsapp-body'>",I(a.chat_welcome_message)||(""!=a.wp_popup_profile?(l+="<div class='chaty-whatsapp-content has-content'>",l+="<div class='wp-profile-img'>",l+="<img src='"+a.wp_popup_profile+"'>",l+="</div>"):l+="<div class='chaty-whatsapp-content'>",l+="<div class='chaty-whatsapp-message'>",l+="<div class='chaty-whatsapp-message-nickname'>"+a.wp_popup_nickname+"</div>",l+="<div class='chaty-whatsapp-message-content'></div>",l+="<div class='chaty-whatsapp-message-time'>"+o+":"+n+"</div>",l+="</div>",l+="</div>"),l+="</div>",l+="<div class='chaty-whatsapp-footer'>",l+="<form action='"+r+"' target='"+d+"' class='whatsapp-chaty-form-"+c+" whatsapp-chaty-form "+(O(a.is_default_open)?"add-analytics":"")+"' data-widget='"+c+"' data-channel='"+a.channel_type+"' autocomplete='off'>",l+="<div class='chaty-whatsapp-data'>",l+=`<div class='chaty-whatsapp-field ${O(a.emoji_picker)?"has_emoji":""}'>`,O(a.emoji_picker)&&(l+='<button type="button" class="chaty-wp-emoji-input"><span class="hide-cht-svg-bg">'+chaty_settings.lang.emoji_picker+'</span><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C6.47 2 2 6.5 2 12C2 14.6522 3.05357 17.1957 4.92893 19.0711C5.85752 19.9997 6.95991 20.7362 8.17317 21.2388C9.38642 21.7413 10.6868 22 12 22C14.6522 22 17.1957 20.9464 19.0711 19.0711C20.9464 17.1957 22 14.6522 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7362 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM15.5 8C15.8978 8 16.2794 8.15804 16.5607 8.43934C16.842 8.72064 17 9.10218 17 9.5C17 9.89782 16.842 10.2794 16.5607 10.5607C16.2794 10.842 15.8978 11 15.5 11C15.1022 11 14.7206 10.842 14.4393 10.5607C14.158 10.2794 14 9.89782 14 9.5C14 9.10218 14.158 8.72064 14.4393 8.43934C14.7206 8.15804 15.1022 8 15.5 8ZM8.5 8C8.89782 8 9.27936 8.15804 9.56066 8.43934C9.84196 8.72064 10 9.10218 10 9.5C10 9.89782 9.84196 10.2794 9.56066 10.5607C9.27936 10.842 8.89782 11 8.5 11C8.10218 11 7.72064 10.842 7.43934 10.5607C7.15804 10.2794 7 9.89782 7 9.5C7 9.10218 7.15804 8.72064 7.43934 8.43934C7.72064 8.15804 8.10218 8 8.5 8ZM12 17.5C9.67 17.5 7.69 16.04 6.89 14H17.11C16.3 16.04 14.33 17.5 12 17.5Z" fill="#CDD9E2"/> </svg></button>'),l+="<input name='text' type='text' id='chaty_whatsapp_input' class='chaty-whatsapp-input' />",l+="<button type='submit' class='chaty-whatsapp-button-button' >",l+="<span class='hide-cht-svg-bg'>"+chaty_settings.lang.whatsapp_button+"</span>",l+='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><g clip-path="url(#clip0_9452_6982)"><path d="M18.5703 9.99996L2.66037 17.6603L5.60665 9.99996L2.66037 2.33963L18.5703 9.99996Z" fill="white" stroke="white" stroke-width="1.6625" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.24069 9.99947L3.07723 9.99992" stroke="#C6D7E3" stroke-width="1.6625" stroke-linecap="round" stroke-linejoin="round"></path></g><defs><clipPath id="clip0_9452_6982"><rect width="20" height="20" fill="white"></rect></clipPath></defs></svg>',l+="</button>",l+="</div>",l+="</div>",!s&&O(a.is_use_web_version)&&(l+="<input type='hidden' name='phone' value='"+a.value+"' />"),l+="</form>",l+="</div>",l+="</div>",l+="</div>",t("body").append(l),t("#chaty-form-"+c+"-"+a.channel_type+" .chaty-whatsapp-message .chaty-whatsapp-message-content").html(a.chat_welcome_message),!I(a.pre_set_message)){var y=a.pre_set_message,p=t("title").text();y=(y=I(p)?y.replace(/{title}/g,""):y.replace(/{title}/g,p)).replace(/{url}/g,window.location),t("#chaty-form-"+c+"-"+a.channel_type+" .chaty-whatsapp-input").val(y)}t("#chaty-form-"+c+"-"+a.channel_type).show(),t("#chaty-form-"+c+"-"+a.channel_type+" .chaty-whatsapp-input").attr("placeholder",a.input_placeholder),t("#chaty-form-"+c+"-"+a.channel_type+" .chaty-whatsapp-header").css("background-color",a.wp_popup_head_bg_color)}(e,i);else{var u="";if(!I(e.pre_set_message)){u=decodeURI(e.pre_set_message);var m=t("title").text();u=(u=I(m)?u.replace(/{title}/g,""):u.replace(/{title}/g,m)).replace(/{url}/g,window.location),u=encodeURIComponent(u)}s?(e.target="",e.url="https://wa.me/"+e.value+"?text="+u):(e.target="_blank",O(e.is_use_web_version)?e.url="https://web.whatsapp.com/send?phone="+e.value+"&text="+u:e.url="https://wa.me/"+e.value+"?text="+u)}}else if("WeChat"==e.channel_type){I(e.qr_code_image_url)||(n=e,l="",null==(h=q(o=i))&&(h=-1),r=I(n.wechat_header)?"":n.wechat_header+": ",r+=n.value,l+="<div style='display:none;' class='chaty-outer-forms chaty-wechat-form chaty-form-"+o+"' data-channel='"+n.channel_type+"' id='chaty-form-"+o+"-"+n.channel_type+"' data-widget='"+o+"' data-index='"+h+"'>",l+="<div class='chaty-form'>",l+="<div class='chaty-form-body qr-code-body'>",l+='<div class="qr-code-header"><div class="qr-code-head-title"><svg width="25" height="22" viewBox="0 0 25 22" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M17.2315 6.81844C17.6918 6.81844 18.1403 6.85385 18.5769 6.91286C17.7744 3.40752 14.092 0.751953 9.66605 0.751953C4.64999 0.751953 0.578125 4.15108 0.578125 8.34096C0.578125 10.7605 1.93541 12.8967 4.04806 14.2894L2.85601 16.6853L6.1135 15.2808C6.80985 15.5287 7.5416 15.7293 8.32057 15.8356C8.21435 15.3753 8.15533 14.9032 8.15533 14.4075C8.14353 10.2294 12.2154 6.81844 17.2315 6.81844ZM12.6875 4.16288C12.8363 4.16288 12.9836 4.19218 13.1211 4.24912C13.2586 4.30607 13.3835 4.38952 13.4887 4.49474C13.5939 4.59995 13.6773 4.72486 13.7343 4.86232C13.7912 4.99979 13.8205 5.14712 13.8205 5.29592C13.8205 5.44471 13.7912 5.59205 13.7343 5.72951C13.6773 5.86698 13.5939 5.99189 13.4887 6.0971C13.3835 6.20231 13.2586 6.28577 13.1211 6.34271C12.9836 6.39965 12.8363 6.42896 12.6875 6.42896C12.387 6.42896 12.0988 6.30958 11.8863 6.0971C11.6738 5.88461 11.5545 5.59642 11.5545 5.29592C11.5545 4.99542 11.6738 4.70722 11.8863 4.49474C12.0988 4.28225 12.387 4.16288 12.6875 4.16288ZM6.63281 6.44076C6.33231 6.44076 6.04412 6.32139 5.83163 6.1089C5.61914 5.89641 5.49977 5.60822 5.49977 5.30772C5.49977 5.00722 5.61914 4.71903 5.83163 4.50654C6.04412 4.29405 6.33231 4.17468 6.63281 4.17468C6.93331 4.17468 7.2215 4.29405 7.43399 4.50654C7.64648 4.71903 7.76585 5.00722 7.76585 5.30772C7.76585 5.60822 7.64648 5.89641 7.43399 6.1089C7.2215 6.32139 6.93331 6.44076 6.63281 6.44076Z" fill="white"/> <path d="M24.7978 14.4102C24.7978 11.0583 21.4105 8.34375 17.2324 8.34375C13.0543 8.34375 9.66699 11.0583 9.66699 14.4102C9.66699 17.7621 13.0543 20.4767 17.2324 20.4767C17.9169 20.4767 18.5779 20.3823 19.2034 20.2407L23.2871 21.9992L21.8708 19.1666C23.6412 18.0572 24.7978 16.3577 24.7978 14.4102ZM14.9545 14.0326C14.7304 14.0326 14.5114 13.9661 14.325 13.8416C14.1387 13.7171 13.9935 13.5401 13.9077 13.3331C13.822 13.1261 13.7995 12.8983 13.8432 12.6785C13.887 12.4587 13.9949 12.2568 14.1533 12.0983C14.3118 11.9399 14.5137 11.832 14.7335 11.7882C14.9533 11.7445 15.1811 11.767 15.3881 11.8527C15.5951 11.9385 15.7721 12.0837 15.8966 12.27C16.0211 12.4564 16.0876 12.6754 16.0876 12.8995C16.0994 13.525 15.58 14.0326 14.9545 14.0326ZM19.4985 14.0326C19.198 14.0326 18.9098 13.9132 18.6973 13.7007C18.4848 13.4882 18.3654 13.2 18.3654 12.8995C18.3654 12.599 18.4848 12.3108 18.6973 12.0983C18.9098 11.8858 19.198 11.7665 19.4985 11.7665C19.799 11.7665 20.0872 11.8858 20.2997 12.0983C20.5121 12.3108 20.6315 12.599 20.6315 12.8995C20.6315 13.2 20.5121 13.4882 20.2997 13.7007C20.0872 13.9132 19.799 14.0326 19.4985 14.0326Z" fill="white"/> </svg>'+r+'</div><div class="qr-code-hide-btn chaty-close-button"><svg width="15" height="9" viewBox="0 0 15 9" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M1 1L7.31429 8L14 1" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </svg></div></div>',I(n.wechat_qr_code_title)||(l+='<div class="qr-code-title">'+n.wechat_qr_code_title+":</div>"),l+="<div role='button' class='close-chaty-form is-whatsapp-btn'><div aria-hidden='true' class='chaty-close-button'></div><span class='hide-cht-svg-bg'>"+chaty_settings.lang.hide_whatsapp_form+"</span></div>",l+="<div class='qr-code-box'><div class='qr-code-image'><img src='"+n.qr_code_image_url+"' alt='"+n.title+"' /></div>",l+="</div>",l+="</div>",l+="</div>",t("body").append(l),t("#chaty-form-"+o+"-"+n.channel_type+" .qr-code-header").css("background-color",n.wechat_header_color),e.url="javascript:;",e.target="",f+=" has-chaty-box chaty-qr-code-form")}else if("Contact_Us"==e.channel_type){d=e,y="",null==(p=q(g=i))&&(p=-1),y+="<div style='display:none;' class='chaty-outer-forms chaty-contact-form-box chaty-form-"+g+"' data-channel='"+d.channel_type+"' id='chaty-form-"+g+"-"+d.channel_type+"' data-widget='"+g+"' data-index='"+p+"'>",y+="<div class='chaty-form'>",y+="<div class='chaty-form-body'>",y+="<div role='button' class='close-chaty-form'><div class='chaty-close-button'></div></div>",y+="<form class='chaty-ajax-contact-form' id='chaty-ajax-contact-form-"+p+"' method='post' data-channel='"+d.channel_type+"' data-widget='"+g+"' data-token='"+d.widget_token+"' data-index='"+d.widget_index+"' enctype='multipart/form-data'>",y+="<div class='chaty-contact-form-body'>",y+="<div class='chaty-contact-form-title'><div class='form-title'>"+d.contact_form_settings.contact_form_title+"</div><div class='chaty-close-button'><svg width='15' height='9' viewBox='0 0 15 9' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M1 1L7.31429 8L14 1' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'></path></svg></div></div>",y+="<div class='chaty-contact-inputs'>",""==d.contact_form_settings.contact_form_field_order?t.each(d.contact_fields,function(t,e){y+="<div class='chaty-contact-input'>";var a=O(e.is_required)?"is-required":"",c="";O(e.is_required)&&(c="<span class='required_indicate'>*</span>"),"textarea"==e.type?(I(e.title)?y+="<label class='sr-only' for='"+e.field+"-"+g+"'>"+e.field+"</label>":y+="<label class='chaty-form-label' for='"+e.field+"-"+g+"'>"+e.title+" "+c+"</label>",y+="<textarea type='"+e.type+"' class='chaty-textarea-field "+a+" field-"+e.field+"' placeholder='"+e.placeholder+"' name='"+e.field+"' id='"+e.field+"-"+g+"' ></textarea>"):(I(e.title)?y+="<label class='sr-only' for='"+e.field+"-"+g+"'>"+e.field+"</label>":y+="<label class='chaty-form-label' for='"+e.field+"-"+g+"'>"+e.title+" "+c+"</label>",console.log(e.field),y+="<input type='"+e.type+"' class='chaty-input-field "+a+" field-"+e.field+"' placeholder='"+e.placeholder+"' name='"+e.field+"' id='"+e.field+"-"+g+"' />","email"==e.field&&(y+='<p id="email_suggestion'+g+'" class="email_suggestion"></p>')),y+="</div>"}):t.each(d.contact_form_settings.contact_form_field_order,function(e,a){t.each(d.contact_fields,function(t,e){if(e.title==a){y+="<div class='chaty-contact-input'>";var c=O(e.is_required)?"is-required":"",i="";O(e.is_required)&&(i="<span class='required_indicate'>*</span>"),"textarea"==e.type?(I(e.title)?y+="<label class='sr-only' for='"+e.field+"-"+g+"'>"+e.field+"</label>":y+="<label class='chaty-form-label' for='"+e.field+"-"+g+"'>"+e.title+" "+i+"</label>",y+="<textarea type='"+e.type+"' class='chaty-textarea-field "+c+" field-"+e.field+"' placeholder='"+e.placeholder+"' name='"+e.field+"' id='"+e.field+"-"+g+"' ></textarea>"):(I(e.title)?y+="<label class='sr-only' for='"+e.field+"-"+g+"'>"+e.field+"</label>":y+="<label class='chaty-form-label' for='"+e.field+"-"+g+"'>"+e.title+" "+i+"</label>",y+="<input type='"+e.type+"' class='chaty-input-field "+c+" field-"+e.field+"' placeholder='"+e.placeholder+"' name='"+e.field+"' id='"+e.field+"-"+g+"' />","email"==e.field&&(y+='<p id="email_suggestion'+g+'" class="email_suggestion"></p>')),y+="</div>"}}),t.each(d.contact_custom_fields,function(e,c){if(c.unique_id==a&&"yes"==c.is_active){var i=O(c.is_required)?"is-required":"",n="";if(O(c.is_required)&&(n="<span class='required_indicate'>*</span>"),y+="<div class='chaty-contact-input'>",y+="<label class='chaty-form-label' for='"+c.field_dropdown+"-"+e+"'>"+c.field_label+" "+n+"</label>",y+="<input type='hidden' name='custom_fields["+e+"][label_"+c.field_dropdown+"]' value='"+c.field_label+"'>",y+="<input type='hidden' name='custom_fields["+e+"][slug]' value='"+c.field_dropdown+"'>","text"==c.field_dropdown||"url"==c.field_dropdown||"date"==c.field_dropdown)y+="<input type='"+c.field_dropdown+"' class='chaty-input-field "+i+" field-"+c.field_dropdown+"' placeholder='"+c.placeholder+"' name='custom_fields["+e+"]["+c.field_dropdown+"]' id='"+c.field_dropdown+"-"+e+"' />";else if("file"==c.field_dropdown)y+="<input type='file' class='chaty-input-field "+i+" field-"+c.field_dropdown+"' name='custom_fields["+e+"]["+c.field_dropdown+"]' id='"+c.field_dropdown+"-"+e+"' accept='.jpg,.jpeg,.png,.gif,.pdf,.doc,.docx,.ppt,.pptx,.pps,.ppsx,.odt,.xls,.xlsx,.mp3,.mp4,.wav,.mpg,.avi,.mov,.wmv,.3gp,.ogv' multiple/>";else if("textarea"==c.field_dropdown)y+="<textarea class='chaty-textarea-field "+i+" field-"+c.field_dropdown+"' placeholder='"+c.placeholder+"' name='custom_fields["+e+"]["+c.field_dropdown+"]' id='"+c.field_dropdown+"-"+e+"' ></textarea>";else if("dropdown"==c.field_dropdown)y+="<select name='custom_fields["+e+"]["+c.field_dropdown+"]' class='chaty-input-field "+i+"'>",c.dropdown_placeholder&&(y+="<option value=''>"+c.dropdown_placeholder+"</option>"),t.each(c.dropdown_option,function(t,e){e&&(y+="<option value='"+e+"'>"+e+"</option>")}),y+="</select>";else if("textblock"==c.field_dropdown){var s=Math.floor(Math.random()*Math.random())+Date.now();y+="<textarea rows='5' name='custom_fields["+e+"]["+c.field_dropdown+"]' class='chaty-text-block chaty-textarea-field "+i+"' id='text_editor_"+s+"'></textarea>"}else"number"==c.field_dropdown&&(y+="<input type='tel' class='chaty-input-field "+i+" field-"+c.field_dropdown+"' placeholder='"+c.placeholder+"' name='custom_fields["+e+"]["+c.field_dropdown+"]' id='"+c.field_dropdown+"-"+e+"' />");y+="</div>"}})}),O(d.enable_recaptcha)&&(I(d.v2_site_key)||(y+="<div class='chaty-contact-input'>",y+="<div class='front-google-captcha' id='front_recaptcha_"+p+"'></div>",y+="</div>"),I(d.v3_site_key)||(y+="<div class='chaty-contact-input'>",y+="<div class='front-google-captcha' id='front_recaptcha_"+p+"'></div>",y+="</div>")),y+="</div>",y+="<div class='chaty-contact-form-button'><button type='submit' id='chaty-submit-button-"+g+"' class='chaty-submit-button'>"+d.contact_form_settings.button_text+"<span class='chaty-loader'><span class='dashicons dashicons-update'></span></span></button></div>",y+="</div>",y+="<input type='hidden' name='nonce' value='"+d.widget_token+"'>",y+="<input type='hidden' name='action' value='chaty_front_form_save_data'>",y+='<input type="hidden" name="channel" value="'+d.channel_type+'">',y+='<input type="hidden" name="widget" value="'+g+'">',y+='<input type="hidden" name="ref_url" value="'+window.location.href+'">',y+='<input type="hidden" name="token" value="'+googleV3Token+'">',y+='<input type="hidden" name="page_id" value="'+chaty_settings.page_id+'">',y+='<input type="hidden" name="page_title" value="'+C()+'">',_=t(".g-recaptcha-response").length?t(".g-recaptcha-response").val():"",y+='<input type="hidden" name="v2token" value="'+_+'">',O(d.enable_recaptcha)&&(I(d.v2_site_key)||(y+="<input type='hidden' id='v2_site_key' class='v2_site_key' value='"+d.v2_site_key+"'>"),I(d.v3_site_key)||(y+="<input type='hidden' id='v3_site_key' class='v3_site_key' value='"+d.v3_site_key+"'>")),y+="</form>",y+="</div>",y+="</div>",y+="</div>",t("body").append(y),t(".chaty-text-block:not(.editor-loaded)").length&&t(".chaty-text-block:not(.editor-loaded)").each(function(){text_id=t(this).attr("id"),wp.editor.initialize(text_id,{tinymce:{wpautop:!1,toolbar1:"bold italic underline"},quicktags:!1})}),e.url="javascript:;",e.target="",f+=" has-chaty-box chaty-contact-us-form"}else if("Email"==e.channel_type){if(!I(e.mail_subject)){var $=decodeURI(e.mail_subject),m=t("title").text();$=($=I(m)?$.replace(/{title}/g,""):$.replace(/{title}/g,m)).replace(/{url}/g,window.location),$=encodeURIComponent($),e.url+="?subject="+$}}else"Viber"==e.channel_type?(""!=e.viber_url?e.url="viber://pa?chatURI="+e.value:(e.value=z(e.value,"+"),s&&!isNaN(e.value)&&navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(e.value="+"+e.value),e.url="viber://chat?number="+e.value),e.target=""):"Vkontakte"==e.channel_type&&(e.url="https://vk.me/"+t.trim(e.value));v="Link"==e.channel||"Custom_Link"==e.channel||"Custom_Link_3"==e.channel||"Custom_Link_4"==e.channel||"Custom_Link_5"==e.channel?I(e.hover_text)?e.channell:e.hover_text:e.channel;var w="";return I(e.click_event)||(w='onclick="'+e.click_event+'"',e.target="",e.url="javascript:;"),"<a href='"+e.url+"' "+w+" target='"+e.target+"' rel='nofollow noopener' aria-label='"+v+"' class='chaty-tooltip chaty-"+e.channel_type.toLowerCase()+"-channel pos-"+c+f+"' data-form='chaty-form-"+i+"-"+e.channel_type+"' data-hover='"+e.hover_text+"'>"+a+"</a>"}function x(t){return new DOMParser().parseFromString(t,"text/html").documentElement.textContent}function q(e){var a=null;return i.length&&t.each(i,function(t,c){c.id==e&&(a=t)}),a}function I(e){return null==e||""==e||""==t.trim(e)}function A(t){return""!=t.custom_image_url&&"null"!=t.custom_image_url?"<span class='chaty-icon channel-icon-"+t.channel_type+"'><span class='chaty-svg chaty-svg-img'><img src='"+t.custom_image_url+"' alt='"+t.hover_text+"' /></span></span>":"<span class='chaty-icon channel-icon-"+t.channel_type+"'><span class='chaty-svg'>"+t.svg_icon+"</span></span>"}function E(e){return""==e||""==t.trim(e)||null==e||"null"==e}function U(t){return"custom"==t.position?t.custom_position:t.position}function P(){jQuery(".chaty.active .chaty-open").length&&jQuery(".chaty.active .chaty-open").each(function(){jQuery(this).find(".chaty-cta-close").trigger("click")})}function H(){g&&t(".on-chaty-exit-intent").length&&t(".on-chaty-exit-intent").each(function(){var e=t(this).data("id");t(this).removeClass("on-chaty-exit-intent"),D(e),t("#chaty-widget-"+e+" .chaty-widget").append("<div class='chaty-exit-intent'></div>"),setTimeout(function(){t(".chaty-exit-intent").addClass("animate"),setTimeout(function(){t(".chaty-exit-intent").removeClass("animate")},2500)},500)})}function D(e){j(e),t(".chaty-widget-"+e).removeClass("on-chaty-delay"),t(".chaty-widget-"+e).removeClass("on-chaty-exit-intent"),t(".chaty-widget-"+e).removeClass("on-chaty-scroll"),t(".chaty.on-chaty-delay").length||(clearInterval(a),h=!1),t(".chaty.on-chaty-exit-intent").length||(g=!1),t(".chaty.on-chaty-scroll").length||(d=!1)}function V(t){for(t=t.toString();t.length<2;)t="0"+t;return t}function O(t){return"1"==t||1==t||!0==t||"true"==t||"yes"==t||"on"==t}function Z(t,e){if(isNaN(e)){var a=new Date(t.toLocaleString("en-US",{timeZone:e})),c=t.getTime()-a.getTime();return new Date(t.getTime()-c)}var i=new Date;if(i=i.toLocaleString("en-US",{timeZone:"UTC"}),i=new Date(i),-1!=e.indexOf("+")){var n=e.replace("+",""),s=parseInt(n),o=60*parseFloat(n%s);(o=i.getUTCMinutes()+o)>59&&(s+=parseInt(o/60),o%=60),i.setUTCHours(i.getUTCHours()+s,o)}else if(-1!=e.indexOf("-")){var n=e.replace("-",""),s=parseInt(n),o=60*parseFloat(n%s);(o=i.getUTCMinutes()-o)<0&&(s-=parseInt(o/60),o%=60),i.setUTCHours(i.getUTCHours()-s,-o)}var c=t.getTime()-i.getTime();return new Date(t.getTime()-c)}function G(){return n="","undefined"!=typeof Storage&&null!=window.sessionStorage.getItem("chaty_user_country_code")?n=window.sessionStorage.getItem("chaty_user_country_code"):X("chaty_user_country_code")&&(n=Y("chaty_user_country_code")),n}function F(t,e){var a=Y("chatyWidget_"+t),c=[];null!=a&&""!=a&&(c=JSON.parse(a));var i=!1;if(c.length>0)for(var n=0;n<c.length;n++)c[n].k==e&&(i=!0,c[n].v=new Date);i||c.push({k:e,v:new Date}),R("chatyWidget_"+t,a=JSON.stringify(c),"7")}function N(t,e){var a,c=function t(e,a){var c=Y("chatyWidget_"+e),i=[];if(null!=c&&""!=c&&(i=JSON.parse(c)),i.length>0){for(var n=0;n<i.length;n++)if(i[n].k==a)return i[n].v}return null}(t,e);if(null!=c&&""!=c){if(c=new Date(c),!(Math.floor(Math.abs(new Date-c)/864e5)>=2))return!1}return!0}function R(t,e,a){var c=new Date;c.setTime(c.getTime()+864e5*a);var i="expires="+c.toUTCString();document.cookie=t+"="+e+"; "+i+"; path=/; SameSite=Lax"}function Y(t){for(var t=t+"=",e=document.cookie.split(";"),a=0;a<e.length;a++){for(var c=e[a];" "==c.charAt(0);)c=c.substring(1);if(0==c.indexOf(t))return c.substring(t.length,c.length)}return null}function X(t){var e=Y(t);return""!=e&&null!==e}function J(t){document.cookie=t+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;"}function Q(){return dd=(today=new Date).getDate(),mm=today.getMonth()+1,yyyy=today.getFullYear(),dd<10&&(dd="0"+dd),mm<10&&(mm="0"+mm),yyyy+"-"+mm+"-"+dd}function K(t){console.log(t)}t(document).ready(function(){var a=RegExp("(googlebot/|bot|Googlebot-Mobile|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)","i"),c=navigator.userAgent;a.test(c)&&(l=!0),s?t("body").addClass("cht-in-mobile"):t("body").addClass("cht-in-desktop"),"undefined"==typeof chaty_settings?(console.log("Chaty settings doesn't exists"),m=setInterval(function(){"object"==typeof chaty_settings&&(clearInterval(m),("object"==typeof chaty_settings&&"on"!=chaty_settings.data_analytics_settings||"off"==chaty_settings.data_analytics_settings)&&(l=!0),i=chaty_settings.chaty_widgets,w())},1e3)):0==chaty_settings.chaty_widgets.length?console.log("Chaty widget doesn't exists"):(i=chaty_settings.chaty_widgets,w(),("object"==typeof chaty_settings&&"on"!=chaty_settings.data_analytics_settings||"off"==chaty_settings.data_analytics_settings)&&(l=!0)),t(window).height()>t(window).width()?t("body").addClass("cht-portrait").removeClass("cht-landscape"):t("body").addClass("cht-landscape").removeClass("cht-portrait"),t(document).on("click","html, body",function(e){t(".chaty-popup-whatsapp-form.active").length&&t(".chaty-popup-whatsapp-form.active").each(function(){var e=t(this).data("widget"),a=N(e,"c-Whatsapp");(!I(e)||0==e)&&a&&F(e,"c-Whatsapp")}),t(".form-open").removeClass("form-open"),t(".chaty-outer-forms").removeClass("active"),t(".chaty .chaty-widget.chaty-no-close-button:not(.has-single)").addClass("chaty-open"),t(".chaty .chaty-widget").hasClass("chaty-open")&&(t(".chaty .chaty-widget:not(.chaty-no-close-button)").removeClass("chaty-open"),t("body").removeClass("add-bg-blur-effect")),t("body").removeClass("add-bg-blur-effect")}),t(document).on("click",".chaty, .chaty-outer-forms",function(t){t.stopPropagation()}),t(document).on("click",".chaty.form-open .chaty-i-trigger.single-channel a",function(e){t("body").removeClass("add-bg-blur-effect")}),t(document).on("click",".chaty-close-view-list",function(){t(this).closest(".chaty").find(".chaty-widget").removeClass("chaty-open"),t("body").removeClass("add-bg-blur-effect")}),t(document).on("submit",".whatsapp-chaty-form",function(){if(t(this).hasClass("form-google-analytics")){var e="Whatsapp";if(window.hasOwnProperty("gtag")&&gtag("event","chaty_"+e,{eventCategory:"chaty_"+e,event_action:"chaty_"+e,method:"chaty_"+e}),window.hasOwnProperty("ga")){var a=window.ga.getAll()[0];a&&a.send("event","click",{eventCategory:"chaty_"+e,eventAction:"chaty_"+e,method:"chaty_"+e})}}var c=t(this).data("widget"),i=t(this).data("channel"),n=N(c,"c-"+i);if((!I(c)||0==c)&&n){F(c,"c-"+i);var o=t("#chaty-widget-"+c).data("nonce");l||t.ajax({url:chaty_settings.ajax_url,data:{widgetId:c,userId:c,isMobile:s,channel:i,nonce:o,action:"update_chaty_channel_click"},dataType:"json",method:"post"})}t("#chaty-widget-"+c).length&&(t("#chaty-widget-"+c).removeClass("form-open"),t(this).closest(".chaty-outer-forms").removeClass("active"),t("#chaty-widget-"+c).find(".chaty-widget").hasClass("cssas-no-close-button")&&t("#chaty-widget-"+c).find(".chaty-widget:not(.has-single)").addClass("chaty-open")),t("body").removeClass("add-bg-blur-effect")}),t(document).on("click",".chaty-close-button, .chaty-close-agent-list, .whatsapp-form-close-btn",function(e){e.preventDefault(),e.stopPropagation();var a=t(this).closest(".chaty-outer-forms").data("widget");if(!I(a)||0==a){if(t("#chaty-widget-"+a).length&&(t("#chaty-widget-"+a).removeClass("form-open"),t(this).closest(".chaty-outer-forms").removeClass("active"),t("#chaty-widget-"+a).find(".chaty-widget").hasClass("chaty-no-close-button")&&t("#chaty-widget-"+a).find(".chaty-widget:not(.has-single)").addClass("chaty-open")),t(this).closest(".chaty-whatsapp-btn-form").length){var c=t(this).closest(".chaty-outer-forms").data("channel");if(!I(c)){var i=N(a,"c-"+c);i&&F(a,"c-"+c)}N(a,"v-widget")&&j(a)}t(this).hasClass("whatsapp-form-close-btn")&&(i=N(a,"c-Whatsapp"),(!I(a)||0==a)&&i&&F(a,"c-Whatsapp"))}t("body").removeClass("add-bg-blur-effect")}),t(document).on("keypress",'.chaty-contact-input input[type="tel"]',function(e){var a=e.which?e.which:e.keyCode;return 43==a&&""==t(this).val()||!!(a>=48)&&!!(a<=57)}),t(document).on("change",'.chaty-contact-input input[type="tel"]',function(){var e=RegExp(/^(\+)?\d*$/),a=t(this).val();e.test(a)||t(this).val("")}),t(document).on("click","a.chaty-qr-code-form",function(e){e.preventDefault();var a=t(this).data("form");if(!I(a)&&t("#"+a).length){var c=t(this).html();t("#"+a).hasClass("active")?(t(this).closest(".chaty").find(".chaty-widget:not(.has-single)").addClass("chaty-open"),t(this).closest(".chaty").removeClass("form-open"),t("#"+a).removeClass("active"),t("body").removeClass("add-bg-blur-effect")):(t(this).closest(".chaty").find(".chaty-widget").removeClass("chaty-open"),t(this).closest(".chaty").addClass("form-open"),t("#"+a).addClass("active"),c=t(this).closest(".chaty").find(".chaty-widget .chaty-cta-close").find("button").html(),t(this).closest(".chaty").find(".open-chaty-channel").html(c))}}),t(document).on("click","a.chaty-contact-us-form",function(e){e.preventDefault();var a=t(this).data("form");!I(a)&&t("#"+a).length&&(""!=googleV3Token&&(googleV3Token="",refreshG3Token()),t("#"+a).hasClass("active")?(t(this).closest(".chaty").find(".chaty-widget:not(.has-single)").addClass("chaty-open"),t(this).closest(".chaty").removeClass("form-open"),t("#"+a).removeClass("active"),t("body").removeClass("add-bg-blur-effect")):(t(this).closest(".chaty").find(".chaty-widget").removeClass("chaty-open"),t(this).closest(".chaty").addClass("form-open"),t("#"+a).addClass("active"),t("#"+a).find(".chaty-ajax-success-message").remove(),t("#"+a).find(".chaty-ajax-error-message").remove(),t("#"+a).find(".has-chaty-error").removeClass("has-chaty-error"),buttonHtml=t(this).closest(".chaty").find(".chaty-widget .chaty-cta-close").find("button").html(),t(this).closest(".chaty").find(".open-chaty-channel").html(buttonHtml)))}),t(document).on("click","a.chaty-whatsapp-btn-form",function(e){e.preventDefault();var a=t(this).data("form");if(!I(a)&&t("#"+a).length){if(t("#"+a).hasClass("active"))t(this).closest(".chaty").find(".chaty-widget:not(.has-single)").addClass("chaty-open"),t(this).closest(".chaty").removeClass("form-open"),t("#"+a).removeClass("active"),t("body").removeClass("add-bg-blur-effect"),setTimeout(function(){t("body").removeClass("add-bg-blur-effect")},100);else{t(this).closest(".chaty").find(".chaty-widget").removeClass("chaty-open"),t(this).closest(".chaty").addClass("form-open"),t("#"+a).addClass("active");var c=t(this).closest(".chaty").find(".chaty-widget .chaty-cta-close").find("button").html()+"<span class='hide-cht-svg-bg'>"+chaty_settings.lang.hide_whatsapp_form+"</span>";t(this).closest(".chaty").find(".chaty-widget").find(".open-chaty-channel").html(c)}setTimeout(function(){t(".chaty-whatsapp-btn-form.active .chaty-whatsapp-input").focus()},100)}}),t(document).on("click",".chaty-channel.chaty-agent-button",function(e){e.preventDefault();var a=t(this).data("form");if(!I(a)&&t("#"+a).length){if(t(this).closest(".chaty").find(".chaty-widget").hasClass("has-single"))t(this).closest(".chaty").hasClass("form-open")?(t(this).closest(".chaty").find(".chaty-widget:not(.has-single)").addClass("chaty-open"),t(this).closest(".chaty").removeClass("form-open"),t("#"+a).removeClass("active"),t("body").removeClass("add-bg-blur-effect")):(c=t(this).closest(".chaty").find(".chaty-widget .chaty-cta-close").find("button").html(),t("#"+a).addClass("is-active"),t(this).closest(".chaty").find(".chaty-widget").removeClass("chaty-open"),t(this).closest(".chaty").addClass("form-open"),t("#"+a).addClass("active"),t(this).closest(".chaty").find(".open-chaty-channel").html(c));else{var c=t(this).html();t("#"+a).addClass("is-active"),t(this).closest(".chaty").find(".chaty-widget").removeClass("chaty-open"),t(this).closest(".chaty").addClass("form-open"),t("#"+a).addClass("active"),c=t(this).closest(".chaty").find(".chaty-widget .chaty-cta-close").find("button").html(),t(this).closest(".chaty").find(".open-chaty-channel").html(c)}}}),t(document).on("click",".chaty-channel a.has-gae",function(a){var c=t(this).closest(".chaty-channel").data("channel");if(console.log("widgetChannel: "+c),c!==e&&""!=c&&null!=c&&(window.hasOwnProperty("gtag")&&gtag("event","chaty_"+c,{eventCategory:"chaty_"+c,event_action:"chaty_"+c,method:"chaty_"+c}),window.hasOwnProperty("ga"))){var i=window.ga.getAll()[0];i&&i.send("event","click",{eventCategory:"chaty_"+c,eventAction:"chaty_"+c,method:"chaty_"+c})}}),t(document).on("mouseover",".chaty-widget.has-single .chaty-channel a.has-on-hover[data-hover]",function(){t(this).find(".on-hover-text").html(t(this).data("hover"))}).on("mouseleave",".chaty-widget.has-single .chaty-channel a.has-on-hover[data-text]",function(){t(this).find(".on-hover-text").html(t(this).data("text"))}),t(document).on("submit",".whatsapp-chaty-form.has-form-gae",function(){var a=t(this).data("widget"),c=t("#Whatsapp-"+a+"-channel").data("channel");if(c!==e&&""!=c&&null!=c&&(window.hasOwnProperty("gtag")&&gtag("event","chaty_whatsapp_redirect",{eventCategory:"chaty_whatsapp_redirect",event_action:"chaty_whatsapp_redirect",method:"chaty_whatsapp_redirect"}),window.hasOwnProperty("ga"))){var i=window.ga.getAll()[0];i&&i.send("event","click",{eventCategory:"chaty_whatsapp_redirect",eventAction:"chaty_whatsapp_redirect",method:"chaty_whatsapp_redirect"})}}),t(document).on("click",".chaty-i-trigger:not(.single-channel)",function(){t(this).closest(".chaty").hasClass("form-open")?(t(this).closest(".chaty").removeClass("form-open"),t(this).closest(".chaty-widget:not(.has-single)").addClass("chaty-open")):t(this).closest(".chaty-widget").toggleClass("chaty-open"),t(".chaty-outer-forms.active").each(function(){t(this).removeClass("active");var e=t(this).data("widget");t("#chaty-widget-"+e).removeClass("form-open")}),t(this).closest(".chaty").find(".chaty-widget").hasClass("chaty-no-close-button")&&t(this).closest(".chaty").find(".chaty-widget:not(.has-single)").addClass("chaty-open")}),t(document).on("click",".chaty-i-trigger.single-channel .chaty-cta-close",function(){if(t(this).closest(".chaty").hasClass("form-open")){t(this).closest(".chaty").removeClass("form-open");var e=t(this).closest(".chaty").data("id");if(t("#chaty-form-"+e+"-Whatsapp").length&&t("#chaty-form-"+e+"-Whatsapp").hasClass("active")){var a=N(e,"c-Whatsapp");(!I(e)||0==e)&&a&&F(e,"c-Whatsapp")}}t(".chaty-outer-forms.active").each(function(){t(this).removeClass("active");var e=t(this).data("widget");t("#chaty-widget-"+e).removeClass("form-open")})}),s||t(document).on("mouseover","body:not(.chaty-in-mobile) .chaty.open-on-hover .chaty-i-trigger:not(.single-channel)",function(){t(this).closest(".chaty-widget").hasClass("chaty-open")||t(this).closest(".chaty-widget").hasClass("on-chaty-widget")||(t(this).closest(".chaty-widget").addClass("on-chaty-widget"),t(this).find(".chaty-cta-main").trigger("click"))}).on("mouseleave","body:not(.chaty-in-mobile) .chaty.open-on-hover .chaty-i-trigger:not(.single-channel)",function(){t(this).closest(".chaty-widget").hasClass("chaty-open")||t(this).closest(".chaty-widget").removeClass("on-chaty-widget")}),t(document).on("click",".chaty-channel.single a",function(){var e=t(this).closest(".chaty").data("id");t(this).closest(".chaty").hasClass("first_click")&&(F(e,"c-widget"),t(this).closest(".chaty-channel").removeClass("active")),$(e)}),t(document).on("click",".chaty-channel",function(e){var a,c,i,n=[],o=0,h=t(this).closest(".chaty").data("id");if(void 0!==h&&void 0!==(i=t("#chaty-widget-"+h).data("identifier"))){var r=t("#chaty-widget-"+h).data("user");if($(h),t(this).hasClass("chaty-cta-main")||t(this).hasClass("chaty-cta-close")){if(console.log("@!3123"),console.log(t("#chaty-form-"+h+"-Whatsapp").length),console.log(t("#chaty-form-"+h+"-Whatsapp").length&&t("#chaty-form-"+h+"-Whatsapp").hasClass("active")),t("#chaty-form-"+h+"-Whatsapp").length&&t("#chaty-form-"+h+"-Whatsapp").hasClass("active")&&(a=N(h,"c-Whatsapp"),(!I(h)||0==h)&&a&&F(h,"c-Whatsapp")),a=N(h,"c-widget"),t("#chaty-widget-"+h).find(".ch-pending-msg").remove(),a&&(F(h,"c-widget"),t(this).hasClass("chaty-cta-main"))){n=[],t("#chaty-widget-"+h).hasClass("chaty-has-chat-view")?t(".chaty-chat-view.chaty-chat-view-"+h+" .chaty-view-channels").find(".chaty-channel").each(function(){c=t(this).data("channel"),(a=N(h,"v-"+c))&&void 0!==c&&(F(h,"v-"+c),n.push(c))}):t("#chaty-widget-"+h+" .chaty-channel-list").find(".chaty-channel").each(function(){c=t(this).data("channel"),(a=N(h,"v-"+c))&&void 0!==c&&(F(h,"v-"+c),n.push(c))});var d=t("#chaty-widget-"+h).data("nonce");l||t.ajax({url:chaty_settings.ajax_url,data:{widgetId:h,userId:r,isMobile:s,channels:n,isSingle:0,nonce:d,action:"update_chaty_widget_click"},dataType:"json",method:"post"})}t("#chaty-widget-"+h).hasClass("first_click")&&(t("#chaty-widget-"+h+" .chaty-cta-main").removeClass("active"),t("#chaty-widget-"+h+" .chaty-cta-main").removeClass("chaty-tooltip"))}else if(t(this).hasClass("single")){t("#chaty-widget-"+h).find(".ch-pending-msg").remove(),a=N(h,"c-widget");var d=t("#chaty-widget-"+h).data("nonce");a&&(F(h,"c-widget"),o=0,n=[],c=t(this).data("channel"),(a=N(h,"c-"+c))&&(n.push(c),o=1),l||t.ajax({url:chaty_settings.ajax_url,data:{widgetId:h,userId:r,isMobile:s,channels:n,isSingle:o,nonce:d,action:"update_chaty_widget_click"},dataType:"json",method:"post"})),t("#chaty-widget-"+h).hasClass("first_click")&&(t("#chaty-widget-"+h+" .chaty-tooltip").removeClass("chaty-tooltip"),t("#chaty-widget-"+h+" .single-channel a").addClass("chaty-tooltip"))}else if(t(this).hasClass("chaty-channel")&&(c=t(this).data("channel"),a=N(h,"c-"+c))){F(h,"c-"+c);var d=t("#chaty-widget-"+h).data("nonce");l||t.ajax({url:chaty_settings.ajax_url,data:{widgetId:h,userId:r,isMobile:s,channel:c,nonce:d,action:"update_chaty_channel_click"},dataType:"json",method:"post"})}}}),t(document).on("submit",".chaty-ajax-contact-form",function(e){e.preventDefault();var a=0;if(t(this).find(".has-chaty-error").each(function(){t(this).removeClass("has-chaty-error")}),t(this).find(".chaty-error-msg").remove(),t(this).find(".chaty-ajax-error-message").remove(),t(this).find(".chaty-ajax-success-message").remove(),t(this).find(".is-required").each(function(){""==jQuery.trim(t(this).val())&&(a++,t(this).addClass("has-chaty-error"),t(this).hasClass("chaty-text-block")&&t(this).closest(".chaty-contact-input").find(".mce-tinymce").addClass("mce-error"))}),0==a){var c=t(this),i=c[0],n=new FormData(i);t(".chaty-submit-button").attr("disabled",!0),t("#chaty-submit-button-"+c.data("index")+" .chaty-loader").addClass("active"),jQuery.ajax({url:chaty_settings.ajax_url,enctype:"multipart/form-data",data:n,type:"post",dataType:"json",cache:!1,contentType:!1,processData:!1,success:function(e){if(""!=googleV3Token&&(googleV3Token="",refreshG3Token()),t(".chaty-ajax-error-message").remove(),t(".chaty-ajax-success-message").remove(),t(".chaty-submit-button").attr("disabled",!1),1==e.status)t("#chaty-submit-button-"+c.data("index")+" .chaty-loader").removeClass("active"),t(".chaty-contact-inputs").append("<div class='chaty-ajax-success-message'>"+e.message+"</div>"),t(".chaty-ajax-contact-form").find(".chaty-contact-input .mce-tinymce").removeClass("mce-error"),t(".field-name, .field-email, .field-message, .field-phone").val(""),t(".chaty-ajax-contact-form").find(".chaty-input-field").val(""),t(".chaty-ajax-contact-form").find(".chaty-textarea-field").val(""),t("#"+c.find(".chaty-text-block").attr("id")+"_ifr").contents().find("body").html(""),"yes"==e.redirect_action&&("yes"==e.link_in_new_tab?null==window.open(e.redirect_link,"_blank")&&window.open(e.redirect_link):window.location=e.redirect_link),"yes"==e.close_form_after&&setTimeout(function(){if(t(".chaty-outer-forms.active").length){var e=t(".chaty-outer-forms.active").data("widget");(!I(e)||0==e)&&t("#chaty-widget-"+e).length&&(t("#chaty-widget-"+e).removeClass("form-open"),t("body").removeClass("add-bg-blur-effect"),t(".chaty-outer-forms.active").removeClass("active"),t("#chaty-widget-"+e).find(".chaty-widget").hasClass("chaty-no-close-button")&&t("#chaty-widget-"+e).find(".chaty-widget:not(.has-single)").addClass("chaty-open"))}},1e3*parseInt(e.close_form_after_seconds));else if(1==e.error){if(e.errors.length)for(var a=0;a<e.errors.length;a++)t("."+e.errors[a].field).addClass("has-chaty-error"),t("."+e.errors[a].field).after("<span class='chaty-error-msg'>"+e.errors[a].message+"</span>");t(".chaty-loader").removeClass("active")}else 0==e.status&&(t(".chaty-contact-inputs").append("<div class='chaty-ajax-error-message'>"+e.message+"</div>"),t(".chaty-loader").removeClass("active"));t(".email_suggestion").html("")}})}else t(".has-chaty-error:first").focus();return!1}),jQuery(document).on("blur",".chaty-contact-form-box .field-email",function(e){var a=t(this).closest(".chaty-contact-form-box").data("widget");jQuery(this).mailcheck({suggested:function(t,e){jQuery("#email_suggestion"+a).html("Did you mean <b><i>"+e.full+"</b></i>?")},empty:function(t){jQuery("#email_suggestion"+a).html("")}})}),t(".chaty-contact-form-box .field-email").length&&t(".chaty-contact-form-box .field-email").emailautocomplete({domains:["protonmail.com","yahoo.com","gmail.com"]}),t(document).on("click",".email_suggestion i",function(){t(this).closest(".chaty-contact-form-box").find(".field-email").val(t(this).text()).focus(),jQuery(this).closest(".email_suggestion").html("")}),t(document).on("click",".chaty-widget.has-single .chaty-i-trigger .chaty-channel:not(.chaty-agent-button).Phone-channel",function(){window.location=t(this).find("a").prop("href")}),t(document).on("click",".chaty-widget.has-single .chaty-i-trigger .chaty-channel:not(.chaty-agent-button).Phone-channel a, .picmo__popupContainer",function(t){t.stopPropagation(),t.stopImmediatePropagation()}),t(document).on("click",".chaty-wp-emoji-input",function(){if(t(".picmo__popupContainer").length);else{let{createPopup:e}=window.picmoPopup,a=document.querySelector("#chaty_whatsapp_input"),c=e({},{referenceElement:a,triggerElement:a,position:"top",hideOnEmojiSelect:!1});c.toggle(),c.addEventListener("emoji:select",e=>{t(".chaty-whatsapp-input").val(t(".chaty-whatsapp-input").val()+e.emoji)})}}),t(document).on("click","#chaty_whatsapp_input",function(){t(".picmo__popupContainer").length&&t(".picmo__popupContainer").remove()})}),t(window).resize(function(){t(window).height()>t(window).width()?t("body").addClass("cht-portrait").removeClass("cht-landscape"):t("body").addClass("cht-landscape").removeClass("cht-portrait")})});var googleV3Token="";function onloadCallbackChatyV3(){var t=jQuery(".v3_site_key").val();t&&""==googleV3Token&&grecaptcha.ready(function(){grecaptcha.execute(t,{action:"contact_form"}).then(function(t){googleV3Token=t})})}function refreshG3Token(){if("function"==typeof grecaptcha||"object"==typeof grecaptcha){var t=jQuery(".v3_site_key").val();t&&""==googleV3Token&&grecaptcha.ready(function(){grecaptcha.execute(t,{action:"contact_form"}).then(function(t){googleV3Token=t})})}}function onloadChatyCallback(){jQuery(".v2_site_key").length&&""!=jQuery(".v2_site_key").val()&&jQuery(".front-google-captcha").length&&jQuery(".front-google-captcha:not(.loaded)").each(function(){var t=jQuery(this).attr("id");jQuery(this).addClass("loaded"),document.getElementById(t)&&grecaptcha.render(t,{sitekey:jQuery(".v2_site_key").val()})})};var InboundCustomizerOffParent=(function(){var _privateMethod=function(){};var myObject={init:function(){jQuery("#wp-admin-bar-customize a").text(customizer_off.launch_visual_editor);jQuery("#wp-admin-bar-customize a").attr('href',customizer_off.url)}};return myObject})();jQuery(document).ready(function($){InboundCustomizerOffParent.init()});!function(t){if(t(document).find(".js-ddLastViewedAjax").each(function(){var e="#"+t(this).attr("id"),a={action:"ajax_load_widget",widgetId:t(this).data("id"),postId:lvData.postID};jQuery.ajax({url:lvData.ajaxurl,type:"POST",data:a,success:function(a){t(e).replaceWith(a)}})}),lvData.postID){var a={action:"ajax_set_cookie_by_js",postId:lvData.postID,postType:lvData.postType};jQuery.ajax({url:lvData.ajaxurl,type:"POST",data:a,success:function(a){t.each(JSON.parse(a),function(a,e){var t=new Date(1e3*e.expire).toUTCString(),i="True"===e.secure?"Secure;":"";e.advanced_checked?document.cookie=e.name+"="+e.list+"; expires="+t+"; path="+e.path+"; SameSite="+e.sameSite+";"+i:document.cookie=e.name+"="+e.list+"; expires="+t+"; path="+e.path})}})}}(jQuery);var PUM,PUM_Accessibility,PUM_Analytics,pm_cookie,pm_cookie_json,pm_remove_cookie;!function(i){"use strict";void 0===i.fn.on&&(i.fn.on=function(e,o,t){return this.delegate(o,e,t)}),void 0===i.fn.off&&(i.fn.off=function(e,o,t){return this.undelegate(o,e,t)}),void 0===i.fn.bindFirst&&(i.fn.bindFirst=function(e,o){var t=i(this);t.unbind(e,o),t.bind(e,o),(t=(o=i._data(t[0]).events)[e]).unshift(t.pop()),o[e]=t}),void 0===i.fn.outerHtml&&(i.fn.outerHtml=function(){var e=i(this).clone();return i("<div/>").append(e).html()}),void 0===i.fn.isInViewport&&(i.fn.isInViewport=function(){var e=i(this).offset().top,o=e+i(this).outerHeight(),t=i(window).scrollTop(),n=t+i(window).height();return t<o&&e<n}),void 0===Date.now&&(Date.now=function(){return(new Date).getTime()})}(jQuery),function(a,r,s){"use strict";function n(e,o){function t(e,o,t){return o?e[o.slice(0,t?-1:o.length)]:e}return o.split(".").reduce(function(e,o){return o?o.split("[").reduce(t,e):e},e)}window.pum_vars=window.pum_vars||{default_theme:"0",home_url:"/",version:1.7,pm_dir_url:"",ajaxurl:"",restapi:!1,analytics_api:!1,rest_nonce:null,debug_mode:!1,disable_tracking:!0,message_position:"top",core_sub_forms_enabled:!0,popups:{}},window.pum_popups=window.pum_popups||{},window.pum_vars.popups=window.pum_popups,PUM={get:new function(){function e(e,o,t){"boolean"==typeof o&&(t=o,o=!1);var n=o?o.selector+" "+e:e;return s!==i[n]&&!t||(i[n]=o?o.find(e):jQuery(e)),i[n]}var i={};return e.elementCache=i,e},getPopup:function(e){var o;return o=e,(e=isNaN(o)||parseInt(Number(o))!==parseInt(o)||isNaN(parseInt(o,10))?"current"===e?PUM.get(".pum-overlay.pum-active:eq(0)",!0):"open"===e?PUM.get(".pum-overlay.pum-active",!0):"closed"===e?PUM.get(".pum-overlay:not(.pum-active)",!0):e instanceof jQuery?e:a(e):PUM.get("#pum-"+e)).hasClass("pum-overlay")?e:e.hasClass("popmake")||e.parents(".pum-overlay").length?e.parents(".pum-overlay"):a()},open:function(e,o){PUM.getPopup(e).popmake("open",o)},close:function(e,o){PUM.getPopup(e).popmake("close",o)},preventOpen:function(e){PUM.getPopup(e).addClass("preventOpen")},getSettings:function(e){return PUM.getPopup(e).popmake("getSettings")},getSetting:function(e,o,t){o=n(PUM.getSettings(e),o);return void 0!==o?o:t!==s?t:null},checkConditions:function(e){return PUM.getPopup(e).popmake("checkConditions")},getCookie:function(e){return a.pm_cookie(e)},getJSONCookie:function(e){return a.pm_cookie_json(e)},setCookie:function(e,o){PUM.getPopup(e).popmake("setCookie",jQuery.extend({name:"pum-"+PUM.getSetting(e,"id"),expires:"+30 days"},o))},clearCookie:function(e,o){a.pm_remove_cookie(e),"function"==typeof o&&o()},clearCookies:function(e,o){var t,n=PUM.getPopup(e).popmake("getSettings").cookies;if(n!==s&&n.length)for(t=0;n.length>t;t+=1)a.pm_remove_cookie(n[t].settings.name);"function"==typeof o&&o()},getClickTriggerSelector:function(e,o){var t=PUM.getPopup(e),e=PUM.getSettings(e),e=[".popmake-"+e.id,".popmake-"+decodeURIComponent(e.slug),'a[href$="#popmake-'+e.id+'"]'];return o.extra_selectors&&""!==o.extra_selectors&&e.push(o.extra_selectors),(e=pum.hooks.applyFilters("pum.trigger.click_open.selectors",e,o,t)).join(", ")},disableClickTriggers:function(e,o){if(e!==s)if(o!==s){var t=PUM.getClickTriggerSelector(e,o);a(t).removeClass("pum-trigger"),a(r).off("click.pumTrigger click.popmakeOpen",t)}else{var n=PUM.getSetting(e,"triggers",[]);if(n.length)for(var i=0;n.length>i;i++)-1!==pum.hooks.applyFilters("pum.disableClickTriggers.clickTriggerTypes",["click_open"]).indexOf(n[i].type)&&(t=PUM.getClickTriggerSelector(e,n[i].settings),a(t).removeClass("pum-trigger"),a(r).off("click.pumTrigger click.popmakeOpen",t))}},actions:{stopIframeVideosPlaying:function(){var e=PUM.getPopup(this),o=e.popmake("getContainer");e.hasClass("pum-has-videos")||(o.find("iframe").filter('[src*="youtube"],[src*="vimeo"]').each(function(){var e=a(this),o=e.attr("src"),t=o.replace("autoplay=1","1=1");t!==o&&(o=t),e.prop("src",o)}),o.find("video").each(function(){this.pause()}))}}},a.fn.popmake=function(e){return a.fn.popmake.methods[e]?(a(r).trigger("pumMethodCall",arguments),a.fn.popmake.methods[e].apply(this,Array.prototype.slice.call(arguments,1))):"object"!=typeof e&&e?void(window.console&&console.warn("Method "+e+" does not exist on $.fn.popmake")):a.fn.popmake.methods.init.apply(this,arguments)},a.fn.popmake.methods={init:function(){return this.each(function(){var e,o=PUM.getPopup(this),t=o.popmake("getSettings");return t.theme_id<=0&&(t.theme_id=pum_vars.default_theme),t.disable_reposition!==s&&t.disable_reposition||a(window).on("resize",function(){(o.hasClass("pum-active")||o.find(".popmake.active").length)&&a.fn.popmake.utilities.throttle(setTimeout(function(){o.popmake("reposition")},25),500,!1)}),o.find(".pum-container").data("popmake",t),o.data("popmake",t).trigger("pumInit"),t.open_sound&&"none"!==t.open_sound&&((e="custom"!==t.open_sound?new Audio(pum_vars.pm_dir_url+"assets/sounds/"+t.open_sound):new Audio(t.custom_sound)).addEventListener("canplaythrough",function(){o.data("popAudio",e)}),e.addEventListener("error",function(){console.warn("Error occurred when trying to load Popup opening sound.")}),e.load()),this})},getOverlay:function(){return PUM.getPopup(this)},getContainer:function(){return PUM.getPopup(this).find(".pum-container")},getTitle:function(){return PUM.getPopup(this).find(".pum-title")||null},getContent:function(){return PUM.getPopup(this).find(".pum-content")||null},getClose:function(){return PUM.getPopup(this).find(".pum-content + .pum-close")||null},getSettings:function(){var e=PUM.getPopup(this);return a.extend(!0,{},a.fn.popmake.defaults,e.data("popmake")||{},"object"==typeof pum_popups&&void 0!==pum_popups[e.attr("id")]?pum_popups[e.attr("id")]:{})},state:function(e){var o=PUM.getPopup(this);if(s!==e)switch(e){case"isOpen":return o.hasClass("pum-open")||o.popmake("getContainer").hasClass("active");case"isClosed":return!o.hasClass("pum-open")&&!o.popmake("getContainer").hasClass("active")}},open:function(e){var o=PUM.getPopup(this),t=o.popmake("getContainer"),n=o.popmake("getClose"),i=o.popmake("getSettings"),r=a("html");return o.trigger("pumBeforeOpen"),o.hasClass("preventOpen")||t.hasClass("preventOpen")?(console.log("prevented"),o.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented")):(i.stackable||o.popmake("close_all"),o.addClass("pum-active"),0<i.close_button_delay&&n.fadeOut(0),r.addClass("pum-open"),i.overlay_disabled?r.addClass("pum-open-overlay-disabled"):r.addClass("pum-open-overlay"),i.position_fixed?r.addClass("pum-open-fixed"):r.addClass("pum-open-scrollable"),o.popmake("setup_close").popmake("reposition").popmake("animate",i.animation_type,function(){0<i.close_button_delay&&setTimeout(function(){n.fadeIn()},i.close_button_delay),o.trigger("pumAfterOpen"),a(window).trigger("resize"),a.fn.popmake.last_open_popup=o,e!==s&&e()}),void 0!==o.data("popAudio")&&o.data("popAudio").play().catch(function(e){console.warn("Sound was not able to play when popup opened. Reason: "+e)})),this},setup_close:function(){var t=PUM.getPopup(this),e=t.popmake("getClose"),n=t.popmake("getSettings");return(e=e.add(a(".popmake-close, .pum-close",t).not(e))).off("click.pum").on("click.pum",function(e){var o=a(this);o.hasClass("pum-do-default")||o.data("do-default")!==s&&o.data("do-default")||e.preventDefault(),a.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(n.close_on_esc_press||n.close_on_f4_press)&&a(window).off("keyup.popmake").on("keyup.popmake",function(e){27===e.keyCode&&n.close_on_esc_press&&(a.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===e.keyCode&&n.close_on_f4_press&&(a.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),n.close_on_overlay_click&&(t.on("pumAfterOpen",function(){a(r).on("click.pumCloseOverlay",function(e){a(e.target).closest(".pum-container").length||(a.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close"))})}),t.on("pumAfterClose",function(){a(r).off("click.pumCloseOverlay")})),n.close_on_form_submission&&PUM.hooks.addAction("pum.integration.form.success",function(e,o){o.popup&&o.popup[0]===t[0]&&setTimeout(function(){a.fn.popmake.last_close_trigger="Form Submission",t.popmake("close")},n.close_on_form_submission_delay||0)}),t.trigger("pumSetupClose"),this},close:function(n){return this.each(function(){var e=PUM.getPopup(this),o=e.popmake("getContainer"),t=(t=e.popmake("getClose")).add(a(".popmake-close, .pum-close",e).not(t));return e.trigger("pumBeforeClose"),e.hasClass("preventClose")||o.hasClass("preventClose")?e.removeClass("preventClose").trigger("pumClosePrevented"):o.fadeOut("fast",function(){e.is(":visible")&&e.fadeOut("fast"),a(window).off("keyup.popmake"),e.off("click.popmake"),t.off("click.popmake"),1===a(".pum-active").length&&a("html").removeClass("pum-open").removeClass("pum-open-scrollable").removeClass("pum-open-overlay").removeClass("pum-open-overlay-disabled").removeClass("pum-open-fixed"),e.removeClass("pum-active").trigger("pumAfterClose"),n!==s&&n()}),this})},close_all:function(){return a(".pum-active").popmake("close"),this},reposition:function(e){var o=PUM.getPopup(this).trigger("pumBeforeReposition"),t=o.popmake("getContainer"),n=o.popmake("getSettings"),i=n.location,r={my:"",at:"",of:window,collision:"none",using:"function"==typeof e?e:a.fn.popmake.callbacks.reposition_using},e={overlay:null,container:null},s=null;try{s=a(a.fn.popmake.last_open_trigger)}catch(e){s=a()}return n.position_from_trigger&&s.length?(r.of=s,0<=i.indexOf("left")&&(r.my+=" right",r.at+=" left"+(0!==n.position_left?"-"+n.position_left:"")),0<=i.indexOf("right")&&(r.my+=" left",r.at+=" right"+(0!==n.position_right?"+"+n.position_right:"")),0<=i.indexOf("center")&&(r.my="center"===i?"center":r.my+" center",r.at="center"===i?"center":r.at+" center"),0<=i.indexOf("top")&&(r.my+=" bottom",r.at+=" top"+(0!==n.position_top?"-"+n.position_top:"")),0<=i.indexOf("bottom")&&(r.my+=" top",r.at+=" bottom"+(0!==n.position_bottom?"+"+n.position_bottom:""))):(0<=i.indexOf("left")&&(r.my+=" left"+(0!==n.position_left?"+"+n.position_left:""),r.at+=" left"),0<=i.indexOf("right")&&(r.my+=" right"+(0!==n.position_right?"-"+n.position_right:""),r.at+=" right"),0<=i.indexOf("center")&&(r.my="center"===i?"center":r.my+" center",r.at="center"===i?"center":r.at+" center"),0<=i.indexOf("top")&&(r.my+=" top"+(0!==n.position_top?"+"+(a("body").hasClass("admin-bar")?parseInt(n.position_top,10)+32:n.position_top):""),r.at+=" top"),0<=i.indexOf("bottom")&&(r.my+=" bottom"+(0!==n.position_bottom?"-"+n.position_bottom:""),r.at+=" bottom")),r.my=a.trim(r.my),r.at=a.trim(r.at),o.is(":hidden")&&(e.overlay=o.css("opacity"),o.css({opacity:0}).show(0)),t.is(":hidden")&&(e.container=t.css("opacity"),t.css({opacity:0}).show(0)),n.position_fixed&&t.addClass("fixed"),"custom"===n.size?t.css({width:n.custom_width,height:n.custom_height_auto?"auto":n.custom_height}):"auto"!==n.size&&t.addClass("responsive").css({minWidth:""!==n.responsive_min_width?n.responsive_min_width:"auto",maxWidth:""!==n.responsive_max_width?n.responsive_max_width:"auto"}),o.trigger("pumAfterReposition"),t.addClass("custom-position").position(r).trigger("popmakeAfterReposition"),"center"===i&&t[0].offsetTop<0&&t.css({top:a("body").hasClass("admin-bar")?42:10}),e.overlay&&o.css({opacity:e.overlay}).hide(0),e.container&&t.css({opacity:e.container}).hide(0),this},animation_origin:function(e){var o=PUM.getPopup(this).popmake("getContainer"),t={my:"",at:""};switch(e){case"top":t={my:"left+"+o.offset().left+" bottom-100",at:"left top"};break;case"bottom":t={my:"left+"+o.offset().left+" top+100",at:"left bottom"};break;case"left":t={my:"right top+"+o.offset().top,at:"left top"};break;case"right":t={my:"left top+"+o.offset().top,at:"right top"};break;default:0<=e.indexOf("left")&&(t={my:t.my+" right",at:t.at+" left"}),0<=e.indexOf("right")&&(t={my:t.my+" left",at:t.at+" right"}),0<=e.indexOf("center")&&(t={my:t.my+" center",at:t.at+" center"}),0<=e.indexOf("top")&&(t={my:t.my+" bottom-100",at:t.at+" top"}),(t=0<=e.indexOf("bottom")?{my:t.my+" top+100",at:t.at+" bottom"}:t).my=a.trim(t.my),t.at=a.trim(t.at)}return t.of=window,t.collision="none",t}}}(jQuery,document),function(e){"use strict";e.fn.popmake.version=1.8,e.fn.popmake.last_open_popup=null,window.ajaxurl=window.pum_vars.ajaxurl,window.PUM.init=function(){console.log("init popups ✔"),e(void 0).trigger("pumBeforeInit"),e(".pum").popmake(),e(void 0).trigger("pumInitialized"),"object"==typeof pum_vars.form_success&&(pum_vars.form_success=e.extend({popup_id:null,settings:{}}),PUM.forms.success(pum_vars.form_success.popup_id,pum_vars.form_success.settings)),PUM.integrations.init()},e(function(){var e=PUM.hooks.applyFilters("pum.initHandler",PUM.init),o=PUM.hooks.applyFilters("pum.initPromises",[]);Promise.all(o).then(e)}),e(".pum").on("pumInit",function(){var e=PUM.getPopup(this),o=PUM.getSetting(e,"id"),e=e.find("form");e.length&&e.append('<input type="hidden" name="pum_form_popup_id" value="'+o+'" />')}).on("pumAfterClose",window.PUM.actions.stopIframeVideosPlaying)}(jQuery),function(i,t){"use strict";var n,r,s="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",e=".pum:not(.pum-accessibility-disabled)";PUM_Accessibility={forceFocus:function(e){r&&r.length&&!r[0].contains(e.target)&&(e.stopPropagation(),PUM_Accessibility.setFocusToFirstItem())},trapTabKey:function(e){var o,t,n;9===e.keyCode&&(o=r.find(".pum-container *").filter(s).filter(":visible"),n=i(":focus"),t=o.length,n=o.index(n),e.shiftKey?0===n&&(o.get(t-1).focus(),e.preventDefault()):n===t-1&&(o.get(0).focus(),e.preventDefault()))},setFocusToFirstItem:function(){r.find(".pum-container *").filter(s).filter(":visible").first().focus()},initiateFocusLock:function(){var e=PUM.getPopup(this),o=i(":focus");e.has(o).length||(n=o),r=e.on("keydown.pum_accessibility",PUM_Accessibility.trapTabKey),i(t).one("focusin.pum_accessibility",PUM_Accessibility.forceFocus),PUM_Accessibility.setFocusToFirstItem()}},i(t).on("pumInit",e,function(){PUM.getPopup(this).find("[tabindex]").each(function(){var e=i(this);e.data("tabindex",e.attr("tabindex")).prop("tabindex","0")})}).on("pumBeforeOpen",e,function(){}).on("pumAfterOpen",e,PUM_Accessibility.initiateFocusLock).on("pumAfterOpen",e,function(){var e=PUM.getPopup(this);r=e.attr("aria-modal","true")}).on("pumBeforeClose",e,function(){}).on("pumAfterClose",e,function(){PUM.getPopup(this).off("keydown.pum_accessibility").attr("aria-modal","false"),void 0!==n&&n.length&&n.focus(),r=null,i(t).off("focusin.pum_accessibility")}).on("pumSetupClose",e,function(){}).on("pumOpenPrevented",e,function(){}).on("pumClosePrevented",e,function(){}).on("pumBeforeReposition",e,function(){})}(jQuery,document),function(i){"use strict";i.fn.popmake.last_open_trigger=null,i.fn.popmake.last_close_trigger=null,i.fn.popmake.conversion_trigger=null;var r=!(void 0===pum_vars.analytics_api||!pum_vars.analytics_api);PUM_Analytics={beacon:function(e,o){var t=new Image,n=r?pum_vars.analytics_api:pum_vars.ajaxurl,o={route:pum.hooks.applyFilters("pum.analyticsBeaconRoute","/"+pum_vars.analytics_route+"/"),data:pum.hooks.applyFilters("pum.AnalyticsBeaconData",i.extend(!0,{event:"open",pid:null,_cache:+new Date},e)),callback:"function"==typeof o?o:function(){}};r?n+=o.route:o.data.action="pum_analytics",n&&(i(t).on("error success load done",o.callback),t.src=n+"?"+i.param(o.data))}},void 0!==pum_vars.disable_tracking&&pum_vars.disable_tracking||void 0!==pum_vars.disable_core_tracking&&pum_vars.disable_core_tracking||(i(document).on("pumAfterOpen.core_analytics",".pum",function(){var e=PUM.getPopup(this),e={pid:parseInt(e.popmake("getSettings").id,10)||null};0<e.pid&&!i("body").hasClass("single-popup")&&PUM_Analytics.beacon(e)}),i(function(){PUM.hooks.addAction("pum.integration.form.success",function(e,o){!1!==o.ajax&&(0===o.popup.length||0<(o={pid:parseInt(o.popup.popmake("getSettings").id,10)||null,event:"conversion"}).pid&&!i("body").hasClass("single-popup")&&PUM_Analytics.beacon(o))})}))}(jQuery),function(n,r){"use strict";function s(e){var o=e.popmake("getContainer"),t={display:"",opacity:""};e.css(t),o.css(t)}function a(e){return e.overlay_disabled?0:e.animation_speed/2}function p(e){return e.overlay_disabled?parseInt(e.animation_speed):e.animation_speed/2}n.fn.popmake.methods.animate_overlay=function(e,o,t){return PUM.getPopup(this).popmake("getSettings").overlay_disabled?n.fn.popmake.overlay_animations.none.apply(this,[o,t]):n.fn.popmake.overlay_animations[e]?n.fn.popmake.overlay_animations[e].apply(this,[o,t]):(window.console&&console.warn("Animation style "+e+" does not exist."),this)},n.fn.popmake.methods.animate=function(e){return n.fn.popmake.animations[e]?n.fn.popmake.animations[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Animation style "+e+" does not exist."),this)},n.fn.popmake.animations={none:function(e){var o=PUM.getPopup(this);return o.popmake("getContainer").css({opacity:1,display:"block"}),o.popmake("animate_overlay","none",0,function(){e!==r&&e()}),this},slide:function(o){var e=PUM.getPopup(this),t=e.popmake("getContainer"),n=e.popmake("getSettings"),i=e.popmake("animation_origin",n.animation_origin);return s(e),t.position(i),e.popmake("animate_overlay","fade",a(n),function(){t.popmake("reposition",function(e){t.animate(e,p(n),"swing",function(){o!==r&&o()})})}),this},fade:function(e){var o=PUM.getPopup(this),t=o.popmake("getContainer"),n=o.popmake("getSettings");return s(o),o.css({opacity:0,display:"block"}),t.css({opacity:0,display:"block"}),o.popmake("animate_overlay","fade",a(n),function(){t.animate({opacity:1},p(n),"swing",function(){e!==r&&e()})}),this},fadeAndSlide:function(o){var e=PUM.getPopup(this),t=e.popmake("getContainer"),n=e.popmake("getSettings"),i=e.popmake("animation_origin",n.animation_origin);return s(e),e.css({display:"block",opacity:0}),t.css({display:"block",opacity:0}),t.position(i),e.popmake("animate_overlay","fade",a(n),function(){t.popmake("reposition",function(e){e.opacity=1,t.animate(e,p(n),"swing",function(){o!==r&&o()})})}),this},grow:function(e){return n.fn.popmake.animations.fade.apply(this,arguments)},growAndSlide:function(e){return n.fn.popmake.animations.fadeAndSlide.apply(this,arguments)}},n.fn.popmake.overlay_animations={none:function(e,o){PUM.getPopup(this).css({opacity:1,display:"block"}),"function"==typeof o&&o()},fade:function(e,o){PUM.getPopup(this).css({opacity:0,display:"block"}).animate({opacity:1},e,"swing",o)},slide:function(e,o){PUM.getPopup(this).slideDown(e,o)}}}(jQuery,void document),function(e,o){"use strict";e(o).on("pumInit",".pum",function(){e(this).popmake("getContainer").trigger("popmakeInit")}).on("pumBeforeOpen",".pum",function(){e(this).popmake("getContainer").addClass("active").trigger("popmakeBeforeOpen")}).on("pumAfterOpen",".pum",function(){e(this).popmake("getContainer").trigger("popmakeAfterOpen")}).on("pumBeforeClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeClose")}).on("pumAfterClose",".pum",function(){e(this).popmake("getContainer").removeClass("active").trigger("popmakeAfterClose")}).on("pumSetupClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeSetupClose")}).on("pumOpenPrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventOpen").removeClass("active")}).on("pumClosePrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventClose")}).on("pumBeforeReposition",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeReposition")})}(jQuery,document),function(o){"use strict";o.fn.popmake.callbacks={reposition_using:function(e){o(this).css(e)}}}(jQuery,document),function(p){"use strict";function u(){return e=void 0===e?"undefined"!=typeof MobileDetect?new MobileDetect(window.navigator.userAgent):{phone:function(){return!1},tablet:function(){return!1}}:e}var e;p.extend(p.fn.popmake.methods,{checkConditions:function(){var e,o,t,n,i,r=PUM.getPopup(this),s=r.popmake("getSettings"),a=!0;if(s.disable_on_mobile&&u().phone())return!1;if(s.disable_on_tablet&&u().tablet())return!1;if(s.conditions.length)for(o=0;s.conditions.length>o;o++){for(n=s.conditions[o],e=!1,t=0;n.length>t;t++)if("boolean"!=typeof n[t]){if((!(i=p.extend({},{not_operand:!1},n[t])).not_operand&&r.popmake("checkCondition",i)||i.not_operand&&!r.popmake("checkCondition",i))&&(e=!0),p(this).trigger("pumCheckingCondition",[e,i]),e)break}else if(n[t]){e=!0;break}e||(a=!1)}return a},checkCondition:function(e){var o=e.target||null;e.settings;return o?p.fn.popmake.conditions[o]?p.fn.popmake.conditions[o].apply(this,[e]):window.console?(console.warn("Condition "+o+" does not exist."),!0):void 0:(console.warn("Condition type not set."),!1)}}),p.fn.popmake.conditions=p.fn.popmake.conditions||{}}(jQuery,document),function(l){"use strict";function f(e,o,t){var n,i=new Date;if("undefined"!=typeof document){if(1<arguments.length){switch(typeof(t=l.extend({path:pum_vars.home_url},f.defaults,t)).expires){case"number":i.setMilliseconds(i.getMilliseconds()+864e5*t.expires),t.expires=i;break;case"string":i.setTime(1e3*l.fn.popmake.utilities.strtotime("+"+t.expires)),t.expires=i}try{n=JSON.stringify(o),/^[\{\[]/.test(n)&&(o=n)}catch(e){}return o=d.write?d.write(o,e):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[e,"=",o,t.expires?"; expires="+t.expires.toUTCString():"",t.path?"; path="+t.path:"",t.domain?"; domain="+t.domain:"",t.secure?"; secure":""].join("")}e||(n={});for(var r=document.cookie?document.cookie.split("; "):[],s=/(%[0-9A-Z]{2})+/g,a=0;a<r.length;a++){var p=r[a].split("=");'"'===(c=p.slice(1).join("=")).charAt(0)&&(c=c.slice(1,-1));try{var u=p[0].replace(s,decodeURIComponent),c=d.read?d.read(c,u):d(c,u)||c.replace(s,decodeURIComponent);if(this.json)try{c=JSON.parse(c)}catch(e){}if(e===u){n=c;break}e||(n[u]=c)}catch(e){}}return n}}var d;l.extend(l.fn.popmake,{cookie:(void 0===d&&(d=function(){}),(f.set=f).get=function(e){return f.call(f,e)},f.getJSON=function(){return f.apply({json:!0},[].slice.call(arguments))},f.defaults={domain:pum_vars.cookie_domain||""},f.remove=function(e,o){f(e,"",l.extend({},o,{expires:-1,path:""})),f(e,"",l.extend({},o,{expires:-1}))},f.process=function(e,o,t,n){return f.apply(f,3<arguments.length&&"object"!=typeof t&&void 0!==o?[e,o,{expires:t,path:n}]:[].slice.call(arguments,[0,2]))},f.withConverter=l.fn.popmake.cookie,f)}),pm_cookie=l.pm_cookie=l.fn.popmake.cookie.process,pm_cookie_json=l.pm_cookie_json=l.fn.popmake.cookie.getJSON,pm_remove_cookie=l.pm_remove_cookie=l.fn.popmake.cookie.remove}(jQuery),function(i,e,n){"use strict";function r(e){i.pm_cookie(e.name,!0,e.session?null:e.time,e.path?pum_vars.home_url||"/":null),pum.hooks.doAction("popmake.setCookie",e)}i.extend(i.fn.popmake.methods,{addCookie:function(e){return pum.hooks.doAction("popmake.addCookie",arguments),i.fn.popmake.cookies[e]?i.fn.popmake.cookies[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Cookie type "+e+" does not exist."),this)},setCookie:r,checkCookies:function(e){var o,t=!1;if(e.cookie_name===n||null===e.cookie_name||""===e.cookie_name)return!1;switch(typeof e.cookie_name){case"object":case"array":for(o=0;e.cookie_name.length>o;o+=1)i.pm_cookie(e.cookie_name[o])!==n&&(t=!0);break;case"string":i.pm_cookie(e.cookie_name)!==n&&(t=!0)}return pum.hooks.doAction("popmake.checkCookies",e,t),t}}),i.fn.popmake.cookies=i.fn.popmake.cookies||{},i.extend(i.fn.popmake.cookies,{on_popup_open:function(e){var o=PUM.getPopup(this);o.on("pumAfterOpen",function(){o.popmake("setCookie",e)})},on_popup_close:function(e){var o=PUM.getPopup(this);o.on("pumBeforeClose",function(){o.popmake("setCookie",e)})},form_submission:function(t){var n=PUM.getPopup(this);t=i.extend({form:"",formInstanceId:"",only_in_popup:!1},t),PUM.hooks.addAction("pum.integration.form.success",function(e,o){t.form.length&&PUM.integrations.checkFormKeyMatches(t.form,t.formInstanceId,o)&&(t.only_in_popup&&o.popup.length&&o.popup.is(n)||!t.only_in_popup)&&n.popmake("setCookie",t)})},manual:function(e){var o=PUM.getPopup(this);o.on("pumSetCookie",function(){o.popmake("setCookie",e)})},form_success:function(e){var o=PUM.getPopup(this);o.on("pumFormSuccess",function(){o.popmake("setCookie",e)})},pum_sub_form_success:function(e){var o=PUM.getPopup(this);o.find("form.pum-sub-form").on("success",function(){o.popmake("setCookie",e)})},pum_sub_form_already_subscribed:function(e){var o=PUM.getPopup(this);o.find("form.pum-sub-form").on("success",function(){o.popmake("setCookie",e)})},ninja_form_success:function(e){return i.fn.popmake.cookies.form_success.apply(this,arguments)},cf7_form_success:function(e){return i.fn.popmake.cookies.form_success.apply(this,arguments)},gforms_form_success:function(e){return i.fn.popmake.cookies.form_success.apply(this,arguments)}}),i(e).on("pumInit",".pum",function(){var e,o,t=PUM.getPopup(this),n=t.popmake("getSettings").cookies||[];if(n.length)for(o=0;o<n.length;o+=1)e=n[o],t.popmake("addCookie",e.event,e.settings)}),i(function(){var e=i(".pum-cookie");e.each(function(){var o=i(this),t=e.index(o),n=o.data("cookie-args");!o.data("only-onscreen")||o.isInViewport()&&o.is(":visible")?r(n):i(window).on("scroll.pum-cookie-"+t,i.fn.popmake.utilities.throttle(function(e){o.isInViewport()&&o.is(":visible")&&(r(n),i(window).off("scroll.pum-cookie-"+t))},100))})})}(jQuery,document);var pum_debug,pum_debug_mode=!1;!function(s,e){var a,o,p;e=window.pum_vars||{debug_mode:!1},(pum_debug_mode=!(pum_debug_mode=void 0!==e.debug_mode&&e.debug_mode)&&-1!==window.location.href.indexOf("pum_debug")?!0:pum_debug_mode)&&(o=a=!1,p=window.pum_debug_vars||{debug_mode_enabled:"Popup Maker: Debug Mode Enabled",debug_started_at:"Debug started at:",debug_more_info:"For more information on how to use this information visit https://docs.wppopupmaker.com/?utm_medium=js-debug-info&utm_campaign=contextual-help&utm_source=browser-console&utm_content=more-info",global_info:"Global Information",localized_vars:"Localized variables",popups_initializing:"Popups Initializing",popups_initialized:"Popups Initialized",single_popup_label:"Popup: #",theme_id:"Theme ID: ",label_method_call:"Method Call:",label_method_args:"Method Arguments:",label_popup_settings:"Settings",label_triggers:"Triggers",label_cookies:"Cookies",label_delay:"Delay:",label_conditions:"Conditions",label_cookie:"Cookie:",label_settings:"Settings:",label_selector:"Selector:",label_mobile_disabled:"Mobile Disabled:",label_tablet_disabled:"Tablet Disabled:",label_event:"Event: %s",triggers:[],cookies:[]},pum_debug={odump:function(e){return s.extend({},e)},logo:function(){console.log(" -------------------------------------------------------------\n|  ____                           __  __       _              |\n| |  _ \\ ___  _ __  _   _ _ __   |  \\/  | __ _| | _____ _ __  |\n| | |_) / _ \\| '_ \\| | | | '_ \\  | |\\/| |/ _` | |/ / _ \\ '__| |\n| |  __/ (_) | |_) | |_| | |_) | | |  | | (_| |   <  __/ |    |\n| |_|   \\___/| .__/ \\__,_| .__/  |_|  |_|\\__,_|_|\\_\\___|_|    |\n|            |_|         |_|                                  |\n -------------------------------------------------------------")},initialize:function(){a=!0,pum_debug.logo(),console.debug(p.debug_mode_enabled),console.log(p.debug_started_at,new Date),console.info(p.debug_more_info),pum_debug.divider(p.global_info),console.groupCollapsed(p.localized_vars),console.log("pum_vars:",pum_debug.odump(e)),s(document).trigger("pum_debug_initialize_localized_vars"),console.groupEnd(),s(document).trigger("pum_debug_initialize")},popup_event_header:function(e){e=e.popmake("getSettings");o!==e.id&&(o=e.id,pum_debug.divider(p.single_popup_label+e.id+" - "+e.slug))},divider:function(e){try{var o,t=0,n=" "+new Array(63).join("-")+" ",i=e;"string"==typeof e?(o=62-(i=62<e.length?i.substring(0,62):i).length,(t={left:Math.floor(o/2),right:Math.floor(o/2)}).left+t.right===o-1&&t.right++,t.left=new Array(t.left+1).join(" "),t.right=new Array(t.right+1).join(" "),console.log(n+"\n|"+t.left+i+t.right+"|\n"+n)):console.log(n)}catch(e){console.error("Got a '"+e+"' when printing out the heading divider to the console.")}},click_trigger:function(e,o){var t=e.popmake("getSettings"),t=[".popmake-"+t.id,".popmake-"+decodeURIComponent(t.slug),'a[href$="#popmake-'+t.id+'"]'];o.extra_selectors&&""!==o.extra_selectors&&t.push(o.extra_selectors),t=(t=pum.hooks.applyFilters("pum.trigger.click_open.selectors",t,o,e)).join(", "),console.log(p.label_selector,t)},trigger:function(e,o){if("string"==typeof p.triggers[o.type]){switch(console.groupCollapsed(p.triggers[o.type]),o.type){case"auto_open":console.log(p.label_delay,o.settings.delay),console.log(p.label_cookie,o.settings.cookie_name);break;case"click_open":pum_debug.click_trigger(e,o.settings),console.log(p.label_cookie,o.settings.cookie_name)}s(document).trigger("pum_debug_render_trigger",e,o),console.groupEnd()}},cookie:function(e,o){if("string"==typeof p.cookies[o.event]){switch(console.groupCollapsed(p.cookies[o.event]),o.event){case"on_popup_open":case"on_popup_close":case"manual":case"ninja_form_success":console.log(p.label_cookie,pum_debug.odump(o.settings))}s(document).trigger("pum_debug_render_trigger",e,o),console.groupEnd()}}},s(document).on("pumInit",".pum",function(){var e=PUM.getPopup(s(this)),o=e.popmake("getSettings"),t=o.triggers||[],n=o.cookies||[],i=o.conditions||[],r=0;if(a||(pum_debug.initialize(),pum_debug.divider(p.popups_initializing)),console.groupCollapsed(p.single_popup_label+o.id+" - "+o.slug),console.log(p.theme_id,o.theme_id),t.length){for(console.groupCollapsed(p.label_triggers),r=0;r<t.length;r++)pum_debug.trigger(e,t[r]);console.groupEnd()}if(n.length){for(console.groupCollapsed(p.label_cookies),r=0;r<n.length;r+=1)pum_debug.cookie(e,n[r]);console.groupEnd()}i.length&&(console.groupCollapsed(p.label_conditions),console.log(i),console.groupEnd()),console.groupCollapsed(p.label_popup_settings),console.log(p.label_mobile_disabled,!1!==o.disable_on_mobile),console.log(p.label_tablet_disabled,!1!==o.disable_on_tablet),console.log(p.label_display_settings,pum_debug.odump(o)),e.trigger("pum_debug_popup_settings"),console.groupEnd(),console.groupEnd()}).on("pumBeforeOpen",".pum",function(){var e=PUM.getPopup(s(this)),o=s.fn.popmake.last_open_trigger;pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeOpen"));try{o=(o=s(s.fn.popmake.last_open_trigger)).length?o:s.fn.popmake.last_open_trigger.toString()}catch(e){o=""}finally{console.log(p.label_triggers,[o])}console.groupEnd()}).on("pumOpenPrevented",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumOpenPrevented")),console.groupEnd()}).on("pumAfterOpen",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterOpen")),console.groupEnd()}).on("pumSetupClose",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumSetupClose")),console.groupEnd()}).on("pumClosePrevented",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumClosePrevented")),console.groupEnd()}).on("pumBeforeClose",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeClose")),console.groupEnd()}).on("pumAfterClose",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterClose")),console.groupEnd()}).on("pumBeforeReposition",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeReposition")),console.groupEnd()}).on("pumAfterReposition",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterReposition")),console.groupEnd()}).on("pumCheckingCondition",".pum",function(e,o,t){var n=PUM.getPopup(s(this));pum_debug.popup_event_header(n),console.groupCollapsed(p.label_event.replace("%s","pumCheckingCondition")),console.log((t.not_operand?"(!) ":"")+t.target+": "+o,t),console.groupEnd()}))}(jQuery),function(e){"use strict";e.fn.popmake.defaults={id:null,slug:"",theme_id:null,cookies:[],triggers:[],conditions:[],mobile_disabled:null,tablet_disabled:null,custom_height_auto:!1,scrollable_content:!1,position_from_trigger:!1,position_fixed:!1,overlay_disabled:!1,stackable:!1,disable_reposition:!1,close_on_overlay_click:!1,close_on_form_submission:!1,close_on_form_submission_delay:0,close_on_esc_press:!1,close_on_f4_press:!1,disable_on_mobile:!1,disable_on_tablet:!1,size:"medium",responsive_min_width:"0%",responsive_max_width:"100%",custom_width:"640px",custom_height:"380px",animation_type:"fade",animation_speed:"350",animation_origin:"center top",location:"center top",position_top:"100",position_bottom:"0",position_left:"0",position_right:"0",zindex:"1999999999",close_button_delay:"0",meta:{display:{stackable:!1,overlay_disabled:!1,size:"medium",responsive_max_width:"100",responsive_max_width_unit:"%",responsive_min_width:"0",responsive_min_width_unit:"%",custom_width:"640",custom_width_unit:"px",custom_height:"380",custom_height_unit:"px",custom_height_auto:!1,location:"center top",position_top:100,position_left:0,position_bottom:0,position_right:0,position_fixed:!1,animation_type:"fade",animation_speed:350,animation_origin:"center top",scrollable_content:!1,disable_reposition:!1,position_from_trigger:!1,overlay_zindex:!1,zindex:"1999999999"},close:{overlay_click:!1,esc_press:!1,f4_press:!1,text:"",button_delay:0},click_open:[]},container:{active_class:"active",attr:{class:"popmake"}},title:{attr:{class:"popmake-title"}},content:{attr:{class:"popmake-content"}},close:{close_speed:0,attr:{class:"popmake-close"}},overlay:{attr:{id:"popmake-overlay",class:"popmake-overlay"}}}}(jQuery,document),function(r){"use strict";var i={openpopup:!1,openpopup_id:0,closepopup:!1,closedelay:0,redirect_enabled:!1,redirect:"",cookie:!1};window.PUM=window.PUM||{},window.PUM.forms=window.PUM.forms||{},r.extend(window.PUM.forms,{form:{validation:{errors:[]},responseHandler:function(e,o){var t=o.data;o.success?window.PUM.forms.form.success(e,t):window.PUM.forms.form.errors(e,t)},display_errors:function(e,o){window.PUM.forms.messages.add(e,o||this.validation.errors,"error")},beforeAjax:function(e){var o=e.find('[type="submit"]'),t=o.find(".pum-form__loader");window.PUM.forms.messages.clear_all(e),t.length||(t=r('<span class="pum-form__loader"></span>'),""!==o.attr("value")?t.insertAfter(o):o.append(t)),o.prop("disabled",!0),t.show(),e.addClass("pum-form--loading").removeClass("pum-form--errors")},afterAjax:function(e){var o=e.find('[type="submit"]'),t=o.find(".pum-form__loader");o.prop("disabled",!1),t.hide(),e.removeClass("pum-form--loading")},success:function(e,o){void 0!==o.message&&""!==o.message&&window.PUM.forms.messages.add(e,[{message:o.message}]),e.trigger("success",[o]),!e.data("noredirect")&&void 0!==e.data("redirect_enabled")&&o.redirect&&(""!==o.redirect?window.location=o.redirect:window.location.reload(!0))},errors:function(e,o){void 0!==o.errors&&o.errors.length&&(console.log(o.errors),window.PUM.forms.form.display_errors(e,o.errors),window.PUM.forms.messages.scroll_to_first(e),e.addClass("pum-form--errors").trigger("errors",[o]))},submit:function(e){var o=r(this),t=o.pumSerializeObject();e.preventDefault(),e.stopPropagation(),window.PUM.forms.form.beforeAjax(o),r.ajax({type:"POST",dataType:"json",url:pum_vars.ajaxurl,data:{action:"pum_form",values:t}}).always(function(){window.PUM.forms.form.afterAjax(o)}).done(function(e){window.PUM.forms.form.responseHandler(o,e)}).error(function(e,o,t){console.log("Error: type of "+o+" with message of "+t)})}},messages:{add:function(e,o,t){var n=e.find(".pum-form__messages"),i=0;if(t=t||"success",o=o||[],!n.length)switch(n=r('<div class="pum-form__messages">').hide(),pum_vars.message_position){case"bottom":e.append(n.addClass("pum-form__messages--bottom"));break;case"top":e.prepend(n.addClass("pum-form__messages--top"))}if(0<=["bottom","top"].indexOf(pum_vars.message_position))for(;o.length>i;i++)this.add_message(n,o[i].message,t);else for(;o.length>i;i++)void 0!==o[i].field?this.add_field_error(e,o[i]):this.add_message(n,o[i].message,t);n.is(":hidden")&&r(".pum-form__message",n).length&&n.slideDown()},add_message:function(e,o,t){o=r('<p class="pum-form__message">').html(o);t=t||"success",o.addClass("pum-form__message--"+t),e.append(o),e.is(":visible")&&o.hide().slideDown()},add_field_error:function(e,o){e=r('[name="'+o.field+'"]',e).parents(".pum-form__field").addClass("pum-form__field--error");this.add_message(e,o.message,"error")},clear_all:function(e,o){var t=e.find(".pum-form__messages"),n=t.find(".pum-form__message"),e=e.find(".pum-form__field.pum-form__field--error");o=o||!1,t.length&&n.slideUp("fast",function(){r(this).remove(),o&&t.hide()}),e.length&&e.removeClass("pum-form__field--error").find("p.pum-form__message").remove()},scroll_to_first:function(e){window.PUM.utilities.scrollTo(r(".pum-form__field.pum-form__field--error",e).eq(0))}},success:function(e,o){var t,n;(o=r.extend({},i,o))&&(t=PUM.getPopup(e),e={},n=function(){o.openpopup&&PUM.getPopup(o.openpopup_id).length?PUM.open(o.openpopup_id):o.redirect_enabled&&(""!==o.redirect?window.location=o.redirect:window.location.reload(!0))},t.length&&(t.trigger("pumFormSuccess"),o.cookie&&(e=r.extend({name:"pum-"+PUM.getSetting(t,"id"),expires:"+1 year"},"object"==typeof o.cookie?o.cookie:{}),PUM.setCookie(t,e))),t.length&&o.closepopup?setTimeout(function(){t.popmake("close",n)},1e3*parseInt(o.closedelay)):n())}})}(jQuery),function(e){"use strict";e.pum=e.pum||{},e.pum.hooks=e.pum.hooks||new function(){var t=Array.prototype.slice,i={removeFilter:function(e,o){"string"==typeof e&&n("filters",e,o);return i},applyFilters:function(){var e=t.call(arguments),o=e.shift();return"string"!=typeof o?i:s("filters",o,e)},addFilter:function(e,o,t,n){"string"==typeof e&&"function"==typeof o&&(t=parseInt(t||10,10),r("filters",e,o,t,n));return i},removeAction:function(e,o){"string"==typeof e&&n("actions",e,o);return i},doAction:function(){var e=t.call(arguments),o=e.shift();"string"==typeof o&&s("actions",o,e);return i},addAction:function(e,o,t,n){"string"==typeof e&&"function"==typeof o&&(t=parseInt(t||10,10),r("actions",e,o,t,n));return i}},a={actions:{},filters:{}};function n(e,o,t,n){var i,r,s;if(a[e][o])if(t)if(i=a[e][o],n)for(s=i.length;s--;)(r=i[s]).callback===t&&r.context===n&&i.splice(s,1);else for(s=i.length;s--;)i[s].callback===t&&i.splice(s,1);else a[e][o]=[]}function r(e,o,t,n,i){n={callback:t,priority:n,context:i},i=(i=a[e][o])?(i.push(n),function(e){for(var o,t,n,i=1,r=e.length;i<r;i++){for(o=e[i],t=i;(n=e[t-1])&&n.priority>o.priority;)e[t]=e[t-1],--t;e[t]=o}return e}(i)):[n];a[e][o]=i}function s(e,o,t){var n,i,r=a[e][o];if(!r)return"filters"===e&&t[0];if(i=r.length,"filters"===e)for(n=0;n<i;n++)t[0]=r[n].callback.apply(r[n].context,t);else for(n=0;n<i;n++)r[n].callback.apply(r[n].context,t);return"filters"!==e||t[0]}return i},e.PUM=e.PUM||{},e.PUM.hooks=e.pum.hooks}(window),function(t){"use strict";function n(e){return e}window.PUM=window.PUM||{},window.PUM.integrations=window.PUM.integrations||{},t.extend(window.PUM.integrations,{init:function(){var e;void 0!==pum_vars.form_submission&&((e=pum_vars.form_submission).ajax=!1,e.popup=0<e.popupId?PUM.getPopup(e.popupId):null,PUM.integrations.formSubmission(null,e))},formSubmission:function(e,o){(o=t.extend({popup:PUM.getPopup(e),formProvider:null,formId:null,formInstanceId:null,formKey:null,ajax:!0,tracked:!1},o)).formKey=o.formKey||[o.formProvider,o.formId,o.formInstanceId].filter(n).join("_"),o.popup&&o.popup.length&&(o.popupId=PUM.getSetting(o.popup,"id")),window.PUM.hooks.doAction("pum.integration.form.success",e,o)},checkFormKeyMatches:function(e,o,t){o=""===o&&o;var n=-1!==["any"===e,"pumsubform"===e&&"pumsubform"===t.formProvider,e===t.formProvider+"_any",!o&&new RegExp("^"+e+"(_[d]*)?").test(t.formKey),!!o&&e+"_"+o===t.formKey].indexOf(!0);return window.PUM.hooks.applyFilters("pum.integration.checkFormKeyMatches",n,{formIdentifier:e,formInstanceId:o,submittedFormArgs:t})}})}(window.jQuery),function(s){"use strict";pum_vars&&void 0!==pum_vars.core_sub_forms_enabled&&!pum_vars.core_sub_forms_enabled||(window.PUM=window.PUM||{},window.PUM.newsletter=window.PUM.newsletter||{},s.extend(window.PUM.newsletter,{form:s.extend({},window.PUM.forms.form,{submit:function(e){var o=s(this),t=o.pumSerializeObject();e.preventDefault(),e.stopPropagation(),window.PUM.newsletter.form.beforeAjax(o),s.ajax({type:"POST",dataType:"json",url:pum_vars.ajaxurl,data:{action:"pum_sub_form",values:t}}).always(function(){window.PUM.newsletter.form.afterAjax(o)}).done(function(e){window.PUM.newsletter.form.responseHandler(o,e)}).error(function(e,o,t){console.log("Error: type of "+o+" with message of "+t)})}})}),s(document).on("submit","form.pum-sub-form",window.PUM.newsletter.form.submit).on("success","form.pum-sub-form",function(e,o){var t=s(e.target),n=t.data("settings")||{},i=t.pumSerializeObject(),r=PUM.getPopup(t),e=PUM.getSetting(r,"id"),r=s("form.pum-sub-form",r).index(t)+1;window.PUM.integrations.formSubmission(t,{formProvider:"pumsubform",formId:e,formInstanceId:r,extras:{data:o,values:i,settings:n}}),t.trigger("pumNewsletterSuccess",[o]).addClass("pum-newsletter-success"),t[0].reset(),window.pum.hooks.doAction("pum-sub-form.success",o,t),"string"==typeof n.redirect&&""!==n.redirect&&(n.redirect=atob(n.redirect)),window.PUM.forms.success(t,n)}).on("error","form.pum-sub-form",function(e,o){e=s(e.target);e.trigger("pumNewsletterError",[o]),window.pum.hooks.doAction("pum-sub-form.errors",o,e)}))}(jQuery),function(r,o){"use strict";r.extend(r.fn.popmake.methods,{addTrigger:function(e){return r.fn.popmake.triggers[e]?r.fn.popmake.triggers[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Trigger type "+e+" does not exist."),this)}}),r.fn.popmake.triggers={auto_open:function(e){var o=PUM.getPopup(this);setTimeout(function(){o.popmake("state","isOpen")||!o.popmake("checkCookies",e)&&o.popmake("checkConditions")&&(r.fn.popmake.last_open_trigger="Auto Open - Delay: "+e.delay,o.popmake("open"))},e.delay)},click_open:function(n){var i=PUM.getPopup(this),e=i.popmake("getSettings"),e=[".popmake-"+e.id,".popmake-"+decodeURIComponent(e.slug),'a[href$="#popmake-'+e.id+'"]'];n.extra_selectors&&""!==n.extra_selectors&&e.push(n.extra_selectors),e=(e=pum.hooks.applyFilters("pum.trigger.click_open.selectors",e,n,i)).join(", "),r(e).addClass("pum-trigger").css({cursor:"pointer"}),r(o).on("click.pumTrigger",e,function(e){var o=r(this),t=n.do_default||!1;0<i.has(o).length||i.popmake("state","isOpen")||!i.popmake("checkCookies",n)&&i.popmake("checkConditions")&&(o.data("do-default")?t=o.data("do-default"):(o.hasClass("do-default")||o.hasClass("popmake-do-default")||o.hasClass("pum-do-default"))&&(t=!0),e.ctrlKey||pum.hooks.applyFilters("pum.trigger.click_open.do_default",t,i,o)||(e.preventDefault(),e.stopPropagation()),r.fn.popmake.last_open_trigger=o,i.popmake("open"))})},form_submission:function(t){var n=PUM.getPopup(this);t=r.extend({form:"",formInstanceId:"",delay:0},t);PUM.hooks.addAction("pum.integration.form.success",function(e,o){t.form.length&&PUM.integrations.checkFormKeyMatches(t.form,t.formInstanceId,o)&&setTimeout(function(){n.popmake("state","isOpen")||!n.popmake("checkCookies",t)&&n.popmake("checkConditions")&&(r.fn.popmake.last_open_trigger="Form Submission",n.popmake("open"))},t.delay)})},admin_debug:function(){PUM.getPopup(this).popmake("open")}},r(o).on("pumInit",".pum",function(){var e,o,t=PUM.getPopup(this),n=t.popmake("getSettings").triggers||[];if(n.length)for(o=0;o<n.length;o+=1)e=n[o],t.popmake("addTrigger",e.type,e.settings)})}(jQuery,document),function(a){"use strict";var n="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),i="select,textarea".split(","),r=/\[([^\]]*)\]/g;Array.prototype.indexOf||(Array.prototype.indexOf=function(e){if(null==this)throw new TypeError;var o=Object(this),t=o.length>>>0;if(0==t)return-1;var n=0;if(0<arguments.length&&((n=Number(arguments[1]))!=n?n=0:0!==n&&n!==1/0&&n!==-1/0&&(n=(0<n||-1)*Math.floor(Math.abs(n)))),t<=n)return-1;for(var i=0<=n?n:Math.max(t-Math.abs(n),0);i<t;i++)if(i in o&&o[i]===e)return i;return-1}),a.fn.popmake.utilities={scrollTo:function(e,o){var t=a(e)||a();t.length&&a("html, body").animate({scrollTop:t.offset().top-100},1e3,"swing",function(){var e=t.find(':input:not([type="button"]):not([type="hidden"]):not(button)').eq(0);e.hasClass("wp-editor-area")?tinyMCE.execCommand("mceFocus",!1,e.attr("id")):e.focus(),"function"==typeof o&&o()})},inArray:function(e,o){return!!~o.indexOf(e)},convert_hex:function(e,o){return e=e.replace("#",""),"rgba("+parseInt(e.substring(0,2),16)+","+parseInt(e.substring(2,4),16)+","+parseInt(e.substring(4,6),16)+","+o/100+")"},debounce:function(t,n){var i;return function(){var e=this,o=arguments;window.clearTimeout(i),i=window.setTimeout(function(){t.apply(e,o)},n)}},throttle:function(e,o){function t(){n=!1}var n=!1;return function(){n||(e.apply(this,arguments),window.setTimeout(t,o),n=!0)}},getXPath:function(e){var t,n,i,r,s=[];return a.each(a(e).parents(),function(e,o){return r=a(o),t=r.attr("id")||"",n=r.attr("class")||"",i=r.get(0).tagName.toLowerCase(),r=r.parent().children(i).index(r),"body"!==i&&(0<n.length&&(n=(n=n.split(" "))[0]),void s.push(i+(0<t.length?"#"+t:0<n.length?"."+n.split(" ").join("."):":eq("+r+")")))}),s.reverse().join(" > ")},strtotime:function(e,o){var t,n,i,r,s,a,p,u,c;if(!e)return!1;if((n=(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase()).match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/))&&n[2]===n[4])if(1901<n[1])switch(n[2]){case"-":return 12<n[3]||31<n[5]?!1:new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return!1;case"/":return 12<n[3]||31<n[5]?!1:new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else if(1901<n[5])switch(n[2]){case"-":case".":return 12<n[3]||31<n[1]?!1:new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case"/":return 12<n[1]||31<n[3]?!1:new Date(n[5],parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else switch(n[2]){case"-":return 12<n[3]||31<n[5]||n[1]<70&&38<n[1]?!1:(r=0<=n[1]&&n[1]<=38?+n[1]+2e3:n[1],new Date(r,parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case".":return 70<=n[5]?!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3:n[5]<60&&!n[6]&&(!(23<n[1]||59<n[3])&&(i=new Date,new Date(i.getFullYear(),i.getMonth(),i.getDate(),n[1]||0,n[3]||0,n[5]||0,n[9]||0)/1e3));case"/":return 12<n[1]||31<n[3]||n[5]<70&&38<n[5]?!1:(r=0<=n[5]&&n[5]<=38?+n[5]+2e3:n[5],new Date(r,parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case":":return 23<n[1]||59<n[3]||59<n[5]?!1:(i=new Date,new Date(i.getFullYear(),i.getMonth(),i.getDate(),n[1]||0,n[3]||0,n[5]||0)/1e3)}if("now"===e)return null===o||isNaN(o)?(new Date).getTime()/1e3||0:o||0;if(t=Date.parse(e),!isNaN(t))return t/1e3||0;function l(e){var o=e.split(" "),t=o[0],n=o[1].substring(0,3),i=/\d+/.test(t),e=("last"===t?-1:1)*("ago"===o[2]?-1:1);if(i&&(e*=parseInt(t,10)),p.hasOwnProperty(n)&&!o[1].match(/^mon(day|\.)?$/i))return s["set"+p[n]](s["get"+p[n]]()+e);if("wee"===n)return s.setDate(s.getDate()+7*e);if("next"===t||"last"===t)t=t,e=e,void 0!==(n=a[n=n])&&(0===(n=n-s.getDay())?n=7*e:0<n&&"last"===t?n-=7:n<0&&"next"===t&&(n+=7),s.setDate(s.getDate()+n));else if(!i)return;return 1}if(s=o?new Date(1e3*o):new Date,a={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},p={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},o="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",!(n=e.match(new RegExp("([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)|(last|next)\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?))(\\sago)?","gi"))))return!1;for(c=0,u=n.length;c<u;c+=1)if(!l(n[c]))return!1;return s.getTime()/1e3},serializeObject:function(e){a.extend({},e);var o={},t=a.extend(!0,{include:[],exclude:[],includeByClass:""},e);return this.find(":input").each(function(){var e;!this.name||this.disabled||window.PUM.utilities.inArray(this.name,t.exclude)||t.include.length&&!window.PUM.utilities.inArray(this.name,t.include)||-1===this.className.indexOf(t.includeByClass)||(e=this.name.replace(r,"[$1").split("["))[0]&&(this.checked||window.PUM.utilities.inArray(this.type,n)||window.PUM.utilities.inArray(this.nodeName.toLowerCase(),i))&&("checkbox"===this.type&&e.push(""),function e(o,t,n){var i=t[0];1<t.length?(o[i]||(o[i]=t[1]?{}:[]),e(o[i],t.slice(1),n)):o[i=i||o.length]=n}(o,e,a(this).val()))}),o}},a.fn.popmake.utilies=a.fn.popmake.utilities,window.PUM=window.PUM||{},window.PUM.utilities=window.PUM.utilities||{},window.PUM.utilities=a.extend(window.PUM.utilities,a.fn.popmake.utilities)}(jQuery,document),function(e){function o(n,o){var t={},i={};function r(e,o,t){return e[o]=t,e}function s(e,o){var t,n=e.match(p.key);try{o=JSON.parse(o)}catch(e){}for(;void 0!==(t=n.pop());)p.push.test(t)?o=r([],function(e){void 0===i[e]&&(i[e]=0);return i[e]++}(e.replace(/\[\]$/,"")),o):p.fixed.test(t)?o=r([],t,o):p.named.test(t)&&(o=r({},t,o));return o}function e(){return t}this.addPair=function(e){return p.validate.test(e.name)&&(e=s(e.name,"checkbox"===a('[name="'+(e=e).name+'"]',o).attr("type")&&"1"===e.value||e.value),t=n.extend(!0,t,e)),this},this.addPairs=function(e){if(!n.isArray(e))throw new Error("formSerializer.addPairs expects an Array");for(var o=0,t=e.length;o<t;o++)this.addPair(e[o]);return this},this.serialize=e,this.serializeJSON=function(){return JSON.stringify(t)}}var t,a,p;a=(t=e).jQuery||e.Zepto||e.ender||e.$,o.patterns=p={validate:/^[a-z_][a-z0-9_]*(?:\[(?:\d*|[a-z0-9_]+)\])*$/i,key:/[a-z0-9_]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_]+$/i},o.serializeObject=function(){var e=(this.is("form")?this:this.find(":input")).serializeArray();return new o(a,this).addPairs(e).serialize()},o.serializeJSON=function(){var e=(this.is("form")?this:this.find(":input")).serializeArray();return new o(a,this).addPairs(e).serializeJSON()},void 0!==a.fn&&(a.fn.pumSerializeObject=o.serializeObject,a.fn.pumSerializeJSON=o.serializeJSON),t.FormSerializer=o}(this),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s=7)}([,function(e,o,t){var n=t(2),i=t(3),r=t(4),s=t(6);e.exports=function(e,o){return n(e)||i(e,o)||r(e,o)||s()}},function(e,o){e.exports=function(e){if(Array.isArray(e))return e}},function(e,o){e.exports=function(e,o){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],n=!0,i=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(t.push(s.value),!o||t.length!==o);n=!0);}catch(e){i=!0,r=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw r}}return t}}},function(e,o,t){var n=t(5);e.exports=function(e,o){if(e){if("string"==typeof e)return n(e,o);var t=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(t="Object"===t&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(e,o):void 0}}},function(e,o){e.exports=function(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,n=new Array(o);t<o;t++)n[t]=e[t];return n}},function(e,o){e.exports=function(){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(e,o,t){"use strict";t.r(o);var n,o=t(1),i=t.n(o);(0,window.jQuery)(document).on("cf.ajax.request",function(e,o){return n=o.$form}).on("cf.submission",function(e,o){var t;"complete"!==o.data.status&&"success"!==o.data.status||(t=n.attr("id").split("_"),t=(o=i()(t,2))[0],o=void 0===(o=o[1])?null:o,window.PUM.integrations.formSubmission(n,{formProvider:"calderaforms",formId:t,formInstanceId:o,extras:{state:window.cfstate.hasOwnProperty(t)?window.cfstate[t]:null}}))})}]),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s=8)}({0:function(o,e){function t(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?o.exports=t=function(e){return typeof e}:o.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}o.exports=t},8:function(e,o,t){"use strict";t.r(o);var o=t(0),i=t.n(o),r=window.jQuery;r(document).on("wpcf7mailsent",function(e,o){var t=e.detail.contactFormId,n=r(e.target),e=(e.detail.id||e.detail.unitTag).split("-").pop().replace("o","");window.PUM.integrations.formSubmission(n,{formProvider:"contactform7",formId:t,formInstanceId:e,extras:{details:o}});o=n.find("input.wpcf7-pum"),o=!!o.length&&JSON.parse(o.val());"object"===i()(o)&&void 0!==o.closedelay&&3<=o.closedelay.toString().length&&(o.closedelay=o.closedelay/1e3),window.PUM.forms.success(n,o)})}}),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s=9)}({9:function(e,o){var r=window.jQuery;r(document).on("fluentform_submission_success",function(e,o){var t=o.form,n=o.config.id,i=t.data("form_instance");console.log(n,o),window.PUM.integrations.formSubmission(r(t),{formProvider:"fluentforms",formId:n,formInstanceId:i})})}}),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s=10)}({10:function(e,o){var r=window.jQuery;r(document).on("frmFormComplete",function(e,o,t){var n=r(o),i=n.find('input[name="form_id"]').val(),o=PUM.getPopup(n.find('input[name="pum_form_popup_id"]').val());window.PUM.integrations.formSubmission(n,{popup:o,formProvider:"formidableforms",formId:i,extras:{response:t}})})}}),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s=11)}({0:function(o,e){function t(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?o.exports=t=function(e){return typeof e}:o.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}o.exports=t},11:function(e,o,t){"use strict";t.r(o);var o=t(0),n=t.n(o),i=window.jQuery,r={};i(document).on("gform_confirmation_loaded",function(e,o){var t=i("#gform_confirmation_wrapper_"+o+",#gforms_confirmation_message_"+o)[0];window.PUM.integrations.formSubmission(t,{formProvider:"gravityforms",formId:o}),window.PUM.forms.success(t,r[o]||{})}),i(function(){i(".gform_wrapper > form").each(function(){var e=i(this),o=e.attr("id").replace("gform_",""),e=e.find("input.gforms-pum"),e=!!e.length&&JSON.parse(e.val());e&&"object"===n()(e)&&("object"===n()(e)&&void 0!==e.closedelay&&3<=e.closedelay.toString().length&&(e.closedelay=e.closedelay/1e3),r[o]=e)})})}}),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s=12)}({12:function(e,o){var r=window.jQuery;r(function(){"undefined"!=typeof mc4wp&&mc4wp.forms.on("success",function(e,o){var t=r(e.element),n=e.id,i=r(".mc4wp-form-"+e.id).index(t)+1;window.PUM.integrations.formSubmission(t,{formProvider:"mc4wp",formId:n,formInstanceId:i,extras:{form:e,data:o}})})})}}),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s=13)}([,function(e,o,t){var n=t(2),i=t(3),r=t(4),s=t(6);e.exports=function(e,o){return n(e)||i(e,o)||r(e,o)||s()}},function(e,o){e.exports=function(e){if(Array.isArray(e))return e}},function(e,o){e.exports=function(e,o){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],n=!0,i=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(t.push(s.value),!o||t.length!==o);n=!0);}catch(e){i=!0,r=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw r}}return t}}},function(e,o,t){var n=t(5);e.exports=function(e,o){if(e){if("string"==typeof e)return n(e,o);var t=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(t="Object"===t&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(e,o):void 0}}},function(e,o){e.exports=function(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,n=new Array(o);t<o;t++)n[t]=e[t];return n}},function(e,o){e.exports=function(){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(e,o,t){"use strict";t.r(o);var o=t(1),a=t.n(o),p=window.jQuery,n=!1;p(function(){"undefined"!=typeof Marionette&&"undefined"!=typeof nfRadio&&!1===n&&new(n=Marionette.Object.extend({initialize:function(){this.listenTo(nfRadio.channel("forms"),"submit:response",this.popupMaker)},popupMaker:function(e,o,t,n){var i=p("#nf-form-"+n+"-cont"),r=n.split("_"),s=a()(r,2),n=s[0],r=s[1],s=void 0===r?null:r,r={};e.errors&&e.errors.length||(window.PUM.integrations.formSubmission(i,{formProvider:"ninjaforms",formId:n,formInstanceId:s,extras:{response:e}}),e.data&&e.data.actions&&(r.openpopup=void 0!==e.data.actions.openpopup,r.openpopup_id=r.openpopup?parseInt(e.data.actions.openpopup):0,r.closepopup=void 0!==e.data.actions.closepopup,r.closedelay=r.closepopup?parseInt(e.data.actions.closepopup):0,r.closepopup&&e.data.actions.closedelay&&(r.closedelay=parseInt(e.data.actions.closedelay))),window.PUM.forms.success(i,r))}}))})}]),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s=14)}({14:function(e,o){var r=window.jQuery;r(document).on("wpformsAjaxSubmitSuccess",".wpforms-ajax-form",function(e,o){var t=r(this),n=t.data("formid"),i=r("form#"+t.attr("id")).index(t)+1;window.PUM.integrations.formSubmission(t,{formProvider:"wpforms",formId:n,formInstanceId:i})})}}),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s=15)}({15:function(e,o){var s=window.jQuery;s(document).on("wsf-submit-success wsf-save-success",function(e,o,t,n,i,r){window.PUM.integrations.formSubmission(s(i),{formProvider:"wsforms",formId:t,formInstanceId:n})})}}),function(e){("object"!=typeof exports||"undefined"==typeof module)&&"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";function e(o){var t=this.constructor;return this.then(function(e){return t.resolve(o()).then(function(){return e})},function(e){return t.resolve(o()).then(function(){return t.reject(e)})})}var o=setTimeout;function p(e){return Boolean(e&&void 0!==e.length)}function n(){}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(e,this)}function i(t,n){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,r._immediateFn(function(){var e,o=1===t._state?n.onFulfilled:n.onRejected;if(null!==o){try{e=o(t._value)}catch(e){return void a(n.promise,e)}s(n.promise,e)}else(1===t._state?s:a)(n.promise,t._value)})):t._deferreds.push(n)}function s(o,e){try{if(e===o)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if(e instanceof r)return o._state=3,o._value=e,void u(o);if("function"==typeof t)return void l((n=t,i=e,function(){n.apply(i,arguments)}),o)}o._state=1,o._value=e,u(o)}catch(e){a(o,e)}var n,i}function a(e,o){e._state=2,e._value=o,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var o=0,t=e._deferreds.length;o<t;o++)i(e,e._deferreds[o]);e._deferreds=null}function c(e,o,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof o?o:null,this.promise=t}function l(e,o){var t=!1;try{e(function(e){t||(t=!0,s(o,e))},function(e){t||(t=!0,a(o,e))})}catch(e){if(t)return;t=!0,a(o,e)}}r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,o){var t=new this.constructor(n);return i(this,new c(e,o,t)),t},r.prototype.finally=e,r.all=function(o){return new r(function(i,r){if(!p(o))return r(new TypeError("Promise.all accepts an array"));var s=Array.prototype.slice.call(o);if(0===s.length)return i([]);var a=s.length;for(var e=0;e<s.length;e++)!function o(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){o(t,e)},r)}s[t]=e,0==--a&&i(s)}catch(e){r(e)}}(e,s[e])})},r.resolve=function(o){return o&&"object"==typeof o&&o.constructor===r?o:new r(function(e){e(o)})},r.reject=function(t){return new r(function(e,o){o(t)})},r.race=function(i){return new r(function(e,o){if(!p(i))return o(new TypeError("Promise.race accepts an array"));for(var t=0,n=i.length;t<n;t++)r.resolve(i[t]).then(e,o)})},r._immediateFn="function"==typeof setImmediate?function(e){setImmediate(e)}:function(e){o(e,0)},r._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var t=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();"Promise"in t?t.Promise.prototype.finally||(t.Promise.prototype.finally=e):t.Promise=r});!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.postscribe=o():e.postscribe=o()}(this,function(){return function(e){function o(r){if(t[r])return t[r].exports;var n=t[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}var t={};return o.m=e,o.c=t,o.p="",o(0)}([function(e,o,t){"use strict";var r=t(1),n=function(e){return e&&e.__esModule?e:{default:e}}(r);e.exports=n.default},function(e,o,t){"use strict";function r(){}function n(){var e=f.shift();if(e){var o=_.last(e);o.afterDequeue(),e.stream=i.apply(void 0,e),o.afterStreamStart()}}function i(e,o,t){function i(e){e=t.beforeWrite(e),u.write(e),t.afterWrite(e)}u=new c.default(e,t),u.id=g++,u.name=t.name||u.id,s.streams[u.name]=u;var d=e.ownerDocument,p={close:d.close,open:d.open,write:d.write,writeln:d.writeln};a(d,{close:r,open:r,write:function(){for(var e=arguments.length,o=Array(e),t=0;t<e;t++)o[t]=arguments[t];return i(o.join(""))},writeln:function(){for(var e=arguments.length,o=Array(e),t=0;t<e;t++)o[t]=arguments[t];return i(o.join("")+"\n")}});var _=u.win.onerror||r;return u.win.onerror=function(e,o,r){t.error({msg:e+" - "+o+": "+r}),_.apply(u.win,[e,o,r])},u.write(o,function(){a(d,p),u.win.onerror=_,t.done(),u=null,n()}),u}function s(e,o,t){if(_.isFunction(t))t={done:t};else if("clear"===t)return f=[],u=null,void(g=0);t=_.defaults(t,l),e=/^#/.test(e)?window.document.getElementById(e.substr(1)):e.jquery?e[0]:e;var i=[e,o,t];return e.postscribe={cancel:function(){i.stream?i.stream.abort():i[1]=r}},t.beforeEnqueue(i),f.push(i),u||n(),e.postscribe}o.__esModule=!0;var a=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e};o.default=s;var d=t(2),c=function(e){return e&&e.__esModule?e:{default:e}}(d),p=t(4),_=function(e){if(e&&e.__esModule)return e;var o={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t]);return o.default=e,o}(p),l={afterAsync:r,afterDequeue:r,afterStreamStart:r,afterWrite:r,autoFix:!0,beforeEnqueue:r,beforeWriteToken:function(e){return e},beforeWrite:function(e){return e},done:r,error:function(e){throw new Error(e.msg)},releaseAsync:!1},g=0,f=[],u=null;a(s,{streams:{},queue:f,WriteStream:c.default})},function(e,o,t){"use strict";function r(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function n(e,o){var t=_+o,r=e.getAttribute(t);return p.existy(r)?String(r):r}function i(e,o){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=_+o;p.existy(t)&&""!==t?e.setAttribute(r,t):e.removeAttribute(r)}o.__esModule=!0;var s=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},a=t(3),d=function(e){return e&&e.__esModule?e:{default:e}}(a),c=t(4),p=function(e){if(e&&e.__esModule)return e;var o={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t]);return o.default=e,o}(c),_="data-ps-",l="ps-style",g="ps-script",f=function(){function e(o){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,e),this.root=o,this.options=t,this.doc=o.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new d.default("",{autoFix:t.autoFix}),this.actuals=[o],this.proxyHistory="",this.proxyRoot=this.doc.createElement(o.nodeName),this.scriptStack=[],this.writeQueue=[],i(this.proxyRoot,"proxyof",0)}return e.prototype.write=function(){var e;for((e=this.writeQueue).push.apply(e,arguments);!this.deferredRemote&&this.writeQueue.length;){var o=this.writeQueue.shift();p.isFunction(o)?this._callFunction(o):this._writeImpl(o)}},e.prototype._callFunction=function(e){var o={type:"function",value:e.name||e.toString()};this._onScriptStart(o),e.call(this.win,this.doc),this._onScriptDone(o)},e.prototype._writeImpl=function(e){this.parser.append(e);for(var o=void 0,t=void 0,r=void 0,n=[];(o=this.parser.readToken())&&!(t=p.isScript(o))&&!(r=p.isStyle(o));)(o=this.options.beforeWriteToken(o))&&n.push(o);n.length>0&&this._writeStaticTokens(n),t&&this._handleScriptToken(o),r&&this._handleStyleToken(o)},e.prototype._writeStaticTokens=function(e){var o=this._buildChunk(e);return o.actual?(o.html=this.proxyHistory+o.actual,this.proxyHistory+=o.proxy,this.proxyRoot.innerHTML=o.html,this._walkChunk(),o):null},e.prototype._buildChunk=function(e){for(var o=this.actuals.length,t=[],r=[],n=[],i=e.length,s=0;s<i;s++){var a=e[s],d=a.toString();if(t.push(d),a.attrs){if(!/^noscript$/i.test(a.tagName)){var c=o++;r.push(d.replace(/(\/?>)/," "+_+"id="+c+" $1")),a.attrs.id!==g&&a.attrs.id!==l&&n.push("atomicTag"===a.type?"":"<"+a.tagName+" "+_+"proxyof="+c+(a.unary?" />":">"))}}else r.push(d),n.push("endTag"===a.type?d:"")}return{tokens:e,raw:t.join(""),actual:r.join(""),proxy:n.join("")}},e.prototype._walkChunk=function(){for(var e=void 0,o=[this.proxyRoot];p.existy(e=o.shift());){var t=1===e.nodeType;if(!(t&&n(e,"proxyof"))){t&&(this.actuals[n(e,"id")]=e,i(e,"id"));var r=e.parentNode&&n(e.parentNode,"proxyof");r&&this.actuals[r].appendChild(e)}o.unshift.apply(o,p.toArray(e.childNodes))}},e.prototype._handleScriptToken=function(e){var o=this,t=this.parser.clear();t&&this.writeQueue.unshift(t),e.src=e.attrs.src||e.attrs.SRC,(e=this.options.beforeWriteToken(e))&&(e.src&&this.scriptStack.length?this.deferredRemote=e:this._onScriptStart(e),this._writeScriptToken(e,function(){o._onScriptDone(e)}))},e.prototype._handleStyleToken=function(e){var o=this.parser.clear();o&&this.writeQueue.unshift(o),e.type=e.attrs.type||e.attrs.TYPE||"text/css",e=this.options.beforeWriteToken(e),e&&this._writeStyleToken(e),o&&this.write()},e.prototype._writeStyleToken=function(e){var o=this._buildStyle(e);this._insertCursor(o,l),e.content&&(o.styleSheet&&!o.sheet?o.styleSheet.cssText=e.content:o.appendChild(this.doc.createTextNode(e.content)))},e.prototype._buildStyle=function(e){var o=this.doc.createElement(e.tagName);return o.setAttribute("type",e.type),p.eachKey(e.attrs,function(e,t){o.setAttribute(e,t)}),o},e.prototype._insertCursor=function(e,o){this._writeImpl('<span id="'+o+'"/>');var t=this.doc.getElementById(o);t&&t.parentNode.replaceChild(e,t)},e.prototype._onScriptStart=function(e){e.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(e)},e.prototype._onScriptDone=function(e){return e!==this.scriptStack[0]?void this.options.error({msg:"Bad script nesting or script finished twice"}):(this.scriptStack.shift(),this.write.apply(this,e.outerWrites),void(!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)))},e.prototype._writeScriptToken=function(e,o){var t=this._buildScript(e),r=this._shouldRelease(t),n=this.options.afterAsync;e.src&&(t.src=e.src,this._scriptLoadHandler(t,r?n:function(){o(),n()}));try{this._insertCursor(t,g),t.src&&!r||o()}catch(e){this.options.error(e),o()}},e.prototype._buildScript=function(e){var o=this.doc.createElement(e.tagName);return p.eachKey(e.attrs,function(e,t){o.setAttribute(e,t)}),e.content&&(o.text=e.content),o},e.prototype._scriptLoadHandler=function(e,o){function t(){e=e.onload=e.onreadystatechange=e.onerror=null}function r(){t(),null!=o&&o(),o=null}function n(e){t(),a(e),null!=o&&o(),o=null}function i(e,o){var t=e["on"+o];null!=t&&(e["_on"+o]=t)}var a=this.options.error;i(e,"load"),i(e,"error"),s(e,{onload:function(){if(e._onload)try{e._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(o){n({msg:"onload handler failed "+o+" @ "+e.src})}r()},onerror:function(){if(e._onerror)try{e._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(o){return void n({msg:"onerror handler failed "+o+" @ "+e.src})}n({msg:"remote script failed "+e.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(e.readyState)&&r()}})},e.prototype._shouldRelease=function(e){return!/^script$/i.test(e.nodeName)||!!(this.options.releaseAsync&&e.src&&e.hasAttribute("async"))},e}();o.default=f},function(e,o,t){!function(o,t){e.exports=function(){return function(e){function o(r){if(t[r])return t[r].exports;var n=t[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}var t={};return o.m=e,o.c=t,o.p="",o(0)}([function(e,o,t){"use strict";var r=t(1),n=function(e){return e&&e.__esModule?e:{default:e}}(r);e.exports=n.default},function(e,o,t){"use strict";function r(e){if(e&&e.__esModule)return e;var o={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t]);return o.default=e,o}function n(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}o.__esModule=!0;var i=t(2),s=r(i),a=t(3),d=r(a),c=t(6),p=function(e){return e&&e.__esModule?e:{default:e}}(c),_=t(5),l={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},g=function(){function e(){var o=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this.stream=t;var i=!1,a={};for(var d in s)s.hasOwnProperty(d)&&(r.autoFix&&(a[d+"Fix"]=!0),i=i||a[d+"Fix"]);i?(this._readToken=(0,p.default)(this,a,function(){return o._readTokenImpl()}),this._peekToken=(0,p.default)(this,a,function(){return o._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}return e.prototype.append=function(e){this.stream+=e},e.prototype.prepend=function(e){this.stream=e+this.stream},e.prototype._readTokenImpl=function(){var e=this._peekTokenImpl();if(e)return this.stream=this.stream.slice(e.length),e},e.prototype._peekTokenImpl=function(){for(var e in l)if(l.hasOwnProperty(e)&&l[e].test(this.stream)){var o=d[e](this.stream);if(o)return"startTag"===o.type&&/script|style/i.test(o.tagName)?null:(o.text=this.stream.substr(0,o.length),o)}},e.prototype.peekToken=function(){return this._peekToken()},e.prototype.readToken=function(){return this._readToken()},e.prototype.readTokens=function(e){for(var o=void 0;o=this.readToken();)if(e[o.type]&&!1===e[o.type](o))return},e.prototype.clear=function(){var e=this.stream;return this.stream="",e},e.prototype.rest=function(){return this.stream},e}();o.default=g,g.tokenToString=function(e){return e.toString()},g.escapeAttributes=function(e){var o={};for(var t in e)e.hasOwnProperty(t)&&(o[t]=(0,_.escapeQuotes)(e[t],null));return o},g.supports=s;for(var f in s)s.hasOwnProperty(f)&&(g.browserHasFlaw=g.browserHasFlaw||!s[f]&&f)},function(e,o){"use strict";o.__esModule=!0;var t=!1,r=!1,n=window.document.createElement("div");try{var i="<P><I></P></I>";n.innerHTML=i,o.tagSoup=t=n.innerHTML!==i}catch(e){o.tagSoup=t=!1}try{n.innerHTML="<P><i><P></P></i></P>",o.selfClose=r=2===n.childNodes.length}catch(e){o.selfClose=r=!1}n=null,o.tagSoup=t,o.selfClose=r},function(e,o,t){"use strict";function r(e){var o=e.indexOf("--\x3e");if(o>=0)return new c.CommentToken(e.substr(4,o-1),o+3)}function n(e){var o=e.indexOf("<");return new c.CharsToken(o>=0?o:e.length)}function i(e){if(-1!==e.indexOf(">")){var o=e.match(p.startTag);if(o){var t=function(){var e={},t={},r=o[2];return o[2].replace(p.attr,function(o,n){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(e[arguments[5]]="",t[arguments[5]]=!0):e[n]=arguments[2]||arguments[3]||arguments[4]||p.fillAttr.test(n)&&n||"":e[n]="",r=r.replace(o,"")}),{v:new c.StartTagToken(o[1],o[0].length,e,t,!!o[3],r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))}}();if("object"===(void 0===t?"undefined":d(t)))return t.v}}}function s(e){var o=i(e);if(o){var t=e.slice(o.length);if(t.match(new RegExp("</\\s*"+o.tagName+"\\s*>","i"))){var r=t.match(new RegExp("([\\s\\S]*?)</\\s*"+o.tagName+"\\s*>","i"));if(r)return new c.AtomicTagToken(o.tagName,r[0].length+o.length,o.attrs,o.booleanAttrs,r[1])}}}function a(e){var o=e.match(p.endTag);if(o)return new c.EndTagToken(o[1],o[0].length)}o.__esModule=!0;var d="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};o.comment=r,o.chars=n,o.startTag=i,o.atomicTag=s,o.endTag=a;var c=t(4),p={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(e,o,t){"use strict";function r(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}o.__esModule=!0,o.EndTagToken=o.AtomicTagToken=o.StartTagToken=o.TagToken=o.CharsToken=o.CommentToken=o.Token=void 0;var n=t(5),i=(o.Token=function e(o,t){r(this,e),this.type=o,this.length=t,this.text=""},o.CommentToken=function(){function e(o,t){r(this,e),this.type="comment",this.length=t||(o?o.length:0),this.text="",this.content=o}return e.prototype.toString=function(){return"\x3c!--"+this.content},e}(),o.CharsToken=function(){function e(o){r(this,e),this.type="chars",this.length=o,this.text=""}return e.prototype.toString=function(){return this.text},e}(),o.TagToken=function(){function e(o,t,n,i,s){r(this,e),this.type=o,this.length=n,this.text="",this.tagName=t,this.attrs=i,this.booleanAttrs=s,this.unary=!1,this.html5Unary=!1}return e.formatTag=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t="<"+e.tagName;for(var r in e.attrs)if(e.attrs.hasOwnProperty(r)){t+=" "+r;var i=e.attrs[r];void 0!==e.booleanAttrs&&void 0!==e.booleanAttrs[r]||(t+='="'+(0,n.escapeQuotes)(i)+'"')}return e.rest&&(t+=" "+e.rest),t+=e.unary&&!e.html5Unary?"/>":">",void 0!==o&&null!==o&&(t+=o+"</"+e.tagName+">"),t},e}());o.StartTagToken=function(){function e(o,t,n,i,s,a){r(this,e),this.type="startTag",this.length=t,this.text="",this.tagName=o,this.attrs=n,this.booleanAttrs=i,this.html5Unary=!1,this.unary=s,this.rest=a}return e.prototype.toString=function(){return i.formatTag(this)},e}(),o.AtomicTagToken=function(){function e(o,t,n,i,s){r(this,e),this.type="atomicTag",this.length=t,this.text="",this.tagName=o,this.attrs=n,this.booleanAttrs=i,this.unary=!1,this.html5Unary=!1,this.content=s}return e.prototype.toString=function(){return i.formatTag(this,this.content)},e}(),o.EndTagToken=function(){function e(o,t){r(this,e),this.type="endTag",this.length=t,this.text="",this.tagName=o}return e.prototype.toString=function(){return"</"+this.tagName+">"},e}()},function(e,o){"use strict";function t(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e?e.replace(/([^"]*)"/g,function(e,o){return/\\/.test(o)?o+'"':o+'\\"'}):o}o.__esModule=!0,o.escapeQuotes=t},function(e,o){"use strict";function t(e){return e&&"startTag"===e.type&&(e.unary=a.test(e.tagName)||e.unary,e.html5Unary=!/\/>$/.test(e.text)),e}function r(e,o){var r=e.stream,n=t(o());return e.stream=r,n}function n(e,o){var t=o.pop();e.prepend("</"+t.tagName+">")}function i(){var e=[];return e.last=function(){return this[this.length-1]},e.lastTagNameEq=function(e){var o=this.last();return o&&o.tagName&&o.tagName.toUpperCase()===e.toUpperCase()},e.containsTagName=function(e){for(var o,t=0;o=this[t];t++)if(o.tagName===e)return!0;return!1},e}function s(e,o,s){function a(){var o=r(e,s);o&&p[o.type]&&p[o.type](o)}var c=i(),p={startTag:function(t){var r=t.tagName;"TR"===r.toUpperCase()&&c.lastTagNameEq("TABLE")?(e.prepend("<TBODY>"),a()):o.selfCloseFix&&d.test(r)&&c.containsTagName(r)?c.lastTagNameEq(r)?n(e,c):(e.prepend("</"+t.tagName+">"),a()):t.unary||c.push(t)},endTag:function(t){c.last()?o.tagSoupFix&&!c.lastTagNameEq(t.tagName)?n(e,c):c.pop():o.tagSoupFix&&(s(),a())}};return function(){return a(),t(s())}}o.__esModule=!0,o.default=s;var a=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,d=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i}])}()}()},function(e,o){"use strict";function t(e){return void 0!==e&&null!==e}function r(e){return"function"==typeof e}function n(e,o,t){var r=void 0,n=e&&e.length||0;for(r=0;r<n;r++)o.call(t,e[r],r)}function i(e,o,t){for(var r in e)e.hasOwnProperty(r)&&o.call(t,r,e[r])}function s(e,o){return e=e||{},i(o,function(o,r){t(e[o])||(e[o]=r)}),e}function a(e){try{return Array.prototype.slice.call(e)}catch(t){var o=function(){var o=[];return n(e,function(e){o.push(e)}),{v:o}}();if("object"===(void 0===o?"undefined":l(o)))return o.v}}function d(e){return e[e.length-1]}function c(e,o){return!(!e||"startTag"!==e.type&&"atomicTag"!==e.type||!("tagName"in e)||!~e.tagName.toLowerCase().indexOf(o))}function p(e){return c(e,"script")}function _(e){return c(e,"style")}o.__esModule=!0;var l="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};o.existy=t,o.isFunction=r,o.each=n,o.eachKey=i,o.defaults=s,o.toArray=a,o.last=d,o.isTag=c,o.isScript=p,o.isStyle=_}])}),function(e,o){e.gdpr_lightbox=function(e,o){"use strict";function t(e){var o=I();return U&&e.length?(e.one(U,o.resolve),setTimeout(o.resolve,500)):o.resolve(),o.promise()}function r(e,t,r){if(1===arguments.length)return o.extend({},e);if("string"==typeof t){if(void 0===r)return void 0===e[t]?null:e[t];e[t]=r}else o.extend(e,t);return this}function n(e){for(var o,t=decodeURI(e.split("#")[0]).split("&"),r={},n=0,i=t.length;n<i;n++)t[n]&&(o=t[n].split("="),r[o[0]]=o[1]);return r}function i(e,t){return e+(e.indexOf("?")>-1?"&":"?")+o.param(t)}function s(e,o){var t=e.indexOf("#");return-1===t?o:(t>0&&(e=e.substr(t)),o+e)}function a(e){return o('<span class="gdpr_lightbox-error"></span>').append(e)}function d(e,t){var r=t.opener()&&t.opener().data("gdpr_lightbox-desc")||"Image with no description",n=o('<img src="'+e+'" alt="'+r+'"/>'),i=I(),s=function(){i.reject(a("Failed loading image"))};return n.on("load",function(){if(0===this.naturalWidth)return s();i.resolve(n)}).on("error",s),i.promise()}function c(e,t){var r,n,i;try{r=o(e)}catch(e){return!1}return!!r.length&&(n=o('<i style="display:none !important"></i>'),i=r.hasClass("gdpr_lightbox-hide"),t.element().one("gdpr_lightbox:remove",function(){n.before(r).remove(),i&&!r.closest(".gdpr_lightbox-content").length&&r.addClass("gdpr_lightbox-hide")}),r.removeClass("gdpr_lightbox-hide").after(n))}function p(e){var t=P.exec(e);return!!t&&f(s(e,i("https://www.youtube"+(t[2]||"")+".com/embed/"+t[4],o.extend({autoplay:1},n(t[5]||"")))))}function _(e){var t=R.exec(e);return!!t&&f(s(e,i("https://player.vimeo.com/video/"+t[3],o.extend({autoplay:1},n(t[4]||"")))))}function l(e){var t=F.exec(e);return!!t&&(0!==e.indexOf("http")&&(e="https:"+e),f(s(e,i("https://www.facebook.com/plugins/video.php?href="+e,o.extend({autoplay:1},n(t[4]||""))))))}function g(e){var o=M.exec(e);return!!o&&f(s(e,i("https://www.google."+o[3]+"/maps?"+o[6],{output:o[6].indexOf("layer=c")>0?"svembed":"embed"})))}function f(e){return'<div class="gdpr_lightbox-iframe-container"><iframe frameborder="0" allowfullscreen allow="autoplay; fullscreen" src="'+e+'"/></div>'}function u(){return C.documentElement.clientHeight?C.documentElement.clientHeight:Math.round(S.height())}function v(e){var o=k();o&&(27===e.keyCode&&o.options("esc")&&o.close(),9===e.keyCode&&m(e,o))}function m(e,o){var t=o.element().find(E),r=t.index(C.activeElement);e.shiftKey&&r<=0?(t.get(t.length-1),e.preventDefault()):e.shiftKey||r!==t.length-1||(t.get(0),e.preventDefault())}function h(){o.each(O,function(e,o){o.resize()})}function b(e){1===O.unshift(e)&&(N.addClass("gdpr_lightbox-active"),S.on({resize:h,keydown:v})),o("body > *").not(e.element()).addClass("gdpr_lightbox-hidden").each(function(){var e=o(this);void 0===e.data(D)&&e.data(D,e.attr(j)||null)}).attr(j,"true")}function y(e){var t;e.element().attr(j,"true"),1===O.length&&(N.removeClass("gdpr_lightbox-active"),S.off({resize:h,keydown:v})),O=o.grep(O,function(o){return e!==o}),t=O.length?O[0].element():o(".gdpr_lightbox-hidden"),t.removeClass("gdpr_lightbox-hidden").each(function(){var e=o(this),t=e.data(D);t?e.attr(j,t):e.removeAttr(j),e.removeData(D)})}function k(){return 0===O.length?null:O[0]}function w(e,t,r,n){var i,s="inline",a=o.extend({},r);return n&&a[n]?(i=a[n](e,t),s=n):(o.each(["inline","iframe"],function(e,o){delete a[o],a[o]=r[o]}),o.each(a,function(o,r){return!r||(!(!r.test||r.test(e,t))||(i=r(e,t),!1!==i?(s=o,!1):void 0))})),{handler:s,content:i||""}}function x(e,n,i,s){function a(e){p=o(e).css("max-height",u()+"px"),c.find(".gdpr_lightbox-loader").each(function(){var e=o(this);t(e).always(function(){e.remove()})}),c.removeClass("gdpr_lightbox-loading").find(".gdpr_lightbox-content").empty().append(p),l=!0,p.trigger("gdpr_lightbox:ready",[_])}var d,c,p,_=this,l=!1,g=!1;n=o.extend({},A,n),c=o(n.template),_.element=function(){return c},_.opener=function(){return i},_.options=o.proxy(r,_,n),_.handlers=o.proxy(r,_,n.handlers),_.resize=function(){l&&!g&&p.css("max-height",u()+"px").trigger("gdpr_lightbox:resize",[_])},_.close=function(){if(l&&!g){g=!0,y(_);var e=I();return s&&(C.activeElement===c[0]||o.contains(c[0],C.activeElement)),p.trigger("gdpr_lightbox:close",[_]),c.removeClass("gdpr_lightbox-opened").addClass("gdpr_lightbox-closed"),t(p.add(c)).always(function(){p.trigger("gdpr_lightbox:remove",[_]),c.remove(),c=void 0,e.resolve()}),e.promise()}},d=w(e,_,n.handlers,n.handler),c.attr(j,"false").addClass("gdpr_lightbox-loading gdpr_lightbox-opened gdpr_lightbox-"+d.handler).appendTo("body").on("click","[data-gdpr_lightbox-close]",function(e){o(e.target).is("[data-gdpr_lightbox-close]")&&_.close()}).trigger("gdpr_lightbox:open",[_]),b(_),o.when(d.content).always(a)}function T(e,t,r){e.preventDefault?(e.preventDefault(),r=o(this),e=r.data("gdpr_lightbox-target")||r.attr("href")||r.attr("src")):r=o(r);var n=new x(e,o.extend({},r.data("gdpr_lightbox-options")||r.data("gdpr_lightbox"),t),r,C.activeElement);if(!e.preventDefault)return n}var C=e.document,S=o(e),I=o.Deferred,N=o("html"),O=[],j="aria-hidden",D="gdpr_lightbox-"+j,E='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])',A={esc:!0,handler:null,handlers:{image:d,inline:c,youtube:p,vimeo:_,googlemaps:g,facebookvideo:l,iframe:f},template:'<div class="gdpr_lightbox" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="gdpr_lightbox-wrap" data-gdpr_lightbox-close role="document"><div class="gdpr_lightbox-loader" aria-hidden="true">Loading...</div><div class="gdpr_lightbox-container"><div class="gdpr_lightbox-content"></div><button class="gdpr_lightbox-close" type="button" aria-label="Close (Press escape to close)" data-gdpr_lightbox-close>&times;</button></div></div></div>'},J=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,P=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,R=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,M=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,F=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,U=function(){var e=C.createElement("div"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in o)if(void 0!==e.style[t])return o[t];return!1}();return d.test=function(e){return J.test(e)},T.options=o.proxy(r,T,A),T.handlers=o.proxy(r,T,A.handlers),T.current=k,o(C).on("click.gdpr_lightbox","[data-gdpr_lightbox]",T),T}(e,e.jQuery||e.Zepto)}("undefined"!=typeof window?window:this),function(e){var o={common:{init:function(){"use strict";function o(e){var o;try{o=new URL(e)}catch(e){return!1}return"http:"===o.protocol||"https:"===o.protocol}function t(e){try{new URLSearchParams(window.location.search).has("gdpr_dbg")&&console.warn(e)}catch(e){console.warn(e)}}function r(){"true"===(void 0!==moove_frontend_gdpr_scripts.ajax_cookie_removal?moove_frontend_gdpr_scripts.ajax_cookie_removal:"false")&&e.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_remove_php_cookies"},function(e){t("dbg - cookies removed")})}function n(){r();var o=void 0!==moove_frontend_gdpr_scripts.wp_lang?moove_frontend_gdpr_scripts.wp_lang:"";"true"===(void 0!==moove_frontend_gdpr_scripts.ajax_cookie_removal?moove_frontend_gdpr_scripts.ajax_cookie_removal:"false")?e.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:0,thirdparty:0,advanced:0,wp_lang:o},function(e){var o={};o.strict=1,o.thirdparty=0,o.advanced=0,h(),i("script_inject",o),_(o)}):h()}function i(e,o){try{jQuery().gdpr_cookie_compliance_analytics(e,o)}catch(e){}}function s(e){try{jQuery().gdpr_cookie_compliance_consent_log(e)}catch(e){}}function a(){var e=u("moove_gdpr_popup"),o={};return o.strict="0",o.thirdparty="0",o.advanced="0",e&&(e=JSON.parse(e),o.strict=e.strict,o.thirdparty=e.thirdparty,o.advanced=e.advanced,_(o),i("script_inject",e)),void 0!==moove_frontend_gdpr_scripts.ifbc?("strict"===moove_frontend_gdpr_scripts.ifbc&&e&&1===parseInt(e.strict)&&d(),"thirdparty"===moove_frontend_gdpr_scripts.ifbc&&e&&1===parseInt(e.thirdparty)&&d(),"advanced"===moove_frontend_gdpr_scripts.ifbc&&e&&1===parseInt(e.advanced)&&d()):"1"!==moove_frontend_gdpr_scripts.strict_init&&d(),o}function d(){e(document).find("iframe[data-gdpr-iframesrc]").each(function(){e(this).attr("src",e(this).attr("data-gdpr-iframesrc"))})}function c(e){w=!0,f("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"1",advanced:"1"}),y),p("enabled-all"),i("accept_all","")}function p(r){var n=!1;try{void 0!==moove_frontend_gdpr_scripts.force_reload&&"true"===moove_frontend_gdpr_scripts.force_reload&&(n=!0)}catch(e){}var s=a(),d=moove_frontend_gdpr_scripts.enabled_default.third_party,c=moove_frontend_gdpr_scripts.enabled_default.advanced;if(document.cookie.indexOf("moove_gdpr_popup")>=0||1==d||1==c){var p=u("moove_gdpr_popup");1==d&&(N.strict=1,N.thirdparty=d),1==c&&(N.strict=1,N.advanced=c),N&&(parseInt(s.strict)-parseInt(N.strict)<0&&(n=!0),parseInt(s.thirdparty)-parseInt(N.thirdparty)<0&&(n=!0),parseInt(s.advanced)-parseInt(N.advanced)<0&&(n=!0))}if(n)if(p={strict:0,thirdparty:0,advanced:0},i("script_inject",p),void 0!==moove_frontend_gdpr_scripts.scripts_defined)setTimeout(function(){location.reload(!0)},800);else{var _=e(document).find('script[src*="googletagmanager.com"]');_.length>0&&_.each(function(){var t=e(this).attr("src");if(t&&o(t)){var r=new URL(t),n=r.searchParams.get("id");n&&(document.cookie="woocommerce_"+n+"=true; expires=Thu, 31 Dec 1970 23:59:59 UTC; path=/",window["ga-disable-"+n]=!0),window.gtag&&window.gtag("remove"),e(this).remove()}});var g=void 0!==moove_frontend_gdpr_scripts.ajax_cookie_removal?moove_frontend_gdpr_scripts.ajax_cookie_removal:"true";if("function"==typeof navigator.sendBeacon)if("true"===g){var f=new FormData;f.append("action","moove_gdpr_remove_php_cookies"),navigator.sendBeacon(moove_frontend_gdpr_scripts.ajaxurl,f),location.reload(!0)}else location.reload(!0);else"true"===g?e.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_remove_php_cookies"},function(e){location.reload(!0)}).fail(function(){location.reload(!0)}):location.reload(!0)}else{var m=u("moove_gdpr_popup");t("dbg - inject - 4"),v(m),l(),e("#moove_gdpr_save_popup_settings_button").show()}}function _(o){o&&(i("script_inject",o),1===parseInt(o.strict)?(e("#moove_gdpr_strict_cookies").is(":checked")||(e("#moove_gdpr_strict_cookies").prop("checked",!0).trigger("change"),e("#third_party_cookies fieldset, #third_party_cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),e("#moove_gdpr_performance_cookies").prop("disabled",!1),e("#third_party_cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),e("#advanced-cookies fieldset, #advanced-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),e("#advanced-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),e("#moove_gdpr_advanced_cookies").prop("disabled",!1)),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&(wp_set_consent("functional","allow"),console.warn("functional allow"))):(e("#moove_gdpr_strict_cookies").is(":checked")&&(e("#moove_gdpr_strict_cookies").prop("checked",!0).trigger("change"),e("#third_party_cookies fieldset, #third_party_cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),e("#moove_gdpr_performance_cookies").prop("disabled",!0).prop("checked",!1),e("#advanced-cookies fieldset, #advanced-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),e("#moove_gdpr_advanced_cookies").prop("disabled",!0).prop("checked",!1)),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&(wp_set_consent("functional","deny"),console.warn("functional deny"))),1===parseInt(o.thirdparty)?(e("#moove_gdpr_performance_cookies").is(":checked")||e("#moove_gdpr_performance_cookies").prop("checked",!0).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&(wp_set_consent("statistics","allow"),console.warn("statistics allow"))):(e("#moove_gdpr_performance_cookies").is(":checked")&&e("#moove_gdpr_performance_cookies").prop("checked",!1).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&(wp_set_consent("statistics","deny"),console.warn("statistics deny"))),1===parseInt(o.advanced)?(e("#moove_gdpr_advanced_cookies").is(":checked")||e("#moove_gdpr_advanced_cookies").prop("checked",!0).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&(wp_set_consent("marketing","allow"),console.warn("marketing allow"))):(e("#moove_gdpr_advanced_cookies").is(":checked")&&e("#moove_gdpr_advanced_cookies").prop("checked",!1).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&(wp_set_consent("marketing","deny"),console.warn("marketing deny"))),e('input[data-name="moove_gdpr_performance_cookies"]').prop("checked",e("#moove_gdpr_performance_cookies").is(":checked")),e('input[data-name="moove_gdpr_strict_cookies"]').prop("checked",e("#moove_gdpr_strict_cookies").is(":checked")),e('input[data-name="moove_gdpr_advanced_cookies"]').prop("checked",e("#moove_gdpr_advanced_cookies").is(":checked")))}function l(){e("#moove_gdpr_cookie_info_bar").length>0&&(e("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),e("body").removeClass("gdpr-infobar-visible"),e("#moove_gdpr_cookie_info_bar").hide())}function g(){var o=!0;if("undefined"!=typeof sessionStorage&&1===parseInt(sessionStorage.getItem("gdpr_infobar_hidden"))&&(o=!1),void 0!==moove_frontend_gdpr_scripts.display_cookie_banner&&o){if("true"===moove_frontend_gdpr_scripts.display_cookie_banner)e("#moove_gdpr_cookie_info_bar").length>0&&(e("#moove_gdpr_cookie_info_bar").removeClass("moove-gdpr-info-bar-hidden"),e("#moove_gdpr_save_popup_settings_button:not(.button-visible)").hide(),e("body").addClass("gdpr-infobar-visible"),e("#moove_gdpr_cookie_info_bar").show(),i("show_infobar",""));else if(e("#moove_gdpr_cookie_info_bar").length>0){e("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),e("body").removeClass("gdpr-infobar-visible"),e("#moove_gdpr_cookie_info_bar").hide();var r={strict:1,thirdparty:1,advanced:1};t("dbg - inject - 5"),v(JSON.stringify(r))}}else e("#moove_gdpr_cookie_info_bar").length>0&&o&&(e("#moove_gdpr_cookie_info_bar").removeClass("moove-gdpr-info-bar-hidden"),e("#moove_gdpr_save_popup_settings_button:not(.button-visible)").hide(),e("body").addClass("gdpr-infobar-visible"),e("#moove_gdpr_cookie_info_bar").show(),i("show_infobar",""))}function f(e,o,r){var n;if(r>0){var i=new Date;i.setTime(i.getTime()+24*r*60*60*1e3),n="; expires="+i.toGMTString()}else n="";try{var a="SameSite=Lax";void 0!==moove_frontend_gdpr_scripts.cookie_attributes&&(a=moove_frontend_gdpr_scripts.cookie_attributes),void 0!==moove_frontend_gdpr_scripts.gdpr_consent_version&&(o=JSON.parse(o),o.version=moove_frontend_gdpr_scripts.gdpr_consent_version,o=JSON.stringify(o)),"moove_gdpr_popup"===e&&0===parseInt(o.strict)?void 0!==moove_frontend_gdpr_scripts.gdpr_scor&&"false"===moove_frontend_gdpr_scripts.gdpr_scor?document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(o)+n+"; path=/; "+a:document.cookie=encodeURIComponent(e)+"=; Path=/;":document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(o)+n+"; path=/; "+a,o!==A&&(A=o,s(o))}catch(e){t("error - moove_gdpr_create_cookie: "+e)}}function u(e){for(var o=encodeURIComponent(e)+"=",t=document.cookie.split(";"),r=0;r<t.length;r++){for(var n=t[r];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(o)){var i=decodeURIComponent(n.substring(o.length,n.length)),s=JSON.parse(i);if(void 0!==s.version){if(void 0!==moove_frontend_gdpr_scripts.gdpr_consent_version){var a=moove_frontend_gdpr_scripts.gdpr_consent_version;if(parseFloat(a)>parseFloat(s.version))return document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;",null}}else if(void 0!==moove_frontend_gdpr_scripts.gdpr_consent_version&&parseFloat(moove_frontend_gdpr_scripts.gdpr_consent_version)>1)return document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;",null;return i}}return null}function v(o){if(N=a(),o){var t=o;o=JSON.parse(o);a();if(!1!==O){var r=JSON.parse(O);1===parseInt(r.thirdparty)&&1===parseInt(o.thirdparty)&&(o.thirdparty="0"),1===parseInt(r.advanced)&&1===parseInt(o.advanced)&&(o.advanced="0")}if(i("script_inject",o),j=!0,void 0!==moove_frontend_gdpr_scripts.ifbc?("strict"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.strict)&&d(),"thirdparty"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.thirdparty)&&d(),"advanced"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.advanced)&&d()):1===parseInt(o.strict)&&d(),void 0!==moove_frontend_gdpr_scripts.scripts_defined)try{var s=JSON.parse(moove_frontend_gdpr_scripts.scripts_defined);if(1===parseInt(o.strict))1===parseInt(o.thirdparty)&&void 0===k.thirdparty&&(s.thirdparty.header&&postscribe(document.head,s.thirdparty.header),s.thirdparty.body&&e(s.thirdparty.body).prependTo(document.body),s.thirdparty.footer&&postscribe(document.body,s.thirdparty.footer),k.thirdparty=!0),1===parseInt(o.advanced)&&void 0===k.advanced&&(s.advanced.header&&postscribe(document.head,s.advanced.header),s.advanced.body&&e(s.advanced.body).prependTo(document.body),s.advanced.footer&&postscribe(document.body,s.advanced.footer),k.advanced=!0);else{var o=u("moove_gdpr_popup");o&&(h(),n())}}catch(e){console.error(e)}else if(void 0===k.thirdparty||void 0===k.advanced){1===o.thirdparty&&(k.thirdparty=!0),1===o.advanced&&(k.advanced=!0);var c=void 0!==moove_frontend_gdpr_scripts.wp_lang?moove_frontend_gdpr_scripts.wp_lang:"";0===parseInt(o.thirdparty)&&0===parseInt(o.advanced)&&h(),e.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:o.strict,thirdparty:o.thirdparty,advanced:o.advanced,wp_lang:c},function(r){O=t,i("script_inject",o);var n=JSON.parse(r);n.header&&postscribe(document.head,n.header),n.body&&e(n.body).prependTo(document.body),n.footer&&postscribe(document.body,n.footer)})}}else g()}function m(){var o=!0;e(document).find("#moove_gdpr_cookie_modal input[type=checkbox]").each(function(){e(this).is(":checked")||(o=!1)})}function h(o){try{e(document).find("script[data-gdpr]").each(function(){t("script_removed: "+e(this).attr("src"))});for(var r=document.cookie.split(";"),n=window.location.hostname,i=0;i<r.length;i++){var s=r[i],a=s.indexOf("="),d=a>-1?s.substr(0,a):s;d.includes("woocommerce")||d.includes("wc_")||d.includes("moove_gdpr_popup")||d.includes("wordpress")||(document.cookie=d+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT;domain="+n,document.cookie=d+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT;domain=."+n,t("cookie removed: "+d+" - "+n))}}catch(e){t("error in gdpr_delete_all_cookies: "+e)}"undefined"!=typeof sessionStorage&&sessionStorage.removeItem("gdpr_session")}function b(o){var t=u("moove_gdpr_popup");o&&(h(),r());var n="0",i="0",s="0",a=!1;t&&(t=JSON.parse(t),n=t.strict,i=t.advanced,s=t.thirdparty),e("#moove_gdpr_strict_cookies").length>0?e("#moove_gdpr_strict_cookies").is(":checked")?(n="1",a=!0):n="0":(a=!0,n="1"),e("#moove_gdpr_performance_cookies").is(":checked")?(s="1",a=!0):s="0",e("#moove_gdpr_advanced_cookies").is(":checked")?(i="1",a=!0):i="0",!t&&a?(f("moove_gdpr_popup",JSON.stringify({strict:n,thirdparty:s,advanced:i}),y),l(),e("#moove_gdpr_save_popup_settings_button").show()):t&&(w||f("moove_gdpr_popup",JSON.stringify({strict:n,thirdparty:s,advanced:i}),y));var t=u("moove_gdpr_popup");t&&(t=JSON.parse(t),"0"==t.strict&&"0"==t.advanced&&"0"==t.thirdparty&&h())}var y=365,k=[],w=!1;void 0!==moove_frontend_gdpr_scripts.cookie_expiration&&(y=moove_frontend_gdpr_scripts.cookie_expiration),e(document).on("click","#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v1 .main-modal-content .moove-gdpr-tab-main:not(#privacy_overview) .tab-title",function(o){window.innerWidth<768&&(e(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-tab-main-content").is(":visible")?e(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-tab-main-content").slideUp(300):e(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-tab-main-content").slideDown(300))}),e(document).on("click tap",'#moove_gdpr_cookie_info_bar .moove-gdpr-infobar-reject-btn, [href*="#gdpr-reject-cookies"], .moove-gdpr-modal-reject-all',function(o){o.preventDefault(),h(),n(),e("#moove_gdpr_cookie_info_bar").length>0&&(e("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),e("body").removeClass("gdpr-infobar-visible"),e("#moove_gdpr_cookie_info_bar").hide(),e("#moove_gdpr_save_popup_settings_button").show()),e(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),e(document).moove_gdpr_lightbox_close(),void 0!==moove_frontend_gdpr_scripts.gdpr_scor&&"false"===moove_frontend_gdpr_scripts.gdpr_scor||(f("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0"}),y),setTimeout(function(){f("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0"}),y)},500)),p("reject-btn")});var x=!1,T=e(".moove_gdpr_modal_theme_v2 .moove-gdpr-tab-main").first(),C=e(".moove_gdpr_modal_theme_v2 .moove-gdpr-tab-main").first(),S=0,I=!1;e(document).on("keydown",function(o){if(e("body").hasClass("moove_gdpr_overflow")&&e(".moove-gdpr-modal-content").hasClass("moove_gdpr_modal_theme_v1")){if(38==o.keyCode){o.preventDefault();var t=e("#moove-gdpr-menu li.menu-item-selected"),r=t.prev();0===r.length&&(r=e("#moove-gdpr-menu li").last()),r.find(".moove-gdpr-tab-nav:visible").trigger("click"),e(".moove-gdpr-tab-main:visible").trigger("focus")}if(40==o.keyCode)if(o.preventDefault(),I){var t=e("#moove-gdpr-menu li.menu-item-selected"),r=t.prev();0===r.length&&(r=e("#moove-gdpr-menu li").last()),r.find(".moove-gdpr-tab-nav:visible").trigger("click"),e(".moove-gdpr-tab-main:visible").trigger("focus")}else{var t=e("#moove-gdpr-menu li.menu-item-selected"),n=t.next();0===n.length&&(n=e("#moove-gdpr-menu li").first()),n.find(".moove-gdpr-tab-nav:visible").trigger("click"),e(".moove-gdpr-tab-main:visible").trigger("focus")}if(9==o.keyCode){o.preventDefault();var i=e("#moove_gdpr_cookie_modal .mgbutton, #moove_gdpr_cookie_modal .moove-gdpr-modal-close, #moove_gdpr_cookie_modal #moove-gdpr-menu > li");if(i.length>0){var s=!1;if(S<=i.length?(I?S--:S++,s=i[S],e(s).is(":visible")||(I?S--:S++,s=i[S])):(S=0,s=i[S]),e("#moove_gdpr_cookie_modal .focus-g").removeClass("focus-g"),S<0&&I&&(S=i.length),!s&&S>i.length&&(S=0,s=i[S]),e(s).addClass("focus-g").trigger("focus"),(e(s).hasClass("menu-item-on")||e(s).hasClass("menu-item-off"))&&e(s).find("button").trigger("click"),e(s).length>0)try{e(s)[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}else{e(".cookie-switch").removeClass("focus-g");var n=T.next();if(T=n,0===n.length&&(n=C,T=C),n.find(".cookie-switch").trigger("focus").addClass("focus-g"),n.find(".cookie-switch").length>0)try{n.find(".cookie-switch")[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}}if(32==o.keyCode){o.preventDefault();e(".moove-gdpr-tab-main:visible").find(".moove-gdpr-status-bar input[type=checkbox]").trigger("click")}13==o.keyCode&&(o.preventDefault(),e(document).find(".focus-g").length>0?e(document).find(".focus-g").trigger("click"):e(".moove-gdpr-modal-save-settings").trigger("click"))}if(e("body").hasClass("moove_gdpr_overflow")&&e(".moove-gdpr-modal-content").hasClass("moove_gdpr_modal_theme_v2")){if(38==o.keyCode){o.preventDefault();var t=e("#moove-gdpr-menu li.menu-item-selected"),r=t.prev();0===r.length&&(r=e("#moove-gdpr-menu li").last()),r.find(".moove-gdpr-tab-nav:visible").trigger("click"),e(".moove-gdpr-tab-main:visible").trigger("focus")}if(40==o.keyCode){o.preventDefault();var t=e("#moove-gdpr-menu li.menu-item-selected"),n=t.next();0===n.length&&(n=e("#moove-gdpr-menu li").first()),n.find(".moove-gdpr-tab-nav:visible").trigger("click"),e(".moove-gdpr-tab-main:visible").trigger("focus")}if(32==o.keyCode){o.preventDefault();e("#moove_gdpr_cookie_modal").find(".focus-g").trigger("click")}if(9==o.keyCode){o.preventDefault();var i=e("#moove_gdpr_cookie_modal .cookie-switch, #moove_gdpr_cookie_modal .mgbutton, #moove_gdpr_cookie_modal a:not(.moove-gdpr-branding), #moove_gdpr_cookie_modal .moove-gdpr-modal-close");if(i.length>0){var s=!1;if(S<=i.length?(I?S--:S++,s=i[S],e(s).is(":visible")||(I?S--:S++,s=i[S])):(S=0,s=i[S]),e("#moove_gdpr_cookie_modal .focus-g").removeClass("focus-g"),S<0&&I&&(S=i.length),!s&&S>i.length&&(S=0,s=i[S]),e(s).addClass("focus-g").trigger("focus"),e(s).length>0)try{e(s)[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}else{e(".cookie-switch").removeClass("focus-g");var n=T.next();if(T=n,0===n.length&&(n=C,T=C),n.find(".cookie-switch").trigger("focus").addClass("focus-g"),n.find(".cookie-switch").length>0)try{n.find(".cookie-switch")[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}}13==o.keyCode&&(e("#moove_gdpr_cookie_modal .focus-g").length>0&&(e("#moove_gdpr_cookie_modal .focus-g").hasClass("mgbutton")||e("#moove_gdpr_cookie_modal .focus-g").hasClass("moove-gdpr-modal-close")||e("#moove_gdpr_cookie_modal .focus-g").attr("href"))?e("#moove_gdpr_cookie_modal .focus-g").attr("href")?e("#moove_gdpr_cookie_modal .focus-g").trigger("click"):(o.preventDefault(),e("#moove_gdpr_cookie_modal .focus-g").trigger("click")):(o.preventDefault(),e(".moove-gdpr-modal-save-settings").trigger("click")))}}),e(document).on("keyup",function(e){16==e.keyCode&&(I=!1),17!=e.keyCode&&18!=e.keyCode&&13!=e.keyCode||(I=!1)}),document.addEventListener("visibilitychange",function(e){I=!1}),e(document).on("keydown",function(o){if(16==o.keyCode&&(I=!0),e("body").hasClass("gdpr-infobar-visible")&&!e("body").hasClass("moove_gdpr_overflow")&&e("#moove_gdpr_cookie_info_bar").hasClass("gdpr-full-screen-infobar")){if(9==o.keyCode){o.preventDefault(),console.warn("fsw-tab");var t=e('#moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar span.change-settings-button, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar button.change-settings-button, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar [data-target="third_party_cookies"] label, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar [data-target="advanced-cookies"] label, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar .mgbutton');if(t.length>0){var r=!1;if(S<=t.length?(I?S--:S++,r=t[S],e(r).is(":visible")||(I?S--:S++,r=t[S])):(S=0,r=t[S]),e("#moove_gdpr_cookie_info_bar .focus-g").removeClass("focus-g"),S<0&&I&&(S=t.length),!r&&S>t.length&&(S=0,r=t[S]),e(document).find("*").blur(),e(r).addClass("focus-g").trigger("focus"),e(r).length>0)try{e(r)[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}else{e(".cookie-switch").removeClass("focus-g");var n=T.next();if(T=n,0===n.length&&(n=C,T=C),n.find(".cookie-switch").trigger("focus").addClass("focus-g"),n.find(".cookie-switch").length>0)try{n.find(".cookie-switch")[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}}if(32==o.keyCode){o.preventDefault();var i=e("#moove_gdpr_cookie_info_bar").find(".gdpr-shr-switch.focus-g input[type=checkbox]");console.warn("space"),i.trigger("click")}}13==o.keyCode&&e(document.activeElement).length>0&&e(document.activeElement).closest("#moove_gdpr_cookie_info_bar").length>0&&(o.preventDefault(),e(document.activeElement).trigger("click"))}),e.fn.moove_gdpr_read_cookies=function(e){var o=u("moove_gdpr_popup"),t={};return t.strict="0",t.thirdparty="0",t.advanced="0",o&&(o=JSON.parse(o),t.strict=parseInt(o.strict),t.thirdparty=parseInt(o.thirdparty),t.advanced=parseInt(o.advanced)),t};var N=a(),O=!1,j=!1,D="",E=!1,A="";e(document).on("click tap","#moove_gdpr_cookie_info_bar .moove-gdpr-infobar-close-btn",function(o){if(o.preventDefault(),void 0!==moove_frontend_gdpr_scripts.close_btn_action){var t=parseInt(moove_frontend_gdpr_scripts.close_btn_action);1===t&&(l(),e("#moove_gdpr_save_popup_settings_button").show(),"undefined"!=typeof sessionStorage&&sessionStorage.setItem("gdpr_infobar_hidden",1)),2===t&&(h(),n(),e("#moove_gdpr_cookie_info_bar").length>0&&(e("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),e("body").removeClass("gdpr-infobar-visible"),e("#moove_gdpr_cookie_info_bar").hide(),e("#moove_gdpr_save_popup_settings_button").show()),e(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),e(document).moove_gdpr_lightbox_close(),void 0!==moove_frontend_gdpr_scripts.gdpr_scor&&"false"===moove_frontend_gdpr_scripts.gdpr_scor||(f("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0"}),y),setTimeout(function(){f("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0"}),y)},500)),p("reject-btn")),3===t&&c("enable_all close-btn"),4===t&&(h(),n(),e("#moove_gdpr_cookie_info_bar").length>0&&(e("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),e("body").removeClass("gdpr-infobar-visible"),e("#moove_gdpr_cookie_info_bar").hide(),e("#moove_gdpr_save_popup_settings_button").show()),e(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),e(document).moove_gdpr_lightbox_close(),void 0!==moove_frontend_gdpr_scripts.gdpr_scor&&"false"===moove_frontend_gdpr_scripts.gdpr_scor||(f("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0"}),y),setTimeout(function(){f("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0"}),y)},500)),void 0!==moove_frontend_gdpr_scripts.close_btn_rdr&&""!==moove_frontend_gdpr_scripts.close_btn_rdr?window.parent.location.href=moove_frontend_gdpr_scripts.close_btn_rdr:p("reject-btn"))}else l(),e("#moove_gdpr_save_popup_settings_button").show(),"undefined"!=typeof sessionStorage&&sessionStorage.setItem("gdpr_infobar_hidden",1)}),e.fn.moove_gdpr_save_cookie=function(o){var t=u("moove_gdpr_popup"),r=t,s=e(window).scrollTop();if(!t){if(o.thirdParty)var a="1";else var a="0";if(o.advanced)var c="1";else var c="0";if(o.scrollEnable){var p=o.scrollEnable;e(window).scroll(function(){!j&&e(this).scrollTop()-s>p&&("undefined"===o.thirdparty&&"undefined"===o.advanced||(f("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:a,advanced:c}),y),t=JSON.parse(t),_(t)))})}else"undefined"===o.thirdparty&&"undefined"===o.advanced||(f("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:a,advanced:c}),y),t=JSON.parse(t),_(t));if(t=u("moove_gdpr_popup"))if(t=JSON.parse(t),i("script_inject",t),j=!0,void 0!==moove_frontend_gdpr_scripts.ifbc?("strict"===moove_frontend_gdpr_scripts.ifbc&&t&&1===parseInt(t.strict)&&d(),"thirdparty"===moove_frontend_gdpr_scripts.ifbc&&t&&1===parseInt(t.thirdparty)&&d(),"advanced"===moove_frontend_gdpr_scripts.ifbc&&t&&1===parseInt(t.advanced)&&d()):1===parseInt(t.strict)&&d(),void 0!==moove_frontend_gdpr_scripts.scripts_defined)try{var l=JSON.parse(moove_frontend_gdpr_scripts.scripts_defined);if(1===parseInt(t.strict))1===parseInt(t.thirdparty)&&void 0===k.thirdparty&&(l.thirdparty.header&&postscribe(document.head,l.thirdparty.header),l.thirdparty.body&&e(l.thirdparty.body).prependTo(document.body),l.thirdparty.footer&&postscribe(document.body,l.thirdparty.footer),k.thirdparty=!0),1===parseInt(t.advanced)&&void 0===k.advanced&&(l.advanced.header&&postscribe(document.head,l.advanced.header),l.advanced.body&&e(l.advanced.body).prependTo(document.body),l.advanced.footer&&postscribe(document.body,l.advanced.footer),k.advanced=!0);else{var t=u("moove_gdpr_popup");t&&(h(),n())}}catch(e){console.error(e)}else if(void 0===k.thirdparty||void 0===k.advanced){1===t.thirdparty&&(k.thirdparty=!0),1===t.advanced&&(k.advanced=!0);var g=void 0!==moove_frontend_gdpr_scripts.wp_lang?moove_frontend_gdpr_scripts.wp_lang:"";0===parseInt(t.thirdparty)&&0===parseInt(t.advanced)&&h(),e.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:t.strict,thirdparty:t.thirdparty,advanced:t.advanced,wp_lang:g},function(o){O=r,i("script_inject",t);var n=JSON.parse(o);n.header&&postscribe(document.head,n.header),n.body&&e(n.body).prependTo(document.body),n.footer&&postscribe(document.body,n.footer)})}}},function(){var o=(location.pathname,e(window).scrollTop());e("#moove_gdpr_save_popup_settings_button").show();var r=moove_frontend_gdpr_scripts.enabled_default.third_party,n=moove_frontend_gdpr_scripts.enabled_default.advanced;if(void 0!==moove_frontend_gdpr_scripts.enable_on_scroll&&"true"===moove_frontend_gdpr_scripts.enable_on_scroll&&1!==parseInt(r)&&1!==parseInt(n)&&(r=1,n=1),document.cookie.indexOf("moove_gdpr_popup")>=0||1==r||1==n){var i=u("moove_gdpr_popup");if(i){var s=a();"0"==s.strict&&"0"==s.advanced&&"0"==s.thirdparty&&(h(),g())}else{var d=!1;if("undefined"!=typeof sessionStorage&&(d=sessionStorage.getItem("gdpr_session")),void 0!==moove_frontend_gdpr_scripts.enable_on_scroll&&"true"===moove_frontend_gdpr_scripts.enable_on_scroll){if(d)try{_(JSON.parse(d)),j=!0,t("dbg - inject - 1"),v(d),f("moove_gdpr_popup",d,y),l()}catch(e){}else if((!j&&1==moove_frontend_gdpr_scripts.enabled_default.third_party||!j&&1==moove_frontend_gdpr_scripts.enabled_default.advanced)&&(i={strict:1,thirdparty:r,advanced:n},_(i),i=JSON.stringify(i),x=!0,g(),t("dbg - default scroll inject")),void 0!==moove_frontend_gdpr_scripts.gdpr_aos_hide&&("1"===moove_frontend_gdpr_scripts.gdpr_aos_hide||"true"===moove_frontend_gdpr_scripts.gdpr_aos_hide||"object"==typeof moove_frontend_gdpr_scripts.gdpr_aos_hide&&moove_frontend_gdpr_scripts.gdpr_aos_hide.includes("1"))&&(t("dbg - enable on scroll - enter"),e(window).scroll(function(){if((!j||x)&&e(this).scrollTop()-o>200){i={strict:1,thirdparty:r,advanced:n},u("moove_gdpr_popup")||"undefined"!=typeof sessionStorage&&((d=sessionStorage.getItem("gdpr_session"))||(sessionStorage.setItem("gdpr_session",JSON.stringify(i)),d=sessionStorage.getItem("gdpr_session")));try{_(i),i=JSON.stringify(i),g(),j=!0,t("dbg - inject - 2 - accept on scroll"),x||v(i),x=!1,f("moove_gdpr_popup",i,y),l(),p("check reload on scroll"),e("#moove_gdpr_save_popup_settings_button").show()}catch(e){}}})),void 0!==moove_frontend_gdpr_scripts.gdpr_aos_hide&&("2"===moove_frontend_gdpr_scripts.gdpr_aos_hide||"object"==typeof moove_frontend_gdpr_scripts.gdpr_aos_hide&&moove_frontend_gdpr_scripts.gdpr_aos_hide.includes("2"))){var c=30;if(void 0!==moove_frontend_gdpr_scripts.gdpr_aos_hide_seconds)var c=parseInt(moove_frontend_gdpr_scripts.gdpr_aos_hide_seconds);t("dbg - hidetimer - enter, seconds: "+c),setTimeout(function(){if(t("dbg - hidetimer - is_created: "+j),!j){i={strict:1,thirdparty:r,advanced:n};var o=u("moove_gdpr_popup");t("dbg - hidetimer - cookies_stored: "+o),o||"undefined"!=typeof sessionStorage&&((d=sessionStorage.getItem("gdpr_session"))||(sessionStorage.setItem("gdpr_session",JSON.stringify(i)),d=sessionStorage.getItem("gdpr_session")));try{_(i),i=JSON.stringify(i),g(),j=!0,t("dbg - inject - 2a"),v(i),f("moove_gdpr_popup",i,y),p("check reload hidetimer")}catch(e){}}l(),e("#moove_gdpr_save_popup_settings_button").show()},1e3*c)}}else i={strict:1,thirdparty:r,advanced:n},_(i),i=JSON.stringify(i),g()}t("dbg - inject - 3"),v(i)}else g()}(),e(document).on("click",'[data-href*="#moove_gdpr_cookie_modal"],[href*="#moove_gdpr_cookie_modal"]',function(o){o.preventDefault(),e("#moove_gdpr_cookie_modal").length>0&&(E=!0,D=gdpr_lightbox("#moove_gdpr_cookie_modal"),e(".gdpr_lightbox").addClass("moove_gdpr_cookie_modal_open"),e(document).moove_gdpr_lightbox_open(),i("opened_modal_from_link",""))}),e(document).on("click",'[data-href*="#gdpr_cookie_modal"],[href*="#gdpr_cookie_modal"]',function(o){o.preventDefault(),e("#moove_gdpr_cookie_modal").length>0&&(E=!0,D=gdpr_lightbox("#moove_gdpr_cookie_modal"),e(".gdpr_lightbox").addClass("moove_gdpr_cookie_modal_open"),e(document).moove_gdpr_lightbox_open(),i("opened_modal_from_link",""))}),e(document).on("click tap","#moove_gdpr_cookie_info_bar .moove-gdpr-close-modal-button a, #moove_gdpr_cookie_info_bar .moove-gdpr-close-modal-button button",function(e){e.preventDefault()}),e(document).on("click tap",".moove-gdpr-modal-close",function(o){o.preventDefault(),e(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),e(document).moove_gdpr_lightbox_close()}),e(document).on("click","#moove-gdpr-menu .moove-gdpr-tab-nav",function(o){o.preventDefault(),o.stopPropagation(),e("#moove-gdpr-menu li").removeClass("menu-item-selected"),e(this).parent().addClass("menu-item-selected"),e(".moove-gdpr-tab-content .moove-gdpr-tab-main").hide(),e(e(this).attr("href")).show(),e(e(this).attr("data-href")).show(),i("clicked_to_tab",e(this).attr("data-href"))}),e(document).on("gdpr_lightbox:close",function(o,t){e(document).moove_gdpr_lightbox_close()}),e.fn.moove_gdpr_lightbox_close=function(o){E&&(e("body").removeClass("moove_gdpr_overflow"),E=!1)},e.fn.moove_gdpr_lightbox_open=function(o){if(E){e("body").addClass("moove_gdpr_overflow");var t=u("moove_gdpr_popup");document.activeElement.blur(),"none"===moove_frontend_gdpr_scripts.show_icons&&e("body").addClass("gdpr-no-icons"),e(".moove-gdpr-status-bar input[type=checkbox]").each(function(){e(this).is(":checked")?e(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideUp():e(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideDown()}),t?(t=JSON.parse(t),_(t)):e("#moove_gdpr_strict_cookies").is(":checked")||(e("#advanced-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled"),e("#third_party_cookies .gdpr-cc-form-fieldset").addClass("fl-disabled")),void 0!==moove_frontend_gdpr_scripts.hide_save_btn&&"true"===moove_frontend_gdpr_scripts.hide_save_btn?e(".moove-gdpr-modal-save-settings").removeClass("button-visible").hide():e(".moove-gdpr-modal-save-settings").addClass("button-visible").show(),m()}},e(document).on("gdpr_lightbox:open",function(o,t){e(document).moove_gdpr_lightbox_open()}),e(document).on("click tap",".fl-disabled",function(o){e("#moove_gdpr_cookie_modal .moove-gdpr-modal-content").is(".moove_gdpr_modal_theme_v2")?e("#moove_gdpr_strict_cookies").length>0&&(e("#moove_gdpr_strict_cookies").trigger("click"),e(this).trigger("click")):e(this).closest(".moove-gdpr-tab-main-content").find(".moove-gdpr-strict-secondary-warning-message").slideDown()}),e(document).on("change",".moove-gdpr-status-bar input[type=checkbox]",function(o){e(".moove-gdpr-modal-save-settings").addClass("button-visible").show();var t=e(this).closest(".moove-gdpr-tab-main").attr("id");e(this).closest(".moove-gdpr-status-bar").toggleClass("checkbox-selected"),e(this).closest(".moove-gdpr-tab-main").toggleClass("checkbox-selected"),e("#moove-gdpr-menu .menu-item-"+t).toggleClass("menu-item-off"),e(this).is(":checked")?e(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideUp():e(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideDown(),e(this).is("#moove_gdpr_strict_cookies")&&(e(this).is(":checked")?(e("#third_party_cookies fieldset, #third_party_cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),e("#moove_gdpr_performance_cookies").prop("disabled",!1),e("#third_party_cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),e("#advanced-cookies fieldset, #advanced-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),e("#advanced-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),e("#moove_gdpr_advanced_cookies").prop("disabled",!1)):(e(".gdpr_cookie_settings_shortcode_content").find("input").each(function(){e(this).prop("checked",!1)}),e("#third_party_cookies fieldset, #third_party_cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),e("#moove_gdpr_performance_cookies").prop("disabled",!0).prop("checked",!1),e("#advanced-cookies fieldset, #advanced-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),e("#moove_gdpr_advanced_cookies").prop("disabled",!0).prop("checked",!1))),e('input[data-name="'+e(this).attr("name")+'"]').prop("checked",e(this).is(":checked")),m()}),e(document).on("click tap",".gdpr_cookie_settings_shortcode_content a.gdpr-shr-save-settings",function(o){o.preventDefault(),b(!0),e(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),e(document).moove_gdpr_lightbox_close(),p("modal-save-settings")}),e(document).on("change",".gdpr_cookie_settings_shortcode_content input[type=checkbox]",function(o){var t=e(this).attr("data-name"),r=e("#"+t);e(this).is(":checked")?(e('input[data-name="'+t+'"]').prop("checked",!0),"moove_gdpr_strict_cookies"!==e(this).attr("data-name")&&(e(this).closest(".gdpr_cookie_settings_shortcode_content").find('input[data-name="moove_gdpr_strict_cookies"]').is(":checked")||(e('input[data-name="'+t+'"]').prop("checked",!1),e('.gdpr_cookie_settings_shortcode_content input[data-name="moove_gdpr_strict_cookies"]').closest(".gdpr-shr-switch").css("transform","scale(1.2)"),setTimeout(function(){e('.gdpr_cookie_settings_shortcode_content input[data-name="moove_gdpr_strict_cookies"]').closest(".gdpr-shr-switch").css("transform","scale(1)")},300)))):(e('input[data-name="'+t+'"]').prop("checked",e(this).is(":checked")),"moove_gdpr_strict_cookies"===e(this).attr("data-name")&&e(".gdpr_cookie_settings_shortcode_content").find('input[type="checkbox"]').prop("checked",!1)),r.trigger("click")}),e(document).on("click tap",'.moove-gdpr-modal-allow-all, [href*="#gdpr-accept-cookies"]',function(o){o.preventDefault(),e("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){var o=e(this);o.is(":checked")||o.trigger("click")}),c("enable_all enable-all-button"),e(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),l(),b(!1),e(document).moove_gdpr_lightbox_close()}),e(document).on("click tap",".moove-gdpr-infobar-allow-all",function(o){o.preventDefault(),e("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){var o=e(this);o.is(":checked")||o.trigger("click")}),c("enable_all allow-btn"),e(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),l(),b(!1)}),e(document).on("click tap",".moove-gdpr-modal-save-settings",function(o){o.preventDefault(),b(!0),e(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),e(document).moove_gdpr_lightbox_close(),p("modal-save-settings")});if(window.location.hash){var J=window.location.hash.substring(1);J=J.replace(/\/$/,""),"moove_gdpr_cookie_modal"!==J&&"gdpr_cookie_modal"!==J||(E=!0,i("opened_modal_from_link",""),setTimeout(function(){e("#moove_gdpr_cookie_modal").length>0&&(D=gdpr_lightbox("#moove_gdpr_cookie_modal"),e(".gdpr_lightbox").addClass("moove_gdpr_cookie_modal_open"),e(document).moove_gdpr_lightbox_open())},500)),"gdpr-accept-cookies"===J&&(e("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){var o=e(this);o.is(":checked")||o.trigger("click")}),c("enable_all enable-all-button"),e(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),l(),b(!0),e(document).moove_gdpr_lightbox_close()),"gdpr-reject-cookies"===J&&(h(),n(),e("#moove_gdpr_cookie_info_bar").length>0&&(e("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),e("body").removeClass("gdpr-infobar-visible"),e("#moove_gdpr_cookie_info_bar").hide(),e("#moove_gdpr_save_popup_settings_button").show()),g(),f("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0"}),y),setTimeout(function(){f("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0"}),y)},500))}},finalize:function(){}}},t={fire:function(e,t,r){var n,i=o;t=void 0===t?"init":t,n=""!==e,n=n&&i[e],(n=n&&"function"==typeof i[e][t])&&i[e][t](r)},loadEvents:function(){var o=!1,r=!1;if(void 0!==moove_frontend_gdpr_scripts.gpc&&1===parseInt(moove_frontend_gdpr_scripts.gpc)&&void 0!==navigator.globalPrivacyControl&&(gpcValue=navigator.globalPrivacyControl,gpcValue&&(r=!0,console.warn("GDPR Cookie Compliance - Blocked by Global Policy Control (GPC)"))),!r)if(void 0!==moove_frontend_gdpr_scripts.geo_location&&"true"===moove_frontend_gdpr_scripts.geo_location)jQuery.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_localize_scripts"},function(e){var r=JSON.parse(e);void 0!==r.display_cookie_banner&&(moove_frontend_gdpr_scripts.display_cookie_banner=r.display_cookie_banner),void 0!==r.enabled_default&&(moove_frontend_gdpr_scripts.enabled_default=r.enabled_default),o||(o=!0,t.fire("common"))});else{var n=void 0!==typeof moove_frontend_gdpr_scripts.script_delay&&parseInt(moove_frontend_gdpr_scripts.script_delay)>=0?parseInt(moove_frontend_gdpr_scripts.script_delay):0;n>0?setTimeout(function(){t.fire("common")},n):t.fire("common")}e.each(document.body.className.replace(/-/g,"_").split(/\s+/),function(e,o){t.fire(o),t.fire(o,"finalize")}),t.fire("common","finalize")}};e(document).ready(t.loadEvents)}(jQuery);var gdpr_consent__strict="false"
var gdpr_consent__thirdparty="false"
var gdpr_consent__advanced="false"
var gdpr_consent__cookies="";(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==!0){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,!1):a(d,f,e!==!1)}})(this);!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)}(function(c){function e(){}function d(e,t){f.ev.on(I+e+x,t)}function u(e,t,n,o){var i=document.createElement("div");return i.className="mfp-"+e,n&&(i.innerHTML=n),o?t&&t.appendChild(i):(i=c(i),t&&i.appendTo(t)),i}function p(e,t){f.ev.triggerHandler(I+e,t),f.st.callbacks&&(e=e.charAt(0).toLowerCase()+e.slice(1),f.st.callbacks[e]&&f.st.callbacks[e].apply(f,Array.isArray(t)?t:[t]))}function m(e){return e===H&&f.currTemplate.closeBtn||(f.currTemplate.closeBtn=c(f.st.closeMarkup.replace("%title%",f.st.tClose)),H=e),f.currTemplate.closeBtn}function a(){c.magnificPopup.instance||((f=new e).init(),c.magnificPopup.instance=f)}function r(){y&&(v.after(y.addClass(l)).detach(),y=null)}function i(){n&&c(document.body).removeClass(n)}function t(){i(),f.req&&f.req.abort()}var f,o,g,s,h,H,l,v,y,n,C="Close",F="BeforeClose",w="MarkupParse",b="Open",j="Change",I="mfp",x="."+I,k="mfp-ready",N="mfp-removing",T="mfp-prevent-close",_=!!window.jQuery,P=c(window),S=(c.magnificPopup={instance:null,proto:e.prototype={constructor:e,init:function(){var e=navigator.appVersion;f.isLowIE=f.isIE8=document.all&&!document.addEventListener,f.isAndroid=/android/gi.test(e),f.isIOS=/iphone|ipad|ipod/gi.test(e),f.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),f.probablyMobile=f.isAndroid||f.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),g=c(document),f.popupsCache={}},open:function(e){if(!1===e.isObj){f.items=e.items.toArray(),f.index=0;for(var t,n=e.items,o=0;o<n.length;o++)if((t=(t=n[o]).parsed?t.el[0]:t)===e.el[0]){f.index=o;break}}else f.items=Array.isArray(e.items)?e.items:[e.items],f.index=e.index||0;if(!f.isOpen){f.types=[],h="",e.mainEl&&e.mainEl.length?f.ev=e.mainEl.eq(0):f.ev=g,e.key?(f.popupsCache[e.key]||(f.popupsCache[e.key]={}),f.currTemplate=f.popupsCache[e.key]):f.currTemplate={},f.st=c.extend(!0,{},c.magnificPopup.defaults,e),f.fixedContentPos="auto"===f.st.fixedContentPos?!f.probablyMobile:f.st.fixedContentPos,f.st.modal&&(f.st.closeOnContentClick=!1,f.st.closeOnBgClick=!1,f.st.showCloseBtn=!1,f.st.enableEscapeKey=!1),f.bgOverlay||(f.bgOverlay=u("bg").on("click"+x,function(){f.close()}),f.wrap=u("wrap").attr("tabindex",-1).on("click"+x,function(e){f._checkIfClose(e.target)&&f.close()}),f.container=u("container",f.wrap)),f.contentContainer=u("content"),f.st.preloader&&(f.preloader=u("preloader",f.container,f.st.tLoading));var i=c.magnificPopup.modules;for(o=0;o<i.length;o++){var a=(a=i[o]).charAt(0).toUpperCase()+a.slice(1);f["init"+a].call(f)}p("BeforeOpen"),f.st.showCloseBtn&&(f.st.closeBtnInside?(d(w,function(e,t,n,o){n.close_replaceWith=m(o.type)}),h+=" mfp-close-btn-in"):f.wrap.append(m())),f.st.alignTop&&(h+=" mfp-align-top"),f.fixedContentPos?f.wrap.css({overflow:f.st.overflowY,overflowX:"hidden",overflowY:f.st.overflowY}):f.wrap.css({top:P.scrollTop(),position:"absolute"}),!1!==f.st.fixedBgPos&&("auto"!==f.st.fixedBgPos||f.fixedContentPos)||f.bgOverlay.css({height:g.height(),position:"absolute"}),f.st.enableEscapeKey&&g.on("keyup"+x,function(e){27===e.keyCode&&f.close()}),P.on("resize"+x,function(){f.updateSize()}),f.st.closeOnContentClick||(h+=" mfp-auto-cursor"),h&&f.wrap.addClass(h);var r=f.wH=P.height(),s={},l=(f.fixedContentPos&&f._hasScrollBar(r)&&(l=f._getScrollbarSize())&&(s.marginRight=l),f.fixedContentPos&&(f.isIE7?c("body, html").css("overflow","hidden"):s.overflow="hidden"),f.st.mainClass);return f.isIE7&&(l+=" mfp-ie7"),l&&f._addClassToMFP(l),f.updateItemHTML(),p("BuildControls"),c("html").css(s),f.bgOverlay.add(f.wrap).prependTo(f.st.prependTo||c(document.body)),f._lastFocusedEl=document.activeElement,setTimeout(function(){f.content?(f._addClassToMFP(k),f._setFocus()):f.bgOverlay.addClass(k),g.on("focusin"+x,f._onFocusIn)},16),f.isOpen=!0,f.updateSize(r),p(b),e}f.updateItemHTML()},close:function(){f.isOpen&&(p(F),f.isOpen=!1,f.st.removalDelay&&!f.isLowIE&&f.supportsTransition?(f._addClassToMFP(N),setTimeout(function(){f._close()},f.st.removalDelay)):f._close())},_close:function(){p(C);var e=N+" "+k+" ";f.bgOverlay.detach(),f.wrap.detach(),f.container.empty(),f.st.mainClass&&(e+=f.st.mainClass+" "),f._removeClassFromMFP(e),f.fixedContentPos&&(e={marginRight:""},f.isIE7?c("body, html").css("overflow",""):e.overflow="",c("html").css(e)),g.off("keyup.mfp focusin"+x),f.ev.off(x),f.wrap.attr("class","mfp-wrap").removeAttr("style"),f.bgOverlay.attr("class","mfp-bg"),f.container.attr("class","mfp-container"),!f.st.showCloseBtn||f.st.closeBtnInside&&!0!==f.currTemplate[f.currItem.type]||f.currTemplate.closeBtn&&f.currTemplate.closeBtn.detach(),f.st.autoFocusLast&&f._lastFocusedEl&&c(f._lastFocusedEl).focus(),f.currItem=null,f.content=null,f.currTemplate=null,f.prevHeight=0,p("AfterClose")},updateSize:function(e){var t;f.isIOS?(t=document.documentElement.clientWidth/window.innerWidth,t=window.innerHeight*t,f.wrap.css("height",t),f.wH=t):f.wH=e||P.height(),f.fixedContentPos||f.wrap.css("height",f.wH),p("Resize")},updateItemHTML:function(){var e=f.items[f.index],t=(f.contentContainer.detach(),f.content&&f.content.detach(),(e=e.parsed?e:f.parseEl(f.index)).type),n=(p("BeforeChange",[f.currItem?f.currItem.type:"",t]),f.currItem=e,f.currTemplate[t]||(n=!!f.st[t]&&f.st[t].markup,p("FirstMarkupParse",n),f.currTemplate[t]=!n||c(n)),s&&s!==e.type&&f.container.removeClass("mfp-"+s+"-holder"),f["get"+t.charAt(0).toUpperCase()+t.slice(1)](e,f.currTemplate[t]));f.appendContent(n,t),e.preloaded=!0,p(j,e),s=e.type,f.container.prepend(f.contentContainer),p("AfterChange")},appendContent:function(e,t){(f.content=e)?f.st.showCloseBtn&&f.st.closeBtnInside&&!0===f.currTemplate[t]?f.content.find(".mfp-close").length||f.content.append(m()):f.content=e:f.content="",p("BeforeAppend"),f.container.addClass("mfp-"+t+"-holder"),f.contentContainer.append(f.content)},parseEl:function(e){var t,n=f.items[e];if((n=n.tagName?{el:c(n)}:(t=n.type,{data:n,src:n.src})).el){for(var o=f.types,i=0;i<o.length;i++)if(n.el.hasClass("mfp-"+o[i])){t=o[i];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=t||f.st.type||"inline",n.index=e,n.parsed=!0,f.items[e]=n,p("ElementParse",n),f.items[e]},addGroup:function(t,n){function e(e){e.mfpEl=this,f._openClick(e,t,n)}var o="click.magnificPopup";(n=n||{}).mainEl=t,n.items?(n.isObj=!0,t.off(o).on(o,e)):(n.isObj=!1,n.delegate?t.off(o).on(o,n.delegate,e):(n.items=t).off(o).on(o,e))},_openClick:function(e,t,n){var o=(void 0!==n.midClick?n:c.magnificPopup.defaults).midClick;if(o||!(2===e.which||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){o=(void 0!==n.disableOn?n:c.magnificPopup.defaults).disableOn;if(o)if("function"==typeof o){if(!o.call(f))return!0}else if(P.width()<o)return!0;e.type&&(e.preventDefault(),f.isOpen&&e.stopPropagation()),n.el=c(e.mfpEl),n.delegate&&(n.items=t.find(n.delegate)),f.open(n)}},updateStatus:function(e,t){var n;f.preloader&&(o!==e&&f.container.removeClass("mfp-s-"+o),n={status:e,text:t=t||"loading"!==e?t:f.st.tLoading},p("UpdateStatus",n),e=n.status,f.preloader.html(t=n.text),f.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),f.container.addClass("mfp-s-"+e),o=e)},_checkIfClose:function(e){if(!c(e).closest("."+T).length){var t=f.st.closeOnContentClick,n=f.st.closeOnBgClick;if(t&&n)return!0;if(!f.content||c(e).closest(".mfp-close").length||f.preloader&&e===f.preloader[0])return!0;if(e===f.content[0]||c.contains(f.content[0],e)){if(t)return!0}else if(n&&c.contains(document,e))return!0;return!1}},_addClassToMFP:function(e){f.bgOverlay.addClass(e),f.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),f.wrap.removeClass(e)},_hasScrollBar:function(e){return(f.isIE7?g.height():document.body.scrollHeight)>(e||P.height())},_setFocus:function(){(f.st.focus?f.content.find(f.st.focus).eq(0):f.wrap).focus()},_onFocusIn:function(e){if(e.target!==f.wrap[0]&&!c.contains(f.wrap[0],e.target))return f._setFocus(),!1},_parseMarkup:function(i,e,t){var a;t.data&&(e=c.extend(t.data,e)),p(w,[i,e,t]),c.each(e,function(e,t){if(void 0===t||!1===t)return!0;var n,o;1<(a=e.split("_")).length?0<(n=i.find(x+"-"+a[0])).length&&("replaceWith"===(o=a[1])?n[0]!==t[0]&&n.replaceWith(t):"img"===o?n.is("img")?n.attr("src",t):n.replaceWith(c("<img>").attr("src",t).attr("class",n.attr("class"))):n.attr(a[1],t)):i.find(x+"-"+e).html(t)})},_getScrollbarSize:function(){var e;return void 0===f.scrollbarSize&&((e=document.createElement("div")).style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),f.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),f.scrollbarSize}},modules:[],open:function(e,t){return a(),(e=e?c.extend(!0,{},e):{}).isObj=!0,e.index=t||0,this.instance.open(e)},close:function(){return c.magnificPopup.instance&&c.magnificPopup.instance.close()},registerModule:function(e,t){t.options&&(c.magnificPopup.defaults[e]=t.options),c.extend(this.proto,t.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},c.fn.magnificPopup=function(e){a();var t,n,o,i=c(this);return"string"==typeof e?"open"===e?(t=_?i.data("magnificPopup"):i[0].magnificPopup,n=parseInt(arguments[1],10)||0,o=t.items?t.items[n]:(o=i,(o=t.delegate?o.find(t.delegate):o).eq(n)),f._openClick({mfpEl:o},i,t)):f.isOpen&&f[e].apply(f,Array.prototype.slice.call(arguments,1)):(e=c.extend(!0,{},e),_?i.data("magnificPopup",e):i[0].magnificPopup=e,f.addGroup(i,e)),i},"inline"),E=(c.magnificPopup.registerModule(S,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){f.types.push(S),d(C+"."+S,function(){r()})},getInline:function(e,t){var n,o,i;return r(),e.src?(n=f.st.inline,(o=c(e.src)).length?((i=o[0].parentNode)&&i.tagName&&(v||(l=n.hiddenClass,v=u(l),l="mfp-"+l),y=o.after(v).detach().removeClass(l)),f.updateStatus("ready")):(f.updateStatus("error",n.tNotFound),o=c("<div>")),e.inlineElement=o):(f.updateStatus("ready"),f._parseMarkup(t,{},e),t)}}}),"ajax");c.magnificPopup.registerModule(E,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){f.types.push(E),n=f.st.ajax.cursor,d(C+"."+E,t),d("BeforeChange."+E,t)},getAjax:function(o){n&&c(document.body).addClass(n),f.updateStatus("loading");var e=c.extend({url:o.src,success:function(e,t,n){e={data:e,xhr:n};p("ParseAjax",e),f.appendContent(c(e.data),E),o.finished=!0,i(),f._setFocus(),setTimeout(function(){f.wrap.addClass(k)},16),f.updateStatus("ready"),p("AjaxContentAdded")},error:function(){i(),o.finished=o.loadError=!0,f.updateStatus("error",f.st.ajax.tError.replace("%url%",o.src))}},f.st.ajax.settings);return f.req=c.ajax(e),""}}});var z;c.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=f.st.image,t=".image";f.types.push("image"),d(b+t,function(){"image"===f.currItem.type&&e.cursor&&c(document.body).addClass(e.cursor)}),d(C+t,function(){e.cursor&&c(document.body).removeClass(e.cursor),P.off("resize"+x)}),d("Resize"+t,f.resizeImage),f.isLowIE&&d("AfterChange",f.resizeImage)},resizeImage:function(){var e,t=f.currItem;t&&t.img&&f.st.image.verticalFit&&(e=0,f.isLowIE&&(e=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",f.wH-e))},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,z&&clearInterval(z),e.isCheckingImgSize=!1,p("ImageHasSize",e),e.imgHidden&&(f.content&&f.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(t){function n(e){z&&clearInterval(z),z=setInterval(function(){0<i.naturalWidth?f._onImageHasSize(t):(200<o&&clearInterval(z),3===++o?n(10):40===o?n(50):100===o&&n(500))},e)}var o=0,i=t.img[0];n(1)},getImage:function(e,t){function n(){e&&(e.img[0].complete?(e.img.off(".mfploader"),e===f.currItem&&(f._onImageHasSize(e),f.updateStatus("ready")),e.hasSize=!0,e.loaded=!0,p("ImageLoadComplete")):++a<200?setTimeout(n,100):o())}function o(){e&&(e.img.off(".mfploader"),e===f.currItem&&(f._onImageHasSize(e),f.updateStatus("error",r.tError.replace("%url%",e.src))),e.hasSize=!0,e.loaded=!0,e.loadError=!0)}var i,a=0,r=f.st.image,s=t.find(".mfp-img");return s.length&&((i=document.createElement("img")).className="mfp-img",e.el&&e.el.find("img").length&&(i.alt=e.el.find("img").attr("alt")),e.img=c(i).on("load.mfploader",n).on("error.mfploader",o),i.src=e.src,s.is("img")&&(e.img=e.img.clone()),0<(i=e.img[0]).naturalWidth?e.hasSize=!0:i.width||(e.hasSize=!1)),f._parseMarkup(t,{title:function(e){if(e.data&&void 0!==e.data.title)return e.data.title;var t=f.st.image.titleSrc;if(t){if("function"==typeof t)return t.call(f,e);if(e.el)return e.el.attr(t)||""}return""}(e),img_replaceWith:e.img},e),f.resizeImage(),e.hasSize?(z&&clearInterval(z),e.loadError?(t.addClass("mfp-loading"),f.updateStatus("error",r.tError.replace("%url%",e.src))):(t.removeClass("mfp-loading"),f.updateStatus("ready"))):(f.updateStatus("loading"),e.loading=!0,e.hasSize||(e.imgHidden=!0,t.addClass("mfp-loading"),f.findImageSize(e))),t}}});function O(e){var t;f.currTemplate[A]&&(t=f.currTemplate[A].find("iframe")).length&&(e||(t[0].src="//about:blank"),f.isIE8&&t.css("display",e?"block":"none"))}function M(e){var t=f.items.length;return t-1<e?e-t:e<0?t+e:e}function W(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)}c.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,t,n,o,i,a,r=f.st.zoom,s=".zoom";r.enabled&&f.supportsTransition&&(t=r.duration,n=function(e){var e=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),t="all "+r.duration/1e3+"s "+r.easing,n={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},o="transition";return n["-webkit-"+o]=n["-moz-"+o]=n["-o-"+o]=n[o]=t,e.css(n),e},o=function(){f.content.css("visibility","visible")},d("BuildControls"+s,function(){f._allowZoom()&&(clearTimeout(i),f.content.css("visibility","hidden"),(e=f._getItemToZoom())?((a=n(e)).css(f._getOffset()),f.wrap.append(a),i=setTimeout(function(){a.css(f._getOffset(!0)),i=setTimeout(function(){o(),setTimeout(function(){a.remove(),e=a=null,p("ZoomAnimationEnded")},16)},t)},16)):o())}),d(F+s,function(){if(f._allowZoom()){if(clearTimeout(i),f.st.removalDelay=t,!e){if(!(e=f._getItemToZoom()))return;a=n(e)}a.css(f._getOffset(!0)),f.wrap.append(a),f.content.css("visibility","hidden"),setTimeout(function(){a.css(f._getOffset())},16)}}),d(C+s,function(){f._allowZoom()&&(o(),a&&a.remove(),e=null)}))},_allowZoom:function(){return"image"===f.currItem.type},_getItemToZoom:function(){return!!f.currItem.hasSize&&f.currItem.img},_getOffset:function(e){var e=e?f.currItem.img:f.st.zoom.opener(f.currItem.el||f.currItem),t=e.offset(),n=parseInt(e.css("padding-top"),10),o=parseInt(e.css("padding-bottom"),10),e=(t.top-=c(window).scrollTop()-n,{width:e.width(),height:(_?e.innerHeight():e[0].offsetHeight)-o-n});return(B=void 0===B?void 0!==document.createElement("p").style.MozTransform:B)?e["-moz-transform"]=e.transform="translate("+t.left+"px,"+t.top+"px)":(e.left=t.left,e.top=t.top),e}}});var B,A="iframe",L=(c.magnificPopup.registerModule(A,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com/",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},youtu_be:{index:"youtu.be",id:"/",src:"//www.youtube.com/embed/%id%?autoplay=1"},youtube_nocookie:{index:"youtube-nocookie.com",id:"/",src:"//www.youtube-nocookie.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){f.types.push(A),d("BeforeChange",function(e,t,n){t!==n&&(t===A?O():n===A&&O(!0))}),d(C+"."+A,function(){O()})},getIframe:function(e,t){var n=e.src,o=f.st.iframe,i=(c.each(o.patterns,function(){if(-1<n.indexOf(this.index))return this.id&&(n="string"==typeof this.id?n.substr(n.lastIndexOf(this.id)+this.id.length,n.length):this.id.call(this,n)),n=this.src.replace("%id%",n),!1}),{});return o.srcAction&&(i[o.srcAction]=n),f._parseMarkup(t,i,e),f.updateStatus("ready"),t}}}),c.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var a=f.st.gallery,e=".mfp-gallery";if(f.direction=!0,!a||!a.enabled)return!1;h+=" mfp-gallery",d(b+e,function(){a.navigateByImgClick&&f.wrap.on("click"+e,".mfp-img",function(){if(1<f.items.length)return f.next(),!1}),g.on("keydown"+e,function(e){37===e.keyCode?f.prev():39===e.keyCode&&f.next()})}),d("UpdateStatus"+e,function(e,t){t.text&&(t.text=W(t.text,f.currItem.index,f.items.length))}),d(w+e,function(e,t,n,o){var i=f.items.length;n.counter=1<i?W(a.tCounter,o.index,i):""}),d("BuildControls"+e,function(){var e,t;1<f.items.length&&a.arrows&&!f.arrowLeft&&(t=a.arrowMarkup,e=f.arrowLeft=c(t.replace(/%title%/gi,a.tPrev).replace(/%dir%/gi,"left")).addClass(T),t=f.arrowRight=c(t.replace(/%title%/gi,a.tNext).replace(/%dir%/gi,"right")).addClass(T),e.click(function(){f.prev()}),t.click(function(){f.next()}),f.container.append(e.add(t)))}),d(j+e,function(){f._preloadTimeout&&clearTimeout(f._preloadTimeout),f._preloadTimeout=setTimeout(function(){f.preloadNearbyImages(),f._preloadTimeout=null},16)}),d(C+e,function(){g.off(e),f.wrap.off("click"+e),f.arrowRight=f.arrowLeft=null})},next:function(){f.direction=!0,f.index=M(f.index+1),f.updateItemHTML()},prev:function(){f.direction=!1,f.index=M(f.index-1),f.updateItemHTML()},goTo:function(e){f.direction=e>=f.index,f.index=e,f.updateItemHTML()},preloadNearbyImages:function(){for(var e=f.st.gallery.preload,t=Math.min(e[0],f.items.length),n=Math.min(e[1],f.items.length),o=1;o<=(f.direction?n:t);o++)f._preloadItem(f.index+o);for(o=1;o<=(f.direction?t:n);o++)f._preloadItem(f.index-o)},_preloadItem:function(e){var t;e=M(e),f.items[e].preloaded||((t=f.items[e]).parsed||(t=f.parseEl(e)),p("LazyLoad",t),"image"===t.type&&(t.img=c('<img class="mfp-img" />').on("load.mfploader",function(){t.hasSize=!0}).on("error.mfploader",function(){t.hasSize=!0,t.loadError=!0,p("LazyLoadError",t)}).attr("src",t.src)),t.preloaded=!0)}}}),"retina");c.magnificPopup.registerModule(L,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){var n,o;1<window.devicePixelRatio&&(n=f.st.retina,o=n.ratio,1<(o=isNaN(o)?o():o)&&(d("ImageHasSize."+L,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/o,width:"100%"})}),d("ElementParse."+L,function(e,t){t.src=n.replaceSrc(t,o)})))}}}),a()});!function(t){"use strict";t.fn.fitVids=function(e){var i={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0],a=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}",d=document.createElement("div");d.innerHTML='<p>x</p><style id="fit-vids-style">'+a+"</style>",r.appendChild(d.childNodes[1])}return e&&t.extend(i,e),this.each(function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];i.customSelector&&e.push(i.customSelector);var r=".fitvidsignore";i.ignore&&(r=r+", "+i.ignore);var a=t(this).find(e.join(","));a=a.not("object object"),a=a.not(r),a.each(function(){var e=t(this);if(!(e.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16));var i="object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height(),a=isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10),d=i/a;if(!e.attr("name")){var o="fitvid"+t.fn.fitVids._count;e.attr("name",o),t.fn.fitVids._count++}e.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*d+"%"),e.removeAttr("height").removeAttr("width")}})})},t.fn.fitVids._count=0}(window.jQuery||window.Zepto);/*!
 * Bootstrap v3.4.1 (https://getbootstrap.com/)
 * Copyright 2011-2019 Twitter, Inc.
 * Licensed under the MIT license
 */
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3<e[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one("bsTransitionEnd",function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function o(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(t.style[i]!==undefined)return{end:e[i]};return!1}(),n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(s){"use strict";var e='[data-dismiss="alert"]',a=function(t){s(t).on("click",e,this.close)};a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.close=function(t){var e=s(this),i=e.attr("data-target");i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=s(document).find(i);function n(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=e.closest(".alert")),o.trigger(t=s.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),s.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(a.TRANSITION_DURATION):n())};var t=s.fn.alert;s.fn.alert=function o(i){return this.each(function(){var t=s(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new a(this)),"string"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=a,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on("click.bs.alert.data-api",e,a.prototype.close)}(jQuery),function(s){"use strict";var n=function(t,e){this.$element=s(t),this.options=s.extend({},n.DEFAULTS,e),this.isLoading=!1};function i(o){return this.each(function(){var t=s(this),e=t.data("bs.button"),i="object"==typeof o&&o;e||t.data("bs.button",e=new n(this,i)),"toggle"==o?e.toggle():o&&e.setState(o)})}n.VERSION="3.4.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var e="disabled",i=this.$element,o=i.is("input")?"val":"html",n=i.data();t+="Text",null==n.resetText&&i.data("resetText",i[o]()),setTimeout(s.proxy(function(){i[o](null==n[t]?this.options[t]:n[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(e).attr(e,e).prop(e,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e).prop(e,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var t=s.fn.button;s.fn.button=i,s.fn.button.Constructor=n,s.fn.button.noConflict=function(){return s.fn.button=t,this},s(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=s(t.target).closest(".btn");i.call(e,"toggle"),s(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),e.is("input,button")?e.trigger("focus"):e.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){s(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(p){"use strict";var c=function(t,e){this.$element=p(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",p.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",p.proxy(this.pause,this)).on("mouseleave.bs.carousel",p.proxy(this.cycle,this))};function r(n){return this.each(function(){var t=p(this),e=t.data("bs.carousel"),i=p.extend({},c.DEFAULTS,t.data(),"object"==typeof n&&n),o="string"==typeof n?n:i.slide;e||t.data("bs.carousel",e=new c(this,i)),"number"==typeof n?e.to(n):o?e[o]():i.interval&&e.pause().cycle()})}c.VERSION="3.4.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},c.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(p.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},c.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var o=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(o)},c.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",this.$items.eq(t))},c.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&p.support.transition&&(this.$element.trigger(p.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),o=e||this.getItemForDirection(t,i),n=this.interval,s="next"==t?"left":"right",a=this;if(o.hasClass("active"))return this.sliding=!1;var r=o[0],l=p.Event("slide.bs.carousel",{relatedTarget:r,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,n&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=p(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass("active")}var d=p.Event("slid.bs.carousel",{relatedTarget:r,direction:s});return p.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",function(){o.removeClass([t,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger(d)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),n&&this.cycle(),this}};var t=p.fn.carousel;p.fn.carousel=r,p.fn.carousel.Constructor=c,p.fn.carousel.noConflict=function(){return p.fn.carousel=t,this};var e=function(t){var e=p(this),i=e.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=e.attr("data-target")||i,n=p(document).find(o);if(n.hasClass("carousel")){var s=p.extend({},n.data(),e.data()),a=e.attr("data-slide-to");a&&(s.interval=!1),r.call(n,s),a&&n.data("bs.carousel").to(a),t.preventDefault()}};p(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),p(window).on("load",function(){p('[data-ride="carousel"]').each(function(){var t=p(this);r.call(t,t.data())})})}(jQuery),function(a){"use strict";var r=function(t,e){this.$element=a(t),this.options=a.extend({},r.DEFAULTS,e),this.$trigger=a('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var e,i=t.attr("data-target")||(e=t.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"");return a(document).find(i)}function l(o){return this.each(function(){var t=a(this),e=t.data("bs.collapse"),i=a.extend({},r.DEFAULTS,t.data(),"object"==typeof o&&o);!e&&i.toggle&&/show|hide/.test(o)&&(i.toggle=!1),e||t.data("bs.collapse",e=new r(this,i)),"string"==typeof o&&e[o]()})}r.VERSION="3.4.1",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(t=e.data("bs.collapse"))&&t.transitioning)){var i=a.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){e&&e.length&&(l.call(e,"hide"),t||e.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var n=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return n.call(this);var s=a.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",a.proxy(n,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[o](this.$element[0][s])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=a.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!a.support.transition)return i.call(this);this.$element[e](0).one("bsTransitionEnd",a.proxy(i,this)).emulateTransitionEnd(r.TRANSITION_DURATION)}}},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return a(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(t,e){var i=a(e);this.addAriaAndCollapsedClass(n(i),i)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var t=a.fn.collapse;a.fn.collapse=l,a.fn.collapse.Constructor=r,a.fn.collapse.noConflict=function(){return a.fn.collapse=t,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e=a(this);e.attr("data-target")||t.preventDefault();var i=n(e),o=i.data("bs.collapse")?"toggle":e.data();l.call(i,o)})}(jQuery),function(a){"use strict";var r='[data-toggle="dropdown"]',o=function(t){a(t).on("click.bs.dropdown",this.toggle)};function l(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==e?a(document).find(e):null;return i&&i.length?i:t.parent()}function s(o){o&&3===o.which||(a(".dropdown-backdrop").remove(),a(r).each(function(){var t=a(this),e=l(t),i={relatedTarget:this};e.hasClass("open")&&(o&&"click"==o.type&&/input|textarea/i.test(o.target.tagName)&&a.contains(e[0],o.target)||(e.trigger(o=a.Event("hide.bs.dropdown",i)),o.isDefaultPrevented()||(t.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",i)))))}))}o.VERSION="3.4.1",o.prototype.toggle=function(t){var e=a(this);if(!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(s(),!o){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",s);var n={relatedTarget:this};if(i.trigger(t=a.Event("show.bs.dropdown",n)),t.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(a.Event("shown.bs.dropdown",n))}return!1}},o.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var e=a(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(!o&&27!=t.which||o&&27==t.which)return 27==t.which&&i.find(r).trigger("focus"),e.trigger("click");var n=i.find(".dropdown-menu li:not(.disabled):visible a");if(n.length){var s=n.index(t.target);38==t.which&&0<s&&s--,40==t.which&&s<n.length-1&&s++,~s||(s=0),n.eq(s).trigger("focus")}}}};var t=a.fn.dropdown;a.fn.dropdown=function e(i){return this.each(function(){var t=a(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new o(this)),"string"==typeof i&&e[i].call(t)})},a.fn.dropdown.Constructor=o,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=t,this},a(document).on("click.bs.dropdown.data-api",s).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r,o.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",o.prototype.keydown)}(jQuery),function(a){"use strict";var s=function(t,e){this.options=e,this.$body=a(document.body),this.$element=a(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};function r(o,n){return this.each(function(){var t=a(this),e=t.data("bs.modal"),i=a.extend({},s.DEFAULTS,t.data(),"object"==typeof o&&o);e||t.data("bs.modal",e=new s(this,i)),"string"==typeof o?e[o](n):i.show&&e.show(n)})}s.VERSION="3.4.1",s.TRANSITION_DURATION=300,s.BACKDROP_TRANSITION_DURATION=150,s.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},s.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},s.prototype.show=function(i){var o=this,t=a.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(t){a(t.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var t=a.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),t&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:i});t?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(s.TRANSITION_DURATION):o.$element.trigger("focus").trigger(e)}))},s.prototype.hide=function(t){t&&t.preventDefault(),t=a.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(s.TRANSITION_DURATION):this.hideModal())},s.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},s.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},s.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},s.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},s.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},s.prototype.backdrop=function(t){var e=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=a.support.transition&&i;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var n=function(){e.removeBackdrop(),t&&t()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):n()}else t&&t()},s.prototype.handleUpdate=function(){this.adjustDialog()},s.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},s.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",t+n),a(this.fixedContent).each(function(t,e){var i=e.style.paddingRight,o=a(e).css("padding-right");a(e).data("padding-right",i).css("padding-right",parseFloat(o)+n+"px")}))},s.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),a(this.fixedContent).each(function(t,e){var i=a(e).data("padding-right");a(e).removeData("padding-right"),e.style.paddingRight=i||""})},s.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=a.fn.modal;a.fn.modal=r,a.fn.modal.Constructor=s,a.fn.modal.noConflict=function(){return a.fn.modal=t,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=a(this),i=e.attr("href"),o=e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,""),n=a(document).find(o),s=n.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(i)&&i},n.data(),e.data());e.is("a")&&t.preventDefault(),n.one("show.bs.modal",function(t){t.isDefaultPrevented()||n.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),r.call(n,s,this)})}(jQuery),function(g){"use strict";var o=["sanitize","whiteList","sanitizeFn"],a=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],t={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function u(t,e){var i=t.nodeName.toLowerCase();if(-1!==g.inArray(i,e))return-1===g.inArray(i,a)||Boolean(t.nodeValue.match(r)||t.nodeValue.match(l));for(var o=g(e).filter(function(t,e){return e instanceof RegExp}),n=0,s=o.length;n<s;n++)if(i.match(o[n]))return!0;return!1}function n(t,e,i){if(0===t.length)return t;if(i&&"function"==typeof i)return i(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=t;for(var n=g.map(e,function(t,e){return e}),s=g(o.body).find("*"),a=0,r=s.length;a<r;a++){var l=s[a],h=l.nodeName.toLowerCase();if(-1!==g.inArray(h,n))for(var d=g.map(l.attributes,function(t){return t}),p=[].concat(e["*"]||[],e[h]||[]),c=0,f=d.length;c<f;c++)u(d[c],p)||l.removeAttribute(d[c].nodeName);else l.parentNode.removeChild(l)}return o.body.innerHTML}var m=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};m.VERSION="3.4.1",m.TRANSITION_DURATION=150,m.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>c.bottom?"top":"top"==s&&l.top-d<c.top?"bottom":"right"==s&&l.right+h>c.width?"left":"left"==s&&l.left-h<c.left?"right":s,o.removeClass(p).addClass(s)}var f=this.getCalculatedOffset(s,l,h,d);this.applyPlacement(f,s);var u=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};g.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",u).emulateTransitionEnd(m.TRANSITION_DURATION):u()}},m.prototype.applyPlacement=function(t,e){var i=this.tip(),o=i[0].offsetWidth,n=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,g.offset.setOffset(i[0],g.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),i.addClass("in");var r=i[0].offsetWidth,l=i[0].offsetHeight;"top"==e&&l!=n&&(t.top=t.top+n-l);var h=this.getViewportAdjustedDelta(e,t,r,l);h.left?t.left+=h.left:t.top+=h.top;var d=/top|bottom/.test(e),p=d?2*h.left-o+r:2*h.top-n+l,c=d?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(p,i[0][c],d)},m.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},m.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=n(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},m.prototype.hide=function(t){var e=this,i=g(this.$tip),o=g.Event("hide.bs."+this.type);function n(){"in"!=e.hoverState&&i.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),t&&t()}if(this.$element.trigger(o),!o.isDefaultPrevented())return i.removeClass("in"),g.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",n).emulateTransitionEnd(m.TRANSITION_DURATION):n(),this.hoverState=null,this},m.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},m.prototype.hasContent=function(){return this.getTitle()},m.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],i="BODY"==e.tagName,o=e.getBoundingClientRect();null==o.width&&(o=g.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var n=window.SVGElement&&e instanceof window.SVGElement,s=i?{top:0,left:0}:n?null:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},r=i?{width:g(window).width(),height:g(window).height()}:null;return g.extend({},o,a,r,s)},m.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},m.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;h<a.left?n.left=a.left-h:d>a.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.tooltip",e=new m(this,i)),"string"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===o&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===o?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.4.1",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<n[0])return this.activeTarget=null,this.clear();for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(n[t+1]===undefined||e<n[t+1])&&this.activate(s[t])},n.prototype.activate=function(t){this.activeTarget=t,this.clear();var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=s(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},n.prototype.clear=function(){s(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var t=s.fn.scrollspy;s.fn.scrollspy=e,s.fn.scrollspy.Constructor=n,s.fn.scrollspy.noConflict=function(){return s.fn.scrollspy=t,this},s(window).on("load.bs.scrollspy.data-api",function(){s('[data-spy="scroll"]').each(function(){var t=s(this);e.call(t,t.data())})})}(jQuery),function(r){"use strict";var a=function(t){this.element=r(t)};function e(i){return this.each(function(){var t=r(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new a(this)),"string"==typeof i&&e[i]()})}a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var o=e.find(".active:last a"),n=r.Event("hide.bs.tab",{relatedTarget:t[0]}),s=r.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(n),t.trigger(s),!s.isDefaultPrevented()&&!n.isDefaultPrevented()){var a=r(document).find(i);this.activate(t.closest("li"),e),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},a.prototype.activate=function(t,e,i){var o=e.find("> .active"),n=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&n?o.one("bsTransitionEnd",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new h(this,i)),"string"==typeof o&&e[o]()})}h.VERSION="3.4.1",h.RESET="affix affix-top affix-bottom",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n<i&&"top";if("bottom"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&"bottom":!(n+a<=t-o)&&"bottom";var r=null==this.affixed,l=r?n:s.top;return null!=i&&n<=i?"top":null!=o&&t-o<=l+(r?a:e)&&"bottom"},h.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(h.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},h.prototype.checkPositionWithEventLoop=function(){setTimeout(l.proxy(this.checkPosition,this),1)},h.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),e=this.options.offset,i=e.top,o=e.bottom,n=Math.max(l(document).height(),l(document.body).height());"object"!=typeof e&&(o=i=e),"function"==typeof i&&(i=e.top(this.$element)),"function"==typeof o&&(o=e.bottom(this.$element));var s=this.getState(n,t,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var a="affix"+(s?"-"+s:""),r=l.Event(a+".bs.affix");if(this.$element.trigger(r),r.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(h.RESET).addClass(a).trigger(a.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:n-t-o})}};var t=l.fn.affix;l.fn.affix=i,l.fn.affix.Constructor=h,l.fn.affix.noConflict=function(){return l.fn.affix=t,this},l(window).on("load",function(){l('[data-spy="affix"]').each(function(){var t=l(this),e=t.data();e.offset=e.offset||{},null!=e.offsetBottom&&(e.offset.bottom=e.offsetBottom),null!=e.offsetTop&&(e.offset.top=e.offsetTop),i.call(t,e)})})}(jQuery);!function(e){FLTheme={init:function(){this._bind()},_bind:function(){var a=this;e(".navbar-toggle").on("click",this.navbarToggleClick),0!=e(".fl-page-bar-nav ul.sub-menu").length&&(this._setupDropDowns(),this._enableTopNavDropDowns()),0!=e(".fl-page-nav ul.sub-menu").length&&(e(window).on("resize.fl-page-nav-sub-menu",e.throttle(500,this._enablePageNavDropDowns)),this._setupDropDowns(),this._enablePageNavDropDowns()),0!=e(".fl-page-nav ul.menu").length&&(e(".fl-page-nav ul.menu").find(".menu-item").on("click",'> a[href*="#"]:not([href="#"])',this._setupCurrentNavItem),this._setupCurrentNavItem()),0!=e(".fl-page-nav-search").length&&e(".fl-page-nav-search a.fa-search").on("click",this._toggleNavSearch),0!=e(".fl-nav-vertical").length&&(e(window).on("resize",e.throttle(500,this._navVertical)),this._navVertical()),0!=e(".fl-fixed-width.fl-nav-vertical-right").length&&(e(window).on("resize",e.throttle(500,this._updateVerticalRightPos)),this._updateVerticalRightPos()),0!=e(".fl-page-nav-centered-inline-logo").length&&(e(window).on("resize",e.throttle(500,this._centeredInlineLogo)),this._centeredInlineLogo()),0!=e("body.fl-nav-left").length&&(e(window).on("resize",e.throttle(500,this._navLeft)),this._navLeft()),0!=e("body.fl-shrink").length&&0==e("html.fl-builder-edit").length&&(e(window).on("resize",e.throttle(500,this._shrinkHeaderEnable)),this._shrinkHeaderInit(),this._shrinkHeaderEnable()),0!=e(".fl-page-header-fixed").length&&(e(window).on("resize.fl-page-header-fixed",e.throttle(500,this._enableFixedHeader)),this._enableFixedHeader()),0!=e("body.fl-fixed-header").length&&0==e("html.fl-builder-edit").length&&(e(window).on("resize",e.throttle(500,this._fixedHeader)),this._fixedHeader()),0!=e("body.fl-scroll-header").length&&0==e("html.fl-builder-edit").length&&(e(window).on("resize",e.throttle(500,this._scrollHeader)),this._scrollHeader()),0!=e(".fl-page-header-primary").find("li.mega-menu").length&&(e(window).on("resize",e.throttle(500,this._megaMenu)),this._megaMenu()),0!=e(".fl-page-header-fixed").length&&(e(window).on("scroll.fl-mega-menu-on-scroll",e.throttle(500,this._megaMenuOnScroll)),e(window).on("resize.fl-mega-menu-on-scroll",e.throttle(500,this._megaMenuOnScroll))),0!=e("html.fl-builder-edit").length&&this._fixedHeadersWhenBuilderActive(),0!=e("body.fl-nav-mobile-offcanvas").length&&0!=!e("html.fl-builder-edit").length&&(e(window).on("resize",e.throttle(500,this._setupMobileNavLayout)),this._setupMobileNavLayout(),this._toggleMobileNavLayout()),e("body").on("click",this.closeMenu),e(".fl-theme-menu > li:last-child").on("focusout",function(l){void 0!==e(l.relatedTarget)[0]&&"nav-link"===e(l.relatedTarget)[0].className||a.closeMenu(l)}),0!=e(".fl-full-width.fl-footer-effect").length&&(e(window).on("resize",e.throttle(500,this._footerEffect)),this._footerEffect()),0!=e("body.fl-scroll-to-top").length&&this._toTop(),"undefined"!=typeof e("body").magnificPopup&&this._enableLightbox(),"undefined"==typeof e.fn.fitVids||e("body").hasClass("fl-builder")||this._enableFitVids(),FLTheme._navBackiosFix(),this._initSmoothScroll()},_isMobile:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0||/Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent)},_initRetinaImages:function(){var a=window.devicePixelRatio?window.devicePixelRatio:1;a>1&&e("img[data-retina]").each(FLTheme._convertImageToRetina)},_convertImageToRetina:function(){var a=e(this),l=new Image,n=a.attr("src"),t=a.data("retina");if("undefined"==typeof n&&(n=a.data("cfsrc")),"undefined"==typeof n)return!1;var i=n.split(".").pop();""!=t&&(l.onload=function(){var e=l.width,n=l.height;"svg"==i&&(e=a.width(),n=a.height()),a.width(e),a.attr("src",t)},l.src=n)},_initMobileHeaderLogo:function(){this._enableMobileLogo(),e(window).on("resize",e.proxy(this._enableMobileLogo,this))},_enableMobileLogo:function(){var a=e(window),l=e(".fl-page-header-logo"),n=l.find("img[data-mobile]"),t=null,i=null,o=null;0!==n.length&&e(n).each(function(){o=new Image,t=e(this),src=t.attr("src"),width=t.data("width"),height=t.data("height"),i=t.data("mobile"),mobileWidth=t.data("mobile-width"),mobileHeight=t.data("mobile-height"),t.attr("src",""),t.attr("data-src",src),a.width()<window.themeopts.mobile_breakpoint?""!=i&&(o.onload=function(){t.attr("src",i),t.attr("width",mobileWidth),t.attr("height",mobileHeight),t.css("width","")},o.src=src,t.show()):"undefined"!=typeof t.data("src")&&(t.attr("src",t.data("src")),t.attr("width",width),t.attr("height",height),t.css("width",width))})},navbarToggleClick:function(a){var l=e("body").hasClass("fl-nav-mobile-offcanvas")?"flyout":"dropdown";if("dropdown"===l){var n=e(a.target).closest(".fl-page-nav"),t=n.find(".fl-page-nav-collapse");t.toggleClass("collapse"),t.toggleClass("in")}else"flyout"===l&&e(".fl-page").toggleClass("fl-nav-offcanvas-active");a.stopPropagation()},closeMenu:function(a){var l,n=e("body").hasClass("fl-nav-mobile-offcanvas")?"flyout":"dropdown",t=e(".fl-page-nav-collapse").hasClass("in"),i=e(".fl-page").hasClass("fl-nav-offcanvas-active");void 0!==a&&void 0!==a.target&&("dropdown"===n&&t?(l=e(".navbar-collapse.in").closest(".fl-page-nav"),l.find(".navbar-toggle").trigger("click")):"flyout"===n&&i&&e(".fl-offcanvas-close").trigger("click"))},_setupDropDowns:function(){e("ul.sub-menu").each(function(){e(this).closest("li").attr("aria-haspopup","true")})},_enableTopNavDropDowns:function(){var a=e(".fl-page-bar-nav"),l=a.find(" > li"),n=a.find("> li").has("> ul.sub-menu").find(".fl-submenu-toggle-icon");FLTheme._isMobile()?!1!==/iPhone|iPad/i.test(navigator.userAgent)?l.hover(FLTheme._navItemMouseover,FLTheme._navItemMouseout):(l.hover(function(){},FLTheme._navItemMouseout),n.on("click",FLTheme._navSubMenuToggleClick)):l.hover(FLTheme._navItemMouseover,FLTheme._navItemMouseout)},_navBackiosFix:function(){ipad=null!==navigator.userAgent.match("iPhone|iPad")&&e(".menu-item-has-children").length>0,!1!==ipad&&(window.onpageshow=function(e){e.persisted&&window.location.reload()})},_initSmoothScroll:function(){if("undefined"!=typeof FLBuilderLayout&&("undefined"==typeof window.themeopts.smooth||"disabled"!==window.themeopts.smooth)){var a=location.hash;a=a.replace(/(:|\!|\.|\[|\]|,|=|@|\/)/g,"\\$1"),a&&e(a).length&&setTimeout(function(){window.scrollTo(0,0),FLBuilderLayout._scrollToElement(e(a))},1)}},_enablePageNavDropDowns:function(){var a=e(".fl-page-header");a.each(FLTheme._enablePageNavDropDown)},_enablePageNavDropDown:function(){var a=e(this),l=a.find(".fl-page-nav .fl-page-nav-collapse"),n=l.find("ul li"),t=l.find("li").has("> ul.sub-menu").find("> a"),i=(l.find("li").has("> ul.sub-menu").find(".fl-submenu-toggle-icon"),l.find("> ul > li").has("ul.sub-menu"));e(".fl-page-nav .navbar-toggle").is(":visible")?(n.off("mouseenter mouseleave"),e("body").hasClass("fl-submenu-toggle")&&(i=l.find("> ul li").has("ul.sub-menu")),i.find("> a").off().on("click",FLTheme._navItemClickMobile),i.find(".fl-submenu-toggle-icon").off().on("click",FLTheme._navItemClickMobile),l.find(".menu").on("click",'.menu-item > a[href*="#"]',FLTheme._toggleForMobile),t.off("click",FLTheme._navSubMenuToggleClick)):(l.find("a").off("click",FLTheme._navItemClickMobile),l.find("a").off("click",FLTheme._toggleForMobile),l.find(".fl-submenu-toggle-icon").off("click",FLTheme._navItemClickMobile),l.removeClass("in").addClass("collapse"),n.removeClass("fl-mobile-sub-menu-open"),n.find("a").width(0).width("auto"),FLTheme._isMobile()?(n.hover(function(){},FLTheme._navItemMouseout),t.on("click",FLTheme._navSubMenuToggleClick)):(n.keydown(function(a){9===a.keyCode&&(el=e(this),focused=el.find(":focus"),focused.parent().is(":last-child")&&(sub=focused.parent().find("ul.sub-menu").first(),mega=focused.parent().parent().parent().parent().parent().hasClass("mega-menu"),mega_last=focused.parent().parent().parent().is(":last-child"),sub.length>0?sub.trigger("mouseenter"):mega&&!mega_last||el.trigger("mouseleave")),parent=focused.closest("ul.sub-menu").parent(),parent.hasClass("fl-sub-menu-open")||focused.trigger("mouseenter"))}),n.hover(FLTheme._navItemMouseover,FLTheme._navItemMouseout)))},_navItemClickMobile:function(a){var l=e(this).closest(".fl-page-nav-collapse"),n=e(this).closest("li"),t=e(this).attr("href"),i=n.find("ul.sub-menu"),o=e(a.target).hasClass("fl-submenu-toggle-icon"),s=null;if(t&&"#"!==t){var r=t.split("#")[1];e("body").find("#"+r).length>0&&n.hasClass("fl-mobile-sub-menu-open")&&(el=e(this).parent().closest("nav").find(".navbar-toggle"),el.trigger("click"),"undefined"!=typeof FLBuilderLayout&&"undefined"==typeof window.themeopts.smooth&&"disabled"!==window.themeopts.smooth&&setTimeout(function(){window.scrollTo(0,0),FLBuilderLayout._scrollToElement(e("#"+r))},1))}("#"==t||o)&&n.hasClass("fl-mobile-sub-menu-open")?(a.preventDefault(),n.removeClass("fl-mobile-sub-menu-open"),i.hide()):n.hasClass("fl-mobile-sub-menu-open")||(a.preventDefault(),n.addClass("fl-mobile-sub-menu-open"),o&&0===e(".fl-submenu-toggle").length&&(s=i.find("li.menu-item-has-children"),s.addClass("fl-mobile-sub-menu-open")),i.fadeIn(200)),0!=e(".fl-nav-collapse-menu").length&&l.find("li.fl-mobile-sub-menu-open").not(e(this).parents(".fl-mobile-sub-menu-open")).not(s).removeClass("fl-mobile-sub-menu-open").find("ul.sub-menu").hide(),a.stopPropagation()},_setupCurrentNavItem:function(a){var l=e(".fl-page-nav .navbar-nav"),n="undefined"!=typeof a?e(a.target).prop("hash"):window.location.hash,n=n.replace(/(:|\!|\.|\[|\]|,|=|@|\/)/g,"\\$1"),t=n.length?l.find("a[href*=\\"+n+"]:not([href=\\#])"):null,i=l.closest(".fl-page-nav").find(".fl-offcanvas-close");null!=t&&e("body").find(n).length>0&&(e(".current-menu-item").removeClass("current-menu-item"),t.parent().addClass("current-menu-item"),i&&i.trigger("click"))},_navItemMouseover:function(){if(0!==e(this).find("ul.sub-menu").length){var a=e(this),l=a.parent(),n=a.find("ul.sub-menu"),t=n.width(),i=0,o=e(window).width(),s=0,r=0;if(0!==a.closest(".fl-sub-menu-right").length?a.addClass("fl-sub-menu-right"):e("body").hasClass("rtl")?(i=l.is("ul.sub-menu")?l.offset().left-t:a.offset().left-t,i<=0&&a.addClass("fl-sub-menu-right")):(i=l.is("ul.sub-menu")?l.offset().left+2*t:a.offset().left+t,i>o&&a.addClass("fl-sub-menu-right")),a.addClass("fl-sub-menu-open"),a.hasClass("hide-heading")||(n.hide(),n.stop().fadeIn(200)),FLTheme._hideNavSearch(),0!==a.closest(".fl-page-nav-collapse").length&&a.hasClass("mega-menu")){if(a.find(".mega-menu-spacer").length>0)return;n.first().before('<div class="mega-menu-spacer"></div>'),s=a.find(".mega-menu-spacer").offset().top,r=n.first().offset().top,a.find(".mega-menu-spacer").css("padding-top",Math.floor(parseInt(r-s))+"px")}}},_navItemMouseout:function(){var a=e(this),l=a.find("ul.sub-menu");a.hasClass("hide-heading")?FLTheme._navItemMouseoutComplete():l.stop().fadeOut({duration:200,done:FLTheme._navItemMouseoutComplete})},_navItemMouseoutComplete:function(){var a=e(this).parent();a.removeClass("fl-sub-menu-open"),a.removeClass("fl-sub-menu-right"),a.find(".mega-menu-spacer").length>0&&a.find(".mega-menu-spacer").remove(),e(this).show()},_navSubMenuToggleClick:function(a){var l=e(this).closest("li").eq(0);l.hasClass("fl-sub-menu-open")||(FLTheme._navItemMouseover.apply(l[0]),a.preventDefault())},_toggleForMobile:function(a){var l=e(".fl-page-nav .fl-page-nav-collapse"),n=e(this).attr("href"),t=e(this).closest("li").hasClass("menu-item-has-children");if("#"!==n){var i=n.split("#")[1];e("body").find("#"+i).length>0&&!t&&(e.isFunction(l.collapse)?l.collapse("hide"):(el=e(this).parent().closest("nav").find(".navbar-toggle"),el.trigger("click")))}},_toggleNavSearch:function(a){var l=e(".fl-page-nav-search form");a.preventDefault(),l.is(":visible")?l.stop().fadeOut(200):(l.stop().fadeIn(200),e("body").on("click.fl-page-nav-search",FLTheme._hideNavSearch),e(".fl-page-nav-search .fl-search-input").focus())},_hideNavSearch:function(a){var l=e(".fl-page-nav-search form");void 0!==a&&e(a.target).closest(".fl-page-nav-search").length>0||(l.stop().fadeOut(200),e("body").off("click.fl-page-nav-search"))},_navVertical:function(){var a=e(window);a.width()>=window.themeopts.medium_breakpoint&&e(".fl-page-header-primary").hasClass("fl-page-nav-toggle-visible-always")&&(e("body").toggleClass("fl-nav-vertical"),e("body").hasClass("fl-nav-vertical-left")&&e("body").toggleClass("fl-nav-vertical-left"),e("body").hasClass("fl-nav-vertical-right")&&e("body").toggleClass("fl-nav-vertical-right"))},_updateVerticalRightPos:function(){var a=e(window).width(),l=e(".fl-page").width(),n=(a-l)/2;e(".fl-page-header-vertical").css("right",n)},_navLeft:function(){var a=e(window);(a.width()<window.themeopts.medium_breakpoint||e(".fl-page-header-primary").hasClass("fl-page-nav-toggle-visible-always"))&&e(".fl-page-header-primary .fl-page-logo-wrap").insertBefore(".fl-page-header-primary .fl-page-nav-col"),a.width()>=window.themeopts.medium_breakpoint&&!e(".fl-page-header-primary").hasClass("fl-page-nav-toggle-visible-always")&&e(".fl-page-header-primary .fl-page-nav-col").insertBefore(".fl-page-header-primary .fl-page-logo-wrap"),0==e(".fl-page-header-fixed").length||e(".fl-page-header-fixed").hasClass("fl-page-nav-toggle-visible-always")||e(".fl-page-header-fixed .fl-page-fixed-nav-wrap").insertBefore(".fl-page-header-fixed .fl-page-logo-wrap")},_shrinkHeaderInit:function(){var a=e(window).scrollTop(),l=250,n=e(".fl-page-header");e("body").addClass("fl-shrink-header-enabled"),"scrollRestoration"in history&&(history.scrollRestoration="manual"),e(".fl-page-header-logo").imagesLoaded(function(){var t=e(".fl-logo-img"),i=t.height();"undefined"!=typeof t.data("origHeight")&&(i=parseInt(t.data("origHeight"))),t.css("max-height",i),setTimeout(function(){e(".fl-page-header").addClass("fl-shrink-header-transition"),a>l?n.addClass("fl-shrink-header"):n.removeClass("fl-shrink-header")},100)})},_shrinkHeaderEnable:function(){var a=e(window);if(a.width()>=window.themeopts.medium_breakpoint){var l=e(".fl-page-header"),n=l.outerHeight(),t=e(".fl-page-bar"),i=0,o=0;0!=t.length?(i+=t.outerHeight(),o=i+n,0!=e("body.admin-bar").length&&(i+=32),l.css("top",i)):o=n,l.prevAll(".fl-builder-content").length>0&&(FLTheme._initThemerLayoutFix(),o=t.outerHeight()),0===e(".fl-header-padding-top-custom").length&&e(".fl-page").css("padding-top",o),e(a).on("scroll.fl-shrink-header",FLTheme._shrinkHeader)}else e(".fl-page-header").css("top",0),e(".fl-page").css("padding-top",0),e(a).off("scroll.fl-shrink-header")},_shrinkHeader:function(){var a=e(this).scrollTop(),l=250,n=e(".fl-page-header"),t=null;e(".fl-page-header-logo").imagesLoaded(function(){t=e(".fl-logo-img"),"undefined"==typeof t.data("origHeight")&&t.data("origHeight",t.height()),a>l?n.addClass("fl-shrink-header"):n.removeClass("fl-shrink-header"),"undefined"!=typeof n.data("original-top")&&FLTheme._fixThemerLayoutOnScroll()})},_fixedHeader:function(){var a=e(window),l=e(".fl-page-header"),n=0,t=0,i=e(".fl-page-bar"),o=0;if(a.width()>=window.themeopts.medium_breakpoint){if(n=l.outerHeight(),0!=i.length){if(o=i.outerHeight(),t=o+n,0!=e("body.admin-bar").length&&(o+=32),0!=e("html.fl-builder-edit").length);l.css("top",o)}else t=n;l.prevAll(".fl-builder-content").length>0&&(FLTheme._initThemerLayoutFix(),t=i.outerHeight(),e(a).on("scroll.fl-fixed-header",FLTheme._fixThemerLayoutOnScroll)),0===e("body.fl-scroll-header").length&&0===e(".fl-header-padding-top-custom").length&&e(".fl-page").css("padding-top",t),e(a).trigger("scroll")}else e(".fl-page-header").css("top",0),e(".fl-page").css("padding-top",0),e(a).off("scroll.fl-fixed-header")},_enableFixedHeader:function(){var a=e(window);a.width()<window.themeopts.medium_breakpoint?(a.off("scroll.fl-page-header-fixed"),e(".fl-page-header-fixed").hide()):a.on("scroll.fl-page-header-fixed",FLTheme._toggleFixedHeader)},_initThemerLayoutFix:function(){var a=e(".fl-page-header"),l=a.prevAll(".fl-builder-content"),n=0;l.length&&(a.css("position","initial"),e.each(l,function(){n+=e(this).outerHeight()}),a.data("original-top",n))},_fixThemerLayoutOnScroll:function(){var a=e(window).scrollTop(),l=e(".fl-page-header"),n=l.data("original-top");"undefined"!=typeof n&&(a>=n?l.css("position","fixed"):l.css("position","initial"),"undefined"!=typeof Waypoint&&Waypoint.refreshAll())},_toggleFixedHeader:function(){var a=e(window),l=e(".fl-page-header-fixed"),n=l.is(":visible"),t=e(".fl-page-header-primary"),i=!1;i=0===t.length?a.scrollTop()>200:a.scrollTop()>t.height()+t.offset().top,i&&!n?l.stop().fadeIn(200):!i&&n&&l.stop().hide()},_centeredInlineLogo:function(){var a=e(window),l=e(".fl-page-nav-centered-inline-logo .fl-page-header-logo"),n=e(".fl-logo-centered-inline > .fl-page-header-logo"),t=e(".fl-page-nav-centered-inline-logo .fl-page-nav .navbar-nav"),i=t.children("li").length,o=Math.round(i/2)-1;a.width()>=window.themeopts.medium_breakpoint&&n.length<1&&!e(".fl-page-header-primary").hasClass("fl-page-nav-toggle-visible-always")&&(l.hasClass("fl-inline-logo-left")&&i%2!=0?t.children("li:nth( "+o+" )").before('<li class="fl-logo-centered-inline"></li>'):t.children("li:nth( "+o+" )").after('<li class="fl-logo-centered-inline"></li>'),t.children(".fl-logo-centered-inline").append(l)),a.width()<window.themeopts.medium_breakpoint&&(e(".fl-page-nav-centered-inline-logo .fl-page-header-row").prepend(n),e(".fl-logo-centered-inline").remove())},_scrollHeader:function(){var a=e(window),l=null,n=e(".fl-page-header-primary").data("fl-distance"),t=0;l=e(0!=e(".fl-page-bar").length?".fl-page-header-primary, .fl-page-bar":".fl-page-header-primary"),a.width()>=window.themeopts.medium_breakpoint?a.on("scroll.fl-show-header-on-scroll",function(){e(this).scrollTop()>n?l.addClass("fl-show"):(l.removeClass("fl-show"),e(".fl-responsive-nav-enabled").length&&(t=2*e(".fl-page-header-primary").height(),0!=e(".fl-page-bar").length&&(t+=e(".fl-page-bar").height()),"undefined"!=typeof e(".fl-nav-offcanvas-collapse").css("top")&&(t+=parseInt(e(".fl-nav-offcanvas-collapse").css("top")))),e(".fl-nav-offcanvas-active").length&&t>0&&e(".fl-nav-offcanvas-collapse").css({transform:"translateY("+t+"px)","-ms-transform":"translateY("+t+"px)","-webkit-transform":"translateY("+t+"px)"}))}):(a.off("scroll.fl-show-header-on-scroll"),e(".fl-nav-offcanvas-collapse").css("transform",""))},_megaMenu:function(){var a=(e(window),e(".fl-page-header")),l=a.find(".fl-page-header-container"),n=l.outerWidth(),t=null,i=0;a.find("li.mega-menu, li.mega-menu-disabled").each(function(){t=e(this),i=t.find("> ul.sub-menu").outerWidth(),"undefined"!=typeof t.data("megamenu-width")&&(i=t.data("megamenu-width")),t.hasClass("mega-menu")&&n<i||FLTheme._isResponsiveNavEnabled()?(t.data("megamenu-width",i),FLTheme._isResponsiveNavEnabled()&&t.find("> ul.sub-menu").css("display","block"),t.removeClass("mega-menu"),t.hasClass("mega-menu-disabled")||t.addClass("mega-menu-disabled")):t.hasClass("mega-menu-disabled")&&n>=i&&(t.find("> ul.sub-menu").css("display",""),t.removeClass("mega-menu-disabled"),t.hasClass("mega-menu")||t.addClass("mega-menu"),t.addClass("mega-menu-items-"+t.children("ul").children("li").length))})},_megaMenuOnScroll:function(){var a=e(window),l=e(".fl-page-header-fixed"),n=l.find(".fl-page-header-container"),t=l.is(":visible"),i=null,o=null;t&&(l.find("li.mega-menu").each(function(){i=e(this),o=i.find("> ul.sub-menu"),n.outerWidth()<o.outerWidth()?(i.removeClass("mega-menu"),i.hasClass("mega-menu-disabled")||i.addClass("mega-menu-disabled")):(i.removeClass("mega-menu-disabled"),i.hasClass("mega-menu")||i.addClass("mega-menu"),i.addClass("mega-menu-items-"+i.children("ul").children("li").length))}),a.off("scroll.fl-mega-menu-on-scroll"),a.off("resize.fl-mega-menu-on-scroll"))},_fixedHeadersWhenBuilderActive:function(){0!=e("body.fl-shrink").length&&e("body").removeClass("fl-shrink"),0!=e("body.fl-fixed-header").length&&e("body").removeClass("fl-fixed-header"),0!=e("body.fl-scroll-header").length&&e("body").removeClass("fl-scroll-header")},_setupMobileNavLayout:function(){var a=e(window),l=e("button.navbar-toggle"),n=e(".fl-page-header:not(.fl-page-header-fixed)"),t=n.find(".fl-page-nav-collapse"),i=e(".fl-page"),o=0,s=a.height(),r=e("body").hasClass("fl-offcanvas-push-opacity-left")||e("body").hasClass("fl-offcanvas-push-opacity-right");n.find(".fl-page-header-logo").offset();FLTheme._isResponsiveNavEnabled()&&l.is(":visible")?(e("body").addClass("fl-responsive-nav-enabled"),l.attr("data-toggle","offcanvas"),t.addClass("fl-nav-offcanvas-collapse"),0===t.find(".fl-button-close").length&&t.prepend('<div class="fl-button-close"><button class="fl-offcanvas-close" aria-label="Close Menu"><i class="fas fa-times"></i></button></div>'),r&&0===e(".fl-offcanvas-opacity").length&&i.append('<div class="fl-offcanvas-opacity"></div>'),i.height()>a.height()&&(s=e(document).height(),0!=e("body.fl-shrink").length&&(s-=n.height())),0!=e("body.admin-bar").length&&(o=e("#wpadminbar").height(),s-=o),0==e(".fl-page-bar").length||e(".fl-page-header").hasClass("fl-page-nav-toggle-button")||(o+=e(".fl-page-bar").height()+1),e(".fl-scroll-header").length&&a.width()>=window.themeopts.medium_breakpoint?t.css("top",i.offset().top-o+"px"):t.css("top","")):(l.attr("data-toggle","collapse"),t.removeClass("fl-nav-offcanvas-collapse"),t.find(".fl-button-close").remove(),t.css("height",""),t.css("top",""),i.removeClass("fl-nav-offcanvas-active"),e("body").find(".fl-offcanvas-opacity").remove(),e("body").removeClass("fl-responsive-nav-enabled"))},_toggleMobileNavLayout:function(){e(".fl-page-nav").on("click",".fl-offcanvas-close",function(a){e(".fl-page").toggleClass("fl-nav-offcanvas-active"),a.stopPropagation()})},_footerEffect:function(){e(window).width()>=window.themeopts.mobile_breakpoint?e(".fl-page").css("margin-bottom",e(".fl-page-footer-wrap").height()):e(".fl-page").css("margin-bottom",0)},_toTop:function(){var a=e("#fl-to-top");a.each(function(){e(this).click(function(){return e("html,body").animate({scrollTop:0},"linear"),!1})}),e(window).scroll(function(){e(this).scrollTop()>window.themeopts.scrollTopPosition?a.fadeIn():a.fadeOut()})},_enableLightbox:function(){var a=e("body");a.hasClass("fl-builder")||a.hasClass("woocommerce")||e(".fl-content a").filter(function(){return/\.(png|jpg|jpeg|gif|webp)(\?.*)?$/i.test(this.href)}).magnificPopup({closeBtnInside:!1,type:"image",gallery:{enabled:!0}}),!a.hasClass("fl-builder")&&!a.hasClass("fl-theme-builder-singular")||a.hasClass("woocommerce")||e(".fl-rich-text a, .fl-module-fl-post-content a").filter(function(){return/\.(png|jpg|jpeg|gif|webp)(\?.*)?$/i.test(this.href)}).magnificPopup({closeBtnInside:!1,type:"image",gallery:{enabled:!0}})},_enableFitVids:function(){e(".fl-post-content").fitVids()},_isResponsiveNavEnabled:function(){var a=e(window);return enabled=!1,(e(".fl-page-nav-toggle-visible-always").length>0||e(".fl-page-nav-toggle-visible-medium-mobile").length>0&&a.width()<window.themeopts.medium_breakpoint||e(".fl-page-nav-toggle-visible-mobile").length>0&&a.width()<window.themeopts.mobile_breakpoint)&&(enabled=!0),enabled}},e(function(){FLTheme.init()}),0===e("html.fl-builder-edit").length&&FLTheme._initMobileHeaderLogo(),FLTheme._initRetinaImages()}(jQuery);function lazyLoadThumb(e,alt,l){var t='<img data-lazy-src="https://i.ytimg.com/vi/ID/hqdefault.jpg" alt="" width="480" height="360"><noscript><img src="https://i.ytimg.com/vi/ID/hqdefault.jpg" alt="" width="480" height="360"></noscript>',a='<button class="play" aria-label="play Youtube video"></button>';if(l){t=t.replace('data-lazy-','');t=t.replace('loading="lazy"','');t=t.replace(/<noscript>.*?<\/noscript>/g,'')}t=t.replace('alt=""','alt="'+alt+'"');return t.replace("ID",e)+a}function lazyLoadYoutubeIframe(){var e=document.createElement("iframe"),t="ID?autoplay=1";t+=0===this.parentNode.dataset.query.length?"":"&"+this.parentNode.dataset.query;e.setAttribute("src",t.replace("ID",this.parentNode.dataset.src)),e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","1"),e.setAttribute("allow","accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"),this.parentNode.parentNode.replaceChild(e,this.parentNode)}document.addEventListener("DOMContentLoaded",function(){var exclusions=[];var e,t,p,u,l,a=document.getElementsByClassName("rll-youtube-player");for(t=0;t<a.length;t++)(e=document.createElement("div")),(u='https://i.ytimg.com/vi/ID/hqdefault.jpg'),(u=u.replace('ID',a[t].dataset.id)),(l=exclusions.some(exclusion=>u.includes(exclusion))),e.setAttribute("data-id",a[t].dataset.id),e.setAttribute("data-query",a[t].dataset.query),e.setAttribute("data-src",a[t].dataset.src),(e.innerHTML=lazyLoadThumb(a[t].dataset.id,a[t].dataset.alt,l)),a[t].appendChild(e),(p=e.querySelector(".play")),(p.onclick=lazyLoadYoutubeIframe)});