@travlrcom/uikit
Version:
TRAVLR UiKit
23 lines • 53 kB
JavaScript
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(window,function(){return i={},o.m=n=[function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=[{ERROR_ID:0,ERROR_MESSAGE:"Error id found"},{ERROR_ID:1,ERROR_MESSAGE:"Config must be an object"},{ERROR_ID:2,ERROR_MESSAGE:"Error message not found"},{ERROR_ID:3,ERROR_MESSAGE:"Error message must be an collection"}],r=function(){function t(e){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==n(e))throw new Error(this.getErrorMessages(1));if("number"!=typeof e.errorId||""===e.errorId)throw new Error(this.getErrorMessages(0));if(!Array.isArray(e.errorMessages))throw new Error(this.getErrorMessages(3));this._config=e,this.init()}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(t,[{key:"init",value:function(){throw new Error(this.getErrorMessages(this._config.errorId,this._config.errorMessages))}},{key:"getErrorMessages",value:function(t,e){return(e=void 0===e?o:e).filter(function(e){return e.ERROR_ID===t}).map(function(e){return e.ERROR_MESSAGE})}}]),t}();t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=(i=n(0))&&i.__esModule?i:{default:i};function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var l={errorId:0,errorMessages:[{ERROR_ID:0,ERROR_MESSAGE:"Config must be an object"}]},u=function(){function n(e){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),"object"!==r(e)){var t=Object.assign({},l,{errorId:0});new o.default(t)}this._config=e,this._element=this._config.element?this._config.element:null,this._attributeName=this._config.attributeName?this._config.attributeName:null,this._attributeValue=this._config.attributeValue}return function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(n,[{key:"getAttribute",value:function(){return null!==this._element&&null!==this._attributeName?this._element.getAttribute(this._attributeName):null}},{key:"setAttribute",value:function(){null!==this._element&&null!==this._attributeName&&this._element.setAttribute(this._attributeName,this._attributeValue)}},{key:"removeAttribute",value:function(){null!==this._element&&null!==this._attributeName&&this._element.removeAttribute(this._attributeName)}}]),n}();t.default=u},function(e,t){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;function n(e){return new o(e)._valueParse}var o=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._pattern=/^(?:f(?:alse)?|no?|0+)$/i,this._value=e,this._valueParse=!1,this.init()}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(t,[{key:"init",value:function(){this._valueParse=!this._pattern.test(this._value)&&!!this._value}}]),t}();t.default=n},function(e,t){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._config=e,this._type=e.type,this._eventName=e.eventName,this._element=e.element,this._action=e.action,this.init()}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(t,[{key:"init",value:function(){if("add"===this._type)this.addEvent();else{if("trigger"!==this._type)return;this.triggerEvent()}}},{key:"addEvent",value:function(){this._eventName&&"function"==typeof this._action&&(new Event(this._eventName),this._element.addEventListener(this._eventName,this._action))}},{key:"triggerEvent",value:function(){this._eventName&&this._element.dispatchEvent(new Event(this._eventName))}}]),t}();window.$TravlrEvent=function(e){new n(e)};var o=n;t.default=o},function(e,t){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._config=e,this._callback=e.callback,this._params=e.params,this.init()}return function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(t,[{key:"init",value:function(){this._callback&&"function"==typeof this._callback&&this._callback(this._params)}}]),t}();t.default=n},function(e,t,n){n(6),n(7),e.exports=n(16)},function(e,t){window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)},function(e,t,n){n(8),n(9),n(10),n(11),n(12),n(13),n(14),n(15)},function(e,t){!function(){if(!(void 0===window.Element||"classList"in document.documentElement)){var e,t,n,i=Array.prototype,o=i.push,r=i.splice,a=i.join;l.prototype={add:function(e){this.contains(e)||(o.call(this,e),this.el.className=this.toString())},contains:function(e){return-1!=this.el.className.indexOf(e)},item:function(e){return this[e]||null},remove:function(e){if(this.contains(e)){for(var t=0;t<this.length&&this[t]!=e;t++);r.call(this,t,1),this.el.className=this.toString()}},toString:function(){return a.call(this," ")},toggle:function(e){return this.contains(e)?this.remove(e):this.add(e),this.contains(e)}},window.DOMTokenList=l,e=Element.prototype,t="classList",n=function(){return new l(this)},Object.defineProperty?Object.defineProperty(e,t,{get:n}):e.__defineGetter__(t,n)}function l(e){for(var t=(this.el=e).className.replace(/^\s+|\s+$/g,"").split(/\s+/),n=0;n<t.length;n++)o.call(this,t[n])}}()},function(e,t){function n(){var t={};return l.call(this.attributes,function(e){(i=e.name.match(u))&&(t[function(e){return e.replace(s,function(e,t){return t.toUpperCase()})}(i[1])]=e.value)}),t}var i,o,r,a,l,u,s,c,f;l=[].forEach,u=/^data-(.+)/,s=/\-([a-z])/gi,c=document.createElement("div"),f=!1,null==c.dataset&&(c.addEventListener("DOMAttrModified",function e(){f=!0,this.removeEventListener("DOMAttrModified",e,!1)},!1),c.setAttribute("foo","bar"),o=Element.prototype,r="dataset",a=f?function(){return this._datasetCache||(this._datasetCache=n.call(this)),this._datasetCache}:n,Object.defineProperty?Object.defineProperty(o,r,{get:a}):o.__defineGetter__(r,a),document.addEventListener("DOMAttrModified",function(e){delete e.target._datasetCache},!1))},function(n,e,t){!function(e){if(!("EventSource"in e)){function t(e){var u=this,s=500,c=null,f="";if(!e||"string"!=typeof e)throw new SyntaxError("Not enough arguments");function d(e){u._pollTimer=setTimeout(function(){t.call(u)},e)}function t(){try{if(u.readyState==u.CLOSED)return;var e=new XMLHttpRequest;e.open("GET",u.URL,!0),e.setRequestHeader("Accept","text/event-stream"),e.setRequestHeader("Cache-Control","no-cache"),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),null!=c&&e.setRequestHeader("Last-Event-ID",c),f="",e.timeout=5e4,e.onreadystatechange=function(){if(3==this.readyState||4==this.readyState&&200==this.status){u.readyState==u.CONNECTING&&(u.readyState=u.OPEN,u.dispatchEvent("open",{type:"open"}));var e="";try{e=this.responseText||""}catch(e){}var t=e.substr(f.length).split("\n"),n="message",i=[],o=0,r="";for(f=e;o<t.length;o++)if(0==(r=t[o].replace(h,"")).indexOf("event"))n=r.replace(/event:?\s*/,"");else if(0==r.indexOf("retry")){var a=parseInt(r.replace(/retry:?\s*/,""));isNaN(a)||(s=a)}else if(0==r.indexOf("data"))i.push(r.replace(/data:?\s*/,""));else if(0==r.indexOf("id:"))c=r.replace(/id:?\s*/,"");else if(0==r.indexOf("id"))c=null;else if(""==r&&i.length){var l=new m(i.join("\n"),u.url,c);u.dispatchEvent(n,l),i=[],n="message"}4==this.readyState&&d(s)}else u.readyState!==u.CLOSED&&(4==this.readyState?(u.readyState=u.CONNECTING,u.dispatchEvent("error",{type:"error"}),d(s)):0==this.readyState&&d(s))},e.send(),setTimeout(function(){e.abort()},e.timeout),u._xhr=e}catch(e){u.dispatchEvent("error",{type:"error",data:e.message})}}this.URL=e,this.readyState=this.CONNECTING,this._pollTimer=null,this._xhr=null,t()}var h=/^(\s|\u00A0)+|(\s|\u00A0)+$/g;t.prototype={close:function(){this.readyState=this.CLOSED,clearInterval(this._pollTimer),this._xhr.abort()},CONNECTING:0,OPEN:1,CLOSED:2,dispatchEvent:function(e,t){var n=this["_"+e+"Handlers"];if(n)for(var i=0;i<n.length;i++)n[i].call(this,t);this["on"+e]&&this["on"+e].call(this,t)},addEventListener:function(e,t){this["_"+e+"Handlers"]||(this["_"+e+"Handlers"]=[]),this["_"+e+"Handlers"].push(t)},removeEventListener:function(e,t){var n=this["_"+e+"Handlers"];if(n)for(var i=n.length-1;0<=i;--i)if(n[i]===t){n.splice(i,1);break}},onerror:null,onmessage:null,onopen:null,readyState:0,URL:""};var m=function(e,t,n){this.data=e,this.origin=t,this.lastEventId=n||""};m.prototype={data:null,type:"message",lastEventId:"",origin:""},"module"in e&&(n.exports=t),e.EventSource=t}}(this)},function(e,t){function n(e){var t=(e=e||window.event).target||e.srcElement;if(3===t.nodeType&&(t=t.parentNode),"INPUT"===t.nodeName&&"submit"===t.type&&null===t.form){o=document.getElementById(t.getAttribute("form"));var n=t.cloneNode(!0);n.style.display="none",o.appendChild(n),n.click(),o.removeChild(n)}}var i,o,r,a,l;o=document.createElement("form"),r=document.createElement("input"),a=document.body,l="f"+ +new Date,o.setAttribute("id",l),r.setAttribute("form",l),a.appendChild(o),a.appendChild(r),i=null!==r.form,a.removeChild(o),a.removeChild(r),i||(a.addEventListener?a.addEventListener("click",n,!1):a.attachEvent("onclick",n))},function(e,t){function n(e){var t=document.createEvent("HTMLEvents");t.initEvent(e,!0,!0),t.eventName=e,(document.body||window).dispatchEvent(t)}function i(){var e=new XMLHttpRequest;e.open("HEAD","/",!1);try{e.send(),o=!0}catch(e){o=!1}return o}var o,r;r=o=!0,navigator.__defineGetter__("onLine",i),i(),!1===o&&(r=!1,n("offline")),setInterval(function(){i(),o!==r&&(n(o?"online":"offline"),r=o)},5e3)},function(e,t){!function(){var e=document.createElement("input");e.setAttribute("type","range");var t,n,i,o,r,a,l,u="text"!==e.type;if(u?(e.style.cssText="position:absolute;visibility:hidden;",e.value=":)",void 0!==e.style.WebkitAppearance&&(document.body.appendChild(e),defaultView=document.defaultView,u=defaultView.getComputedStyle&&"textfield"!==defaultView.getComputedStyle(e,null).WebkitAppearance&&0!==e.offsetHeight,document.body.removeChild(e))):u=":)"==e.value,u){for(var s=document.getElementsByTagName("select"),c=0;c<s.length;c++)"range"==s[c].getAttribute("data-type")&&(t=s[c],l=a=r=o=i=n=void 0,a=document.createElement("input"),l=t.parentNode,a.setAttribute("type","range"),t=l.replaceChild(a,t),a.autofocus=t.autofocus,a.disabled=t.disabled,a.autocomplete=t.autocomplete,a.className=t.className,a.id=t.id,a.style=t.style,a.tabindex=t.tabindex,a.title=t.title,a.min=(n=t,i=(i="option").toUpperCase(),n.firstChild.nodeName===i?n.firstChild:n.firstChild.nextSibling).value,a.max=(o=t,r=(r="option").toUpperCase(),o.lastChild.nodeName===r?o.lastChild:o.lastChild.previousSibling).value,a.value=t.value,a.name=t.name,t.getAttribute("data-type-range-step")&&(a.step=t.getAttribute("data-type-range-step")),c--)}}()},function(e,t){var n;!sessionStorage&&JSON&&(sessionStorage=(n=window.name?JSON.parse(window.name):{},{clear:function(){n={},window.name=""},getItem:function(e){return void 0===n[e]?null:n[e]},removeItem:function(e){delete n[e],window.name=JSON.stringify(n)},setItem:function(e,t){n[e]=t,window.name=JSON.stringify(n)}}))},function(e,t){function n(t){function n(e,t,n){var i,o;o=n?((i=new Date).setTime(i.getTime()+24*n*60*60*1e3),"; expires="+i.toGMTString()):"",document.cookie=e+"="+t+o+"; path=/"}function i(e){e=JSON.stringify(e),"session"==t?window.name=e:n("localStorage",e,365)}var e,o=(e="session"==t?window.name:function(e){var t,n,i=e+"=",o=document.cookie.split(";");for(t=0;t<o.length;t++){for(n=o[t];" "==n.charAt(0);)n=n.substring(1,n.length);if(0==n.indexOf(i))return n.substring(i.length,n.length)}return null}("localStorage"))?JSON.parse(e):{};return{length:0,clear:function(){o={},this.length=0,"session"==t?window.name="":n("localStorage","",365)},getItem:function(e){return void 0===o[e]?null:o[e]},key:function(e){var t=0;for(var n in o){if(t==e)return n;t++}return null},removeItem:function(e){delete o[e],this.length--,i(o)},setItem:function(e,t){o[e]=t+"",this.length++,i(o)}}}void 0!==window.localStorage&&void 0!==window.sessionStorage||(void 0===window.localStorage&&(window.localStorage=new n("local")),void 0===window.sessionStorage&&(window.sessionStorage=new n("session")))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(17),n(18);t.default={}},function(e,t,n){},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(19);var i,o=(i=n(21))&&i.__esModule?i:{default:i};if(void 0===window.$TravlrSelector)throw new Error("TravlrUikit requires Sizzle js. Sizzle must be include before TravlrUikit Javascript.");function r(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this._config=e,this._config?window[a]=this._config:window[a]=o.default}var a="TravlrUikit";new r;var l=r;t.default=l},function(e,t,n){var i,o=(i=n(20))&&i.__esModule?i:{default:i};window.$TravlrSelector=o.default},function(Te,Ce,Re){var xe;
/*!
* Sizzle CSS Selector Engine v2.3.4
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://js.foundation/
*
* Date: 2019-04-08
*/
/*!
* Sizzle CSS Selector Engine v2.3.4
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://js.foundation/
*
* Date: 2019-04-08
*/
!function(n){function f(e,t,n){var i="0x"+t-65536;return i!=i||n?t:i<0?String.fromCharCode(65536+i):String.fromCharCode(i>>10|55296,1023&i|56320)}function o(){E()}var e,h,_,r,a,m,d,p,w,u,s,E,A,l,S,v,c,g,b,N="sizzle"+1*new Date,y=n.document,T=0,i=0,C=ue(),R=ue(),x=ue(),O=ue(),k=function(e,t){return e===t&&(s=!0),0},I={}.hasOwnProperty,t=[],M=t.pop,D=t.push,L=t.push,V=t.slice,B=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",G="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",$="\\["+P+"*("+G+")(?:"+P+"*([*^$|!~]?=)"+P+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+G+"))|)"+P+"*\\]",q=":("+G+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+$+")*)|.*)\\)|)",H=new RegExp(P+"+","g"),U=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),z=new RegExp("^"+P+"*,"+P+"*"),F=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),J=new RegExp(P+"|>"),W=new RegExp(q),X=new RegExp("^"+G+"$"),Y={ID:new RegExp("^#("+G+")"),CLASS:new RegExp("^\\.("+G+")"),TAG:new RegExp("^("+G+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,ee=/^[^{]+\{\s*\[native \w/,te=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ne=/[+~]/,ie=new RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),oe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ae=_e(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{L.apply(t=V.call(y.childNodes),y.childNodes),t[y.childNodes.length].nodeType}catch(e){L={apply:t.length?function(e,t){D.apply(e,V.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function le(t,e,n,i){var o,r,a,l,u,s,c,f=e&&e.ownerDocument,d=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==d&&9!==d&&11!==d)return n;if(!i&&((e?e.ownerDocument||e:y)!==A&&E(e),e=e||A,S)){if(11!==d&&(u=te.exec(t)))if(o=u[1]){if(9===d){if(!(a=e.getElementById(o)))return n;if(a.id===o)return n.push(a),n}else if(f&&(a=f.getElementById(o))&&b(e,a)&&a.id===o)return n.push(a),n}else{if(u[2])return L.apply(n,e.getElementsByTagName(t)),n;if((o=u[3])&&h.getElementsByClassName&&e.getElementsByClassName)return L.apply(n,e.getElementsByClassName(o)),n}if(h.qsa&&!O[t+" "]&&(!v||!v.test(t))&&(1!==d||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===d&&J.test(t)){for((l=e.getAttribute("id"))?l=l.replace(oe,re):e.setAttribute("id",l=N),r=(s=m(t)).length;r--;)s[r]="#"+l+" "+ye(s[r]);c=s.join(","),f=ne.test(t)&&ge(e.parentNode)||e}try{return L.apply(n,f.querySelectorAll(c)),n}catch(e){O(t,!0)}finally{l===N&&e.removeAttribute("id")}}}return p(t.replace(U,"$1"),e,n,i)}function ue(){var i=[];return function e(t,n){return i.push(t+" ")>_.cacheLength&&delete e[i.shift()],e[t+" "]=n}}function se(e){return e[N]=!0,e}function ce(e){var t=A.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),i=n.length;i--;)_.attrHandle[n[i]]=t}function de(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function he(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function me(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function pe(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&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return se(function(r){return r=+r,se(function(e,t){for(var n,i=a([],e.length,r),o=i.length;o--;)e[n=i[o]]&&(e[n]=!(t[n]=e[n]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in h=le.support={},a=le.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!K.test(t||n&&n.nodeName||"HTML")},E=le.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:y;return i!==A&&9===i.nodeType&&i.documentElement&&(l=(A=i).documentElement,S=!a(A),y!==A&&(n=A.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",o,!1):n.attachEvent&&n.attachEvent("onunload",o)),h.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),h.getElementsByTagName=ce(function(e){return e.appendChild(A.createComment("")),!e.getElementsByTagName("*").length}),h.getElementsByClassName=ee.test(A.getElementsByClassName),h.getById=ce(function(e){return l.appendChild(e).id=N,!A.getElementsByName||!A.getElementsByName(N).length}),h.getById?(_.filter.ID=function(e){var t=e.replace(ie,f);return function(e){return e.getAttribute("id")===t}},_.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(_.filter.ID=function(e){var n=e.replace(ie,f);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},_.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n,i,o,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(o=t.getElementsByName(e),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),_.find.TAG=h.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):h.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],o=0,r=t.getElementsByTagName(e);if("*"!==e)return r;for(;n=r[o++];)1===n.nodeType&&i.push(n);return i},_.find.CLASS=h.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&S)return t.getElementsByClassName(e)},c=[],v=[],(h.qsa=ee.test(A.querySelectorAll))&&(ce(function(e){l.appendChild(e).innerHTML="<a id='"+N+"'></a><select id='"+N+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+P+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+N+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+N+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=A.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+P+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),l.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(h.matchesSelector=ee.test(g=l.matches||l.webkitMatchesSelector||l.mozMatchesSelector||l.oMatchesSelector||l.msMatchesSelector))&&ce(function(e){h.disconnectedMatch=g.call(e,"*"),g.call(e,"[s!='']:x"),c.push("!=",q)}),v=v.length&&new RegExp(v.join("|")),c=c.length&&new RegExp(c.join("|")),t=ee.test(l.compareDocumentPosition),b=t||ee.test(l.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},k=t?function(e,t){if(e===t)return s=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!h.sortDetached&&t.compareDocumentPosition(e)===n?e===A||e.ownerDocument===y&&b(y,e)?-1:t===A||t.ownerDocument===y&&b(y,t)?1:u?B(u,e)-B(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return s=!0,0;var n,i=0,o=e.parentNode,r=t.parentNode,a=[e],l=[t];if(!o||!r)return e===A?-1:t===A?1:o?-1:r?1:u?B(u,e)-B(u,t):0;if(o===r)return de(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?de(a[i],l[i]):a[i]===y?-1:l[i]===y?1:0}),A},le.matches=function(e,t){return le(e,null,null,t)},le.matchesSelector=function(e,t){if((e.ownerDocument||e)!==A&&E(e),h.matchesSelector&&S&&!O[t+" "]&&(!c||!c.test(t))&&(!v||!v.test(t)))try{var n=g.call(e,t);if(n||h.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){O(t,!0)}return 0<le(t,A,null,[e]).length},le.contains=function(e,t){return(e.ownerDocument||e)!==A&&E(e),b(e,t)},le.attr=function(e,t){(e.ownerDocument||e)!==A&&E(e);var n=_.attrHandle[t.toLowerCase()],i=n&&I.call(_.attrHandle,t.toLowerCase())?n(e,t,!S):void 0;return void 0!==i?i:h.attributes||!S?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},le.escape=function(e){return(e+"").replace(oe,re)},le.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},le.uniqueSort=function(e){var t,n=[],i=0,o=0;if(s=!h.detectDuplicates,u=!h.sortStable&&e.slice(0),e.sort(k),s){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return u=null,e},r=le.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=r(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=r(t);return n},(_=le.selectors={cacheLength:50,createPseudo:se,match:Y,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(ie,f),e[3]=(e[3]||e[4]||e[5]||"").replace(ie,f),"~="===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]||le.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]&&le.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=m(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(ie,f).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,i,o){return function(e){var t=le.attr(e,n);return null==t?"!="===i:!i||(t+="","="===i?t===o:"!="===i?t!==o:"^="===i?o&&0===t.indexOf(o):"*="===i?o&&-1<t.indexOf(o):"$="===i?o&&t.slice(-o.length)===o:"~="===i?-1<(" "+t.replace(H," ")+" ").indexOf(o):"|="===i&&(t===o||t.slice(0,o.length+1)===o+"-"))}},CHILD:function(m,e,t,p,v){var g="nth"!==m.slice(0,3),b="last"!==m.slice(-4),y="of-type"===e;return 1===p&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var i,o,r,a,l,u,s=g!=b?"nextSibling":"previousSibling",c=e.parentNode,f=y&&e.nodeName.toLowerCase(),d=!n&&!y,h=!1;if(c){if(g){for(;s;){for(a=e;a=a[s];)if(y?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=s="only"===m&&!u&&"nextSibling"}return!0}if(u=[b?c.firstChild:c.lastChild],b&&d){for(h=(l=(i=(o=(r=(a=c)[N]||(a[N]={}))[a.uniqueID]||(r[a.uniqueID]={}))[m]||[])[0]===T&&i[1])&&i[2],a=l&&c.childNodes[l];a=++l&&a&&a[s]||(h=l=0)||u.pop();)if(1===a.nodeType&&++h&&a===e){o[m]=[T,l,h];break}}else if(d&&(h=l=(i=(o=(r=(a=e)[N]||(a[N]={}))[a.uniqueID]||(r[a.uniqueID]={}))[m]||[])[0]===T&&i[1]),!1===h)for(;(a=++l&&a&&a[s]||(h=l=0)||u.pop())&&((y?a.nodeName.toLowerCase()!==f:1!==a.nodeType)||!++h||(d&&((o=(r=a[N]||(a[N]={}))[a.uniqueID]||(r[a.uniqueID]={}))[m]=[T,h]),a!==e)););return(h-=v)===p||h%p==0&&0<=h/p}}},PSEUDO:function(e,r){var t,a=_.pseudos[e]||_.setFilters[e.toLowerCase()]||le.error("unsupported pseudo: "+e);return a[N]?a(r):1<a.length?(t=[e,e,"",r],_.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,t){for(var n,i=a(e,r),o=i.length;o--;)e[n=B(e,i[o])]=!(t[n]=i[o])}):function(e){return a(e,0,t)}):a}},pseudos:{not:se(function(e){var i=[],o=[],l=d(e.replace(U,"$1"));return l[N]?se(function(e,t,n,i){for(var o,r=l(e,null,i,[]),a=e.length;a--;)(o=r[a])&&(e[a]=!(t[a]=o))}):function(e,t,n){return i[0]=e,l(i,null,n,o),i[0]=null,!o.pop()}}),has:se(function(t){return function(e){return 0<le(t,e).length}}),contains:se(function(t){return t=t.replace(ie,f),function(e){return-1<(e.textContent||r(e)).indexOf(t)}}),lang:se(function(n){return X.test(n||"")||le.error("unsupported lang: "+n),n=n.replace(ie,f).toLowerCase(),function(e){var t;do{if(t=S?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=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===l},focus:function(e){return e===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:pe(!1),disabled:pe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!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!_.pseudos.empty(e)},header:function(e){return Z.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var i=n<0?n+t:t<n?t:n;0<=--i;)e.push(i);return e}),gt:ve(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}}).pseudos.nth=_.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})_.pseudos[e]=he(e);for(e in{submit:!0,reset:!0})_.pseudos[e]=me(e);function be(){}function ye(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function _e(l,e,t){var u=e.dir,s=e.next,c=s||u,f=t&&"parentNode"===c,d=i++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||f)return l(e,t,n);return!1}:function(e,t,n){var i,o,r,a=[T,d];if(n){for(;e=e[u];)if((1===e.nodeType||f)&&l(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||f)if(o=(r=e[N]||(e[N]={}))[e.uniqueID]||(r[e.uniqueID]={}),s&&s===e.nodeName.toLowerCase())e=e[u]||e;else{if((i=o[c])&&i[0]===T&&i[1]===d)return a[2]=i[2];if((o[c]=a)[2]=l(e,t,n))return!0}return!1}}function we(o){return 1<o.length?function(e,t,n){for(var i=o.length;i--;)if(!o[i](e,t,n))return!1;return!0}:o[0]}function Ee(e,t,n,i,o){for(var r,a=[],l=0,u=e.length,s=null!=t;l<u;l++)(r=e[l])&&(n&&!n(r,i,o)||(a.push(r),s&&t.push(l)));return a}function Ae(h,m,p,v,g,e){return v&&!v[N]&&(v=Ae(v)),g&&!g[N]&&(g=Ae(g,e)),se(function(e,t,n,i){var o,r,a,l=[],u=[],s=t.length,c=e||function(e,t,n){for(var i=0,o=t.length;i<o;i++)le(e,t[i],n);return n}(m||"*",n.nodeType?[n]:n,[]),f=!h||!e&&m?c:Ee(c,l,h,n,i),d=p?g||(e?h:s||v)?[]:t:f;if(p&&p(f,d,n,i),v)for(o=Ee(d,u),v(o,[],n,i),r=o.length;r--;)(a=o[r])&&(d[u[r]]=!(f[u[r]]=a));if(e){if(g||h){if(g){for(o=[],r=d.length;r--;)(a=d[r])&&o.push(f[r]=a);g(null,d=[],o,i)}for(r=d.length;r--;)(a=d[r])&&-1<(o=g?B(e,a):l[r])&&(e[o]=!(t[o]=a))}}else d=Ee(d===t?d.splice(s,d.length):d),g?g(null,t,d,i):L.apply(t,d)})}function Se(e){for(var o,t,n,i=e.length,r=_.relative[e[0].type],a=r||_.relative[" "],l=r?1:0,u=_e(function(e){return e===o},a,!0),s=_e(function(e){return-1<B(o,e)},a,!0),c=[function(e,t,n){var i=!r&&(n||t!==w)||((o=t).nodeType?u(e,t,n):s(e,t,n));return o=null,i}];l<i;l++)if(t=_.relative[e[l].type])c=[_e(we(c),t)];else{if((t=_.filter[e[l].type].apply(null,e[l].matches))[N]){for(n=++l;n<i&&!_.relative[e[n].type];n++);return Ae(1<l&&we(c),1<l&&ye(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(U,"$1"),t,l<n&&Se(e.slice(l,n)),n<i&&Se(e=e.slice(n)),n<i&&ye(e))}c.push(t)}return we(c)}be.prototype=_.filters=_.pseudos,_.setFilters=new be,m=le.tokenize=function(e,t){var n,i,o,r,a,l,u,s=R[e+" "];if(s)return t?0:s.slice(0);for(a=e,l=[],u=_.preFilter;a;){for(r in n&&!(i=z.exec(a))||(i&&(a=a.slice(i[0].length)||a),l.push(o=[])),n=!1,(i=F.exec(a))&&(n=i.shift(),o.push({value:n,type:i[0].replace(U," ")}),a=a.slice(n.length)),_.filter)!(i=Y[r].exec(a))||u[r]&&!(i=u[r](i))||(n=i.shift(),o.push({value:n,type:r,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?le.error(e):R(e,l).slice(0)},d=le.compile=function(e,t){var n,i=[],o=[],r=x[e+" "];if(!r){for(t||(t=m(e)),n=t.length;n--;)(r=Se(t[n]))[N]?i.push(r):o.push(r);(r=x(e,function(v,g){function e(e,t,n,i,o){var r,a,l,u=0,s="0",c=e&&[],f=[],d=w,h=e||y&&_.find.TAG("*",o),m=T+=null==d?1:Math.random()||.1,p=h.length;for(o&&(w=t===A||t||o);s!==p&&null!=(r=h[s]);s++){if(y&&r){for(a=0,t||r.ownerDocument===A||(E(r),n=!S);l=v[a++];)if(l(r,t||A,n)){i.push(r);break}o&&(T=m)}b&&((r=!l&&r)&&u--,e&&c.push(r))}if(u+=s,b&&s!==u){for(a=0;l=g[a++];)l(c,f,t,n);if(e){if(0<u)for(;s--;)c[s]||f[s]||(f[s]=M.call(i));f=Ee(f)}L.apply(i,f),o&&!e&&0<f.length&&1<u+g.length&&le.uniqueSort(i)}return o&&(T=m,w=d),c}var b=0<g.length,y=0<v.length;return b?se(e):e}(o,i))).selector=e}return r},p=le.select=function(e,t,n,i){var o,r,a,l,u,s="function"==typeof e&&e,c=!i&&m(e=s.selector||e);if(n=n||[],1===c.length){if(2<(r=c[0]=c[0].slice(0)).length&&"ID"===(a=r[0]).type&&9===t.nodeType&&S&&_.relative[r[1].type]){if(!(t=(_.find.ID(a.matches[0].replace(ie,f),t)||[])[0]))return n;s&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=Y.needsContext.test(e)?0:r.length;o--&&(a=r[o],!_.relative[l=a.type]);)if((u=_.find[l])&&(i=u(a.matches[0].replace(ie,f),ne.test(r[0].type)&&ge(t.parentNode)||t))){if(r.splice(o,1),!(e=i.length&&ye(r)))return L.apply(n,i),n;break}}return(s||d(e,c))(i,t,!S,n,!t||ne.test(e)&&ge(t.parentNode)||t),n},h.sortStable=N.split("").sort(k).join("")===N,h.detectDuplicates=!!s,E(),h.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(A.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),h.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(j,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null});var Ne=n.Sizzle;le.noConflict=function(){return n.Sizzle===le&&(n.Sizzle=Ne),le},void 0===(xe=function(){return le}.call(Ce,Re,Ce,Te))||(Te.exports=xe)}(window)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=l(n(22)),o=l(n(23)),r=l(n(24)),a=l(n(25));function l(e){return e&&e.__esModule?e:{default:e}}var u={button:i.default,modal:o.default,dropdown:r.default,notification:a.default};t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=u(n(1)),r=u(n(4)),i=u(n(2)),a=u(n(3)),l=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function f(e){return new y(e)}var d="button",h="trv.".concat(d),m=".".concat(h),p={TRV_TOGGLE:'[trv-toggle="'.concat(d,'"]'),TRV_BUTTON:"[trv-".concat(d,'^="#"]'),TRV_STATUS:"[trv-status]"},v="active",g={ACTIVE:"active".concat(m),INACTIVE:"inactive".concat(m)},b={errorId:0,errorMessages:[{ERROR_ID:0,ERROR_MESSAGE:"Config must be an object"}]},y=function(){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),"object"!==s(e)){var t=Object.assign({},b,{errorId:0});new l.default(t)}this._config=e,this._element=window.$TravlrSelector(this._config.element),this._elementContext="",this._isActive=!1,this._beforeAction=e.beforeAction,this._afterAction=e.afterAction,0===this._element.length&&(this._element=window.$TravlrSelector(p.TRV_BUTTON)),this.init()}return function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(n,[{key:"init",value:function(){var i=this;0<this._element.length&&this._element.forEach(function(t){i._elementContext=t;var e=new o.default({element:t,attributeName:"trv-status"}).getAttribute()||null,n=i;null===e&&new o.default({element:t,attributeName:"trv-status",attributeValue:!1}).setAttribute(),new a.default({type:"add",element:t,eventName:g.ACTIVE,action:function(e){n._elementContext=e.target,"function"==typeof n._beforeAction&&new r.default({callback:n._beforeAction,params:n}),i.active(t),"function"==typeof n._afterAction&&new r.default({callback:n._afterAction,params:n})}}),new a.default({type:"add",element:t,eventName:g.INACTIVE,action:function(e){n._elementContext=e.target,"function"==typeof n._beforeAction&&new r.default({callback:n._beforeAction,params:n}),i.inActive(t),"function"==typeof n._afterAction&&new r.default({callback:n._afterAction,params:n})}}),t.onclick=function(e){n._elementContext=this,"function"==typeof n._beforeAction&&new r.default({callback:n._beforeAction,params:n}),n.toggle(e.target),"function"==typeof n._afterAction&&new r.default({callback:n._afterAction,params:n})}})}},{key:"toggle",value:function(e){var t=new o.default({element:e,attributeName:"trv-status"}).getAttribute();this._isActive=(0,i.default)(t)||!1,this._isActive?this.inActive(e):this.active(e)}},{key:"active",value:function(e){this._isActive=!0,new o.default({element:e,attributeName:"trv-status",attributeValue:this._isActive}).setAttribute(),e.classList.add(v)}},{key:"inActive",value:function(e){this._isActive=!1,new o.default({element:e,attributeName:"trv-status",attributeValue:this._isActive}).setAttribute(),e.classList.remove(v)}}]),n}();t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=u(n(1)),r=u(n(2)),i=u(n(3)),a=u(n(4)),l=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function f(e){return new y(e)}var d="modal",h="trv.".concat(d),m=".".concat(h),p={TRV_TOGGLE:'[trv-toggle="'.concat(d,'"]'),TRV_DISMISS:'[trv-dismiss="'.concat(d,'"]'),TRV_OVERLAY:'[trv-overlay="'.concat(d,'"]')},v="active",g={ACTIVE:"active".concat(m),INACTIVE:"inactive".concat(m)},b={errorId:0,errorMessages:[{ERROR_ID:0,ERROR_MESSAGE:"Config must be an object"}]},y=function(){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),"object"!==s(e)){var t=Object.assign({},b,{errorId:0});new l.default(t)}this._config=e,this._element=void 0===e.element?"":e.element,this._elementModalButton=window.$TravlrSelector(p.TRV_TOGGLE),this._modalButtonContext=null,this._elementModalButtonDismiss=window.$TravlrSelector(p.TRV_DISMISS),this._modalButtonDismissContext=null,this._elementModalOverlay=window.$TravlrSelector(p.TRV_OVERLAY),this._modalOverlayContext=null,this._elementModalTarget=null,this._modalTargetName=null,this._modalTargetContext=null,this._isShown=!1,this._beforeAction=e.beforeAction,this._afterAction=e.afterAction,this.init()}return function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(n,[{key:"init",value:function(){var n=this;""!==this._element&&(this._elementModalButton=window.$TravlrSelector("".concat(p.TRV_TOGGLE,'[trv-modal-target="').concat(this._element,'"]')),this._elementModalButtonDismiss=window.$TravlrSelector("".concat(p.TRV_DISMISS,'[trv-modal-target="').concat(this._element,'"]')),this._elementModalOverlay=window.$TravlrSelector("".concat(p.TRV_OVERLAY,'[trv-modal-target="').concat(this._element,'"]'))),0<this._elementModalButton.length?this._elementModalButton.forEach(function(e){n._modalButtonContext=e;var t=n;e.onclick=function(e){t._modalButtonContext=this,t.prepareModal(e.target,t._config.status),t.toggle()}}):(this.prepareModal(this._element,this._config.status),this.toggle())}},{key:"prepareModal",value:function(e,t){if(e instanceof Element||e instanceof HTMLDocument&&t){var n=new o.default({element:e,attributeName:"trv-status"}).getAttribute(),i=new o.default({element:e,attributeName:"trv-modal-target"}).getAttribute();this._isShown=(0,r.default)(n)||!1,this._modalTargetName=i}else this._isShown="open"===t||(void 0===t||""===t)&&null,this._modalTargetName=e||"";this._elementModalTarget=window.$TravlrSelector("[trv-modal-name=".concat(this._modalTargetName,"]")),this.eventListener()}},{key:"eventListener",value:function(){var t=this;this._elementModalTarget.forEach(function(e){new i.default({type:"add",element:e,eventName:g.ACTIVE,action:function(e){t._elementContext=e.target,"function"==typeof t._beforeAction&&new a.default({callback:t._beforeAction,params:t}),t.show(),"function"==typeof t._afterAction&&new a.default({callback:t._afterAction,params:t})}}),new i.default({type:"add",element:e,eventName:g.INACTIVE,action:function(e){t._elementContext=e.target,"function"==typeof t._beforeAction&&new a.default({callback:t._beforeAction,params:t}),t.hide(),"function"==typeof t._afterAction&&new a.default({callback:t._afterAction,params:t})}})})}},{key:"toggle",value:function(){this._isShown=!this._isShown,null!==this._isShown&&("function"==typeof this._beforeAction&&new a.default({callback:this._beforeAction,params:this}),this._isShown?this.show():this.hide(),"function"==typeof this._afterAction&&new a.default({callback:this._afterAction,params:this}))}},{key:"dismiss",value:function(e){var t=this;e.onclick=function(){t.hide()}}},{key:"show",value:function(){var t=this;this._isShown=!0,this._elementModalButton.forEach(function(e){new o.default({element:e,attributeName:"trv-status",attributeValue:t._isShown}).setAttribute()}),this._elementModalButtonDismiss.forEach(function(e){new o.default({element:e,attributeName:"trv-status",attributeValue:t._isShown}).setAttribute()}),this.modalToggle(),this._elementModalButtonDismiss.forEach(function(e){t._modalButtonDismissContext=e,t.dismiss(e)}),this._elementModalOverlay.forEach(function(e){t._modalOverlayContext=e,t.dismiss(e)})}},{key:"hide",value:function(){var t=this;this._isShown=!1,this._elementModalButton.forEach(function(e){new o.default({element:e,attributeName:"trv-status",attributeValue:t._isShown}).setAttribute()}),this._elementModalButtonDismiss.forEach(function(e){new o.default({element:e,attributeName:"trv-status",attributeValue:t._isShown}).setAttribute()}),this.modalToggle()}},{key:"modalToggle",value:function(){var t=this;this._elementModalTarget.forEach(function(e){t._modalTargetContext=e,t._isShown?e.classList.add(v):e.classList.remove(v)})}}]),n}();t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=u(n(1)),i=u(n(2)),r=u(n(4)),a=u(n(0)),l=u(n(3));function u(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function f(e){return new y(e)}var d="dropdown",h="trv.".concat(d),m=".".concat(h),p={TRV_TOGGLE:'[trv-toggle="'.concat(d,'"]'),TRV_DROPDOWN_BUTTON:"[trv-".concat(d,"]"),TRV_STATUS:"[trv-status]"},v="active",g={ACTIVE:"active".concat(m),INACTIVE:"inactive".concat(m)},b={errorId:0,errorMessages:[{ERROR_ID:0,ERROR_MESSAGE:"Config must be an object"}]},y=function(){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),"object"!==s(e)){var t=Object.assign({},b,{errorId:0});new a.default(t)}this._config=e,this._element=window.$TravlrSelector(this._config.element),this._elementContext="",this._isActive=!1,this._beforeAction=e.beforeAction,this._afterAction=e.afterAction,0===this._element.length&&(this._element=window.$TravlrSelector(p.TRV_DROPDOWN_BUTTON)),this.init()}return function(e,t,n){t&&c(e.prototype,t),n&&c(e,n)}(n,[{key:"init",value:function(){var i=this;0<this._element.length&&(this.eventListener(),this._element.forEach(function(e){i._elementContext=e;var t=new o.default({element:e,attributeName:"trv-status"}).getAttribute()||null,n=i;null===t&&new o.default({element:e,attributeName:"trv-status",attributeValue:!1}).setAttribute(),e.onclick=function(){n._elementContext=this,"function"==typeof n._beforeAction&&new r.default({callback:n._beforeAction,params:n}),n.toggle(this),"function"==typeof n._afterAction&&new r.default({callback:n._afterAction,params:n})}}))}},{key:"eventListener",value:function(){var n=this;this._element.forEach(function(t){new l.default({type:"add",element:t,eventName:g.ACTIVE,action:function(e){n._elementContext=e.target,"function"==typeof n._beforeAction&&new r.default({callback:n._beforeAction,params:n}),n.active(t),"function"==typeof n._afterAction&&new r.default({callback:n._afterAction,params:n})}}),new l.default({type:"add",element:t,eventName:g.INACTIVE,action:function(e){n._elementContext=e.target,"function"==typeof n._beforeAction&&new r.default({callback:n._beforeAction,params:n}),n.inActive(t),"function"==typeof n._afterAction&&new r.default({callback:n._afterAction,params:n})}})})}},{key:"toggle",value:function(e){1<arguments.length&&void 0!==arguments[1]&&arguments[1];var t=new o.default({element:e,attributeName:"trv-status"}).getAttribute();this._isActive=(0,i.default)(t)||!1,this._isActive?this.inActive(e):this.active(e)}},{key:"active",value:function(e){this._isActive=!0,new o.default({element:e,attributeName:"trv-status",attributeValue:this._isActive}).setAttribute(),e.classList.add(v)}},{key:"inActive",value:function(e){this._isActive=!1,new o.default({element:e,attributeName:"trv-status",attributeValue:this._isActive}).setAttribute(),e.classList.remove(v)}}]),n}();t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=l(n(1)),r=l(n(2)),i=l(n(0)),a=l(n(3));function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function c(e){new y(e)}var f="notification",d="trv.".concat(f),h=".".concat(d),m={TRV_TOGGLE:'[trv-toggle="'.concat(f,'"]'),TRV_DISMISS:'[trv-dismiss="'.concat(f,'"]'),TRV_STATUS:"[trv-status]"},p="active",v={ACTIVE:"active".concat(h),INACTIVE:"inactive".concat(h)},g={errorId:0,errorMessages:[{ERROR_ID:0,ERROR_MESSAGE:"Config must be an object"},{ERROR_ID:1,ERROR_MESSAGE:"Position must be an object"}]},b={top:!0,bottom:!1,right:!0,left:!1},y=function(){function n(e){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),"object"!==u(e)){var t=Object.assign({},g,{errorId:0});new i.default(t)}this._config=e,this._element=void 0===e.element?"":e.element,this._elementNotificationButton=window.$TravlrSelector(m.TRV_TOGGLE),this._notificationButtonContext=null,this._elementNotificationButtonActive=null,this._elementNotificationButtonDismiss=window.$TravlrSelector(m.TRV_DISMISS),this._notificationButtonDismissContext=null,this._elementNotificationTarget=null,this._notificationTargetContext=null,this._notificationTargetName=null,this._elementPosition="object"!==u(e.position)?this._config.position:b,this._elementContext="",this._isShown=!1,this._autoclose=(0,r.default)(this._config.autoclose)||!1,this._interval=this._config.interval&&"number"==typeof this._config.interval?this._config.interval:3e3,this._beforeAction=e.beforeAction,this._afterAction=e.afterAction,this.init()}return function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(n,[{key:"init",value:function(){var n=this;""!==this._element&&(this._elementNotificationButton=window.$TravlrSelector("".concat(m.TRV_TOGGLE,'[trv-notification-target="').concat(this._element,'"]'))),0<this._elementNotificationButton.length?this._elementNotificationButton.forEach(function(e){n._notificationButtonContext=e;var t=n;e.onclick=function(e){t._notificationButtonContext=this,t.prepareNotification(e.target,t._config.status),t.toggle()}}):(this.prepareNotification(this._element,this._config.status),this.toggle())}},{key:"prepareNotification",value:function(e,t){if(e instanceof Element||e instanceof HTMLDocument&&t){var n=new o.default({element:e,attributeName:"trv-status"}).getAttribute(),i=new o.default({element:e,attributeName:"trv-notification-target"}).getAttribute();this._isShown=(0,r.default)(n)||!1,this._notificationTargetName=i,this._elementNotificationButtonActive=e}else this._isShown="show"!==t,this._notificationTargetName=e||"";this._elementNotificationTarget=window.$TravlrSelector("[trv-notification-name=".concat(this._notificationTargetName,"]")),this.eventListener()}},{key:"eventListener",value:function(){var t=this;this._elementNotificationTarget.forEach(function(e){new a.default({type:"add",element:e,eventName:v.ACTIVE,action:function(e){t._elementContext=e.target,"function"==typeof t._beforeAction&&new CallbackHandler({callback:t._beforeAction,params:t}),t.show(),"function"==typeof t._afterAction&&new CallbackHandler({callback:t._afterAction,params:t})}}),new a.default({type:"add",element:e,eventName:v.INACTIVE,action:function(e){t._elementContext=e.target,"function"==typeof t._beforeAction&&new CallbackHandler({callback:t._beforeAction,params:t}),t.hide(),"function"==typeof t._afterAction&&new CallbackHandler({callback:t._afterAction,params:t})}})})}},{key:"toggle",value:function(){this._isShown=!this._isShown,null!==this._isShown&&("function"==typeof this._beforeAction&&new CallbackHandler({callback:this._beforeAction,params:this}),this._isShown?this.show():this.hide(),"function"==typeof this._afterAction&&new CallbackHandler({callback:this._afterAction,params:this}))}},{key:"show",value:function(){var t=this;this._isShown=!0,new o.default({element:this._elementNotificationButtonActive,attributeName:"trv-status",attributeValue:this._isShown}).setAttribute(),this._elementNotificationTarget.forEach(function(e){new o.default({element:e,attributeName:"trv-status",attributeValue:t._isShown}).setAttribute()}),this.notificationToggle(),this._autoclose&&setTimeout(function(){t.hide()},this._interval),this._elementNotificationButtonDismiss.forEach(function(e){t._notificationButtonDismissContext=e,t.dismiss(e)})}},{key:"hide",value:function(){var t=this;this._isShown=!1,new o.default({element:this._elementNotificationButtonActive,attributeName:"trv-status",attributeValue:this._isShown}).setAttribute(),this._elementNotificationTarget.forEach(function(e){new o.default({element:e,attributeName:"trv-status",attributeValue:t._isShown}).setAttribute()}),this.notificationToggle()}},{key:"dismiss",value:function(t){var n=this;t.onclick=function(){var e=new o.default({element:t,attributeName:"trv-notification-target"}).getAttribute();n._elementNotificationTarget=window.$TravlrSelector("[trv-notification-name=".concat(e,"]")),n.hide()}}},{key:"notificationToggle",value:function(){var t=this;this._elementNotificationTarget.forEach(function(e){t._notificationTargetContext=e,t._isShown?e.classList.add(p):e.classList.remove(p)})}}]),n}();t.default=c}],o.c=i,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=5);function o(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,i});
//# sourceMappingURL=travlr-uikit.min.js.map