Click to Chat for WhatsApp Chat - Version 2.8.2

Version Description

  • Display Styles after WhatsApp Number is added.
  • Default sytles changed.
Download this release

Release Info

Developer bhvreddy
Plugin Icon 128x128 Click to Chat for WhatsApp Chat
Version 2.8.2
Comparing to
See all releases

Code changes from version 2.7 to 2.8.2

Files changed (31) hide show
  1. click-to-chat.php +2 -2
  2. new/admin/admin.php +2 -2
  3. new/admin/admin_assets/js/admin.js +5 -7
  4. new/admin/admin_assets/js/materialize.min.js +4 -6
  5. new/admin/{admin-after-settings-page.php → admin_commons/admin-after-settings-page.php} +0 -0
  6. new/admin/admin_commons/admin-show-hide.php +482 -0
  7. new/admin/admin_commons/class-ht-ctc-admin-others.php +96 -0
  8. new/admin/{class-ht-ctc-metabox.php → admin_commons/class-ht-ctc-metabox.php} +0 -0
  9. new/admin/class-ht-ctc-admin-customize-styles.php +85 -82
  10. new/admin/class-ht-ctc-admin-group-page.php +14 -462
  11. new/admin/class-ht-ctc-admin-main-page.php +50 -481
  12. new/admin/class-ht-ctc-admin-others.php +0 -50
  13. new/admin/class-ht-ctc-admin-scripts.php +5 -2
  14. new/admin/class-ht-ctc-admin-share-page.php +14 -463
  15. new/admin/class-ht-ctc-db.php +5 -8
  16. new/class-ht-ctc.php +1 -0
  17. new/inc/assets/js/app.js +93 -28
  18. new/inc/chat/chat-show-hide.php +0 -200
  19. new/inc/chat/class-ht-ctc-chat-shortcode.php +5 -13
  20. new/inc/chat/class-ht-ctc-chat.php +28 -23
  21. new/inc/class-ht-ctc-main.php +2 -22
  22. new/inc/commons/class-ht-ctc-hooks.php +61 -0
  23. new/inc/commons/class-ht-ctc-scripts.php +1 -3
  24. new/inc/commons/ht-ctc-variables.php +0 -150
  25. new/inc/{share/share-show-hide.php → commons/show-hide.php} +19 -26
  26. new/inc/group/class-ht-ctc-group-shortcode.php +5 -13
  27. new/inc/group/class-ht-ctc-group.php +25 -16
  28. new/inc/group/group-show-hide.php +0 -212
  29. new/inc/share/class-ht-ctc-share-shortcode.php +5 -13
  30. new/inc/share/class-ht-ctc-share.php +27 -19
  31. readme.txt +50 -47
click-to-chat.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Click to Chat
4
  Plugin URI: https://wordpress.org/plugins/click-to-chat-for-whatsapp/
5
  Description: Lets make your Web page visitors contact you through WhatsApp with a single click/tap
6
- Version: 2.7
7
  Author: HoliThemes
8
  Author URI: https://holithemes.com/plugins/click-to-chat/
9
  License: GPL2
@@ -17,7 +17,7 @@ if ( ! defined( 'WPINC' ) ) {
17
 
18
  // new interface - ctc - Version
19
  if ( ! defined( 'HT_CTC_VERSION' ) ) {
20
- define( 'HT_CTC_VERSION', '2.7' );
21
  }
22
 
23
  // for previous interface - define HT_CCW_VERSION
3
  Plugin Name: Click to Chat
4
  Plugin URI: https://wordpress.org/plugins/click-to-chat-for-whatsapp/
5
  Description: Lets make your Web page visitors contact you through WhatsApp with a single click/tap
6
+ Version: 2.8.2
7
  Author: HoliThemes
8
  Author URI: https://holithemes.com/plugins/click-to-chat/
9
  License: GPL2
17
 
18
  // new interface - ctc - Version
19
  if ( ! defined( 'HT_CTC_VERSION' ) ) {
20
+ define( 'HT_CTC_VERSION', '2.8.2' );
21
  }
22
 
23
  // for previous interface - define HT_CCW_VERSION
new/admin/admin.php CHANGED
@@ -44,7 +44,7 @@ if ( isset ( $ht_ctc_main_options['enable_share'] ) ) {
44
  include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-customize-styles.php';
45
 
46
  // meta boxes - change values at page level
47
- include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-metabox.php';
48
 
49
  // others - hooks ....
50
- include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-others.php';
44
  include_once HT_CTC_PLUGIN_DIR .'new/admin/class-ht-ctc-admin-customize-styles.php';
45
 
46
  // meta boxes - change values at page level
47
+ include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/class-ht-ctc-metabox.php';
48
 
49
  // others - hooks ....
50
+ include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/class-ht-ctc-admin-others.php';
new/admin/admin_assets/js/admin.js CHANGED
@@ -1,10 +1,4 @@
1
- /**
2
- * Click to Chat
3
- * Custom Code
4
- */
5
-
6
-
7
- // initialize materialize function ..
8
  document.addEventListener('DOMContentLoaded', function() {
9
 
10
  var elems = document.querySelectorAll('select');
@@ -16,6 +10,9 @@ document.addEventListener('DOMContentLoaded', function() {
16
  var elems = document.querySelectorAll('.modal');
17
  M.Modal.init(elems, {});
18
 
 
 
 
19
  });
20
 
21
 
@@ -24,6 +21,7 @@ jQuery(document).ready(function ($) {
24
  $('select').formSelect();
25
  $('.collapsible').collapsible();
26
  $('.modal').modal();
 
27
 
28
  $('.ht-ctc-color').wpColorPicker();
29
 
1
+ // Click to Chat
 
 
 
 
 
 
2
  document.addEventListener('DOMContentLoaded', function() {
3
 
4
  var elems = document.querySelectorAll('select');
10
  var elems = document.querySelectorAll('.modal');
11
  M.Modal.init(elems, {});
12
 
13
+ var elems = document.querySelectorAll('.tooltipped');
14
+ M.Tooltip.init(elems, {});
15
+
16
  });
17
 
18
 
21
  $('select').formSelect();
22
  $('.collapsible').collapsible();
23
  $('.modal').modal();
24
+ $('.tooltipped').tooltip();
25
 
26
  $('.ht-ctc-color').wpColorPicker();
27
 
new/admin/admin_assets/js/materialize.min.js CHANGED
@@ -1,6 +1,4 @@
1
- /*!
2
- * Materialize v1.0.0 (http://materializecss.com)
3
- * Copyright 2014-2017 Materialize
4
- * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
- */
6
- var _get=function t(e,i,n){null===e&&(e=Function.prototype);var s=Object.getOwnPropertyDescriptor(e,i);if(void 0===s){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,n)}if("value"in s)return s.value;var a=s.get;return void 0!==a?a.call(n):void 0},_createClass=function(){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}}();function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}window.cash=function(){var i,o=document,a=window,t=Array.prototype,r=t.slice,n=t.filter,s=t.push,e=function(){},h=function(t){return typeof t==typeof e&&t.call},d=function(t){return"string"==typeof t},l=/^#[\w-]*$/,u=/^\.[\w-]*$/,c=/<.+>/,p=/^\w+$/;function v(t,e){e=e||o;var i=u.test(t)?e.getElementsByClassName(t.slice(1)):p.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t);return i}function f(t){if(!i){var e=(i=o.implementation.createHTMLDocument(null)).createElement("base");e.href=o.location.href,i.head.appendChild(e)}return i.body.innerHTML=t,i.body.childNodes}function m(t){"loading"!==o.readyState?t():o.addEventListener("DOMContentLoaded",t)}function g(t,e){if(!t)return this;if(t.cash&&t!==a)return t;var i,n=t,s=0;if(d(t))n=l.test(t)?o.getElementById(t.slice(1)):c.test(t)?f(t):v(t,e);else if(h(t))return m(t),this;if(!n)return this;if(n.nodeType||n===a)this[0]=n,this.length=1;else for(i=this.length=n.length;s<i;s++)this[s]=n[s];return this}function _(t,e){return new g(t,e)}var y=_.fn=_.prototype=g.prototype={cash:!0,length:0,push:s,splice:t.splice,map:t.map,init:g};function k(t,e){for(var i=t.length,n=0;n<i&&!1!==e.call(t[n],t[n],n,t);n++);}function b(t,e){var i=t&&(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector);return!!i&&i.call(t,e)}function w(e){return d(e)?b:e.cash?function(t){return e.is(t)}:function(t,e){return t===e}}function C(t){return _(r.call(t).filter(function(t,e,i){return i.indexOf(t)===e}))}Object.defineProperty(y,"constructor",{value:_}),_.parseHTML=f,_.noop=e,_.isFunction=h,_.isString=d,_.extend=y.extend=function(t){t=t||{};var e=r.call(arguments),i=e.length,n=1;for(1===e.length&&(t=this,n=0);n<i;n++)if(e[n])for(var s in e[n])e[n].hasOwnProperty(s)&&(t[s]=e[n][s]);return t},_.extend({merge:function(t,e){for(var i=+e.length,n=t.length,s=0;s<i;n++,s++)t[n]=e[s];return t.length=n,t},each:k,matches:b,unique:C,isArray:Array.isArray,isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)}});var E=_.uid="_cash"+Date.now();function M(t){return t[E]=t[E]||{}}function O(t,e,i){return M(t)[e]=i}function x(t,e){var i=M(t);return void 0===i[e]&&(i[e]=t.dataset?t.dataset[e]:_(t).attr("data-"+e)),i[e]}y.extend({data:function(e,i){if(d(e))return void 0===i?x(this[0],e):this.each(function(t){return O(t,e,i)});for(var t in e)this.data(t,e[t]);return this},removeData:function(s){return this.each(function(t){return i=s,void((n=M(e=t))?delete n[i]:e.dataset?delete e.dataset[i]:_(e).removeAttr("data-"+name));var e,i,n})}});var L=/\S+/g;function T(t){return d(t)&&t.match(L)}function $(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)}function B(t,e,i){t.classList?t.classList.add(e):i.indexOf(" "+e+" ")&&(t.className+=" "+e)}function D(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(e,"")}y.extend({addClass:function(t){var n=T(t);return n?this.each(function(e){var i=" "+e.className+" ";k(n,function(t){B(e,t,i)})}):this},attr:function(e,i){if(e){if(d(e))return void 0===i?this[0]?this[0].getAttribute?this[0].getAttribute(e):this[0][e]:void 0:this.each(function(t){t.setAttribute?t.setAttribute(e,i):t[e]=i});for(var t in e)this.attr(t,e[t]);return this}},hasClass:function(t){var e=!1,i=T(t);return i&&i.length&&this.each(function(t){return!(e=$(t,i[0]))}),e},prop:function(e,i){if(d(e))return void 0===i?this[0][e]:this.each(function(t){t[e]=i});for(var t in e)this.prop(t,e[t]);return this},removeAttr:function(e){return this.each(function(t){t.removeAttribute?t.removeAttribute(e):delete t[e]})},removeClass:function(t){if(!arguments.length)return this.attr("class","");var i=T(t);return i?this.each(function(e){k(i,function(t){D(e,t)})}):this},removeProp:function(e){return this.each(function(t){delete t[e]})},toggleClass:function(t,e){if(void 0!==e)return this[e?"addClass":"removeClass"](t);var n=T(t);return n?this.each(function(e){var i=" "+e.className+" ";k(n,function(t){$(e,t)?D(e,t):B(e,t,i)})}):this}}),y.extend({add:function(t,e){return C(_.merge(this,_(t,e)))},each:function(t){return k(this,t),this},eq:function(t){return _(this.get(t))},filter:function(e){if(!e)return this;var i=h(e)?e:w(e);return _(n.call(this,function(t){return i(t,e)}))},first:function(){return this.eq(0)},get:function(t){return void 0===t?r.call(this):t<0?this[t+this.length]:this[t]},index:function(t){var e=t?_(t)[0]:this[0],i=t?this:_(e).parent().children();return r.call(i).indexOf(e)},last:function(){return this.eq(-1)}});var S,I,A,R,H,P,W=(H=/(?:^\w|[A-Z]|\b\w)/g,P=/[\s-_]+/g,function(t){return t.replace(H,function(t,e){return t[0===e?"toLowerCase":"toUpperCase"]()}).replace(P,"")}),j=(S={},I=document,A=I.createElement("div"),R=A.style,function(e){if(e=W(e),S[e])return S[e];var t=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+["webkit","moz","ms","o"].join(t+" ")+t).split(" ");return k(i,function(t){if(t in R)return S[t]=e=S[e]=t,!1}),S[e]});function F(t,e){return parseInt(a.getComputedStyle(t[0],null)[e],10)||0}function q(e,i,t){var n,s=x(e,"_cashEvents"),o=s&&s[i];o&&(t?(e.removeEventListener(i,t),0<=(n=o.indexOf(t))&&o.splice(n,1)):(k(o,function(t){e.removeEventListener(i,t)}),o=[]))}function N(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function z(t){var e,i,n,s=t.type;if(!s)return null;switch(s.toLowerCase()){case"select-one":return 0<=(n=(i=t).selectedIndex)?i.options[n].value:null;case"select-multiple":return e=[],k(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null;case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function V(e,i,n){var t=d(i);t||!i.length?k(e,t?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",i)}:function(t,e){return function(t,e,i){if(i){var n=t.childNodes[0];t.insertBefore(e,n)}else t.appendChild(e)}(t,0===e?i:i.cloneNode(!0),n)}):k(i,function(t){return V(e,t,n)})}_.prefixedProp=j,_.camelCase=W,y.extend({css:function(e,i){if(d(e))return e=j(e),1<arguments.length?this.each(function(t){return t.style[e]=i}):a.getComputedStyle(this[0])[e];for(var t in e)this.css(t,e[t]);return this}}),k(["Width","Height"],function(e){var t=e.toLowerCase();y[t]=function(){return this[0].getBoundingClientRect()[t]},y["inner"+e]=function(){return this[0]["client"+e]},y["outer"+e]=function(t){return this[0]["offset"+e]+(t?F(this,"margin"+("Width"===e?"Left":"Top"))+F(this,"margin"+("Width"===e?"Right":"Bottom")):0)}}),y.extend({off:function(e,i){return this.each(function(t){return q(t,e,i)})},on:function(a,i,r,l){var n;if(!d(a)){for(var t in a)this.on(t,i,a[t]);return this}return h(i)&&(r=i,i=null),"ready"===a?(m(r),this):(i&&(n=r,r=function(t){for(var e=t.target;!b(e,i);){if(e===this||null===e)return e=!1;e=e.parentNode}e&&n.call(e,t)}),this.each(function(t){var e,i,n,s,o=r;l&&(o=function(){r.apply(this,arguments),q(t,a,o)}),i=a,n=o,(s=x(e=t,"_cashEvents")||O(e,"_cashEvents",{}))[i]=s[i]||[],s[i].push(n),e.addEventListener(i,n)}))},one:function(t,e,i){return this.on(t,e,i,!0)},ready:m,trigger:function(t,e){if(document.createEvent){var i=document.createEvent("HTMLEvents");return i.initEvent(t,!0,!1),i=this.extend(i,e),this.each(function(t){return t.dispatchEvent(i)})}}}),y.extend({serialize:function(){var s="";return k(this[0].elements||this,function(t){if(!t.disabled&&"FIELDSET"!==t.tagName){var e=t.name;switch(t.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var i=z(t);null!==i&&k(i,function(t){s+=N(e,t)});break;default:var n=z(t);null!==n&&(s+=N(e,n))}}}),s.substr(1)},val:function(e){return void 0===e?z(this[0]):this.each(function(t){return t.value=e})}}),y.extend({after:function(t){return _(t).insertAfter(this),this},append:function(t){return V(this,t),this},appendTo:function(t){return V(_(t),this),this},before:function(t){return _(t).insertBefore(this),this},clone:function(){return _(this.map(function(t){return t.cloneNode(!0)}))},empty:function(){return this.html(""),this},html:function(t){if(void 0===t)return this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each(function(t){return t.innerHTML=e})},insertAfter:function(t){var s=this;return _(t).each(function(t,e){var i=t.parentNode,n=t.nextSibling;s.each(function(t){i.insertBefore(0===e?t:t.cloneNode(!0),n)})}),this},insertBefore:function(t){var s=this;return _(t).each(function(e,i){var n=e.parentNode;s.each(function(t){n.insertBefore(0===i?t:t.cloneNode(!0),e)})}),this},prepend:function(t){return V(this,t,!0),this},prependTo:function(t){return V(_(t),this,!0),this},remove:function(){return this.each(function(t){if(t.parentNode)return t.parentNode.removeChild(t)})},text:function(e){return void 0===e?this[0].textContent:this.each(function(t){return t.textContent=e})}});var X=o.documentElement;return y.extend({position:function(){var t=this[0];return{left:t.offsetLeft,top:t.offsetTop}},offset:function(){var t=this[0].getBoundingClientRect();return{top:t.top+a.pageYOffset-X.clientTop,left:t.left+a.pageXOffset-X.clientLeft}},offsetParent:function(){return _(this[0].offsetParent)}}),y.extend({children:function(e){var i=[];return this.each(function(t){s.apply(i,t.children)}),i=C(i),e?i.filter(function(t){return b(t,e)}):i},closest:function(t){return!t||this.length<1?_():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(e){if(!e)return!1;var i=!1,n=w(e);return this.each(function(t){return!(i=n(t,e))}),i},find:function(e){if(!e||e.nodeType)return _(e&&this.has(e).length?e:null);var i=[];return this.each(function(t){s.apply(i,v(e,t))}),C(i)},has:function(e){var t=d(e)?function(t){return 0!==v(e,t).length}:function(t){return t.contains(e)};return this.filter(t)},next:function(){return _(this[0].nextElementSibling)},not:function(e){if(!e)return this;var i=w(e);return this.filter(function(t){return!i(t,e)})},parent:function(){var e=[];return this.each(function(t){t&&t.parentNode&&e.push(t.parentNode)}),C(e)},parents:function(e){var i,n=[];return this.each(function(t){for(i=t;i&&i.parentNode&&i!==o.body.parentNode;)i=i.parentNode,(!e||e&&b(i,e))&&n.push(i)}),C(n)},prev:function(){return _(this[0].previousElementSibling)},siblings:function(t){var e=this.parent().children(t),i=this[0];return e.filter(function(t){return t!==i})}}),_}();var Component=function(){function s(t,e,i){_classCallCheck(this,s),e instanceof Element||console.error(Error(e+" is not an HTML Element"));var n=t.getInstance(e);n&&n.destroy(),this.el=e,this.$el=cash(e)}return _createClass(s,null,[{key:"init",value:function(t,e,i){var n=null;if(e instanceof Element)n=new t(e,i);else if(e&&(e.jquery||e.cash||e instanceof NodeList)){for(var s=[],o=0;o<e.length;o++)s.push(new t(e[o],i));n=s}return n}}]),s}();!function(t){t.Package?M={}:t.M={},M.jQueryLoaded=!!t.jQuery}(window),"function"==typeof define&&define.amd?define("M",[],function(){return M}):"undefined"==typeof exports||exports.nodeType||("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=M),exports.default=M),M.version="1.0.0",M.keys={TAB:9,ENTER:13,ESC:27,ARROW_UP:38,ARROW_DOWN:40},M.tabPressed=!1,M.keyDown=!1;var docHandleKeydown=function(t){M.keyDown=!0,t.which!==M.keys.TAB&&t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||(M.tabPressed=!0)},docHandleKeyup=function(t){M.keyDown=!1,t.which!==M.keys.TAB&&t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||(M.tabPressed=!1)},docHandleFocus=function(t){M.keyDown&&document.body.classList.add("keyboard-focused")},docHandleBlur=function(t){document.body.classList.remove("keyboard-focused")};document.addEventListener("keydown",docHandleKeydown,!0),document.addEventListener("keyup",docHandleKeyup,!0),document.addEventListener("focus",docHandleFocus,!0),document.addEventListener("blur",docHandleBlur,!0),M.initializeJqueryWrapper=function(n,s,o){jQuery.fn[s]=function(e){if(n.prototype[e]){var i=Array.prototype.slice.call(arguments,1);if("get"===e.slice(0,3)){var t=this.first()[0][o];return t[e].apply(t,i)}return this.each(function(){var t=this[o];t[e].apply(t,i)})}if("object"==typeof e||!e)return n.init(this,e),this;jQuery.error("Method "+e+" does not exist on jQuery."+s)}},M.AutoInit=function(t){var e=t||document.body,i={Autocomplete:e.querySelectorAll(".autocomplete:not(.no-autoinit)"),Carousel:e.querySelectorAll(".carousel:not(.no-autoinit)"),Chips:e.querySelectorAll(".chips:not(.no-autoinit)"),Collapsible:e.querySelectorAll(".collapsible:not(.no-autoinit)"),Datepicker:e.querySelectorAll(".datepicker:not(.no-autoinit)"),Dropdown:e.querySelectorAll(".dropdown-trigger:not(.no-autoinit)"),Materialbox:e.querySelectorAll(".materialboxed:not(.no-autoinit)"),Modal:e.querySelectorAll(".modal:not(.no-autoinit)"),Parallax:e.querySelectorAll(".parallax:not(.no-autoinit)"),Pushpin:e.querySelectorAll(".pushpin:not(.no-autoinit)"),ScrollSpy:e.querySelectorAll(".scrollspy:not(.no-autoinit)"),FormSelect:e.querySelectorAll("select:not(.no-autoinit)"),Sidenav:e.querySelectorAll(".sidenav:not(.no-autoinit)"),Tabs:e.querySelectorAll(".tabs:not(.no-autoinit)"),TapTarget:e.querySelectorAll(".tap-target:not(.no-autoinit)"),Timepicker:e.querySelectorAll(".timepicker:not(.no-autoinit)"),Tooltip:e.querySelectorAll(".tooltipped:not(.no-autoinit)"),FloatingActionButton:e.querySelectorAll(".fixed-action-btn:not(.no-autoinit)")};for(var n in i){M[n].init(i[n])}},M.objectSelectorString=function(t){return((t.prop("tagName")||"")+(t.attr("id")||"")+(t.attr("class")||"")).replace(/\s/g,"")},M.guid=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}(),M.escapeHash=function(t){return t.replace(/(:|\.|\[|\]|,|=|\/)/g,"\\$1")},M.elementOrParentIsFixed=function(t){var e=$(t),i=e.add(e.parents()),n=!1;return i.each(function(){if("fixed"===$(this).css("position"))return!(n=!0)}),n},M.checkWithinContainer=function(t,e,i){var n={top:!1,right:!1,bottom:!1,left:!1},s=t.getBoundingClientRect(),o=t===document.body?Math.max(s.bottom,window.innerHeight):s.bottom,a=t.scrollLeft,r=t.scrollTop,l=e.left-a,h=e.top-r;return(l<s.left+i||l<i)&&(n.left=!0),(l+e.width>s.right-i||l+e.width>window.innerWidth-i)&&(n.right=!0),(h<s.top+i||h<i)&&(n.top=!0),(h+e.height>o-i||h+e.height>window.innerHeight-i)&&(n.bottom=!0),n},M.checkPossibleAlignments=function(t,e,i,n){var s={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},o="visible"===getComputedStyle(e).overflow,a=e.getBoundingClientRect(),r=Math.min(a.height,window.innerHeight),l=Math.min(a.width,window.innerWidth),h=t.getBoundingClientRect(),d=e.scrollLeft,u=e.scrollTop,c=i.left-d,p=i.top-u,v=i.top+h.height-u;return s.spaceOnRight=o?window.innerWidth-(h.left+i.width):l-(c+i.width),s.spaceOnRight<0&&(s.left=!1),s.spaceOnLeft=o?h.right-i.width:c-i.width+h.width,s.spaceOnLeft<0&&(s.right=!1),s.spaceOnBottom=o?window.innerHeight-(h.top+i.height+n):r-(p+i.height+n),s.spaceOnBottom<0&&(s.top=!1),s.spaceOnTop=o?h.bottom-(i.height+n):v-(i.height-n),s.spaceOnTop<0&&(s.bottom=!1),s},M.getOverflowParent=function(t){return null==t?null:t===document.body||"visible"!==getComputedStyle(t).overflow?t:M.getOverflowParent(t.parentElement)},M.getIdFromTrigger=function(t){var e=t.getAttribute("data-target");return e||(e=(e=t.getAttribute("href"))?e.slice(1):""),e},M.getDocumentScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},M.getDocumentScrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};var getTime=Date.now||function(){return(new Date).getTime()};M.throttle=function(i,n,s){var o=void 0,a=void 0,r=void 0,l=null,h=0;s||(s={});var d=function(){h=!1===s.leading?0:getTime(),l=null,r=i.apply(o,a),o=a=null};return function(){var t=getTime();h||!1!==s.leading||(h=t);var e=n-(t-h);return o=this,a=arguments,e<=0?(clearTimeout(l),l=null,h=t,r=i.apply(o,a),o=a=null):l||!1===s.trailing||(l=setTimeout(d,e)),r}};var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,i){if(i.get||i.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[e]=i.value)},$jscomp.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:"undefined"!=typeof global&&null!=global?global:t},$jscomp.global=$jscomp.getGlobal(this),$jscomp.SYMBOL_PREFIX="jscomp_symbol_",$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){},$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)},$jscomp.symbolCounter_=0,$jscomp.Symbol=function(t){return $jscomp.SYMBOL_PREFIX+(t||"")+$jscomp.symbolCounter_++},$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var t=$jscomp.global.Symbol.iterator;t||(t=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&$jscomp.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}}),$jscomp.initSymbolIterator=function(){}},$jscomp.arrayIterator=function(t){var e=0;return $jscomp.iteratorPrototype(function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}})},$jscomp.iteratorPrototype=function(t){return $jscomp.initSymbolIterator(),(t={next:t})[$jscomp.global.Symbol.iterator]=function(){return this},t},$jscomp.array=$jscomp.array||{},$jscomp.iteratorFromArray=function(e,i){$jscomp.initSymbolIterator(),e instanceof String&&(e+="");var n=0,s={next:function(){if(n<e.length){var t=n++;return{value:i(t,e[t]),done:!1}}return s.next=function(){return{done:!0,value:void 0}},s.next()}};return s[Symbol.iterator]=function(){return s},s},$jscomp.polyfill=function(t,e,i,n){if(e){for(i=$jscomp.global,t=t.split("."),n=0;n<t.length-1;n++){var s=t[n];s in i||(i[s]={}),i=i[s]}(e=e(n=i[t=t[t.length-1]]))!=n&&null!=e&&$jscomp.defineProperty(i,t,{configurable:!0,writable:!0,value:e})}},$jscomp.polyfill("Array.prototype.keys",function(t){return t||function(){return $jscomp.iteratorFromArray(this,function(t){return t})}},"es6-impl","es3");var $jscomp$this=this;M.anime=function(){function s(t){if(!B.col(t))try{return document.querySelectorAll(t)}catch(t){}}function b(t,e){for(var i=t.length,n=2<=arguments.length?e:void 0,s=[],o=0;o<i;o++)if(o in t){var a=t[o];e.call(n,a,o,t)&&s.push(a)}return s}function d(t){return t.reduce(function(t,e){return t.concat(B.arr(e)?d(e):e)},[])}function o(t){return B.arr(t)?t:(B.str(t)&&(t=s(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function a(t,e){return t.some(function(t){return t===e})}function r(t){var e,i={};for(e in t)i[e]=t[e];return i}function u(t,e){var i,n=r(t);for(i in t)n[i]=e.hasOwnProperty(i)?e[i]:t[i];return n}function c(t,e){var i,n=r(t);for(i in e)n[i]=B.und(t[i])?e[i]:t[i];return n}function l(t){if(t=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t))return t[2]}function h(t,e){return B.fnc(t)?t(e.target,e.id,e.total):t}function w(t,e){if(e in t.style)return getComputedStyle(t).getPropertyValue(e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function p(t,e){return B.dom(t)&&a($,e)?"transform":B.dom(t)&&(t.getAttribute(e)||B.svg(t)&&t[e])?"attribute":B.dom(t)&&"transform"!==e&&w(t,e)?"css":null!=t[e]?"object":void 0}function v(t,e){switch(p(t,e)){case"transform":return function(t,i){var e,n=-1<(e=i).indexOf("translate")||"perspective"===e?"px":-1<e.indexOf("rotate")||-1<e.indexOf("skew")?"deg":void 0,n=-1<i.indexOf("scale")?1:0+n;if(!(t=t.style.transform))return n;for(var s=[],o=[],a=[],r=/(\w+)\((.+?)\)/g;s=r.exec(t);)o.push(s[1]),a.push(s[2]);return(t=b(a,function(t,e){return o[e]===i})).length?t[0]:n}(t,e);case"css":return w(t,e);case"attribute":return t.getAttribute(e)}return t[e]||0}function f(t,e){var i=/^(\*=|\+=|-=)/.exec(t);if(!i)return t;var n=l(t)||0;switch(e=parseFloat(e),t=parseFloat(t.replace(i[0],"")),i[0][0]){case"+":return e+t+n;case"-":return e-t+n;case"*":return e*t+n}}function m(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function i(t){t=t.points;for(var e,i=0,n=0;n<t.numberOfItems;n++){var s=t.getItem(n);0<n&&(i+=m(e,s)),e=s}return i}function g(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return 2*Math.PI*t.getAttribute("r");case"rect":return 2*t.getAttribute("width")+2*t.getAttribute("height");case"line":return m({x:t.getAttribute("x1"),y:t.getAttribute("y1")},{x:t.getAttribute("x2"),y:t.getAttribute("y2")});case"polyline":return i(t);case"polygon":var e=t.points;return i(t)+m(e.getItem(e.numberOfItems-1),e.getItem(0))}}function C(e,i){function t(t){return t=void 0===t?0:t,e.el.getPointAtLength(1<=i+t?i+t:0)}var n=t(),s=t(-1),o=t(1);switch(e.property){case"x":return n.x;case"y":return n.y;case"angle":return 180*Math.atan2(o.y-s.y,o.x-s.x)/Math.PI}}function _(t,e){var i,n=/-?\d*\.?\d+/g;if(i=B.pth(t)?t.totalLength:t,B.col(i))if(B.rgb(i)){var s=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(i);i=s?"rgba("+s[1]+",1)":i}else i=B.hex(i)?function(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);t=parseInt(e[1],16);var i=parseInt(e[2],16),e=parseInt(e[3],16);return"rgba("+t+","+i+","+e+",1)"}(i):B.hsl(i)?function(t){function e(t,e,i){return i<0&&(i+=1),1<i&&--i,i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}var i=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);t=parseInt(i[1])/360;var n=parseInt(i[2])/100,s=parseInt(i[3])/100,i=i[4]||1;if(0==n)s=n=t=s;else{var o=s<.5?s*(1+n):s+n-s*n,a=2*s-o,s=e(a,o,t+1/3),n=e(a,o,t);t=e(a,o,t-1/3)}return"rgba("+255*s+","+255*n+","+255*t+","+i+")"}(i):void 0;else s=(s=l(i))?i.substr(0,i.length-s.length):i,i=e&&!/\s/g.test(i)?s+e:s;return{original:i+="",numbers:i.match(n)?i.match(n).map(Number):[0],strings:B.str(t)||e?i.split(n):[]}}function y(t){return b(t=t?d(B.arr(t)?t.map(o):o(t)):[],function(t,e,i){return i.indexOf(t)===e})}function k(t,i){var e=r(i);if(B.arr(t)){var n=t.length;2!==n||B.obj(t[0])?B.fnc(i.duration)||(e.duration=i.duration/n):t={value:t}}return o(t).map(function(t,e){return e=e?0:i.delay,t=B.obj(t)&&!B.pth(t)?t:{value:t},B.und(t.delay)&&(t.delay=e),t}).map(function(t){return c(t,e)})}function E(o,a){var r;return o.tweens.map(function(t){var e=(t=function(t,e){var i,n={};for(i in t){var s=h(t[i],e);B.arr(s)&&1===(s=s.map(function(t){return h(t,e)})).length&&(s=s[0]),n[i]=s}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(t,a)).value,i=v(a.target,o.name),n=r?r.to.original:i,n=B.arr(e)?e[0]:n,s=f(B.arr(e)?e[1]:e,n),i=l(s)||l(n)||l(i);return t.from=_(n,i),t.to=_(s,i),t.start=r?r.end:o.offset,t.end=t.start+t.delay+t.duration,t.easing=function(t){return B.arr(t)?D.apply(this,t):S[t]}(t.easing),t.elasticity=(1e3-Math.min(Math.max(t.elasticity,1),999))/1e3,t.isPath=B.pth(e),t.isColor=B.col(t.from.original),t.isColor&&(t.round=1),r=t})}function M(e,t,i,n){var s="delay"===e;return t.length?(s?Math.min:Math.max).apply(Math,t.map(function(t){return t[e]})):s?n.delay:i.offset+n.delay+n.duration}function n(t){var e,i,n,s,o=u(L,t),a=u(T,t),r=(i=t.targets,(n=y(i)).map(function(t,e){return{target:t,id:e,total:n.length}})),l=[],h=c(o,a);for(e in t)h.hasOwnProperty(e)||"targets"===e||l.push({name:e,offset:h.offset,tweens:k(t[e],a)});return s=l,t=b(d(r.map(function(n){return s.map(function(t){var e=p(n.target,t.name);if(e){var i=E(t,n);t={type:e,property:t.name,animatable:n,tweens:i,duration:i[i.length-1].end,delay:i[0].delay}}else t=void 0;return t})})),function(t){return!B.und(t)}),c(o,{children:[],animatables:r,animations:t,duration:M("duration",t,o,a),delay:M("delay",t,o,a)})}function O(t){function d(){return window.Promise&&new Promise(function(t){return _=t})}function u(t){return k.reversed?k.duration-t:t}function c(e){for(var t=0,i={},n=k.animations,s=n.length;t<s;){var o=n[t],a=o.animatable,r=o.tweens,l=r.length-1,h=r[l];l&&(h=b(r,function(t){return e<t.end})[0]||h);for(var r=Math.min(Math.max(e-h.start-h.delay,0),h.duration)/h.duration,d=isNaN(r)?1:h.easing(r,h.elasticity),r=h.to.strings,u=h.round,l=[],c=void 0,c=h.to.numbers.length,p=0;p<c;p++){var v=void 0,v=h.to.numbers[p],f=h.from.numbers[p],v=h.isPath?C(h.value,d*v):f+d*(v-f);u&&(h.isColor&&2<p||(v=Math.round(v*u)/u)),l.push(v)}if(h=r.length)for(c=r[0],d=0;d<h;d++)u=r[d+1],p=l[d],isNaN(p)||(c=u?c+(p+u):c+(p+" "));else c=l[0];I[o.type](a.target,o.property,c,i,a.id),o.currentValue=c,t++}if(t=Object.keys(i).length)for(n=0;n<t;n++)x||(x=w(document.body,"transform")?"transform":"-webkit-transform"),k.animatables[n].target.style[x]=i[n].join(" ");k.currentTime=e,k.progress=e/k.duration*100}function p(t){k[t]&&k[t](k)}function v(){k.remaining&&!0!==k.remaining&&k.remaining--}function e(t){var e=k.duration,i=k.offset,n=i+k.delay,s=k.currentTime,o=k.reversed,a=u(t);if(k.children.length){var r=k.children,l=r.length;if(a>=k.currentTime)for(var h=0;h<l;h++)r[h].seek(a);else for(;l--;)r[l].seek(a)}(n<=a||!e)&&(k.began||(k.began=!0,p("begin")),p("run")),i<a&&a<e?c(a):(a<=i&&0!==s&&(c(0),o&&v()),(e<=a&&s!==e||!e)&&(c(e),o||v())),p("update"),e<=t&&(k.remaining?(m=f,"alternate"===k.direction&&(k.reversed=!k.reversed)):(k.pause(),k.completed||(k.completed=!0,p("complete"),"Promise"in window&&(_(),y=d()))),g=0)}t=void 0===t?{}:t;var f,m,g=0,_=null,y=d(),k=n(t);return k.reset=function(){var t=k.direction,e=k.loop;for(k.currentTime=0,k.progress=0,k.paused=!0,k.began=!1,k.completed=!1,k.reversed="reverse"===t,k.remaining="alternate"===t&&1===e?2:e,c(0),t=k.children.length;t--;)k.children[t].reset()},k.tick=function(t){f=t,m||(m=f),e((g+f-m)*O.speed)},k.seek=function(t){e(u(t))},k.pause=function(){var t=A.indexOf(k);-1<t&&A.splice(t,1),k.paused=!0},k.play=function(){k.paused&&(k.paused=!1,m=0,g=u(k.currentTime),A.push(k),R||H())},k.reverse=function(){k.reversed=!k.reversed,m=0,g=u(k.currentTime)},k.restart=function(){k.pause(),k.reset(),k.play()},k.finished=y,k.reset(),k.autoplay&&k.play(),k}var x,L={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},T={duration:1e3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},$="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),B={arr:function(t){return Array.isArray(t)},obj:function(t){return-1<Object.prototype.toString.call(t).indexOf("Object")},pth:function(t){return B.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},dom:function(t){return t.nodeType||B.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return B.hex(t)||B.rgb(t)||B.hsl(t)}},D=function(){function u(t,e,i){return(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t}return function(a,r,l,h){if(0<=a&&a<=1&&0<=l&&l<=1){var d=new Float32Array(11);if(a!==r||l!==h)for(var t=0;t<11;++t)d[t]=u(.1*t,a,l);return function(t){if(a===r&&l===h)return t;if(0===t)return 0;if(1===t)return 1;for(var e=0,i=1;10!==i&&d[i]<=t;++i)e+=.1;var i=e+(t-d[--i])/(d[i+1]-d[i])*.1,n=3*(1-3*l+3*a)*i*i+2*(3*l-6*a)*i+3*a;if(.001<=n){for(e=0;e<4&&0!=(n=3*(1-3*l+3*a)*i*i+2*(3*l-6*a)*i+3*a);++e)var s=u(i,a,l)-t,i=i-s/n;t=i}else if(0===n)t=i;else{for(var i=e,e=e+.1,o=0;0<(n=u(s=i+(e-i)/2,a,l)-t)?e=s:i=s,1e-7<Math.abs(n)&&++o<10;);t=s}return u(t,r,h)}}}}(),S=function(){function i(t,e){return 0===t||1===t?t:-Math.pow(2,10*(t-1))*Math.sin(2*(t-1-e/(2*Math.PI)*Math.asin(1))*Math.PI/e)}var t,n="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),e={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],i],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(t,e){return 1-i(1-t,e)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(t,e){return t<.5?i(2*t,e)/2:1-i(-2*t+2,e)/2}]},s={linear:D(.25,.25,.75,.75)},o={};for(t in e)o.type=t,e[o.type].forEach(function(i){return function(t,e){s["ease"+i.type+n[e]]=B.fnc(t)?t:D.apply($jscomp$this,t)}}(o)),o={type:o.type};return s}(),I={css:function(t,e,i){return t.style[e]=i},attribute:function(t,e,i){return t.setAttribute(e,i)},object:function(t,e,i){return t[e]=i},transform:function(t,e,i,n,s){n[s]||(n[s]=[]),n[s].push(e+"("+i+")")}},A=[],R=0,H=function(){function n(){R=requestAnimationFrame(t)}function t(t){var e=A.length;if(e){for(var i=0;i<e;)A[i]&&A[i].tick(t),i++;n()}else cancelAnimationFrame(R),R=0}return n}();return O.version="2.2.0",O.speed=1,O.running=A,O.remove=function(t){t=y(t);for(var e=A.length;e--;)for(var i=A[e],n=i.animations,s=n.length;s--;)a(t,n[s].animatable.target)&&(n.splice(s,1),n.length||i.pause())},O.getValue=v,O.path=function(t,e){var i=B.str(t)?s(t)[0]:t,n=e||100;return function(t){return{el:i,property:t,totalLength:g(i)*(n/100)}}},O.setDashoffset=function(t){var e=g(t);return t.setAttribute("stroke-dasharray",e),e},O.bezier=D,O.easings=S,O.timeline=function(n){var s=O(n);return s.pause(),s.duration=0,s.add=function(t){return s.children.forEach(function(t){t.began=!0,t.completed=!0}),o(t).forEach(function(t){var e=c(t,u(T,n||{}));e.targets=e.targets||n.targets,t=s.duration;var i=e.offset;e.autoplay=!1,e.direction=s.direction,e.offset=B.und(i)?t:f(i,t),s.began=!0,s.completed=!0,s.seek(e.offset),(e=O(e)).began=!0,e.completed=!0,e.duration>t&&(s.duration=e.duration),s.children.push(e)}),s.seek(0),s.reset(),s.autoplay&&s.restart(),s},s},O.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},O}(),function(r,l){"use strict";var e={accordion:!0,onOpenStart:void 0,onOpenEnd:void 0,onCloseStart:void 0,onCloseEnd:void 0,inDuration:300,outDuration:300},t=function(t){function s(t,e){_classCallCheck(this,s);var i=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,t,e));(i.el.M_Collapsible=i).options=r.extend({},s.defaults,e),i.$headers=i.$el.children("li").children(".collapsible-header"),i.$headers.attr("tabindex",0),i._setupEventHandlers();var n=i.$el.children("li.active").children(".collapsible-body");return i.options.accordion?n.first().css("display","block"):n.css("display","block"),i}return _inherits(s,Component),_createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Collapsible=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleCollapsibleClickBound=this._handleCollapsibleClick.bind(this),this._handleCollapsibleKeydownBound=this._handleCollapsibleKeydown.bind(this),this.el.addEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(t){t.addEventListener("keydown",e._handleCollapsibleKeydownBound)})}},{key:"_removeEventHandlers",value:function(){var e=this;this.el.removeEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(t){t.removeEventListener("keydown",e._handleCollapsibleKeydownBound)})}},{key:"_handleCollapsibleClick",value:function(t){var e=r(t.target).closest(".collapsible-header");if(t.target&&e.length){var i=e.closest(".collapsible");if(i[0]===this.el){var n=e.closest("li"),s=i.children("li"),o=n[0].classList.contains("active"),a=s.index(n);o?this.close(a):this.open(a)}}}},{key:"_handleCollapsibleKeydown",value:function(t){13===t.keyCode&&this._handleCollapsibleClickBound(t)}},{key:"_animateIn",value:function(t){var e=this,i=this.$el.children("li").eq(t);if(i.length){var n=i.children(".collapsible-body");l.remove(n[0]),n.css({display:"block",overflow:"hidden",height:0,paddingTop:"",paddingBottom:""});var s=n.css("padding-top"),o=n.css("padding-bottom"),a=n[0].scrollHeight;n.css({paddingTop:0,paddingBottom:0}),l({targets:n[0],height:a,paddingTop:s,paddingBottom:o,duration:this.options.inDuration,easing:"easeInOutCubic",complete:function(t){n.css({overflow:"",paddingTop:"",paddingBottom:"",height:""}),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,i[0])}})}}},{key:"_animateOut",value:function(t){var e=this,i=this.$el.children("li").eq(t);if(i.length){var n=i.children(".collapsible-body");l.remove(n[0]),n.css("overflow","hidden"),l({targets:n[0],height:0,paddingTop:0,paddingBottom:0,duration:this.options.outDuration,easing:"easeInOutCubic",complete:function(){n.css({height:"",overflow:"",padding:"",display:""}),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,i[0])}})}}},{key:"open",value:function(t){var i=this,e=this.$el.children("li").eq(t);if(e.length&&!e[0].classList.contains("active")){if("function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,e[0]),this.options.accordion){var n=this.$el.children("li");this.$el.children("li.active").each(function(t){var e=n.index(r(t));i.close(e)})}e[0].classList.add("active"),this._animateIn(t)}}},{key:"close",value:function(t){var e=this.$el.children("li").eq(t);e.length&&e[0].classList.contains("active")&&("function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,e[0]),e[0].classList.remove("active"),this._animateOut(t))}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Collapsible}},{key:"defaults",get:function(){return e}}]),s}();M.Collapsible=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"collapsible","M_Collapsible")}(cash,M.anime),function(h,i){"use strict";var e={alignment:"left",autoFocus:!0,constrainWidth:!0,container:null,coverTrigger:!0,closeOnClick:!0,hover:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onItemClick:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return i.el.M_Dropdown=i,n._dropdowns.push(i),i.id=M.getIdFromTrigger(t),i.dropdownEl=document.getElementById(i.id),i.$dropdownEl=h(i.dropdownEl),i.options=h.extend({},n.defaults,e),i.isOpen=!1,i.isScrollable=!1,i.isTouchMoving=!1,i.focusedIndex=-1,i.filterQuery=[],i.options.container?h(i.options.container).append(i.dropdownEl):i.$el.after(i.dropdownEl),i._makeDropdownFocusable(),i._resetFilterQueryBound=i._resetFilterQuery.bind(i),i._handleDocumentClickBound=i._handleDocumentClick.bind(i),i._handleDocumentTouchmoveBound=i._handleDocumentTouchmove.bind(i),i._handleDropdownClickBound=i._handleDropdownClick.bind(i),i._handleDropdownKeydownBound=i._handleDropdownKeydown.bind(i),i._handleTriggerKeydownBound=i._handleTriggerKeydown.bind(i),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._resetDropdownStyles(),this._removeEventHandlers(),n._dropdowns.splice(n._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}},{key:"_setupEventHandlers",value:function(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.addEventListener("click",this._handleDropdownClickBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.removeEventListener("click",this._handleDropdownClickBound),this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventListener("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}},{key:"_setupTemporaryEventHandlers",value:function(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound),document.body.addEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_removeTemporaryEventHandlers",value:function(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound),document.body.removeEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_handleClick",value:function(t){t.preventDefault(),this.open()}},{key:"_handleMouseEnter",value:function(){this.open()}},{key:"_handleMouseLeave",value:function(t){var e=t.toElement||t.relatedTarget,i=!!h(e).closest(".dropdown-content").length,n=!1,s=h(e).closest(".dropdown-trigger");s.length&&s[0].M_Dropdown&&s[0].M_Dropdown.isOpen&&(n=!0),n||i||this.close()}},{key:"_handleDocumentClick",value:function(t){var e=this,i=h(t.target);this.options.closeOnClick&&i.closest(".dropdown-content").length&&!this.isTouchMoving?setTimeout(function(){e.close()},0):!i.closest(".dropdown-trigger").length&&i.closest(".dropdown-content").length||setTimeout(function(){e.close()},0),this.isTouchMoving=!1}},{key:"_handleTriggerKeydown",value:function(t){t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ENTER||this.isOpen||(t.preventDefault(),this.open())}},{key:"_handleDocumentTouchmove",value:function(t){h(t.target).closest(".dropdown-content").length&&(this.isTouchMoving=!0)}},{key:"_handleDropdownClick",value:function(t){if("function"==typeof this.options.onItemClick){var e=h(t.target).closest("li")[0];this.options.onItemClick.call(this,e)}}},{key:"_handleDropdownKeydown",value:function(t){if(t.which===M.keys.TAB)t.preventDefault(),this.close();else if(t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||!this.isOpen)if(t.which===M.keys.ENTER&&this.isOpen){var e=this.dropdownEl.children[this.focusedIndex],i=h(e).find("a, button").first();i.length?i[0].click():e&&e.click()}else t.which===M.keys.ESC&&this.isOpen&&(t.preventDefault(),this.close());else{t.preventDefault();var n=t.which===M.keys.ARROW_DOWN?1:-1,s=this.focusedIndex,o=!1;do{if(s+=n,this.dropdownEl.children[s]&&-1!==this.dropdownEl.children[s].tabIndex){o=!0;break}}while(s<this.dropdownEl.children.length&&0<=s);o&&(this.focusedIndex=s,this._focusFocusedItem())}var a=String.fromCharCode(t.which).toLowerCase();if(a&&-1===[9,13,27,38,40].indexOf(t.which)){this.filterQuery.push(a);var r=this.filterQuery.join(""),l=h(this.dropdownEl).find("li").filter(function(t){return 0===h(t).text().toLowerCase().indexOf(r)})[0];l&&(this.focusedIndex=h(l).index(),this._focusFocusedItem())}this.filterTimeout=setTimeout(this._resetFilterQueryBound,1e3)}},{key:"_resetFilterQuery",value:function(){this.filterQuery=[]}},{key:"_resetDropdownStyles",value:function(){this.$dropdownEl.css({display:"",width:"",height:"",left:"",top:"","transform-origin":"",transform:"",opacity:""})}},{key:"_makeDropdownFocusable",value:function(){this.dropdownEl.tabIndex=0,h(this.dropdownEl).children().each(function(t){t.getAttribute("tabindex")||t.setAttribute("tabindex",0)})}},{key:"_focusFocusedItem",value:function(){0<=this.focusedIndex&&this.focusedIndex<this.dropdownEl.children.length&&this.options.autoFocus&&this.dropdownEl.children[this.focusedIndex].focus()}},{key:"_getDropdownPosition",value:function(){this.el.offsetParent.getBoundingClientRect();var t=this.el.getBoundingClientRect(),e=this.dropdownEl.getBoundingClientRect(),i=e.height,n=e.width,s=t.left-e.left,o=t.top-e.top,a={left:s,top:o,height:i,width:n},r=this.dropdownEl.offsetParent?this.dropdownEl.offsetParent:this.dropdownEl.parentNode,l=M.checkPossibleAlignments(this.el,r,a,this.options.coverTrigger?0:t.height),h="top",d=this.options.alignment;if(o+=this.options.coverTrigger?0:t.height,this.isScrollable=!1,l.top||(l.bottom?h="bottom":(this.isScrollable=!0,l.spaceOnTop>l.spaceOnBottom?(h="bottom",i+=l.spaceOnTop,o-=l.spaceOnTop):i+=l.spaceOnBottom)),!l[d]){var u="left"===d?"right":"left";l[u]?d=u:l.spaceOnLeft>l.spaceOnRight?(d="right",n+=l.spaceOnLeft,s-=l.spaceOnLeft):(d="left",n+=l.spaceOnRight)}return"bottom"===h&&(o=o-e.height+(this.options.coverTrigger?t.height:0)),"right"===d&&(s=s-e.width+t.width),{x:s,y:o,verticalAlignment:h,horizontalAlignment:d,height:i,width:n}}},{key:"_animateIn",value:function(){var e=this;i.remove(this.dropdownEl),i({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:function(t){e.options.autoFocus&&e.dropdownEl.focus(),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}})}},{key:"_animateOut",value:function(){var e=this;i.remove(this.dropdownEl),i({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:function(t){e._resetDropdownStyles(),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_placeDropdown",value:function(){var t=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=t+"px";var e=this._getDropdownPosition();this.dropdownEl.style.left=e.x+"px",this.dropdownEl.style.top=e.y+"px",this.dropdownEl.style.height=e.height+"px",this.dropdownEl.style.width=e.width+"px",this.dropdownEl.style.transformOrigin=("left"===e.horizontalAlignment?"0":"100%")+" "+("top"===e.verticalAlignment?"0":"100%")}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._resetDropdownStyles(),this.dropdownEl.style.display="block",this._placeDropdown(),this._animateIn(),this._setupTemporaryEventHandlers())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.focusedIndex=-1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._animateOut(),this._removeTemporaryEventHandlers(),this.options.autoFocus&&this.el.focus())}},{key:"recalculateDimensions",value:function(){this.isOpen&&(this.$dropdownEl.css({width:"",height:"",left:"",top:"","transform-origin":""}),this._placeDropdown())}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Dropdown}},{key:"defaults",get:function(){return e}}]),n}();t._dropdowns=[],M.Dropdown=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"dropdown","M_Dropdown")}(cash,M.anime),function(s,i){"use strict";var e={opacity:.5,inDuration:250,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0,dismissible:!0,startingTop:"4%",endingTop:"10%"},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Modal=i).options=s.extend({},n.defaults,e),i.isOpen=!1,i.id=i.$el.attr("id"),i._openingTrigger=void 0,i.$overlay=s('<div class="modal-overlay"></div>'),i.el.tabIndex=0,i._nthModalOpened=0,n._count++,i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){n._count--,this._removeEventHandlers(),this.el.removeAttribute("style"),this.$overlay.remove(),this.el.M_Modal=void 0}},{key:"_setupEventHandlers",value:function(){this._handleOverlayClickBound=this._handleOverlayClick.bind(this),this._handleModalCloseClickBound=this._handleModalCloseClick.bind(this),1===n._count&&document.body.addEventListener("click",this._handleTriggerClick),this.$overlay[0].addEventListener("click",this._handleOverlayClickBound),this.el.addEventListener("click",this._handleModalCloseClickBound)}},{key:"_removeEventHandlers",value:function(){0===n._count&&document.body.removeEventListener("click",this._handleTriggerClick),this.$overlay[0].removeEventListener("click",this._handleOverlayClickBound),this.el.removeEventListener("click",this._handleModalCloseClickBound)}},{key:"_handleTriggerClick",value:function(t){var e=s(t.target).closest(".modal-trigger");if(e.length){var i=M.getIdFromTrigger(e[0]),n=document.getElementById(i).M_Modal;n&&n.open(e),t.preventDefault()}}},{key:"_handleOverlayClick",value:function(){this.options.dismissible&&this.close()}},{key:"_handleModalCloseClick",value:function(t){s(t.target).closest(".modal-close").length&&this.close()}},{key:"_handleKeydown",value:function(t){27===t.keyCode&&this.options.dismissible&&this.close()}},{key:"_handleFocus",value:function(t){this.el.contains(t.target)||this._nthModalOpened!==n._modalsOpen||this.el.focus()}},{key:"_animateIn",value:function(){var t=this;s.extend(this.el.style,{display:"block",opacity:0}),s.extend(this.$overlay[0].style,{display:"block",opacity:0}),i({targets:this.$overlay[0],opacity:this.options.opacity,duration:this.options.inDuration,easing:"easeOutQuad"});var e={targets:this.el,duration:this.options.inDuration,easing:"easeOutCubic",complete:function(){"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el,t._openingTrigger)}};this.el.classList.contains("bottom-sheet")?s.extend(e,{bottom:0,opacity:1}):s.extend(e,{top:[this.options.startingTop,this.options.endingTop],opacity:1,scaleX:[.8,1],scaleY:[.8,1]}),i(e)}},{key:"_animateOut",value:function(){var t=this;i({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuart"});var e={targets:this.el,duration:this.options.outDuration,easing:"easeOutCubic",complete:function(){t.el.style.display="none",t.$overlay.remove(),"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}};this.el.classList.contains("bottom-sheet")?s.extend(e,{bottom:"-100%",opacity:0}):s.extend(e,{top:[this.options.endingTop,this.options.startingTop],opacity:0,scaleX:.8,scaleY:.8}),i(e)}},{key:"open",value:function(t){if(!this.isOpen)return this.isOpen=!0,n._modalsOpen++,this._nthModalOpened=n._modalsOpen,this.$overlay[0].style.zIndex=1e3+2*n._modalsOpen,this.el.style.zIndex=1e3+2*n._modalsOpen+1,this._openingTrigger=t?t[0]:void 0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el,this._openingTrigger),this.options.preventScrolling&&(document.body.style.overflow="hidden"),this.el.classList.add("open"),this.el.insertAdjacentElement("afterend",this.$overlay[0]),this.options.dismissible&&(this._handleKeydownBound=this._handleKeydown.bind(this),this._handleFocusBound=this._handleFocus.bind(this),document.addEventListener("keydown",this._handleKeydownBound),document.addEventListener("focus",this._handleFocusBound,!0)),i.remove(this.el),i.remove(this.$overlay[0]),this._animateIn(),this.el.focus(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,n._modalsOpen--,this._nthModalOpened=0,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this.el.classList.remove("open"),0===n._modalsOpen&&(document.body.style.overflow=""),this.options.dismissible&&(document.removeEventListener("keydown",this._handleKeydownBound),document.removeEventListener("focus",this._handleFocusBound,!0)),i.remove(this.el),i.remove(this.$overlay[0]),this._animateOut(),this}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Modal}},{key:"defaults",get:function(){return e}}]),n}();t._modalsOpen=0,t._count=0,M.Modal=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"modal","M_Modal")}(cash,M.anime),function(o,a){"use strict";var e={inDuration:275,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Materialbox=i).options=o.extend({},n.defaults,e),i.overlayActive=!1,i.doneAnimating=!0,i.placeholder=o("<div></div>").addClass("material-placeholder"),i.originalWidth=0,i.originalHeight=0,i.originInlineStyles=i.$el.attr("style"),i.caption=i.el.getAttribute("data-caption")||"",i.$el.before(i.placeholder),i.placeholder.append(i.$el),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Materialbox=void 0,o(this.placeholder).after(this.el).remove(),this.$el.removeAttr("style")}},{key:"_setupEventHandlers",value:function(){this._handleMaterialboxClickBound=this._handleMaterialboxClick.bind(this),this.el.addEventListener("click",this._handleMaterialboxClickBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleMaterialboxClickBound)}},{key:"_handleMaterialboxClick",value:function(t){!1===this.doneAnimating||this.overlayActive&&this.doneAnimating?this.close():this.open()}},{key:"_handleWindowScroll",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowResize",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowEscape",value:function(t){27===t.keyCode&&this.doneAnimating&&this.overlayActive&&this.close()}},{key:"_makeAncestorsOverflowVisible",value:function(){this.ancestorsChanged=o();for(var t=this.placeholder[0].parentNode;null!==t&&!o(t).is(document);){var e=o(t);"visible"!==e.css("overflow")&&(e.css("overflow","visible"),void 0===this.ancestorsChanged?this.ancestorsChanged=e:this.ancestorsChanged=this.ancestorsChanged.add(e)),t=t.parentNode}}},{key:"_animateImageIn",value:function(){var t=this,e={targets:this.el,height:[this.originalHeight,this.newHeight],width:[this.originalWidth,this.newWidth],left:M.getDocumentScrollLeft()+this.windowWidth/2-this.placeholder.offset().left-this.newWidth/2,top:M.getDocumentScrollTop()+this.windowHeight/2-this.placeholder.offset().top-this.newHeight/2,duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){t.doneAnimating=!0,"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el)}};this.maxWidth=this.$el.css("max-width"),this.maxHeight=this.$el.css("max-height"),"none"!==this.maxWidth&&(e.maxWidth=this.newWidth),"none"!==this.maxHeight&&(e.maxHeight=this.newHeight),a(e)}},{key:"_animateImageOut",value:function(){var t=this,e={targets:this.el,width:this.originalWidth,height:this.originalHeight,left:0,top:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.placeholder.css({height:"",width:"",position:"",top:"",left:""}),t.attrWidth&&t.$el.attr("width",t.attrWidth),t.attrHeight&&t.$el.attr("height",t.attrHeight),t.$el.removeAttr("style"),t.originInlineStyles&&t.$el.attr("style",t.originInlineStyles),t.$el.removeClass("active"),t.doneAnimating=!0,t.ancestorsChanged.length&&t.ancestorsChanged.css("overflow",""),"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}};a(e)}},{key:"_updateVars",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.caption=this.el.getAttribute("data-caption")||""}},{key:"open",value:function(){var t=this;this._updateVars(),this.originalWidth=this.el.getBoundingClientRect().width,this.originalHeight=this.el.getBoundingClientRect().height,this.doneAnimating=!1,this.$el.addClass("active"),this.overlayActive=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this.placeholder.css({width:this.placeholder[0].getBoundingClientRect().width+"px",height:this.placeholder[0].getBoundingClientRect().height+"px",position:"relative",top:0,left:0}),this._makeAncestorsOverflowVisible(),this.$el.css({position:"absolute","z-index":1e3,"will-change":"left, top, width, height"}),this.attrWidth=this.$el.attr("width"),this.attrHeight=this.$el.attr("height"),this.attrWidth&&(this.$el.css("width",this.attrWidth+"px"),this.$el.removeAttr("width")),this.attrHeight&&(this.$el.css("width",this.attrHeight+"px"),this.$el.removeAttr("height")),this.$overlay=o('<div id="materialbox-overlay"></div>').css({opacity:0}).one("click",function(){t.doneAnimating&&t.close()}),this.$el.before(this.$overlay);var e=this.$overlay[0].getBoundingClientRect();this.$overlay.css({width:this.windowWidth+"px",height:this.windowHeight+"px",left:-1*e.left+"px",top:-1*e.top+"px"}),a.remove(this.el),a.remove(this.$overlay[0]),a({targets:this.$overlay[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}),""!==this.caption&&(this.$photocaption&&a.remove(this.$photoCaption[0]),this.$photoCaption=o('<div class="materialbox-caption"></div>'),this.$photoCaption.text(this.caption),o("body").append(this.$photoCaption),this.$photoCaption.css({display:"inline"}),a({targets:this.$photoCaption[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}));var i=0,n=this.originalWidth/this.windowWidth,s=this.originalHeight/this.windowHeight;this.newWidth=0,this.newHeight=0,s<n?(i=this.originalHeight/this.originalWidth,this.newWidth=.9*this.windowWidth,this.newHeight=.9*this.windowWidth*i):(i=this.originalWidth/this.originalHeight,this.newWidth=.9*this.windowHeight*i,this.newHeight=.9*this.windowHeight),this._animateImageIn(),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),this._handleWindowResizeBound=this._handleWindowResize.bind(this),this._handleWindowEscapeBound=this._handleWindowEscape.bind(this),window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleWindowResizeBound),window.addEventListener("keyup",this._handleWindowEscapeBound)}},{key:"close",value:function(){var t=this;this._updateVars(),this.doneAnimating=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),a.remove(this.el),a.remove(this.$overlay[0]),""!==this.caption&&a.remove(this.$photoCaption[0]),window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleWindowResizeBound),window.removeEventListener("keyup",this._handleWindowEscapeBound),a({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.overlayActive=!1,t.$overlay.remove()}}),this._animateImageOut(),""!==this.caption&&a({targets:this.$photoCaption[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.$photoCaption.remove()}})}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Materialbox}},{key:"defaults",get:function(){return e}}]),n}();M.Materialbox=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"materialbox","M_Materialbox")}(cash,M.anime),function(s){"use strict";var e={responsiveThreshold:0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Parallax=i).options=s.extend({},n.defaults,e),i._enabled=window.innerWidth>i.options.responsiveThreshold,i.$img=i.$el.find("img").first(),i.$img.each(function(){this.complete&&s(this).trigger("load")}),i._updateParallax(),i._setupEventHandlers(),i._setupStyles(),n._parallaxes.push(i),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){n._parallaxes.splice(n._parallaxes.indexOf(this),1),this.$img[0].style.transform="",this._removeEventHandlers(),this.$el[0].M_Parallax=void 0}},{key:"_setupEventHandlers",value:function(){this._handleImageLoadBound=this._handleImageLoad.bind(this),this.$img[0].addEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(n._handleScrollThrottled=M.throttle(n._handleScroll,5),window.addEventListener("scroll",n._handleScrollThrottled),n._handleWindowResizeThrottled=M.throttle(n._handleWindowResize,5),window.addEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_removeEventHandlers",value:function(){this.$img[0].removeEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(window.removeEventListener("scroll",n._handleScrollThrottled),window.removeEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_setupStyles",value:function(){this.$img[0].style.opacity=1}},{key:"_handleImageLoad",value:function(){this._updateParallax()}},{key:"_updateParallax",value:function(){var t=0<this.$el.height()?this.el.parentNode.offsetHeight:500,e=this.$img[0].offsetHeight-t,i=this.$el.offset().top+t,n=this.$el.offset().top,s=M.getDocumentScrollTop(),o=window.innerHeight,a=e*((s+o-n)/(t+o));this._enabled?s<i&&n<s+o&&(this.$img[0].style.transform="translate3D(-50%, "+a+"px, 0)"):this.$img[0].style.transform=""}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Parallax}},{key:"_handleScroll",value:function(){for(var t=0;t<n._parallaxes.length;t++){var e=n._parallaxes[t];e._updateParallax.call(e)}}},{key:"_handleWindowResize",value:function(){for(var t=0;t<n._parallaxes.length;t++){var e=n._parallaxes[t];e._enabled=window.innerWidth>e.options.responsiveThreshold}}},{key:"defaults",get:function(){return e}}]),n}();t._parallaxes=[],M.Parallax=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"parallax","M_Parallax")}(cash),function(a,s){"use strict";var e={duration:300,onShow:null,swipeable:!1,responsiveThreshold:1/0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Tabs=i).options=a.extend({},n.defaults,e),i.$tabLinks=i.$el.children("li.tab").children("a"),i.index=0,i._setupActiveTabLink(),i.options.swipeable?i._setupSwipeableTabs():i._setupNormalTabs(),i._setTabsAndTabWidth(),i._createIndicator(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._indicator.parentNode.removeChild(this._indicator),this.options.swipeable?this._teardownSwipeableTabs():this._teardownNormalTabs(),this.$el[0].M_Tabs=void 0}},{key:"_setupEventHandlers",value:function(){this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound),this._handleTabClickBound=this._handleTabClick.bind(this),this.el.addEventListener("click",this._handleTabClickBound)}},{key:"_removeEventHandlers",value:function(){window.removeEventListener("resize",this._handleWindowResizeBound),this.el.removeEventListener("click",this._handleTabClickBound)}},{key:"_handleWindowResize",value:function(){this._setTabsAndTabWidth(),0!==this.tabWidth&&0!==this.tabsWidth&&(this._indicator.style.left=this._calcLeftPos(this.$activeTabLink)+"px",this._indicator.style.right=this._calcRightPos(this.$activeTabLink)+"px")}},{key:"_handleTabClick",value:function(t){var e=this,i=a(t.target).closest("li.tab"),n=a(t.target).closest("a");if(n.length&&n.parent().hasClass("tab"))if(i.hasClass("disabled"))t.preventDefault();else if(!n.attr("target")){this.$activeTabLink.removeClass("active");var s=this.$content;this.$activeTabLink=n,this.$content=a(M.escapeHash(n[0].hash)),this.$tabLinks=this.$el.children("li.tab").children("a"),this.$activeTabLink.addClass("active");var o=this.index;this.index=Math.max(this.$tabLinks.index(n),0),this.options.swipeable?this._tabsCarousel&&this._tabsCarousel.set(this.index,function(){"function"==typeof e.options.onShow&&e.options.onShow.call(e,e.$content[0])}):this.$content.length&&(this.$content[0].style.display="block",this.$content.addClass("active"),"function"==typeof this.options.onShow&&this.options.onShow.call(this,this.$content[0]),s.length&&!s.is(this.$content)&&(s[0].style.display="none",s.removeClass("active"))),this._setTabsAndTabWidth(),this._animateIndicator(o),t.preventDefault()}}},{key:"_createIndicator",value:function(){var t=this,e=document.createElement("li");e.classList.add("indicator"),this.el.appendChild(e),this._indicator=e,setTimeout(function(){t._indicator.style.left=t._calcLeftPos(t.$activeTabLink)+"px",t._indicator.style.right=t._calcRightPos(t.$activeTabLink)+"px"},0)}},{key:"_setupActiveTabLink",value:function(){this.$activeTabLink=a(this.$tabLinks.filter('[href="'+location.hash+'"]')),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a.active").first()),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a").first()),this.$tabLinks.removeClass("active"),this.$activeTabLink[0].classList.add("active"),this.index=Math.max(this.$tabLinks.index(this.$activeTabLink),0),this.$activeTabLink.length&&(this.$content=a(M.escapeHash(this.$activeTabLink[0].hash)),this.$content.addClass("active"))}},{key:"_setupSwipeableTabs",value:function(){var i=this;window.innerWidth>this.options.responsiveThreshold&&(this.options.swipeable=!1);var n=a();this.$tabLinks.each(function(t){var e=a(M.escapeHash(t.hash));e.addClass("carousel-item"),n=n.add(e)});var t=a('<div class="tabs-content carousel carousel-slider"></div>');n.first().before(t),t.append(n),n[0].style.display="";var e=this.$activeTabLink.closest(".tab").index();this._tabsCarousel=M.Carousel.init(t[0],{fullWidth:!0,noWrap:!0,onCycleTo:function(t){var e=i.index;i.index=a(t).index(),i.$activeTabLink.removeClass("active"),i.$activeTabLink=i.$tabLinks.eq(i.index),i.$activeTabLink.addClass("active"),i._animateIndicator(e),"function"==typeof i.options.onShow&&i.options.onShow.call(i,i.$content[0])}}),this._tabsCarousel.set(e)}},{key:"_teardownSwipeableTabs",value:function(){var t=this._tabsCarousel.$el;this._tabsCarousel.destroy(),t.after(t.children()),t.remove()}},{key:"_setupNormalTabs",value:function(){this.$tabLinks.not(this.$activeTabLink).each(function(t){if(t.hash){var e=a(M.escapeHash(t.hash));e.length&&(e[0].style.display="none")}})}},{key:"_teardownNormalTabs",value:function(){this.$tabLinks.each(function(t){if(t.hash){var e=a(M.escapeHash(t.hash));e.length&&(e[0].style.display="")}})}},{key:"_setTabsAndTabWidth",value:function(){this.tabsWidth=this.$el.width(),this.tabWidth=Math.max(this.tabsWidth,this.el.scrollWidth)/this.$tabLinks.length}},{key:"_calcRightPos",value:function(t){return Math.ceil(this.tabsWidth-t.position().left-t[0].getBoundingClientRect().width)}},{key:"_calcLeftPos",value:function(t){return Math.floor(t.position().left)}},{key:"updateTabIndicator",value:function(){this._setTabsAndTabWidth(),this._animateIndicator(this.index)}},{key:"_animateIndicator",value:function(t){var e=0,i=0;0<=this.index-t?e=90:i=90;var n={targets:this._indicator,left:{value:this._calcLeftPos(this.$activeTabLink),delay:e},right:{value:this._calcRightPos(this.$activeTabLink),delay:i},duration:this.options.duration,easing:"easeOutQuad"};s.remove(this._indicator),s(n)}},{key:"select",value:function(t){var e=this.$tabLinks.filter('[href="#'+t+'"]');e.length&&e.trigger("click")}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Tabs}},{key:"defaults",get:function(){return e}}]),n}();M.Tabs=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"tabs","M_Tabs")}(cash,M.anime),function(d,e){"use strict";var i={exitDelay:200,enterDelay:0,html:null,margin:5,inDuration:250,outDuration:200,position:"bottom",transitionMovement:10},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Tooltip=i).options=d.extend({},n.defaults,e),i.isOpen=!1,i.isHovered=!1,i.isFocused=!1,i._appendTooltipEl(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){d(this.tooltipEl).remove(),this._removeEventHandlers(),this.el.M_Tooltip=void 0}},{key:"_appendTooltipEl",value:function(){var t=document.createElement("div");t.classList.add("material-tooltip"),this.tooltipEl=t;var e=document.createElement("div");e.classList.add("tooltip-content"),e.innerHTML=this.options.html,t.appendChild(e),document.body.appendChild(t)}},{key:"_updateTooltipContent",value:function(){this.tooltipEl.querySelector(".tooltip-content").innerHTML=this.options.html}},{key:"_setupEventHandlers",value:function(){this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this._handleFocusBound=this._handleFocus.bind(this),this._handleBlurBound=this._handleBlur.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.el.addEventListener("focus",this._handleFocusBound,!0),this.el.addEventListener("blur",this._handleBlurBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.el.removeEventListener("focus",this._handleFocusBound,!0),this.el.removeEventListener("blur",this._handleBlurBound,!0)}},{key:"open",value:function(t){this.isOpen||(t=void 0===t||void 0,this.isOpen=!0,this.options=d.extend({},this.options,this._getAttributeOptions()),this._updateTooltipContent(),this._setEnterDelayTimeout(t))}},{key:"close",value:function(){this.isOpen&&(this.isHovered=!1,this.isFocused=!1,this.isOpen=!1,this._setExitDelayTimeout())}},{key:"_setExitDelayTimeout",value:function(){var t=this;clearTimeout(this._exitDelayTimeout),this._exitDelayTimeout=setTimeout(function(){t.isHovered||t.isFocused||t._animateOut()},this.options.exitDelay)}},{key:"_setEnterDelayTimeout",value:function(t){var e=this;clearTimeout(this._enterDelayTimeout),this._enterDelayTimeout=setTimeout(function(){(e.isHovered||e.isFocused||t)&&e._animateIn()},this.options.enterDelay)}},{key:"_positionTooltip",value:function(){var t,e=this.el,i=this.tooltipEl,n=e.offsetHeight,s=e.offsetWidth,o=i.offsetHeight,a=i.offsetWidth,r=this.options.margin,l=void 0,h=void 0;this.xMovement=0,this.yMovement=0,l=e.getBoundingClientRect().top+M.getDocumentScrollTop(),h=e.getBoundingClientRect().left+M.getDocumentScrollLeft(),"top"===this.options.position?(l+=-o-r,h+=s/2-a/2,this.yMovement=-this.options.transitionMovement):"right"===this.options.position?(l+=n/2-o/2,h+=s+r,this.xMovement=this.options.transitionMovement):"left"===this.options.position?(l+=n/2-o/2,h+=-a-r,this.xMovement=-this.options.transitionMovement):(l+=n+r,h+=s/2-a/2,this.yMovement=this.options.transitionMovement),t=this._repositionWithinScreen(h,l,a,o),d(i).css({top:t.y+"px",left:t.x+"px"})}},{key:"_repositionWithinScreen",value:function(t,e,i,n){var s=M.getDocumentScrollLeft(),o=M.getDocumentScrollTop(),a=t-s,r=e-o,l={left:a,top:r,width:i,height:n},h=this.options.margin+this.options.transitionMovement,d=M.checkWithinContainer(document.body,l,h);return d.left?a=h:d.right&&(a-=a+i-window.innerWidth),d.top?r=h:d.bottom&&(r-=r+n-window.innerHeight),{x:a+s,y:r+o}}},{key:"_animateIn",value:function(){this._positionTooltip(),this.tooltipEl.style.visibility="visible",e.remove(this.tooltipEl),e({targets:this.tooltipEl,opacity:1,translateX:this.xMovement,translateY:this.yMovement,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_animateOut",value:function(){e.remove(this.tooltipEl),e({targets:this.tooltipEl,opacity:0,translateX:0,translateY:0,duration:this.options.outDuration,easing:"easeOutCubic"})}},{key:"_handleMouseEnter",value:function(){this.isHovered=!0,this.isFocused=!1,this.open(!1)}},{key:"_handleMouseLeave",value:function(){this.isHovered=!1,this.isFocused=!1,this.close()}},{key:"_handleFocus",value:function(){M.tabPressed&&(this.isFocused=!0,this.open(!1))}},{key:"_handleBlur",value:function(){this.isFocused=!1,this.close()}},{key:"_getAttributeOptions",value:function(){var t={},e=this.el.getAttribute("data-tooltip"),i=this.el.getAttribute("data-position");return e&&(t.html=e),i&&(t.position=i),t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Tooltip}},{key:"defaults",get:function(){return i}}]),n}();M.Tooltip=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"tooltip","M_Tooltip")}(cash,M.anime),function(i){"use strict";var t=t||{},e=document.querySelectorAll.bind(document);function m(t){var e="";for(var i in t)t.hasOwnProperty(i)&&(e+=i+":"+t[i]+";");return e}var g={duration:750,show:function(t,e){if(2===t.button)return!1;var i=e||this,n=document.createElement("div");n.className="waves-ripple",i.appendChild(n);var s,o,a,r,l,h,d,u=(h={top:0,left:0},d=(s=i)&&s.ownerDocument,o=d.documentElement,void 0!==s.getBoundingClientRect&&(h=s.getBoundingClientRect()),a=null!==(l=r=d)&&l===l.window?r:9===r.nodeType&&r.defaultView,{top:h.top+a.pageYOffset-o.clientTop,left:h.left+a.pageXOffset-o.clientLeft}),c=t.pageY-u.top,p=t.pageX-u.left,v="scale("+i.clientWidth/100*10+")";"touches"in t&&(c=t.touches[0].pageY-u.top,p=t.touches[0].pageX-u.left),n.setAttribute("data-hold",Date.now()),n.setAttribute("data-scale",v),n.setAttribute("data-x",p),n.setAttribute("data-y",c);var f={top:c+"px",left:p+"px"};n.className=n.className+" waves-notransition",n.setAttribute("style",m(f)),n.className=n.className.replace("waves-notransition",""),f["-webkit-transform"]=v,f["-moz-transform"]=v,f["-ms-transform"]=v,f["-o-transform"]=v,f.transform=v,f.opacity="1",f["-webkit-transition-duration"]=g.duration+"ms",f["-moz-transition-duration"]=g.duration+"ms",f["-o-transition-duration"]=g.duration+"ms",f["transition-duration"]=g.duration+"ms",f["-webkit-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-moz-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-o-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",n.setAttribute("style",m(f))},hide:function(t){l.touchup(t);var e=this,i=(e.clientWidth,null),n=e.getElementsByClassName("waves-ripple");if(!(0<n.length))return!1;var s=(i=n[n.length-1]).getAttribute("data-x"),o=i.getAttribute("data-y"),a=i.getAttribute("data-scale"),r=350-(Date.now()-Number(i.getAttribute("data-hold")));r<0&&(r=0),setTimeout(function(){var t={top:o+"px",left:s+"px",opacity:"0","-webkit-transition-duration":g.duration+"ms","-moz-transition-duration":g.duration+"ms","-o-transition-duration":g.duration+"ms","transition-duration":g.duration+"ms","-webkit-transform":a,"-moz-transform":a,"-ms-transform":a,"-o-transform":a,transform:a};i.setAttribute("style",m(t)),setTimeout(function(){try{e.removeChild(i)}catch(t){return!1}},g.duration)},r)},wrapInput:function(t){for(var e=0;e<t.length;e++){var i=t[e];if("input"===i.tagName.toLowerCase()){var n=i.parentNode;if("i"===n.tagName.toLowerCase()&&-1!==n.className.indexOf("waves-effect"))continue;var s=document.createElement("i");s.className=i.className+" waves-input-wrapper";var o=i.getAttribute("style");o||(o=""),s.setAttribute("style",o),i.className="waves-button-input",i.removeAttribute("style"),n.replaceChild(s,i),s.appendChild(i)}}}},l={touches:0,allowEvent:function(t){var e=!0;return"touchstart"===t.type?l.touches+=1:"touchend"===t.type||"touchcancel"===t.type?setTimeout(function(){0<l.touches&&(l.touches-=1)},500):"mousedown"===t.type&&0<l.touches&&(e=!1),e},touchup:function(t){l.allowEvent(t)}};function n(t){var e=function(t){if(!1===l.allowEvent(t))return null;for(var e=null,i=t.target||t.srcElement;null!==i.parentNode;){if(!(i instanceof SVGElement)&&-1!==i.className.indexOf("waves-effect")){e=i;break}i=i.parentNode}return e}(t);null!==e&&(g.show(t,e),"ontouchstart"in i&&(e.addEventListener("touchend",g.hide,!1),e.addEventListener("touchcancel",g.hide,!1)),e.addEventListener("mouseup",g.hide,!1),e.addEventListener("mouseleave",g.hide,!1),e.addEventListener("dragend",g.hide,!1))}t.displayEffect=function(t){"duration"in(t=t||{})&&(g.duration=t.duration),g.wrapInput(e(".waves-effect")),"ontouchstart"in i&&document.body.addEventListener("touchstart",n,!1),document.body.addEventListener("mousedown",n,!1)},t.attach=function(t){"input"===t.tagName.toLowerCase()&&(g.wrapInput([t]),t=t.parentNode),"ontouchstart"in i&&t.addEventListener("touchstart",n,!1),t.addEventListener("mousedown",n,!1)},i.Waves=t,document.addEventListener("DOMContentLoaded",function(){t.displayEffect()},!1)}(window),function(i,n){"use strict";var t={html:"",displayLength:4e3,inDuration:300,outDuration:375,classes:"",completeCallback:null,activationPercent:.8},e=function(){function s(t){_classCallCheck(this,s),this.options=i.extend({},s.defaults,t),this.message=this.options.html,this.panning=!1,this.timeRemaining=this.options.displayLength,0===s._toasts.length&&s._createContainer(),s._toasts.push(this);var e=this._createToast();(e.M_Toast=this).el=e,this.$el=i(e),this._animateIn(),this._setTimer()}return _createClass(s,[{key:"_createToast",value:function(){var t=document.createElement("div");return t.classList.add("toast"),this.options.classes.length&&i(t).addClass(this.options.classes),("object"==typeof HTMLElement?this.message instanceof HTMLElement:this.message&&"object"==typeof this.message&&null!==this.message&&1===this.message.nodeType&&"string"==typeof this.message.nodeName)?t.appendChild(this.message):this.message.jquery?i(t).append(this.message[0]):t.innerHTML=this.message,s._container.appendChild(t),t}},{key:"_animateIn",value:function(){n({targets:this.el,top:0,opacity:1,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_setTimer",value:function(){var t=this;this.timeRemaining!==1/0&&(this.counterInterval=setInterval(function(){t.panning||(t.timeRemaining-=20),t.timeRemaining<=0&&t.dismiss()},20))}},{key:"dismiss",value:function(){var t=this;window.clearInterval(this.counterInterval);var e=this.el.offsetWidth*this.options.activationPercent;this.wasSwiped&&(this.el.style.transition="transform .05s, opacity .05s",this.el.style.transform="translateX("+e+"px)",this.el.style.opacity=0),n({targets:this.el,opacity:0,marginTop:-40,duration:this.options.outDuration,easing:"easeOutExpo",complete:function(){"function"==typeof t.options.completeCallback&&t.options.completeCallback(),t.$el.remove(),s._toasts.splice(s._toasts.indexOf(t),1),0===s._toasts.length&&s._removeContainer()}})}}],[{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Toast}},{key:"_createContainer",value:function(){var t=document.createElement("div");t.setAttribute("id","toast-container"),t.addEventListener("touchstart",s._onDragStart),t.addEventListener("touchmove",s._onDragMove),t.addEventListener("touchend",s._onDragEnd),t.addEventListener("mousedown",s._onDragStart),document.addEventListener("mousemove",s._onDragMove),document.addEventListener("mouseup",s._onDragEnd),document.body.appendChild(t),s._container=t}},{key:"_removeContainer",value:function(){document.removeEventListener("mousemove",s._onDragMove),document.removeEventListener("mouseup",s._onDragEnd),i(s._container).remove(),s._container=null}},{key:"_onDragStart",value:function(t){if(t.target&&i(t.target).closest(".toast").length){var e=i(t.target).closest(".toast")[0].M_Toast;e.panning=!0,(s._draggedToast=e).el.classList.add("panning"),e.el.style.transition="",e.startingXPos=s._xPos(t),e.time=Date.now(),e.xPos=s._xPos(t)}}},{key:"_onDragMove",value:function(t){if(s._draggedToast){t.preventDefault();var e=s._draggedToast;e.deltaX=Math.abs(e.xPos-s._xPos(t)),e.xPos=s._xPos(t),e.velocityX=e.deltaX/(Date.now()-e.time),e.time=Date.now();var i=e.xPos-e.startingXPos,n=e.el.offsetWidth*e.options.activationPercent;e.el.style.transform="translateX("+i+"px)",e.el.style.opacity=1-Math.abs(i/n)}}},{key:"_onDragEnd",value:function(){if(s._draggedToast){var t=s._draggedToast;t.panning=!1,t.el.classList.remove("panning");var e=t.xPos-t.startingXPos,i=t.el.offsetWidth*t.options.activationPercent;Math.abs(e)>i||1<t.velocityX?(t.wasSwiped=!0,t.dismiss()):(t.el.style.transition="transform .2s, opacity .2s",t.el.style.transform="",t.el.style.opacity=""),s._draggedToast=null}}},{key:"_xPos",value:function(t){return t.targetTouches&&1<=t.targetTouches.length?t.targetTouches[0].clientX:t.clientX}},{key:"dismissAll",value:function(){for(var t in s._toasts)s._toasts[t].dismiss()}},{key:"defaults",get:function(){return t}}]),s}();e._toasts=[],e._container=null,e._draggedToast=null,M.Toast=e,M.toast=function(t){return new e(t)}}(cash,M.anime),function(s,o){"use strict";var e={edge:"left",draggable:!0,inDuration:250,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Sidenav=i).id=i.$el.attr("id"),i.options=s.extend({},n.defaults,e),i.isOpen=!1,i.isFixed=i.el.classList.contains("sidenav-fixed"),i.isDragged=!1,i.lastWindowWidth=window.innerWidth,i.lastWindowHeight=window.innerHeight,i._createOverlay(),i._createDragTarget(),i._setupEventHandlers(),i._setupClasses(),i._setupFixed(),n._sidenavs.push(i),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._enableBodyScrolling(),this._overlay.parentNode.removeChild(this._overlay),this.dragTarget.parentNode.removeChild(this.dragTarget),this.el.M_Sidenav=void 0,this.el.style.transform="";var t=n._sidenavs.indexOf(this);0<=t&&n._sidenavs.splice(t,1)}},{key:"_createOverlay",value:function(){var t=document.createElement("div");this._closeBound=this.close.bind(this),t.classList.add("sidenav-overlay"),t.addEventListener("click",this._closeBound),document.body.appendChild(t),this._overlay=t}},{key:"_setupEventHandlers",value:function(){0===n._sidenavs.length&&document.body.addEventListener("click",this._handleTriggerClick),this._handleDragTargetDragBound=this._handleDragTargetDrag.bind(this),this._handleDragTargetReleaseBound=this._handleDragTargetRelease.bind(this),this._handleCloseDragBound=this._handleCloseDrag.bind(this),this._handleCloseReleaseBound=this._handleCloseRelease.bind(this),this._handleCloseTriggerClickBound=this._handleCloseTriggerClick.bind(this),this.dragTarget.addEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.addEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.addEventListener("touchmove",this._handleCloseDragBound),this._overlay.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("touchmove",this._handleCloseDragBound),this.el.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&(this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound))}},{key:"_removeEventHandlers",value:function(){1===n._sidenavs.length&&document.body.removeEventListener("click",this._handleTriggerClick),this.dragTarget.removeEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.removeEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.removeEventListener("touchmove",this._handleCloseDragBound),this._overlay.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("touchmove",this._handleCloseDragBound),this.el.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&window.removeEventListener("resize",this._handleWindowResizeBound)}},{key:"_handleTriggerClick",value:function(t){var e=s(t.target).closest(".sidenav-trigger");if(t.target&&e.length){var i=M.getIdFromTrigger(e[0]),n=document.getElementById(i).M_Sidenav;n&&n.open(e),t.preventDefault()}}},{key:"_startDrag",value:function(t){var e=t.targetTouches[0].clientX;this.isDragged=!0,this._startingXpos=e,this._xPos=this._startingXpos,this._time=Date.now(),this._width=this.el.getBoundingClientRect().width,this._overlay.style.display="block",this._initialScrollTop=this.isOpen?this.el.scrollTop:M.getDocumentScrollTop(),this._verticallyScrolling=!1,o.remove(this.el),o.remove(this._overlay)}},{key:"_dragMoveUpdate",value:function(t){var e=t.targetTouches[0].clientX,i=this.isOpen?this.el.scrollTop:M.getDocumentScrollTop();this.deltaX=Math.abs(this._xPos-e),this._xPos=e,this.velocityX=this.deltaX/(Date.now()-this._time),this._time=Date.now(),this._initialScrollTop!==i&&(this._verticallyScrolling=!0)}},{key:"_handleDragTargetDrag",value:function(t){if(this.options.draggable&&!this._isCurrentlyFixed()&&!this._verticallyScrolling){this.isDragged||this._startDrag(t),this._dragMoveUpdate(t);var e=this._xPos-this._startingXpos,i=0<e?"right":"left";e=Math.min(this._width,Math.abs(e)),this.options.edge===i&&(e=0);var n=e,s="translateX(-100%)";"right"===this.options.edge&&(s="translateX(100%)",n=-n),this.percentOpen=Math.min(1,e/this._width),this.el.style.transform=s+" translateX("+n+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleDragTargetRelease",value:function(){this.isDragged&&(.2<this.percentOpen?this.open():this._animateOut(),this.isDragged=!1,this._verticallyScrolling=!1)}},{key:"_handleCloseDrag",value:function(t){if(this.isOpen){if(!this.options.draggable||this._isCurrentlyFixed()||this._verticallyScrolling)return;this.isDragged||this._startDrag(t),this._dragMoveUpdate(t);var e=this._xPos-this._startingXpos,i=0<e?"right":"left";e=Math.min(this._width,Math.abs(e)),this.options.edge!==i&&(e=0);var n=-e;"right"===this.options.edge&&(n=-n),this.percentOpen=Math.min(1,1-e/this._width),this.el.style.transform="translateX("+n+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleCloseRelease",value:function(){this.isOpen&&this.isDragged&&(.8<this.percentOpen?this._animateIn():this.close(),this.isDragged=!1,this._verticallyScrolling=!1)}},{key:"_handleCloseTriggerClick",value:function(t){s(t.target).closest(".sidenav-close").length&&!this._isCurrentlyFixed()&&this.close()}},{key:"_handleWindowResize",value:function(){this.lastWindowWidth!==window.innerWidth&&(992<window.innerWidth?this.open():this.close()),this.lastWindowWidth=window.innerWidth,this.lastWindowHeight=window.innerHeight}},{key:"_setupClasses",value:function(){"right"===this.options.edge&&(this.el.classList.add("right-aligned"),this.dragTarget.classList.add("right-aligned"))}},{key:"_removeClasses",value:function(){this.el.classList.remove("right-aligned"),this.dragTarget.classList.remove("right-aligned")}},{key:"_setupFixed",value:function(){this._isCurrentlyFixed()&&this.open()}},{key:"_isCurrentlyFixed",value:function(){return this.isFixed&&992<window.innerWidth}},{key:"_createDragTarget",value:function(){var t=document.createElement("div");t.classList.add("drag-target"),document.body.appendChild(t),this.dragTarget=t}},{key:"_preventBodyScrolling",value:function(){document.body.style.overflow="hidden"}},{key:"_enableBodyScrolling",value:function(){document.body.style.overflow=""}},{key:"open",value:function(){!0!==this.isOpen&&(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._isCurrentlyFixed()?(o.remove(this.el),o({targets:this.el,translateX:0,duration:0,easing:"easeOutQuad"}),this._enableBodyScrolling(),this._overlay.style.display="none"):(this.options.preventScrolling&&this._preventBodyScrolling(),this.isDragged&&1==this.percentOpen||this._animateIn()))}},{key:"close",value:function(){if(!1!==this.isOpen)if(this.isOpen=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._isCurrentlyFixed()){var t="left"===this.options.edge?"-105%":"105%";this.el.style.transform="translateX("+t+")"}else this._enableBodyScrolling(),this.isDragged&&0==this.percentOpen?this._overlay.style.display="none":this._animateOut()}},{key:"_animateIn",value:function(){this._animateSidenavIn(),this._animateOverlayIn()}},{key:"_animateSidenavIn",value:function(){var t=this,e="left"===this.options.edge?-1:1;this.isDragged&&(e="left"===this.options.edge?e+this.percentOpen:e-this.percentOpen),o.remove(this.el),o({targets:this.el,translateX:[100*e+"%",0],duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el)}})}},{key:"_animateOverlayIn",value:function(){var t=0;this.isDragged?t=this.percentOpen:s(this._overlay).css({display:"block"}),o.remove(this._overlay),o({targets:this._overlay,opacity:[t,1],duration:this.options.inDuration,easing:"easeOutQuad"})}},{key:"_animateOut",value:function(){this._animateSidenavOut(),this._animateOverlayOut()}},{key:"_animateSidenavOut",value:function(){var t=this,e="left"===this.options.edge?-1:1,i=0;this.isDragged&&(i="left"===this.options.edge?e+this.percentOpen:e-this.percentOpen),o.remove(this.el),o({targets:this.el,translateX:[100*i+"%",105*e+"%"],duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}})}},{key:"_animateOverlayOut",value:function(){var t=this;o.remove(this._overlay),o({targets:this._overlay,opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){s(t._overlay).css("display","none")}})}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Sidenav}},{key:"defaults",get:function(){return e}}]),n}();t._sidenavs=[],M.Sidenav=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"sidenav","M_Sidenav")}(cash,M.anime),function(o,a){"use strict";var e={throttle:100,scrollOffset:200,activeClass:"active",getActiveElement:function(t){return'a[href="#'+t+'"]'}},t=function(t){function c(t,e){_classCallCheck(this,c);var i=_possibleConstructorReturn(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,c,t,e));return(i.el.M_ScrollSpy=i).options=o.extend({},c.defaults,e),c._elements.push(i),c._count++,c._increment++,i.tickId=-1,i.id=c._increment,i._setupEventHandlers(),i._handleWindowScroll(),i}return _inherits(c,Component),_createClass(c,[{key:"destroy",value:function(){c._elements.splice(c._elements.indexOf(this),1),c._elementsInView.splice(c._elementsInView.indexOf(this),1),c._visibleElements.splice(c._visibleElements.indexOf(this.$el),1),c._count--,this._removeEventHandlers(),o(this.options.getActiveElement(this.$el.attr("id"))).removeClass(this.options.activeClass),this.el.M_ScrollSpy=void 0}},{key:"_setupEventHandlers",value:function(){var t=M.throttle(this._handleWindowScroll,200);this._handleThrottledResizeBound=t.bind(this),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),1===c._count&&(window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleThrottledResizeBound),document.body.addEventListener("click",this._handleTriggerClick))}},{key:"_removeEventHandlers",value:function(){0===c._count&&(window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleThrottledResizeBound),document.body.removeEventListener("click",this._handleTriggerClick))}},{key:"_handleTriggerClick",value:function(t){for(var e=o(t.target),i=c._elements.length-1;0<=i;i--){var n=c._elements[i];if(e.is('a[href="#'+n.$el.attr("id")+'"]')){t.preventDefault();var s=n.$el.offset().top+1;a({targets:[document.documentElement,document.body],scrollTop:s-n.options.scrollOffset,duration:400,easing:"easeOutCubic"});break}}}},{key:"_handleWindowScroll",value:function(){c._ticks++;for(var t=M.getDocumentScrollTop(),e=M.getDocumentScrollLeft(),i=e+window.innerWidth,n=t+window.innerHeight,s=c._findElements(t,i,n,e),o=0;o<s.length;o++){var a=s[o];a.tickId<0&&a._enter(),a.tickId=c._ticks}for(var r=0;r<c._elementsInView.length;r++){var l=c._elementsInView[r],h=l.tickId;0<=h&&h!==c._ticks&&(l._exit(),l.tickId=-1)}c._elementsInView=s}},{key:"_enter",value:function(){(c._visibleElements=c._visibleElements.filter(function(t){return 0!=t.height()}))[0]?(o(this.options.getActiveElement(c._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),c._visibleElements[0][0].M_ScrollSpy&&this.id<c._visibleElements[0][0].M_ScrollSpy.id?c._visibleElements.unshift(this.$el):c._visibleElements.push(this.$el)):c._visibleElements.push(this.$el),o(this.options.getActiveElement(c._visibleElements[0].attr("id"))).addClass(this.options.activeClass)}},{key:"_exit",value:function(){var e=this;(c._visibleElements=c._visibleElements.filter(function(t){return 0!=t.height()}))[0]&&(o(this.options.getActiveElement(c._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),(c._visibleElements=c._visibleElements.filter(function(t){return t.attr("id")!=e.$el.attr("id")}))[0]&&o(this.options.getActiveElement(c._visibleElements[0].attr("id"))).addClass(this.options.activeClass))}}],[{key:"init",value:function(t,e){return _get(c.__proto__||Object.getPrototypeOf(c),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_ScrollSpy}},{key:"_findElements",value:function(t,e,i,n){for(var s=[],o=0;o<c._elements.length;o++){var a=c._elements[o],r=t+a.options.scrollOffset||200;if(0<a.$el.height()){var l=a.$el.offset().top,h=a.$el.offset().left,d=h+a.$el.width(),u=l+a.$el.height();!(e<h||d<n||i<l||u<r)&&s.push(a)}}return s}},{key:"defaults",get:function(){return e}}]),c}();t._elements=[],t._elementsInView=[],t._visibleElements=[],t._count=0,t._increment=0,t._ticks=0,M.ScrollSpy=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"scrollSpy","M_ScrollSpy")}(cash,M.anime),function(h){"use strict";var e={data:{},limit:1/0,onAutocomplete:null,minLength:1,sortFunction:function(t,e,i){return t.indexOf(i)-e.indexOf(i)}},t=function(t){function s(t,e){_classCallCheck(this,s);var i=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,t,e));return(i.el.M_Autocomplete=i).options=h.extend({},s.defaults,e),i.isOpen=!1,i.count=0,i.activeIndex=-1,i.oldVal,i.$inputField=i.$el.closest(".input-field"),i.$active=h(),i._mousedown=!1,i._setupDropdown(),i._setupEventHandlers(),i}return _inherits(s,Component),_createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_Autocomplete=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputBlurBound=this._handleInputBlur.bind(this),this._handleInputKeyupAndFocusBound=this._handleInputKeyupAndFocus.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleContainerMousedownAndTouchstartBound=this._handleContainerMousedownAndTouchstart.bind(this),this._handleContainerMouseupAndTouchendBound=this._handleContainerMouseupAndTouchend.bind(this),this.el.addEventListener("blur",this._handleInputBlurBound),this.el.addEventListener("keyup",this._handleInputKeyupAndFocusBound),this.el.addEventListener("focus",this._handleInputKeyupAndFocusBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("click",this._handleInputClickBound),this.container.addEventListener("mousedown",this._handleContainerMousedownAndTouchstartBound),this.container.addEventListener("mouseup",this._handleContainerMouseupAndTouchendBound),void 0!==window.ontouchstart&&(this.container.addEventListener("touchstart",this._handleContainerMousedownAndTouchstartBound),this.container.addEventListener("touchend",this._handleContainerMouseupAndTouchendBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("blur",this._handleInputBlurBound),this.el.removeEventListener("keyup",this._handleInputKeyupAndFocusBound),this.el.removeEventListener("focus",this._handleInputKeyupAndFocusBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("click",this._handleInputClickBound),this.container.removeEventListener("mousedown",this._handleContainerMousedownAndTouchstartBound),this.container.removeEventListener("mouseup",this._handleContainerMouseupAndTouchendBound),void 0!==window.ontouchstart&&(this.container.removeEventListener("touchstart",this._handleContainerMousedownAndTouchstartBound),this.container.removeEventListener("touchend",this._handleContainerMouseupAndTouchendBound))}},{key:"_setupDropdown",value:function(){var e=this;this.container=document.createElement("ul"),this.container.id="autocomplete-options-"+M.guid(),h(this.container).addClass("autocomplete-content dropdown-content"),this.$inputField.append(this.container),this.el.setAttribute("data-target",this.container.id),this.dropdown=M.Dropdown.init(this.el,{autoFocus:!1,closeOnClick:!1,coverTrigger:!1,onItemClick:function(t){e.selectOption(h(t))}}),this.el.removeEventListener("click",this.dropdown._handleClickBound)}},{key:"_removeDropdown",value:function(){this.container.parentNode.removeChild(this.container)}},{key:"_handleInputBlur",value:function(){this._mousedown||(this.close(),this._resetAutocomplete())}},{key:"_handleInputKeyupAndFocus",value:function(t){"keyup"===t.type&&(s._keydown=!1),this.count=0;var e=this.el.value.toLowerCase();13!==t.keyCode&&38!==t.keyCode&&40!==t.keyCode&&(this.oldVal===e||!M.tabPressed&&"focus"===t.type||this.open(),this.oldVal=e)}},{key:"_handleInputKeydown",value:function(t){s._keydown=!0;var e=t.keyCode,i=void 0,n=h(this.container).children("li").length;e===M.keys.ENTER&&0<=this.activeIndex?(i=h(this.container).children("li").eq(this.activeIndex)).length&&(this.selectOption(i),t.preventDefault()):e!==M.keys.ARROW_UP&&e!==M.keys.ARROW_DOWN||(t.preventDefault(),e===M.keys.ARROW_UP&&0<this.activeIndex&&this.activeIndex--,e===M.keys.ARROW_DOWN&&this.activeIndex<n-1&&this.activeIndex++,this.$active.removeClass("active"),0<=this.activeIndex&&(this.$active=h(this.container).children("li").eq(this.activeIndex),this.$active.addClass("active")))}},{key:"_handleInputClick",value:function(t){this.open()}},{key:"_handleContainerMousedownAndTouchstart",value:function(t){this._mousedown=!0}},{key:"_handleContainerMouseupAndTouchend",value:function(t){this._mousedown=!1}},{key:"_highlight",value:function(t,e){var i=e.find("img"),n=e.text().toLowerCase().indexOf(""+t.toLowerCase()),s=n+t.length-1,o=e.text().slice(0,n),a=e.text().slice(n,s+1),r=e.text().slice(s+1);e.html("<span>"+o+"<span class='highlight'>"+a+"</span>"+r+"</span>"),i.length&&e.prepend(i)}},{key:"_resetCurrentElement",value:function(){this.activeIndex=-1,this.$active.removeClass("active")}},{key:"_resetAutocomplete",value:function(){h(this.container).empty(),this._resetCurrentElement(),this.oldVal=null,this.isOpen=!1,this._mousedown=!1}},{key:"selectOption",value:function(t){var e=t.text().trim();this.el.value=e,this.$el.trigger("change"),this._resetAutocomplete(),this.close(),"function"==typeof this.options.onAutocomplete&&this.options.onAutocomplete.call(this,e)}},{key:"_renderDropdown",value:function(t,i){var n=this;this._resetAutocomplete();var e=[];for(var s in t)if(t.hasOwnProperty(s)&&-1!==s.toLowerCase().indexOf(i)){if(this.count>=this.options.limit)break;var o={data:t[s],key:s};e.push(o),this.count++}if(this.options.sortFunction){e.sort(function(t,e){return n.options.sortFunction(t.key.toLowerCase(),e.key.toLowerCase(),i.toLowerCase())})}for(var a=0;a<e.length;a++){var r=e[a],l=h("<li></li>");r.data?l.append('<img src="'+r.data+'" class="right circle"><span>'+r.key+"</span>"):l.append("<span>"+r.key+"</span>"),h(this.container).append(l),this._highlight(i,l)}}},{key:"open",value:function(){var t=this.el.value.toLowerCase();this._resetAutocomplete(),t.length>=this.options.minLength&&(this.isOpen=!0,this._renderDropdown(this.options.data,t)),this.dropdown.isOpen?this.dropdown.recalculateDimensions():this.dropdown.open()}},{key:"close",value:function(){this.dropdown.close()}},{key:"updateData",value:function(t){var e=this.el.value.toLowerCase();this.options.data=t,this.isOpen&&this._renderDropdown(t,e)}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Autocomplete}},{key:"defaults",get:function(){return e}}]),s}();t._keydown=!1,M.Autocomplete=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"autocomplete","M_Autocomplete")}(cash),function(d){M.updateTextFields=function(){d("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea").each(function(t,e){var i=d(this);0<t.value.length||d(t).is(":focus")||t.autofocus||null!==i.attr("placeholder")?i.siblings("label").addClass("active"):t.validity?i.siblings("label").toggleClass("active",!0===t.validity.badInput):i.siblings("label").removeClass("active")})},M.validate_field=function(t){var e=null!==t.attr("data-length"),i=parseInt(t.attr("data-length")),n=t[0].value.length;0!==n||!1!==t[0].validity.badInput||t.is(":required")?t.hasClass("validate")&&(t.is(":valid")&&e&&n<=i||t.is(":valid")&&!e?(t.removeClass("invalid"),t.addClass("valid")):(t.removeClass("valid"),t.addClass("invalid"))):t.hasClass("validate")&&(t.removeClass("valid"),t.removeClass("invalid"))},M.textareaAutoResize=function(t){if(t instanceof Element&&(t=d(t)),t.length){var e=d(".hiddendiv").first();e.length||(e=d('<div class="hiddendiv common"></div>'),d("body").append(e));var i=t.css("font-family"),n=t.css("font-size"),s=t.css("line-height"),o=t.css("padding-top"),a=t.css("padding-right"),r=t.css("padding-bottom"),l=t.css("padding-left");n&&e.css("font-size",n),i&&e.css("font-family",i),s&&e.css("line-height",s),o&&e.css("padding-top",o),a&&e.css("padding-right",a),r&&e.css("padding-bottom",r),l&&e.css("padding-left",l),t.data("original-height")||t.data("original-height",t.height()),"off"===t.attr("wrap")&&e.css("overflow-wrap","normal").css("white-space","pre"),e.text(t[0].value+"\n");var h=e.html().replace(/\n/g,"<br>");e.html(h),0<t[0].offsetWidth&&0<t[0].offsetHeight?e.css("width",t.width()+"px"):e.css("width",window.innerWidth/2+"px"),t.data("original-height")<=e.innerHeight()?t.css("height",e.innerHeight()+"px"):t[0].value.length<t.data("previous-length")&&t.css("height",t.data("original-height")+"px"),t.data("previous-length",t[0].value.length)}else console.error("No textarea element found")},d(document).ready(function(){var n="input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea";d(document).on("change",n,function(){0===this.value.length&&null===d(this).attr("placeholder")||d(this).siblings("label").addClass("active"),M.validate_field(d(this))}),d(document).ready(function(){M.updateTextFields()}),d(document).on("reset",function(t){var e=d(t.target);e.is("form")&&(e.find(n).removeClass("valid").removeClass("invalid"),e.find(n).each(function(t){this.value.length&&d(this).siblings("label").removeClass("active")}),setTimeout(function(){e.find("select").each(function(){this.M_FormSelect&&d(this).trigger("change")})},0))}),document.addEventListener("focus",function(t){d(t.target).is(n)&&d(t.target).siblings("label, .prefix").addClass("active")},!0),document.addEventListener("blur",function(t){var e=d(t.target);if(e.is(n)){var i=".prefix";0===e[0].value.length&&!0!==e[0].validity.badInput&&null===e.attr("placeholder")&&(i+=", label"),e.siblings(i).removeClass("active"),M.validate_field(e)}},!0);d(document).on("keyup","input[type=radio], input[type=checkbox]",function(t){if(t.which===M.keys.TAB)return d(this).addClass("tabbed"),void d(this).one("blur",function(t){d(this).removeClass("tabbed")})});var t=".materialize-textarea";d(t).each(function(){var t=d(this);t.data("original-height",t.height()),t.data("previous-length",this.value.length),M.textareaAutoResize(t)}),d(document).on("keyup",t,function(){M.textareaAutoResize(d(this))}),d(document).on("keydown",t,function(){M.textareaAutoResize(d(this))}),d(document).on("change",'.file-field input[type="file"]',function(){for(var t=d(this).closest(".file-field").find("input.file-path"),e=d(this)[0].files,i=[],n=0;n<e.length;n++)i.push(e[n].name);t[0].value=i.join(", "),t.trigger("change")})})}(cash),function(s,o){"use strict";var e={indicators:!0,height:400,duration:500,interval:6e3},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Slider=i).options=s.extend({},n.defaults,e),i.$slider=i.$el.find(".slides"),i.$slides=i.$slider.children("li"),i.activeIndex=i.$slides.filter(function(t){return s(t).hasClass("active")}).first().index(),-1!=i.activeIndex&&(i.$active=i.$slides.eq(i.activeIndex)),i._setSliderHeight(),i.$slides.find(".caption").each(function(t){i._animateCaptionIn(t,0)}),i.$slides.find("img").each(function(t){var e="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";s(t).attr("src")!==e&&(s(t).css("background-image",'url("'+s(t).attr("src")+'")'),s(t).attr("src",e))}),i._setupIndicators(),i.$active?i.$active.css("display","block"):(i.$slides.first().addClass("active"),o({targets:i.$slides.first()[0],opacity:1,duration:i.options.duration,easing:"easeOutQuad"}),i.activeIndex=0,i.$active=i.$slides.eq(i.activeIndex),i.options.indicators&&i.$indicators.eq(i.activeIndex).addClass("active")),i.$active.find("img").each(function(t){o({targets:i.$active.find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:i.options.duration,easing:"easeOutQuad"})}),i._setupEventHandlers(),i.start(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this.pause(),this._removeIndicators(),this._removeEventHandlers(),this.el.M_Slider=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleIntervalBound=this._handleInterval.bind(this),this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.options.indicators&&this.$indicators.each(function(t){t.addEventListener("click",e._handleIndicatorClickBound)})}},{key:"_removeEventHandlers",value:function(){var e=this;this.options.indicators&&this.$indicators.each(function(t){t.removeEventListener("click",e._handleIndicatorClickBound)})}},{key:"_handleIndicatorClick",value:function(t){var e=s(t.target).index();this.set(e)}},{key:"_handleInterval",value:function(){var t=this.$slider.find(".active").index();this.$slides.length===t+1?t=0:t+=1,this.set(t)}},{key:"_animateCaptionIn",value:function(t,e){var i={targets:t,opacity:0,duration:e,easing:"easeOutQuad"};s(t).hasClass("center-align")?i.translateY=-100:s(t).hasClass("right-align")?i.translateX=100:s(t).hasClass("left-align")&&(i.translateX=-100),o(i)}},{key:"_setSliderHeight",value:function(){this.$el.hasClass("fullscreen")||(this.options.indicators?this.$el.css("height",this.options.height+40+"px"):this.$el.css("height",this.options.height+"px"),this.$slider.css("height",this.options.height+"px"))}},{key:"_setupIndicators",value:function(){var n=this;this.options.indicators&&(this.$indicators=s('<ul class="indicators"></ul>'),this.$slides.each(function(t,e){var i=s('<li class="indicator-item"></li>');n.$indicators.append(i[0])}),this.$el.append(this.$indicators[0]),this.$indicators=this.$indicators.children("li.indicator-item"))}},{key:"_removeIndicators",value:function(){this.$el.find("ul.indicators").remove()}},{key:"set",value:function(t){var e=this;if(t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.activeIndex!=t){this.$active=this.$slides.eq(this.activeIndex);var i=this.$active.find(".caption");this.$active.removeClass("active"),o({targets:this.$active[0],opacity:0,duration:this.options.duration,easing:"easeOutQuad",complete:function(){e.$slides.not(".active").each(function(t){o({targets:t,opacity:0,translateX:0,translateY:0,duration:0,easing:"easeOutQuad"})})}}),this._animateCaptionIn(i[0],this.options.duration),this.options.indicators&&(this.$indicators.eq(this.activeIndex).removeClass("active"),this.$indicators.eq(t).addClass("active")),o({targets:this.$slides.eq(t)[0],opacity:1,duration:this.options.duration,easing:"easeOutQuad"}),o({targets:this.$slides.eq(t).find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:this.options.duration,delay:this.options.duration,easing:"easeOutQuad"}),this.$slides.eq(t).addClass("active"),this.activeIndex=t,this.start()}}},{key:"pause",value:function(){clearInterval(this.interval)}},{key:"start",value:function(){clearInterval(this.interval),this.interval=setInterval(this._handleIntervalBound,this.options.duration+this.options.interval)}},{key:"next",value:function(){var t=this.activeIndex+1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}},{key:"prev",value:function(){var t=this.activeIndex-1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Slider}},{key:"defaults",get:function(){return e}}]),n}();M.Slider=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"slider","M_Slider")}(cash,M.anime),function(n,s){n(document).on("click",".card",function(t){if(n(this).children(".card-reveal").length){var i=n(t.target).closest(".card");void 0===i.data("initialOverflow")&&i.data("initialOverflow",void 0===i.css("overflow")?"":i.css("overflow"));var e=n(this).find(".card-reveal");n(t.target).is(n(".card-reveal .card-title"))||n(t.target).is(n(".card-reveal .card-title i"))?s({targets:e[0],translateY:0,duration:225,easing:"easeInOutQuad",complete:function(t){var e=t.animatables[0].target;n(e).css({display:"none"}),i.css("overflow",i.data("initialOverflow"))}}):(n(t.target).is(n(".card .activator"))||n(t.target).is(n(".card .activator i")))&&(i.css("overflow","hidden"),e.css({display:"block"}),s({targets:e[0],translateY:"-100%",duration:300,easing:"easeInOutQuad"}))}})}(cash,M.anime),function(h){"use strict";var e={data:[],placeholder:"",secondaryPlaceholder:"",autocompleteOptions:{},limit:1/0,onChipAdd:null,onChipSelect:null,onChipDelete:null},t=function(t){function l(t,e){_classCallCheck(this,l);var i=_possibleConstructorReturn(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,l,t,e));return(i.el.M_Chips=i).options=h.extend({},l.defaults,e),i.$el.addClass("chips input-field"),i.chipsData=[],i.$chips=h(),i._setupInput(),i.hasAutocomplete=0<Object.keys(i.options.autocompleteOptions).length,i.$input.attr("id")||i.$input.attr("id",M.guid()),i.options.data.length&&(i.chipsData=i.options.data,i._renderChips(i.chipsData)),i.hasAutocomplete&&i._setupAutocomplete(),i._setPlaceholder(),i._setupLabel(),i._setupEventHandlers(),i}return _inherits(l,Component),_createClass(l,[{key:"getData",value:function(){return this.chipsData}},{key:"destroy",value:function(){this._removeEventHandlers(),this.$chips.remove(),this.el.M_Chips=void 0}},{key:"_setupEventHandlers",value:function(){this._handleChipClickBound=this._handleChipClick.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputFocusBound=this._handleInputFocus.bind(this),this._handleInputBlurBound=this._handleInputBlur.bind(this),this.el.addEventListener("click",this._handleChipClickBound),document.addEventListener("keydown",l._handleChipsKeydown),document.addEventListener("keyup",l._handleChipsKeyup),this.el.addEventListener("blur",l._handleChipsBlur,!0),this.$input[0].addEventListener("focus",this._handleInputFocusBound),this.$input[0].addEventListener("blur",this._handleInputBlurBound),this.$input[0].addEventListener("keydown",this._handleInputKeydownBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleChipClickBound),document.removeEventListener("keydown",l._handleChipsKeydown),document.removeEventListener("keyup",l._handleChipsKeyup),this.el.removeEventListener("blur",l._handleChipsBlur,!0),this.$input[0].removeEventListener("focus",this._handleInputFocusBound),this.$input[0].removeEventListener("blur",this._handleInputBlurBound),this.$input[0].removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleChipClick",value:function(t){var e=h(t.target).closest(".chip"),i=h(t.target).is(".close");if(e.length){var n=e.index();i?(this.deleteChip(n),this.$input[0].focus()):this.selectChip(n)}else this.$input[0].focus()}},{key:"_handleInputFocus",value:function(){this.$el.addClass("focus")}},{key:"_handleInputBlur",value:function(){this.$el.removeClass("focus")}},{key:"_handleInputKeydown",value:function(t){if(l._keydown=!0,13===t.keyCode){if(this.hasAutocomplete&&this.autocomplete&&this.autocomplete.isOpen)return;t.preventDefault(),this.addChip({tag:this.$input[0].value}),this.$input[0].value=""}else 8!==t.keyCode&&37!==t.keyCode||""!==this.$input[0].value||!this.chipsData.length||(t.preventDefault(),this.selectChip(this.chipsData.length-1))}},{key:"_renderChip",value:function(t){if(t.tag){var e=document.createElement("div"),i=document.createElement("i");if(e.classList.add("chip"),e.textContent=t.tag,e.setAttribute("tabindex",0),h(i).addClass("material-icons close"),i.textContent="close",t.image){var n=document.createElement("img");n.setAttribute("src",t.image),e.insertBefore(n,e.firstChild)}return e.appendChild(i),e}}},{key:"_renderChips",value:function(){this.$chips.remove();for(var t=0;t<this.chipsData.length;t++){var e=this._renderChip(this.chipsData[t]);this.$el.append(e),this.$chips.add(e)}this.$el.append(this.$input[0])}},{key:"_setupAutocomplete",value:function(){var e=this;this.options.autocompleteOptions.onAutocomplete=function(t){e.addChip({tag:t}),e.$input[0].value="",e.$input[0].focus()},this.autocomplete=M.Autocomplete.init(this.$input[0],this.options.autocompleteOptions)}},{key:"_setupInput",value:function(){this.$input=this.$el.find("input"),this.$input.length||(this.$input=h("<input></input>"),this.$el.append(this.$input)),this.$input.addClass("input")}},{key:"_setupLabel",value:function(){this.$label=this.$el.find("label"),this.$label.length&&this.$label.setAttribute("for",this.$input.attr("id"))}},{key:"_setPlaceholder",value:function(){void 0!==this.chipsData&&!this.chipsData.length&&this.options.placeholder?h(this.$input).prop("placeholder",this.options.placeholder):(void 0===this.chipsData||this.chipsData.length)&&this.options.secondaryPlaceholder&&h(this.$input).prop("placeholder",this.options.secondaryPlaceholder)}},{key:"_isValid",value:function(t){if(t.hasOwnProperty("tag")&&""!==t.tag){for(var e=!1,i=0;i<this.chipsData.length;i++)if(this.chipsData[i].tag===t.tag){e=!0;break}return!e}return!1}},{key:"addChip",value:function(t){if(this._isValid(t)&&!(this.chipsData.length>=this.options.limit)){var e=this._renderChip(t);this.$chips.add(e),this.chipsData.push(t),h(this.$input).before(e),this._setPlaceholder(),"function"==typeof this.options.onChipAdd&&this.options.onChipAdd.call(this,this.$el,e)}}},{key:"deleteChip",value:function(t){var e=this.$chips.eq(t);this.$chips.eq(t).remove(),this.$chips=this.$chips.filter(function(t){return 0<=h(t).index()}),this.chipsData.splice(t,1),this._setPlaceholder(),"function"==typeof this.options.onChipDelete&&this.options.onChipDelete.call(this,this.$el,e[0])}},{key:"selectChip",value:function(t){var e=this.$chips.eq(t);(this._selectedChip=e)[0].focus(),"function"==typeof this.options.onChipSelect&&this.options.onChipSelect.call(this,this.$el,e[0])}}],[{key:"init",value:function(t,e){return _get(l.__proto__||Object.getPrototypeOf(l),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Chips}},{key:"_handleChipsKeydown",value:function(t){l._keydown=!0;var e=h(t.target).closest(".chips"),i=t.target&&e.length;if(!h(t.target).is("input, textarea")&&i){var n=e[0].M_Chips;if(8===t.keyCode||46===t.keyCode){t.preventDefault();var s=n.chipsData.length;if(n._selectedChip){var o=n._selectedChip.index();n.deleteChip(o),n._selectedChip=null,s=Math.max(o-1,0)}n.chipsData.length&&n.selectChip(s)}else if(37===t.keyCode){if(n._selectedChip){var a=n._selectedChip.index()-1;if(a<0)return;n.selectChip(a)}}else if(39===t.keyCode&&n._selectedChip){var r=n._selectedChip.index()+1;r>=n.chipsData.length?n.$input[0].focus():n.selectChip(r)}}}},{key:"_handleChipsKeyup",value:function(t){l._keydown=!1}},{key:"_handleChipsBlur",value:function(t){l._keydown||(h(t.target).closest(".chips")[0].M_Chips._selectedChip=null)}},{key:"defaults",get:function(){return e}}]),l}();t._keydown=!1,M.Chips=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"chips","M_Chips"),h(document).ready(function(){h(document.body).on("click",".chip .close",function(){var t=h(this).closest(".chips");t.length&&t[0].M_Chips||h(this).closest(".chip").remove()})})}(cash),function(s){"use strict";var e={top:0,bottom:1/0,offset:0,onPositionChange:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Pushpin=i).options=s.extend({},n.defaults,e),i.originalOffset=i.el.offsetTop,n._pushpins.push(i),i._setupEventHandlers(),i._updatePosition(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this.el.style.top=null,this._removePinClasses(),this._removeEventHandlers();var t=n._pushpins.indexOf(this);n._pushpins.splice(t,1)}},{key:"_setupEventHandlers",value:function(){document.addEventListener("scroll",n._updateElements)}},{key:"_removeEventHandlers",value:function(){document.removeEventListener("scroll",n._updateElements)}},{key:"_updatePosition",value:function(){var t=M.getDocumentScrollTop()+this.options.offset;this.options.top<=t&&this.options.bottom>=t&&!this.el.classList.contains("pinned")&&(this._removePinClasses(),this.el.style.top=this.options.offset+"px",this.el.classList.add("pinned"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pinned")),t<this.options.top&&!this.el.classList.contains("pin-top")&&(this._removePinClasses(),this.el.style.top=0,this.el.classList.add("pin-top"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-top")),t>this.options.bottom&&!this.el.classList.contains("pin-bottom")&&(this._removePinClasses(),this.el.classList.add("pin-bottom"),this.el.style.top=this.options.bottom-this.originalOffset+"px","function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-bottom"))}},{key:"_removePinClasses",value:function(){this.el.classList.remove("pin-top"),this.el.classList.remove("pinned"),this.el.classList.remove("pin-bottom")}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Pushpin}},{key:"_updateElements",value:function(){for(var t in n._pushpins){n._pushpins[t]._updatePosition()}}},{key:"defaults",get:function(){return e}}]),n}();t._pushpins=[],M.Pushpin=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"pushpin","M_Pushpin")}(cash),function(r,s){"use strict";var e={direction:"top",hoverEnabled:!0,toolbarEnabled:!1};r.fn.reverse=[].reverse;var t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_FloatingActionButton=i).options=r.extend({},n.defaults,e),i.isOpen=!1,i.$anchor=i.$el.children("a").first(),i.$menu=i.$el.children("ul").first(),i.$floatingBtns=i.$el.find("ul .btn-floating"),i.$floatingBtnsReverse=i.$el.find("ul .btn-floating").reverse(),i.offsetY=0,i.offsetX=0,i.$el.addClass("direction-"+i.options.direction),"top"===i.options.direction?i.offsetY=40:"right"===i.options.direction?i.offsetX=-40:"bottom"===i.options.direction?i.offsetY=-40:i.offsetX=40,i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}},{key:"_setupEventHandlers",value:function(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener("mouseenter",this._handleOpenBound),this.el.addEventListener("mouseleave",this._handleCloseBound)):this.el.addEventListener("click",this._handleFABClickBound)}},{key:"_removeEventHandlers",value:function(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener("mouseenter",this._handleOpenBound),this.el.removeEventListener("mouseleave",this._handleCloseBound)):this.el.removeEventListener("click",this._handleFABClickBound)}},{key:"_handleFABClick",value:function(){this.isOpen?this.close():this.open()}},{key:"_handleDocumentClick",value:function(t){r(t.target).closest(this.$menu).length||this.close()}},{key:"open",value:function(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}},{key:"close",value:function(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener("scroll",this._handleCloseBound,!0),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}},{key:"_animateInFAB",value:function(){var e=this;this.$el.addClass("active");var i=0;this.$floatingBtnsReverse.each(function(t){s({targets:t,opacity:1,scale:[.4,1],translateY:[e.offsetY,0],translateX:[e.offsetX,0],duration:275,delay:i,easing:"easeInOutQuad"}),i+=40})}},{key:"_animateOutFAB",value:function(){var e=this;this.$floatingBtnsReverse.each(function(t){s.remove(t),s({targets:t,opacity:0,scale:.4,translateY:e.offsetY,translateX:e.offsetX,duration:175,easing:"easeOutQuad",complete:function(){e.$el.removeClass("active")}})})}},{key:"_animateInToolbar",value:function(){var t,e=this,i=window.innerWidth,n=window.innerHeight,s=this.el.getBoundingClientRect(),o=r('<div class="fab-backdrop"></div>'),a=this.$anchor.css("background-color");this.$anchor.append(o),this.offsetX=s.left-i/2+s.width/2,this.offsetY=n-s.bottom,t=i/o[0].clientWidth,this.btnBottom=s.bottom,this.btnLeft=s.left,this.btnWidth=s.width,this.$el.addClass("active"),this.$el.css({"text-align":"center",width:"100%",bottom:0,left:0,transform:"translateX("+this.offsetX+"px)",transition:"none"}),this.$anchor.css({transform:"translateY("+-this.offsetY+"px)",transition:"none"}),o.css({"background-color":a}),setTimeout(function(){e.$el.css({transform:"",transition:"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"}),e.$anchor.css({overflow:"visible",transform:"",transition:"transform .2s"}),setTimeout(function(){e.$el.css({overflow:"hidden","background-color":a}),o.css({transform:"scale("+t+")",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"}),e.$menu.children("li").children("a").css({opacity:1}),e._handleDocumentClickBound=e._handleDocumentClick.bind(e),window.addEventListener("scroll",e._handleCloseBound,!0),document.body.addEventListener("click",e._handleDocumentClickBound,!0)},100)},0)}},{key:"_animateOutToolbar",value:function(){var t=this,e=window.innerWidth,i=window.innerHeight,n=this.$el.find(".fab-backdrop"),s=this.$anchor.css("background-color");this.offsetX=this.btnLeft-e/2+this.btnWidth/2,this.offsetY=i-this.btnBottom,this.$el.removeClass("active"),this.$el.css({"background-color":"transparent",transition:"none"}),this.$anchor.css({transition:"none"}),n.css({transform:"scale(0)","background-color":s}),this.$menu.children("li").children("a").css({opacity:""}),setTimeout(function(){n.remove(),t.$el.css({"text-align":"",width:"",bottom:"",left:"",overflow:"","background-color":"",transform:"translate3d("+-t.offsetX+"px,0,0)"}),t.$anchor.css({overflow:"",transform:"translate3d(0,"+t.offsetY+"px,0)"}),setTimeout(function(){t.$el.css({transform:"translate3d(0,0,0)",transition:"transform .2s"}),t.$anchor.css({transform:"translate3d(0,0,0)",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"})},20)},200)}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_FloatingActionButton}},{key:"defaults",get:function(){return e}}]),n}();M.FloatingActionButton=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"floatingActionButton","M_FloatingActionButton")}(cash,M.anime),function(g){"use strict";var e={autoClose:!1,format:"mmm dd, yyyy",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",previousMonth:"‹",nextMonth:"›",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},t=function(t){function B(t,e){_classCallCheck(this,B);var i=_possibleConstructorReturn(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,B,t,e));(i.el.M_Datepicker=i).options=g.extend({},B.defaults,e),e&&e.hasOwnProperty("i18n")&&"object"==typeof e.i18n&&(i.options.i18n=g.extend({},B.defaults.i18n,e.i18n)),i.options.minDate&&i.options.minDate.setHours(0,0,0,0),i.options.maxDate&&i.options.maxDate.setHours(0,0,0,0),i.id=M.guid(),i._setupVariables(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupEventHandlers(),i.options.defaultDate||(i.options.defaultDate=new Date(Date.parse(i.el.value)));var n=i.options.defaultDate;return B._isDate(n)?i.options.setDefaultDate?(i.setDate(n,!0),i.setInputValue()):i.gotoDate(n):i.gotoDate(new Date),i.isOpen=!1,i}return _inherits(B,Component),_createClass(B,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),g(this.modalEl).remove(),this.destroySelects(),this.el.M_Datepicker=void 0}},{key:"destroySelects",value:function(){var t=this.calendarEl.querySelector(".orig-select-year");t&&M.FormSelect.getInstance(t).destroy();var e=this.calendarEl.querySelector(".orig-select-month");e&&M.FormSelect.getInstance(e).destroy()}},{key:"_insertHTMLIntoDOM",value:function(){this.options.showClearBtn&&(g(this.clearBtn).css({visibility:""}),this.clearBtn.innerHTML=this.options.i18n.clear),this.doneBtn.innerHTML=this.options.i18n.done,this.cancelBtn.innerHTML=this.options.i18n.cancel,this.options.container?this.$modalEl.appendTo(this.options.container):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var t=this;this.modalEl.id="modal-"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){t.isOpen=!1}})}},{key:"toString",value:function(t){var e=this;return t=t||this.options.format,B._isDate(this.date)?t.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(function(t){return e.formats[t]?e.formats[t]():t}).join(""):""}},{key:"setDate",value:function(t,e){if(!t)return this.date=null,this._renderDateDisplay(),this.draw();if("string"==typeof t&&(t=new Date(Date.parse(t))),B._isDate(t)){var i=this.options.minDate,n=this.options.maxDate;B._isDate(i)&&t<i?t=i:B._isDate(n)&&n<t&&(t=n),this.date=new Date(t.getTime()),this._renderDateDisplay(),B._setToStartOfDay(this.date),this.gotoDate(this.date),e||"function"!=typeof this.options.onSelect||this.options.onSelect.call(this,this.date)}}},{key:"setInputValue",value:function(){this.el.value=this.toString(),this.$el.trigger("change",{firedBy:this})}},{key:"_renderDateDisplay",value:function(){var t=B._isDate(this.date)?this.date:new Date,e=this.options.i18n,i=e.weekdaysShort[t.getDay()],n=e.monthsShort[t.getMonth()],s=t.getDate();this.yearTextEl.innerHTML=t.getFullYear(),this.dateTextEl.innerHTML=i+", "+n+" "+s}},{key:"gotoDate",value:function(t){var e=!0;if(B._isDate(t)){if(this.calendars){var i=new Date(this.calendars[0].year,this.calendars[0].month,1),n=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),s=t.getTime();n.setMonth(n.getMonth()+1),n.setDate(n.getDate()-1),e=s<i.getTime()||n.getTime()<s}e&&(this.calendars=[{month:t.getMonth(),year:t.getFullYear()}]),this.adjustCalendars()}}},{key:"adjustCalendars",value:function(){this.calendars[0]=this.adjustCalendar(this.calendars[0]),this.draw()}},{key:"adjustCalendar",value:function(t){return t.month<0&&(t.year-=Math.ceil(Math.abs(t.month)/12),t.month+=12),11<t.month&&(t.year+=Math.floor(Math.abs(t.month)/12),t.month-=12),t}},{key:"nextMonth",value:function(){this.calendars[0].month++,this.adjustCalendars()}},{key:"prevMonth",value:function(){this.calendars[0].month--,this.adjustCalendars()}},{key:"render",value:function(t,e,i){var n=this.options,s=new Date,o=B._getDaysInMonth(t,e),a=new Date(t,e,1).getDay(),r=[],l=[];B._setToStartOfDay(s),0<n.firstDay&&(a-=n.firstDay)<0&&(a+=7);for(var h=0===e?11:e-1,d=11===e?0:e+1,u=0===e?t-1:t,c=11===e?t+1:t,p=B._getDaysInMonth(u,h),v=o+a,f=v;7<f;)f-=7;v+=7-f;for(var m=!1,g=0,_=0;g<v;g++){var y=new Date(t,e,g-a+1),k=!!B._isDate(this.date)&&B._compareDates(y,this.date),b=B._compareDates(y,s),w=-1!==n.events.indexOf(y.toDateString()),C=g<a||o+a<=g,E=g-a+1,M=e,O=t,x=n.startRange&&B._compareDates(n.startRange,y),L=n.endRange&&B._compareDates(n.endRange,y),T=n.startRange&&n.endRange&&n.startRange<y&&y<n.endRange;C&&(g<a?(E=p+E,M=h,O=u):(E-=o,M=d,O=c));var $={day:E,month:M,year:O,hasEvent:w,isSelected:k,isToday:b,isDisabled:n.minDate&&y<n.minDate||n.maxDate&&y>n.maxDate||n.disableWeekends&&B._isWeekend(y)||n.disableDayFn&&n.disableDayFn(y),isEmpty:C,isStartRange:x,isEndRange:L,isInRange:T,showDaysInNextAndPreviousMonths:n.showDaysInNextAndPreviousMonths};l.push(this.renderDay($)),7==++_&&(r.push(this.renderRow(l,n.isRTL,m)),_=0,m=!(l=[]))}return this.renderTable(n,r,i)}},{key:"renderDay",value:function(t){var e=[],i="false";if(t.isEmpty){if(!t.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';e.push("is-outside-current-month"),e.push("is-selection-disabled")}return t.isDisabled&&e.push("is-disabled"),t.isToday&&e.push("is-today"),t.isSelected&&(e.push("is-selected"),i="true"),t.hasEvent&&e.push("has-event"),t.isInRange&&e.push("is-inrange"),t.isStartRange&&e.push("is-startrange"),t.isEndRange&&e.push("is-endrange"),'<td data-day="'+t.day+'" class="'+e.join(" ")+'" aria-selected="'+i+'"><button class="datepicker-day-button" type="button" data-year="'+t.year+'" data-month="'+t.month+'" data-day="'+t.day+'">'+t.day+"</button></td>"}},{key:"renderRow",value:function(t,e,i){return'<tr class="datepicker-row'+(i?" is-selected":"")+'">'+(e?t.reverse():t).join("")+"</tr>"}},{key:"renderTable",value:function(t,e,i){return'<div class="datepicker-table-wrapper"><table cellpadding="0" cellspacing="0" class="datepicker-table" role="grid" aria-labelledby="'+i+'">'+this.renderHead(t)+this.renderBody(e)+"</table></div>"}},{key:"renderHead",value:function(t){var e=void 0,i=[];for(e=0;e<7;e++)i.push('<th scope="col"><abbr title="'+this.renderDayName(t,e)+'">'+this.renderDayName(t,e,!0)+"</abbr></th>");return"<thead><tr>"+(t.isRTL?i.reverse():i).join("")+"</tr></thead>"}},{key:"renderBody",value:function(t){return"<tbody>"+t.join("")+"</tbody>"}},{key:"renderTitle",value:function(t,e,i,n,s,o){var a,r,l=void 0,h=void 0,d=void 0,u=this.options,c=i===u.minYear,p=i===u.maxYear,v='<div id="'+o+'" class="datepicker-controls" role="heading" aria-live="assertive">',f=!0,m=!0;for(d=[],l=0;l<12;l++)d.push('<option value="'+(i===s?l-e:12+l-e)+'"'+(l===n?' selected="selected"':"")+(c&&l<u.minMonth||p&&l>u.maxMonth?'disabled="disabled"':"")+">"+u.i18n.months[l]+"</option>");for(a='<select class="datepicker-select orig-select-month" tabindex="-1">'+d.join("")+"</select>",g.isArray(u.yearRange)?(l=u.yearRange[0],h=u.yearRange[1]+1):(l=i-u.yearRange,h=1+i+u.yearRange),d=[];l<h&&l<=u.maxYear;l++)l>=u.minYear&&d.push('<option value="'+l+'" '+(l===i?'selected="selected"':"")+">"+l+"</option>");r='<select class="datepicker-select orig-select-year" tabindex="-1">'+d.join("")+"</select>";v+='<button class="month-prev'+(f?"":" is-disabled")+'" type="button"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg></button>',v+='<div class="selects-container">',u.showMonthAfterYear?v+=r+a:v+=a+r,v+="</div>",c&&(0===n||u.minMonth>=n)&&(f=!1),p&&(11===n||u.maxMonth<=n)&&(m=!1);return(v+='<button class="month-next'+(m?"":" is-disabled")+'" type="button"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></svg></button>')+"</div>"}},{key:"draw",value:function(t){if(this.isOpen||t){var e,i=this.options,n=i.minYear,s=i.maxYear,o=i.minMonth,a=i.maxMonth,r="";this._y<=n&&(this._y=n,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=s&&(this._y=s,!isNaN(a)&&this._m>a&&(this._m=a)),e="datepicker-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<1;l++)this._renderDateDisplay(),r+=this.renderTitle(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,e)+this.render(this.calendars[l].year,this.calendars[l].month,e);this.destroySelects(),this.calendarEl.innerHTML=r;var h=this.calendarEl.querySelector(".orig-select-year"),d=this.calendarEl.querySelector(".orig-select-month");M.FormSelect.init(h,{classes:"select-year",dropdownOptions:{container:document.body,constrainWidth:!1}}),M.FormSelect.init(d,{classes:"select-month",dropdownOptions:{container:document.body,constrainWidth:!1}}),h.addEventListener("change",this._handleYearChange.bind(this)),d.addEventListener("change",this._handleMonthChange.bind(this)),"function"==typeof this.options.onDraw&&this.options.onDraw(this)}}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this._closeBound=this.close.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("change",this._handleInputChangeBound),this.calendarEl.addEventListener("click",this._handleCalendarClickBound),this.doneBtn.addEventListener("click",this._finishSelectionBound),this.cancelBtn.addEventListener("click",this._closeBound),this.options.showClearBtn&&(this._handleClearClickBound=this._handleClearClick.bind(this),this.clearBtn.addEventListener("click",this._handleClearClickBound))}},{key:"_setupVariables",value:function(){var e=this;this.$modalEl=g(B._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(".datepicker-calendar"),this.yearTextEl=this.modalEl.querySelector(".year-text"),this.dateTextEl=this.modalEl.querySelector(".date-text"),this.options.showClearBtn&&(this.clearBtn=this.modalEl.querySelector(".datepicker-clear")),this.doneBtn=this.modalEl.querySelector(".datepicker-done"),this.cancelBtn=this.modalEl.querySelector(".datepicker-cancel"),this.formats={d:function(){return e.date.getDate()},dd:function(){var t=e.date.getDate();return(t<10?"0":"")+t},ddd:function(){return e.options.i18n.weekdaysShort[e.date.getDay()]},dddd:function(){return e.options.i18n.weekdays[e.date.getDay()]},m:function(){return e.date.getMonth()+1},mm:function(){var t=e.date.getMonth()+1;return(t<10?"0":"")+t},mmm:function(){return e.options.i18n.monthsShort[e.date.getMonth()]},mmmm:function(){return e.options.i18n.months[e.date.getMonth()]},yy:function(){return(""+e.date.getFullYear()).slice(2)},yyyy:function(){return e.date.getFullYear()}}}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("change",this._handleInputChangeBound),this.calendarEl.removeEventListener("click",this._handleCalendarClickBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:"_handleCalendarClick",value:function(t){if(this.isOpen){var e=g(t.target);e.hasClass("is-disabled")||(!e.hasClass("datepicker-day-button")||e.hasClass("is-empty")||e.parent().hasClass("is-disabled")?e.closest(".month-prev").length?this.prevMonth():e.closest(".month-next").length&&this.nextMonth():(this.setDate(new Date(t.target.getAttribute("data-year"),t.target.getAttribute("data-month"),t.target.getAttribute("data-day"))),this.options.autoClose&&this._finishSelection()))}}},{key:"_handleClearClick",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:"_handleMonthChange",value:function(t){this.gotoMonth(t.target.value)}},{key:"_handleYearChange",value:function(t){this.gotoYear(t.target.value)}},{key:"gotoMonth",value:function(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())}},{key:"gotoYear",value:function(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())}},{key:"_handleInputChange",value:function(t){var e=void 0;t.firedBy!==this&&(e=this.options.parse?this.options.parse(this.el.value,this.options.format):new Date(Date.parse(this.el.value)),B._isDate(e)&&this.setDate(e))}},{key:"renderDayName",value:function(t,e,i){for(e+=t.firstDay;7<=e;)e-=7;return i?t.i18n.weekdaysAbbrev[e]:t.i18n.weekdays[e]}},{key:"_finishSelection",value:function(){this.setInputValue(),this.close()}},{key:"open",value:function(){if(!this.isOpen)return this.isOpen=!0,"function"==typeof this.options.onOpen&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,"function"==typeof this.options.onClose&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:"init",value:function(t,e){return _get(B.__proto__||Object.getPrototypeOf(B),"init",this).call(this,this,t,e)}},{key:"_isDate",value:function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())}},{key:"_isWeekend",value:function(t){var e=t.getDay();return 0===e||6===e}},{key:"_setToStartOfDay",value:function(t){B._isDate(t)&&t.setHours(0,0,0,0)}},{key:"_getDaysInMonth",value:function(t,e){return[31,B._isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}},{key:"_isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"_compareDates",value:function(t,e){return t.getTime()===e.getTime()}},{key:"_setToStartOfDay",value:function(t){B._isDate(t)&&t.setHours(0,0,0,0)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Datepicker}},{key:"defaults",get:function(){return e}}]),B}();t._template=['<div class= "modal datepicker-modal">','<div class="modal-content datepicker-container">','<div class="datepicker-date-display">','<span class="year-text"></span>','<span class="date-text"></span>',"</div>",'<div class="datepicker-calendar-container">','<div class="datepicker-calendar"></div>','<div class="datepicker-footer">','<button class="btn-flat datepicker-clear waves-effect" style="visibility: hidden;" type="button"></button>','<div class="confirmation-btns">','<button class="btn-flat datepicker-cancel waves-effect" type="button"></button>','<button class="btn-flat datepicker-done waves-effect" type="button"></button>',"</div>","</div>","</div>","</div>","</div>"].join(""),M.Datepicker=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"datepicker","M_Datepicker")}(cash),function(h){"use strict";var e={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:"now",fromNow:0,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok"},autoClose:!1,twelveHour:!0,vibrate:!0,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onSelect:null},t=function(t){function f(t,e){_classCallCheck(this,f);var i=_possibleConstructorReturn(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,f,t,e));return(i.el.M_Timepicker=i).options=h.extend({},f.defaults,e),i.id=M.guid(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupVariables(),i._setupEventHandlers(),i._clockSetup(),i._pickerSetup(),i}return _inherits(f,Component),_createClass(f,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),h(this.modalEl).remove(),this.el.M_Timepicker=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleClockClickStartBound=this._handleClockClickStart.bind(this),this._handleDocumentClickMoveBound=this._handleDocumentClickMove.bind(this),this._handleDocumentClickEndBound=this._handleDocumentClickEnd.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.plate.addEventListener("mousedown",this._handleClockClickStartBound),this.plate.addEventListener("touchstart",this._handleClockClickStartBound),h(this.spanHours).on("click",this.showView.bind(this,"hours")),h(this.spanMinutes).on("click",this.showView.bind(this,"minutes"))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:"_handleClockClickStart",value:function(t){t.preventDefault();var e=this.plate.getBoundingClientRect(),i=e.left,n=e.top;this.x0=i+this.options.dialRadius,this.y0=n+this.options.dialRadius,this.moved=!1;var s=f._Pos(t);this.dx=s.x-this.x0,this.dy=s.y-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener("mousemove",this._handleDocumentClickMoveBound),document.addEventListener("touchmove",this._handleDocumentClickMoveBound),document.addEventListener("mouseup",this._handleDocumentClickEndBound),document.addEventListener("touchend",this._handleDocumentClickEndBound)}},{key:"_handleDocumentClickMove",value:function(t){t.preventDefault();var e=f._Pos(t),i=e.x-this.x0,n=e.y-this.y0;this.moved=!0,this.setHand(i,n,!1,!0)}},{key:"_handleDocumentClickEnd",value:function(t){var e=this;t.preventDefault(),document.removeEventListener("mouseup",this._handleDocumentClickEndBound),document.removeEventListener("touchend",this._handleDocumentClickEndBound);var i=f._Pos(t),n=i.x-this.x0,s=i.y-this.y0;this.moved&&n===this.dx&&s===this.dy&&this.setHand(n,s),"hours"===this.currentView?this.showView("minutes",this.options.duration/2):this.options.autoClose&&(h(this.minutesView).addClass("timepicker-dial-out"),setTimeout(function(){e.done()},this.options.duration/2)),"function"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.hours,this.minutes),document.removeEventListener("mousemove",this._handleDocumentClickMoveBound),document.removeEventListener("touchmove",this._handleDocumentClickMoveBound)}},{key:"_insertHTMLIntoDOM",value:function(){this.$modalEl=h(f._template),this.modalEl=this.$modalEl[0],this.modalEl.id="modal-"+this.id;var t=document.querySelector(this.options.container);this.options.container&&t?this.$modalEl.appendTo(t):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var t=this;this.modal=M.Modal.init(this.modalEl,{onOpenStart:this.options.onOpenStart,onOpenEnd:this.options.onOpenEnd,onCloseStart:this.options.onCloseStart,onCloseEnd:function(){"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t),t.isOpen=!1}})}},{key:"_setupVariables",value:function(){this.currentView="hours",this.vibrate=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,this._canvas=this.modalEl.querySelector(".timepicker-canvas"),this.plate=this.modalEl.querySelector(".timepicker-plate"),this.hoursView=this.modalEl.querySelector(".timepicker-hours"),this.minutesView=this.modalEl.querySelector(".timepicker-minutes"),this.spanHours=this.modalEl.querySelector(".timepicker-span-hours"),this.spanMinutes=this.modalEl.querySelector(".timepicker-span-minutes"),this.spanAmPm=this.modalEl.querySelector(".timepicker-span-am-pm"),this.footer=this.modalEl.querySelector(".timepicker-footer"),this.amOrPm="PM"}},{key:"_pickerSetup",value:function(){var t=h('<button class="btn-flat timepicker-clear waves-effect" style="visibility: hidden;" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.clear+"</button>").appendTo(this.footer).on("click",this.clear.bind(this));this.options.showClearBtn&&t.css({visibility:""});var e=h('<div class="confirmation-btns"></div>');h('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.cancel+"</button>").appendTo(e).on("click",this.close.bind(this)),h('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.done+"</button>").appendTo(e).on("click",this.done.bind(this)),e.appendTo(this.footer)}},{key:"_clockSetup",value:function(){this.options.twelveHour&&(this.$amBtn=h('<div class="am-btn">AM</div>'),this.$pmBtn=h('<div class="pm-btn">PM</div>'),this.$amBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),this.$pmBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}},{key:"_buildSVGClock",value:function(){var t=this.options.dialRadius,e=this.options.tickRadius,i=2*t,n=f._createSVGEl("svg");n.setAttribute("class","timepicker-svg"),n.setAttribute("width",i),n.setAttribute("height",i);var s=f._createSVGEl("g");s.setAttribute("transform","translate("+t+","+t+")");var o=f._createSVGEl("circle");o.setAttribute("class","timepicker-canvas-bearing"),o.setAttribute("cx",0),o.setAttribute("cy",0),o.setAttribute("r",4);var a=f._createSVGEl("line");a.setAttribute("x1",0),a.setAttribute("y1",0);var r=f._createSVGEl("circle");r.setAttribute("class","timepicker-canvas-bg"),r.setAttribute("r",e),s.appendChild(a),s.appendChild(r),s.appendChild(o),n.appendChild(s),this._canvas.appendChild(n),this.hand=a,this.bg=r,this.bearing=o,this.g=s}},{key:"_buildHoursView",value:function(){var t=h('<div class="timepicker-tick"></div>');if(this.options.twelveHour)for(var e=1;e<13;e+=1){var i=t.clone(),n=e/6*Math.PI,s=this.options.outerRadius;i.css({left:this.options.dialRadius+Math.sin(n)*s-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(n)*s-this.options.tickRadius+"px"}),i.html(0===e?"00":e),this.hoursView.appendChild(i[0])}else for(var o=0;o<24;o+=1){var a=t.clone(),r=o/6*Math.PI,l=0<o&&o<13?this.options.innerRadius:this.options.outerRadius;a.css({left:this.options.dialRadius+Math.sin(r)*l-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(r)*l-this.options.tickRadius+"px"}),a.html(0===o?"00":o),this.hoursView.appendChild(a[0])}}},{key:"_buildMinutesView",value:function(){for(var t=h('<div class="timepicker-tick"></div>'),e=0;e<60;e+=5){var i=t.clone(),n=e/30*Math.PI;i.css({left:this.options.dialRadius+Math.sin(n)*this.options.outerRadius-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(n)*this.options.outerRadius-this.options.tickRadius+"px"}),i.html(f._addLeadingZero(e)),this.minutesView.appendChild(i[0])}}},{key:"_handleAmPmClick",value:function(t){var e=h(t.target);this.amOrPm=e.hasClass("am-btn")?"AM":"PM",this._updateAmPmView()}},{key:"_updateAmPmView",value:function(){this.options.twelveHour&&(this.$amBtn.toggleClass("text-primary","AM"===this.amOrPm),this.$pmBtn.toggleClass("text-primary","PM"===this.amOrPm))}},{key:"_updateTimeFromInput",value:function(){var t=((this.el.value||this.options.defaultTime||"")+"").split(":");if(this.options.twelveHour&&void 0!==t[1]&&(0<t[1].toUpperCase().indexOf("AM")?this.amOrPm="AM":this.amOrPm="PM",t[1]=t[1].replace("AM","").replace("PM","")),"now"===t[0]){var e=new Date(+new Date+this.options.fromNow);t=[e.getHours(),e.getMinutes()],this.options.twelveHour&&(this.amOrPm=12<=t[0]&&t[0]<24?"PM":"AM")}this.hours=+t[0]||0,this.minutes=+t[1]||0,this.spanHours.innerHTML=this.hours,this.spanMinutes.innerHTML=f._addLeadingZero(this.minutes),this._updateAmPmView()}},{key:"showView",value:function(t,e){"minutes"===t&&h(this.hoursView).css("visibility");var i="hours"===t,n=i?this.hoursView:this.minutesView,s=i?this.minutesView:this.hoursView;this.currentView=t,h(this.spanHours).toggleClass("text-primary",i),h(this.spanMinutes).toggleClass("text-primary",!i),s.classList.add("timepicker-dial-out"),h(n).css("visibility","visible").removeClass("timepicker-dial-out"),this.resetClock(e),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout(function(){h(s).css("visibility","hidden")},this.options.duration)}},{key:"resetClock",value:function(t){var e=this.currentView,i=this[e],n="hours"===e,s=i*(Math.PI/(n?6:30)),o=n&&0<i&&i<13?this.options.innerRadius:this.options.outerRadius,a=Math.sin(s)*o,r=-Math.cos(s)*o,l=this;t?(h(this.canvas).addClass("timepicker-canvas-out"),setTimeout(function(){h(l.canvas).removeClass("timepicker-canvas-out"),l.setHand(a,r)},t)):this.setHand(a,r)}},{key:"setHand",value:function(t,e,i){var n=this,s=Math.atan2(t,-e),o="hours"===this.currentView,a=Math.PI/(o||i?6:30),r=Math.sqrt(t*t+e*e),l=o&&r<(this.options.outerRadius+this.options.innerRadius)/2,h=l?this.options.innerRadius:this.options.outerRadius;this.options.twelveHour&&(h=this.options.outerRadius),s<0&&(s=2*Math.PI+s);var d=Math.round(s/a);s=d*a,this.options.twelveHour?o?0===d&&(d=12):(i&&(d*=5),60===d&&(d=0)):o?(12===d&&(d=0),d=l?0===d?12:d:0===d?0:d+12):(i&&(d*=5),60===d&&(d=0)),this[this.currentView]!==d&&this.vibrate&&this.options.vibrate&&(this.vibrateTimer||(navigator[this.vibrate](10),this.vibrateTimer=setTimeout(function(){n.vibrateTimer=null},100))),this[this.currentView]=d,o?this.spanHours.innerHTML=d:this.spanMinutes.innerHTML=f._addLeadingZero(d);var u=Math.sin(s)*(h-this.options.tickRadius),c=-Math.cos(s)*(h-this.options.tickRadius),p=Math.sin(s)*h,v=-Math.cos(s)*h;this.hand.setAttribute("x2",u),this.hand.setAttribute("y2",c),this.bg.setAttribute("cx",p),this.bg.setAttribute("cy",v)}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,this._updateTimeFromInput(),this.showView("hours"),this.modal.open())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.modal.close())}},{key:"done",value:function(t,e){var i=this.el.value,n=e?"":f._addLeadingZero(this.hours)+":"+f._addLeadingZero(this.minutes);this.time=n,!e&&this.options.twelveHour&&(n=n+" "+this.amOrPm),(this.el.value=n)!==i&&this.$el.trigger("change"),this.close(),this.el.focus()}},{key:"clear",value:function(){this.done(null,!0)}}],[{key:"init",value:function(t,e){return _get(f.__proto__||Object.getPrototypeOf(f),"init",this).call(this,this,t,e)}},{key:"_addLeadingZero",value:function(t){return(t<10?"0":"")+t}},{key:"_createSVGEl",value:function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}},{key:"_Pos",value:function(t){return t.targetTouches&&1<=t.targetTouches.length?{x:t.targetTouches[0].clientX,y:t.targetTouches[0].clientY}:{x:t.clientX,y:t.clientY}}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Timepicker}},{key:"defaults",get:function(){return e}}]),f}();t._template=['<div class= "modal timepicker-modal">','<div class="modal-content timepicker-container">','<div class="timepicker-digital-display">','<div class="timepicker-text-container">','<div class="timepicker-display-column">','<span class="timepicker-span-hours text-primary"></span>',":",'<span class="timepicker-span-minutes"></span>',"</div>",'<div class="timepicker-display-column timepicker-display-am-pm">','<div class="timepicker-span-am-pm"></div>',"</div>","</div>","</div>",'<div class="timepicker-analog-display">','<div class="timepicker-plate">','<div class="timepicker-canvas"></div>','<div class="timepicker-dial timepicker-hours"></div>','<div class="timepicker-dial timepicker-minutes timepicker-dial-out"></div>',"</div>",'<div class="timepicker-footer"></div>',"</div>","</div>","</div>"].join(""),M.Timepicker=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"timepicker","M_Timepicker")}(cash),function(s){"use strict";var e={},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_CharacterCounter=i).options=s.extend({},n.defaults,e),i.isInvalid=!1,i.isValidLength=!1,i._setupCounter(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.CharacterCounter=void 0,this._removeCounter()}},{key:"_setupEventHandlers",value:function(){this._handleUpdateCounterBound=this.updateCounter.bind(this),this.el.addEventListener("focus",this._handleUpdateCounterBound,!0),this.el.addEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("focus",this._handleUpdateCounterBound,!0),this.el.removeEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_setupCounter",value:function(){this.counterEl=document.createElement("span"),s(this.counterEl).addClass("character-counter").css({float:"right","font-size":"12px",height:1}),this.$el.parent().append(this.counterEl)}},{key:"_removeCounter",value:function(){s(this.counterEl).remove()}},{key:"updateCounter",value:function(){var t=+this.$el.attr("data-length"),e=this.el.value.length;this.isValidLength=e<=t;var i=e;t&&(i+="/"+t,this._validateInput()),s(this.counterEl).html(i)}},{key:"_validateInput",value:function(){this.isValidLength&&this.isInvalid?(this.isInvalid=!1,this.$el.removeClass("invalid")):this.isValidLength||this.isInvalid||(this.isInvalid=!0,this.$el.removeClass("valid"),this.$el.addClass("invalid"))}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_CharacterCounter}},{key:"defaults",get:function(){return e}}]),n}();M.CharacterCounter=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"characterCounter","M_CharacterCounter")}(cash),function(b){"use strict";var e={duration:200,dist:-100,shift:0,padding:0,numVisible:5,fullWidth:!1,indicators:!1,noWrap:!1,onCycleTo:null},t=function(t){function i(t,e){_classCallCheck(this,i);var n=_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,i,t,e));return(n.el.M_Carousel=n).options=b.extend({},i.defaults,e),n.hasMultipleSlides=1<n.$el.find(".carousel-item").length,n.showIndicators=n.options.indicators&&n.hasMultipleSlides,n.noWrap=n.options.noWrap||!n.hasMultipleSlides,n.pressed=!1,n.dragged=!1,n.offset=n.target=0,n.images=[],n.itemWidth=n.$el.find(".carousel-item").first().innerWidth(),n.itemHeight=n.$el.find(".carousel-item").first().innerHeight(),n.dim=2*n.itemWidth+n.options.padding||1,n._autoScrollBound=n._autoScroll.bind(n),n._trackBound=n._track.bind(n),n.options.fullWidth&&(n.options.dist=0,n._setCarouselHeight(),n.showIndicators&&n.$el.find(".carousel-fixed-item").addClass("with-indicators")),n.$indicators=b('<ul class="indicators"></ul>'),n.$el.find(".carousel-item").each(function(t,e){if(n.images.push(t),n.showIndicators){var i=b('<li class="indicator-item"></li>');0===e&&i[0].classList.add("active"),n.$indicators.append(i)}}),n.showIndicators&&n.$el.append(n.$indicators),n.count=n.images.length,n.options.numVisible=Math.min(n.count,n.options.numVisible),n.xform="transform",["webkit","Moz","O","ms"].every(function(t){var e=t+"Transform";return void 0===document.body.style[e]||(n.xform=e,!1)}),n._setupEventHandlers(),n._scroll(n.offset),n}return _inherits(i,Component),_createClass(i,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Carousel=void 0}},{key:"_setupEventHandlers",value:function(){var i=this;this._handleCarouselTapBound=this._handleCarouselTap.bind(this),this._handleCarouselDragBound=this._handleCarouselDrag.bind(this),this._handleCarouselReleaseBound=this._handleCarouselRelease.bind(this),this._handleCarouselClickBound=this._handleCarouselClick.bind(this),void 0!==window.ontouchstart&&(this.el.addEventListener("touchstart",this._handleCarouselTapBound),this.el.addEventListener("touchmove",this._handleCarouselDragBound),this.el.addEventListener("touchend",this._handleCarouselReleaseBound)),this.el.addEventListener("mousedown",this._handleCarouselTapBound),this.el.addEventListener("mousemove",this._handleCarouselDragBound),this.el.addEventListener("mouseup",this._handleCarouselReleaseBound),this.el.addEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.addEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&(this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.$indicators.find(".indicator-item").each(function(t,e){t.addEventListener("click",i._handleIndicatorClickBound)}));var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){var i=this;void 0!==window.ontouchstart&&(this.el.removeEventListener("touchstart",this._handleCarouselTapBound),this.el.removeEventListener("touchmove",this._handleCarouselDragBound),this.el.removeEventListener("touchend",this._handleCarouselReleaseBound)),this.el.removeEventListener("mousedown",this._handleCarouselTapBound),this.el.removeEventListener("mousemove",this._handleCarouselDragBound),this.el.removeEventListener("mouseup",this._handleCarouselReleaseBound),this.el.removeEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.removeEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&this.$indicators.find(".indicator-item").each(function(t,e){t.removeEventListener("click",i._handleIndicatorClickBound)}),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleCarouselTap",value:function(t){"mousedown"===t.type&&b(t.target).is("img")&&t.preventDefault(),this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this._xpos(t),this.referenceY=this._ypos(t),this.velocity=this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this._trackBound,100)}},{key:"_handleCarouselDrag",value:function(t){var e=void 0,i=void 0,n=void 0;if(this.pressed)if(e=this._xpos(t),i=this._ypos(t),n=this.reference-e,Math.abs(this.referenceY-i)<30&&!this.verticalDragged)(2<n||n<-2)&&(this.dragged=!0,this.reference=e,this._scroll(this.offset+n));else{if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1;this.verticalDragged=!0}if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1}},{key:"_handleCarouselRelease",value:function(t){if(this.pressed)return this.pressed=!1,clearInterval(this.ticker),this.target=this.offset,(10<this.velocity||this.velocity<-10)&&(this.amplitude=.9*this.velocity,this.target=this.offset+this.amplitude),this.target=Math.round(this.target/this.dim)*this.dim,this.noWrap&&(this.target>=this.dim*(this.count-1)?this.target=this.dim*(this.count-1):this.target<0&&(this.target=0)),this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound),this.dragged&&(t.preventDefault(),t.stopPropagation()),!1}},{key:"_handleCarouselClick",value:function(t){if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1;if(!this.options.fullWidth){var e=b(t.target).closest(".carousel-item").index();0!==this._wrap(this.center)-e&&(t.preventDefault(),t.stopPropagation()),this._cycleTo(e)}}},{key:"_handleIndicatorClick",value:function(t){t.stopPropagation();var e=b(t.target).closest(".indicator-item");e.length&&this._cycleTo(e.index())}},{key:"_handleResize",value:function(t){this.options.fullWidth?(this.itemWidth=this.$el.find(".carousel-item").first().innerWidth(),this.imageHeight=this.$el.find(".carousel-item.active").height(),this.dim=2*this.itemWidth+this.options.padding,this.offset=2*this.center*this.itemWidth,this.target=this.offset,this._setCarouselHeight(!0)):this._scroll()}},{key:"_setCarouselHeight",value:function(t){var i=this,e=this.$el.find(".carousel-item.active").length?this.$el.find(".carousel-item.active").first():this.$el.find(".carousel-item").first(),n=e.find("img").first();if(n.length)if(n[0].complete){var s=n.height();if(0<s)this.$el.css("height",s+"px");else{var o=n[0].naturalWidth,a=n[0].naturalHeight,r=this.$el.width()/o*a;this.$el.css("height",r+"px")}}else n.one("load",function(t,e){i.$el.css("height",t.offsetHeight+"px")});else if(!t){var l=e.height();this.$el.css("height",l+"px")}}},{key:"_xpos",value:function(t){return t.targetTouches&&1<=t.targetTouches.length?t.targetTouches[0].clientX:t.clientX}},{key:"_ypos",value:function(t){return t.targetTouches&&1<=t.targetTouches.length?t.targetTouches[0].clientY:t.clientY}},{key:"_wrap",value:function(t){return t>=this.count?t%this.count:t<0?this._wrap(this.count+t%this.count):t}},{key:"_track",value:function(){var t,e,i,n;e=(t=Date.now())-this.timestamp,this.timestamp=t,i=this.offset-this.frame,this.frame=this.offset,n=1e3*i/(1+e),this.velocity=.8*n+.2*this.velocity}},{key:"_autoScroll",value:function(){var t=void 0,e=void 0;this.amplitude&&(t=Date.now()-this.timestamp,2<(e=this.amplitude*Math.exp(-t/this.options.duration))||e<-2?(this._scroll(this.target-e),requestAnimationFrame(this._autoScrollBound)):this._scroll(this.target))}},{key:"_scroll",value:function(t){var e=this;this.$el.hasClass("scrolling")||this.el.classList.add("scrolling"),null!=this.scrollingTimeout&&window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=window.setTimeout(function(){e.$el.removeClass("scrolling")},this.options.duration);var i,n,s,o,a=void 0,r=void 0,l=void 0,h=void 0,d=void 0,u=void 0,c=this.center,p=1/this.options.numVisible;if(this.offset="number"==typeof t?t:this.offset,this.center=Math.floor((this.offset+this.dim/2)/this.dim),o=-(s=(n=this.offset-this.center*this.dim)<0?1:-1)*n*2/this.dim,i=this.count>>1,this.options.fullWidth?(l="translateX(0)",u=1):(l="translateX("+(this.el.clientWidth-this.itemWidth)/2+"px) ",l+="translateY("+(this.el.clientHeight-this.itemHeight)/2+"px)",u=1-p*o),this.showIndicators){var v=this.center%this.count,f=this.$indicators.find(".indicator-item.active");f.index()!==v&&(f.removeClass("active"),this.$indicators.find(".indicator-item").eq(v)[0].classList.add("active"))}if(!this.noWrap||0<=this.center&&this.center<this.count){r=this.images[this._wrap(this.center)],b(r).hasClass("active")||(this.$el.find(".carousel-item").removeClass("active"),r.classList.add("active"));var m=l+" translateX("+-n/2+"px) translateX("+s*this.options.shift*o*a+"px) translateZ("+this.options.dist*o+"px)";this._updateItemStyle(r,u,0,m)}for(a=1;a<=i;++a){if(this.options.fullWidth?(h=this.options.dist,d=a===i&&n<0?1-o:1):(h=this.options.dist*(2*a+o*s),d=1-p*(2*a+o*s)),!this.noWrap||this.center+a<this.count){r=this.images[this._wrap(this.center+a)];var g=l+" translateX("+(this.options.shift+(this.dim*a-n)/2)+"px) translateZ("+h+"px)";this._updateItemStyle(r,d,-a,g)}if(this.options.fullWidth?(h=this.options.dist,d=a===i&&0<n?1-o:1):(h=this.options.dist*(2*a-o*s),d=1-p*(2*a-o*s)),!this.noWrap||0<=this.center-a){r=this.images[this._wrap(this.center-a)];var _=l+" translateX("+(-this.options.shift+(-this.dim*a-n)/2)+"px) translateZ("+h+"px)";this._updateItemStyle(r,d,-a,_)}}if(!this.noWrap||0<=this.center&&this.center<this.count){r=this.images[this._wrap(this.center)];var y=l+" translateX("+-n/2+"px) translateX("+s*this.options.shift*o+"px) translateZ("+this.options.dist*o+"px)";this._updateItemStyle(r,u,0,y)}var k=this.$el.find(".carousel-item").eq(this._wrap(this.center));c!==this.center&&"function"==typeof this.options.onCycleTo&&this.options.onCycleTo.call(this,k[0],this.dragged),"function"==typeof this.oneTimeCallback&&(this.oneTimeCallback.call(this,k[0],this.dragged),this.oneTimeCallback=null)}},{key:"_updateItemStyle",value:function(t,e,i,n){t.style[this.xform]=n,t.style.zIndex=i,t.style.opacity=e,t.style.visibility="visible"}},{key:"_cycleTo",value:function(t,e){var i=this.center%this.count-t;this.noWrap||(i<0?Math.abs(i+this.count)<Math.abs(i)&&(i+=this.count):0<i&&Math.abs(i-this.count)<i&&(i-=this.count)),this.target=this.dim*Math.round(this.offset/this.dim),i<0?this.target+=this.dim*Math.abs(i):0<i&&(this.target-=this.dim*i),"function"==typeof e&&(this.oneTimeCallback=e),this.offset!==this.target&&(this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound))}},{key:"next",value:function(t){(void 0===t||isNaN(t))&&(t=1);var e=this.center+t;if(e>=this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:"prev",value:function(t){(void 0===t||isNaN(t))&&(t=1);var e=this.center-t;if(e>=this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:"set",value:function(t,e){if((void 0===t||isNaN(t))&&(t=0),t>this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t,e)}}],[{key:"init",value:function(t,e){return _get(i.__proto__||Object.getPrototypeOf(i),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Carousel}},{key:"defaults",get:function(){return e}}]),i}();M.Carousel=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"carousel","M_Carousel")}(cash),function(S){"use strict";var e={onOpen:void 0,onClose:void 0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_TapTarget=i).options=S.extend({},n.defaults,e),i.isOpen=!1,i.$origin=S("#"+i.$el.attr("data-target")),i._setup(),i._calculatePositioning(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.TapTarget=void 0}},{key:"_setupEventHandlers",value:function(){this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleTargetClickBound=this._handleTargetClick.bind(this),this._handleOriginClickBound=this._handleOriginClick.bind(this),this.el.addEventListener("click",this._handleTargetClickBound),this.originEl.addEventListener("click",this._handleOriginClickBound);var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleTargetClickBound),this.originEl.removeEventListener("click",this._handleOriginClickBound),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleTargetClick",value:function(t){this.open()}},{key:"_handleOriginClick",value:function(t){this.close()}},{key:"_handleResize",value:function(t){this._calculatePositioning()}},{key:"_handleDocumentClick",value:function(t){S(t.target).closest(".tap-target-wrapper").length||(this.close(),t.preventDefault(),t.stopPropagation())}},{key:"_setup",value:function(){this.wrapper=this.$el.parent()[0],this.waveEl=S(this.wrapper).find(".tap-target-wave")[0],this.originEl=S(this.wrapper).find(".tap-target-origin")[0],this.contentEl=this.$el.find(".tap-target-content")[0],S(this.wrapper).hasClass(".tap-target-wrapper")||(this.wrapper=document.createElement("div"),this.wrapper.classList.add("tap-target-wrapper"),this.$el.before(S(this.wrapper)),this.wrapper.append(this.el)),this.contentEl||(this.contentEl=document.createElement("div"),this.contentEl.classList.add("tap-target-content"),this.$el.append(this.contentEl)),this.waveEl||(this.waveEl=document.createElement("div"),this.waveEl.classList.add("tap-target-wave"),this.originEl||(this.originEl=this.$origin.clone(!0,!0),this.originEl.addClass("tap-target-origin"),this.originEl.removeAttr("id"),this.originEl.removeAttr("style"),this.originEl=this.originEl[0],this.waveEl.append(this.originEl)),this.wrapper.append(this.waveEl))}},{key:"_calculatePositioning",value:function(){var t="fixed"===this.$origin.css("position");if(!t)for(var e=this.$origin.parents(),i=0;i<e.length&&!(t="fixed"==S(e[i]).css("position"));i++);var n=this.$origin.outerWidth(),s=this.$origin.outerHeight(),o=t?this.$origin.offset().top-M.getDocumentScrollTop():this.$origin.offset().top,a=t?this.$origin.offset().left-M.getDocumentScrollLeft():this.$origin.offset().left,r=window.innerWidth,l=window.innerHeight,h=r/2,d=l/2,u=a<=h,c=h<a,p=o<=d,v=d<o,f=.25*r<=a&&a<=.75*r,m=this.$el.outerWidth(),g=this.$el.outerHeight(),_=o+s/2-g/2,y=a+n/2-m/2,k=t?"fixed":"absolute",b=f?m:m/2+n,w=g/2,C=p?g/2:0,E=u&&!f?m/2-n:0,O=n,x=v?"bottom":"top",L=2*n,T=L,$=g/2-T/2,B=m/2-L/2,D={};D.top=p?_+"px":"",D.right=c?r-y-m+"px":"",D.bottom=v?l-_-g+"px":"",D.left=u?y+"px":"",D.position=k,S(this.wrapper).css(D),S(this.contentEl).css({width:b+"px",height:w+"px",top:C+"px",right:"0px",bottom:"0px",left:E+"px",padding:O+"px",verticalAlign:x}),S(this.waveEl).css({top:$+"px",left:B+"px",width:L+"px",height:T+"px"})}},{key:"open",value:function(){this.isOpen||("function"==typeof this.options.onOpen&&this.options.onOpen.call(this,this.$origin[0]),this.isOpen=!0,this.wrapper.classList.add("open"),document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound))}},{key:"close",value:function(){this.isOpen&&("function"==typeof this.options.onClose&&this.options.onClose.call(this,this.$origin[0]),this.isOpen=!1,this.wrapper.classList.remove("open"),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound))}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_TapTarget}},{key:"defaults",get:function(){return e}}]),n}();M.TapTarget=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"tapTarget","M_TapTarget")}(cash),function(d){"use strict";var e={classes:"",dropdownOptions:{}},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return i.$el.hasClass("browser-default")?_possibleConstructorReturn(i):((i.el.M_FormSelect=i).options=d.extend({},n.defaults,e),i.isMultiple=i.$el.prop("multiple"),i.el.tabIndex=-1,i._keysSelected={},i._valueDict={},i._setupDropdown(),i._setupEventHandlers(),i)}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_FormSelect=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleSelectChangeBound=this._handleSelectChange.bind(this),this._handleOptionClickBound=this._handleOptionClick.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),d(this.dropdownOptions).find("li:not(.optgroup)").each(function(t){t.addEventListener("click",e._handleOptionClickBound)}),this.el.addEventListener("change",this._handleSelectChangeBound),this.input.addEventListener("click",this._handleInputClickBound)}},{key:"_removeEventHandlers",value:function(){var e=this;d(this.dropdownOptions).find("li:not(.optgroup)").each(function(t){t.removeEventListener("click",e._handleOptionClickBound)}),this.el.removeEventListener("change",this._handleSelectChangeBound),this.input.removeEventListener("click",this._handleInputClickBound)}},{key:"_handleSelectChange",value:function(t){this._setValueToInput()}},{key:"_handleOptionClick",value:function(t){t.preventDefault();var e=d(t.target).closest("li")[0],i=e.id;if(!d(e).hasClass("disabled")&&!d(e).hasClass("optgroup")&&i.length){var n=!0;if(this.isMultiple){var s=d(this.dropdownOptions).find("li.disabled.selected");s.length&&(s.removeClass("selected"),s.find('input[type="checkbox"]').prop("checked",!1),this._toggleEntryFromArray(s[0].id)),n=this._toggleEntryFromArray(i)}else d(this.dropdownOptions).find("li").removeClass("selected"),d(e).toggleClass("selected",n);d(this._valueDict[i].el).prop("selected")!==n&&(d(this._valueDict[i].el).prop("selected",n),this.$el.trigger("change"))}t.stopPropagation()}},{key:"_handleInputClick",value:function(){this.dropdown&&this.dropdown.isOpen&&(this._setValueToInput(),this._setSelectedStates())}},{key:"_setupDropdown",value:function(){var n=this;this.wrapper=document.createElement("div"),d(this.wrapper).addClass("select-wrapper "+this.options.classes),this.$el.before(d(this.wrapper)),this.wrapper.appendChild(this.el),this.el.disabled&&this.wrapper.classList.add("disabled"),this.$selectOptions=this.$el.children("option, optgroup"),this.dropdownOptions=document.createElement("ul"),this.dropdownOptions.id="select-options-"+M.guid(),d(this.dropdownOptions).addClass("dropdown-content select-dropdown "+(this.isMultiple?"multiple-select-dropdown":"")),this.$selectOptions.length&&this.$selectOptions.each(function(t){if(d(t).is("option")){var e=void 0;e=n.isMultiple?n._appendOptionWithIcon(n.$el,t,"multiple"):n._appendOptionWithIcon(n.$el,t),n._addOptionToValueDict(t,e)}else if(d(t).is("optgroup")){var i=d(t).children("option");d(n.dropdownOptions).append(d('<li class="optgroup"><span>'+t.getAttribute("label")+"</span></li>")[0]),i.each(function(t){var e=n._appendOptionWithIcon(n.$el,t,"optgroup-option");n._addOptionToValueDict(t,e)})}}),this.$el.after(this.dropdownOptions),this.input=document.createElement("input"),d(this.input).addClass("select-dropdown dropdown-trigger"),this.input.setAttribute("type","text"),this.input.setAttribute("readonly","true"),this.input.setAttribute("data-target",this.dropdownOptions.id),this.el.disabled&&d(this.input).prop("disabled","true"),this.$el.before(this.input),this._setValueToInput();var t=d('<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');if(this.$el.before(t[0]),!this.el.disabled){var e=d.extend({},this.options.dropdownOptions);e.onOpenEnd=function(t){var e=d(n.dropdownOptions).find(".selected").first();if(e.length&&(M.keyDown=!0,n.dropdown.focusedIndex=e.index(),n.dropdown._focusFocusedItem(),M.keyDown=!1,n.dropdown.isScrollable)){var i=e[0].getBoundingClientRect().top-n.dropdownOptions.getBoundingClientRect().top;i-=n.dropdownOptions.clientHeight/2,n.dropdownOptions.scrollTop=i}},this.isMultiple&&(e.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,e)}this._setSelectedStates()}},{key:"_addOptionToValueDict",value:function(t,e){var i=Object.keys(this._valueDict).length,n=this.dropdownOptions.id+i,s={};e.id=n,s.el=t,s.optionEl=e,this._valueDict[n]=s}},{key:"_removeDropdown",value:function(){d(this.wrapper).find(".caret").remove(),d(this.input).remove(),d(this.dropdownOptions).remove(),d(this.wrapper).before(this.$el),d(this.wrapper).remove()}},{key:"_appendOptionWithIcon",value:function(t,e,i){var n=e.disabled?"disabled ":"",s="optgroup-option"===i?"optgroup-option ":"",o=this.isMultiple?'<label><input type="checkbox"'+n+'"/><span>'+e.innerHTML+"</span></label>":e.innerHTML,a=d("<li></li>"),r=d("<span></span>");r.html(o),a.addClass(n+" "+s),a.append(r);var l=e.getAttribute("data-icon");if(l){var h=d('<img alt="" src="'+l+'">');a.prepend(h)}return d(this.dropdownOptions).append(a[0]),a[0]}},{key:"_toggleEntryFromArray",value:function(t){var e=!this._keysSelected.hasOwnProperty(t),i=d(this._valueDict[t].optionEl);return e?this._keysSelected[t]=!0:delete this._keysSelected[t],i.toggleClass("selected",e),i.find('input[type="checkbox"]').prop("checked",e),i.prop("selected",e),e}},{key:"_setValueToInput",value:function(){var i=[];if(this.$el.find("option").each(function(t){if(d(t).prop("selected")){var e=d(t).text();i.push(e)}}),!i.length){var t=this.$el.find("option:disabled").eq(0);t.length&&""===t[0].value&&i.push(t.text())}this.input.value=i.join(", ")}},{key:"_setSelectedStates",value:function(){for(var t in this._keysSelected={},this._valueDict){var e=this._valueDict[t],i=d(e.el).prop("selected");d(e.optionEl).find('input[type="checkbox"]').prop("checked",i),i?(this._activateOption(d(this.dropdownOptions),d(e.optionEl)),this._keysSelected[t]=!0):d(e.optionEl).removeClass("selected")}}},{key:"_activateOption",value:function(t,e){e&&(this.isMultiple||t.find("li.selected").removeClass("selected"),d(e).addClass("selected"))}},{key:"getSelectedValues",value:function(){var t=[];for(var e in this._keysSelected)t.push(this._valueDict[e].el.value);return t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_FormSelect}},{key:"defaults",get:function(){return e}}]),n}();M.FormSelect=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"formSelect","M_FormSelect")}(cash),function(s,e){"use strict";var i={},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Range=i).options=s.extend({},n.defaults,e),i._mousedown=!1,i._setupThumb(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeThumb(),this.el.M_Range=void 0}},{key:"_setupEventHandlers",value:function(){this._handleRangeChangeBound=this._handleRangeChange.bind(this),this._handleRangeMousedownTouchstartBound=this._handleRangeMousedownTouchstart.bind(this),this._handleRangeInputMousemoveTouchmoveBound=this._handleRangeInputMousemoveTouchmove.bind(this),this._handleRangeMouseupTouchendBound=this._handleRangeMouseupTouchend.bind(this),this._handleRangeBlurMouseoutTouchleaveBound=this._handleRangeBlurMouseoutTouchleave.bind(this),this.el.addEventListener("change",this._handleRangeChangeBound),this.el.addEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.addEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.addEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("change",this._handleRangeChangeBound),this.el.removeEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_handleRangeChange",value:function(){s(this.value).html(this.$el.val()),s(this.thumb).hasClass("active")||this._showRangeBubble();var t=this._calcRangeOffset();s(this.thumb).addClass("active").css("left",t+"px")}},{key:"_handleRangeMousedownTouchstart",value:function(t){if(s(this.value).html(this.$el.val()),this._mousedown=!0,this.$el.addClass("active"),s(this.thumb).hasClass("active")||this._showRangeBubble(),"input"!==t.type){var e=this._calcRangeOffset();s(this.thumb).addClass("active").css("left",e+"px")}}},{key:"_handleRangeInputMousemoveTouchmove",value:function(){if(this._mousedown){s(this.thumb).hasClass("active")||this._showRangeBubble();var t=this._calcRangeOffset();s(this.thumb).addClass("active").css("left",t+"px"),s(this.value).html(this.$el.val())}}},{key:"_handleRangeMouseupTouchend",value:function(){this._mousedown=!1,this.$el.removeClass("active")}},{key:"_handleRangeBlurMouseoutTouchleave",value:function(){if(!this._mousedown){var t=7+parseInt(this.$el.css("padding-left"))+"px";s(this.thumb).hasClass("active")&&(e.remove(this.thumb),e({targets:this.thumb,height:0,width:0,top:10,easing:"easeOutQuad",marginLeft:t,duration:100})),s(this.thumb).removeClass("active")}}},{key:"_setupThumb",value:function(){this.thumb=document.createElement("span"),this.value=document.createElement("span"),s(this.thumb).addClass("thumb"),s(this.value).addClass("value"),s(this.thumb).append(this.value),this.$el.after(this.thumb)}},{key:"_removeThumb",value:function(){s(this.thumb).remove()}},{key:"_showRangeBubble",value:function(){var t=-7+parseInt(s(this.thumb).parent().css("padding-left"))+"px";e.remove(this.thumb),e({targets:this.thumb,height:30,width:30,top:-30,marginLeft:t,duration:300,easing:"easeOutQuint"})}},{key:"_calcRangeOffset",value:function(){var t=this.$el.width()-15,e=parseFloat(this.$el.attr("max"))||100,i=parseFloat(this.$el.attr("min"))||0;return(parseFloat(this.$el.val())-i)/(e-i)*t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Range}},{key:"defaults",get:function(){return i}}]),n}();M.Range=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"range","M_Range"),t.init(s("input[type=range]"))}(cash,M.anime);
1
+ // v1.0.0
2
+ var _get=function t(e,i,n){null===e&&(e=Function.prototype);var s=Object.getOwnPropertyDescriptor(e,i);if(void 0===s){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,n)}if("value"in s)return s.value;var a=s.get;return void 0!==a?a.call(n):void 0},_createClass=function(){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}}();function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}window.cash=function(){var i,o=document,a=window,t=Array.prototype,r=t.slice,n=t.filter,s=t.push,e=function(){},h=function(t){return typeof t==typeof e&&t.call},d=function(t){return"string"==typeof t},l=/^#[\w-]*$/,u=/^\.[\w-]*$/,c=/<.+>/,p=/^\w+$/;function v(t,e){e=e||o;var i=u.test(t)?e.getElementsByClassName(t.slice(1)):p.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t);return i}function f(t){if(!i){var e=(i=o.implementation.createHTMLDocument(null)).createElement("base");e.href=o.location.href,i.head.appendChild(e)}return i.body.innerHTML=t,i.body.childNodes}function m(t){"loading"!==o.readyState?t():o.addEventListener("DOMContentLoaded",t)}function g(t,e){if(!t)return this;if(t.cash&&t!==a)return t;var i,n=t,s=0;if(d(t))n=l.test(t)?o.getElementById(t.slice(1)):c.test(t)?f(t):v(t,e);else if(h(t))return m(t),this;if(!n)return this;if(n.nodeType||n===a)this[0]=n,this.length=1;else for(i=this.length=n.length;s<i;s++)this[s]=n[s];return this}function _(t,e){return new g(t,e)}var y=_.fn=_.prototype=g.prototype={cash:!0,length:0,push:s,splice:t.splice,map:t.map,init:g};function k(t,e){for(var i=t.length,n=0;n<i&&!1!==e.call(t[n],t[n],n,t);n++);}function b(t,e){var i=t&&(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector);return!!i&&i.call(t,e)}function w(e){return d(e)?b:e.cash?function(t){return e.is(t)}:function(t,e){return t===e}}function C(t){return _(r.call(t).filter(function(t,e,i){return i.indexOf(t)===e}))}Object.defineProperty(y,"constructor",{value:_}),_.parseHTML=f,_.noop=e,_.isFunction=h,_.isString=d,_.extend=y.extend=function(t){t=t||{};var e=r.call(arguments),i=e.length,n=1;for(1===e.length&&(t=this,n=0);n<i;n++)if(e[n])for(var s in e[n])e[n].hasOwnProperty(s)&&(t[s]=e[n][s]);return t},_.extend({merge:function(t,e){for(var i=+e.length,n=t.length,s=0;s<i;n++,s++)t[n]=e[s];return t.length=n,t},each:k,matches:b,unique:C,isArray:Array.isArray,isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)}});var E=_.uid="_cash"+Date.now();function M(t){return t[E]=t[E]||{}}function O(t,e,i){return M(t)[e]=i}function x(t,e){var i=M(t);return void 0===i[e]&&(i[e]=t.dataset?t.dataset[e]:_(t).attr("data-"+e)),i[e]}y.extend({data:function(e,i){if(d(e))return void 0===i?x(this[0],e):this.each(function(t){return O(t,e,i)});for(var t in e)this.data(t,e[t]);return this},removeData:function(s){return this.each(function(t){return i=s,void((n=M(e=t))?delete n[i]:e.dataset?delete e.dataset[i]:_(e).removeAttr("data-"+name));var e,i,n})}});var L=/\S+/g;function T(t){return d(t)&&t.match(L)}function $(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)}function B(t,e,i){t.classList?t.classList.add(e):i.indexOf(" "+e+" ")&&(t.className+=" "+e)}function D(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(e,"")}y.extend({addClass:function(t){var n=T(t);return n?this.each(function(e){var i=" "+e.className+" ";k(n,function(t){B(e,t,i)})}):this},attr:function(e,i){if(e){if(d(e))return void 0===i?this[0]?this[0].getAttribute?this[0].getAttribute(e):this[0][e]:void 0:this.each(function(t){t.setAttribute?t.setAttribute(e,i):t[e]=i});for(var t in e)this.attr(t,e[t]);return this}},hasClass:function(t){var e=!1,i=T(t);return i&&i.length&&this.each(function(t){return!(e=$(t,i[0]))}),e},prop:function(e,i){if(d(e))return void 0===i?this[0][e]:this.each(function(t){t[e]=i});for(var t in e)this.prop(t,e[t]);return this},removeAttr:function(e){return this.each(function(t){t.removeAttribute?t.removeAttribute(e):delete t[e]})},removeClass:function(t){if(!arguments.length)return this.attr("class","");var i=T(t);return i?this.each(function(e){k(i,function(t){D(e,t)})}):this},removeProp:function(e){return this.each(function(t){delete t[e]})},toggleClass:function(t,e){if(void 0!==e)return this[e?"addClass":"removeClass"](t);var n=T(t);return n?this.each(function(e){var i=" "+e.className+" ";k(n,function(t){$(e,t)?D(e,t):B(e,t,i)})}):this}}),y.extend({add:function(t,e){return C(_.merge(this,_(t,e)))},each:function(t){return k(this,t),this},eq:function(t){return _(this.get(t))},filter:function(e){if(!e)return this;var i=h(e)?e:w(e);return _(n.call(this,function(t){return i(t,e)}))},first:function(){return this.eq(0)},get:function(t){return void 0===t?r.call(this):t<0?this[t+this.length]:this[t]},index:function(t){var e=t?_(t)[0]:this[0],i=t?this:_(e).parent().children();return r.call(i).indexOf(e)},last:function(){return this.eq(-1)}});var S,I,A,R,H,P,W=(H=/(?:^\w|[A-Z]|\b\w)/g,P=/[\s-_]+/g,function(t){return t.replace(H,function(t,e){return t[0===e?"toLowerCase":"toUpperCase"]()}).replace(P,"")}),j=(S={},I=document,A=I.createElement("div"),R=A.style,function(e){if(e=W(e),S[e])return S[e];var t=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+["webkit","moz","ms","o"].join(t+" ")+t).split(" ");return k(i,function(t){if(t in R)return S[t]=e=S[e]=t,!1}),S[e]});function F(t,e){return parseInt(a.getComputedStyle(t[0],null)[e],10)||0}function q(e,i,t){var n,s=x(e,"_cashEvents"),o=s&&s[i];o&&(t?(e.removeEventListener(i,t),0<=(n=o.indexOf(t))&&o.splice(n,1)):(k(o,function(t){e.removeEventListener(i,t)}),o=[]))}function N(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function z(t){var e,i,n,s=t.type;if(!s)return null;switch(s.toLowerCase()){case"select-one":return 0<=(n=(i=t).selectedIndex)?i.options[n].value:null;case"select-multiple":return e=[],k(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null;case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function V(e,i,n){var t=d(i);t||!i.length?k(e,t?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",i)}:function(t,e){return function(t,e,i){if(i){var n=t.childNodes[0];t.insertBefore(e,n)}else t.appendChild(e)}(t,0===e?i:i.cloneNode(!0),n)}):k(i,function(t){return V(e,t,n)})}_.prefixedProp=j,_.camelCase=W,y.extend({css:function(e,i){if(d(e))return e=j(e),1<arguments.length?this.each(function(t){return t.style[e]=i}):a.getComputedStyle(this[0])[e];for(var t in e)this.css(t,e[t]);return this}}),k(["Width","Height"],function(e){var t=e.toLowerCase();y[t]=function(){return this[0].getBoundingClientRect()[t]},y["inner"+e]=function(){return this[0]["client"+e]},y["outer"+e]=function(t){return this[0]["offset"+e]+(t?F(this,"margin"+("Width"===e?"Left":"Top"))+F(this,"margin"+("Width"===e?"Right":"Bottom")):0)}}),y.extend({off:function(e,i){return this.each(function(t){return q(t,e,i)})},on:function(a,i,r,l){var n;if(!d(a)){for(var t in a)this.on(t,i,a[t]);return this}return h(i)&&(r=i,i=null),"ready"===a?(m(r),this):(i&&(n=r,r=function(t){for(var e=t.target;!b(e,i);){if(e===this||null===e)return e=!1;e=e.parentNode}e&&n.call(e,t)}),this.each(function(t){var e,i,n,s,o=r;l&&(o=function(){r.apply(this,arguments),q(t,a,o)}),i=a,n=o,(s=x(e=t,"_cashEvents")||O(e,"_cashEvents",{}))[i]=s[i]||[],s[i].push(n),e.addEventListener(i,n)}))},one:function(t,e,i){return this.on(t,e,i,!0)},ready:m,trigger:function(t,e){if(document.createEvent){var i=document.createEvent("HTMLEvents");return i.initEvent(t,!0,!1),i=this.extend(i,e),this.each(function(t){return t.dispatchEvent(i)})}}}),y.extend({serialize:function(){var s="";return k(this[0].elements||this,function(t){if(!t.disabled&&"FIELDSET"!==t.tagName){var e=t.name;switch(t.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var i=z(t);null!==i&&k(i,function(t){s+=N(e,t)});break;default:var n=z(t);null!==n&&(s+=N(e,n))}}}),s.substr(1)},val:function(e){return void 0===e?z(this[0]):this.each(function(t){return t.value=e})}}),y.extend({after:function(t){return _(t).insertAfter(this),this},append:function(t){return V(this,t),this},appendTo:function(t){return V(_(t),this),this},before:function(t){return _(t).insertBefore(this),this},clone:function(){return _(this.map(function(t){return t.cloneNode(!0)}))},empty:function(){return this.html(""),this},html:function(t){if(void 0===t)return this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each(function(t){return t.innerHTML=e})},insertAfter:function(t){var s=this;return _(t).each(function(t,e){var i=t.parentNode,n=t.nextSibling;s.each(function(t){i.insertBefore(0===e?t:t.cloneNode(!0),n)})}),this},insertBefore:function(t){var s=this;return _(t).each(function(e,i){var n=e.parentNode;s.each(function(t){n.insertBefore(0===i?t:t.cloneNode(!0),e)})}),this},prepend:function(t){return V(this,t,!0),this},prependTo:function(t){return V(_(t),this,!0),this},remove:function(){return this.each(function(t){if(t.parentNode)return t.parentNode.removeChild(t)})},text:function(e){return void 0===e?this[0].textContent:this.each(function(t){return t.textContent=e})}});var X=o.documentElement;return y.extend({position:function(){var t=this[0];return{left:t.offsetLeft,top:t.offsetTop}},offset:function(){var t=this[0].getBoundingClientRect();return{top:t.top+a.pageYOffset-X.clientTop,left:t.left+a.pageXOffset-X.clientLeft}},offsetParent:function(){return _(this[0].offsetParent)}}),y.extend({children:function(e){var i=[];return this.each(function(t){s.apply(i,t.children)}),i=C(i),e?i.filter(function(t){return b(t,e)}):i},closest:function(t){return!t||this.length<1?_():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(e){if(!e)return!1;var i=!1,n=w(e);return this.each(function(t){return!(i=n(t,e))}),i},find:function(e){if(!e||e.nodeType)return _(e&&this.has(e).length?e:null);var i=[];return this.each(function(t){s.apply(i,v(e,t))}),C(i)},has:function(e){var t=d(e)?function(t){return 0!==v(e,t).length}:function(t){return t.contains(e)};return this.filter(t)},next:function(){return _(this[0].nextElementSibling)},not:function(e){if(!e)return this;var i=w(e);return this.filter(function(t){return!i(t,e)})},parent:function(){var e=[];return this.each(function(t){t&&t.parentNode&&e.push(t.parentNode)}),C(e)},parents:function(e){var i,n=[];return this.each(function(t){for(i=t;i&&i.parentNode&&i!==o.body.parentNode;)i=i.parentNode,(!e||e&&b(i,e))&&n.push(i)}),C(n)},prev:function(){return _(this[0].previousElementSibling)},siblings:function(t){var e=this.parent().children(t),i=this[0];return e.filter(function(t){return t!==i})}}),_}();var Component=function(){function s(t,e,i){_classCallCheck(this,s),e instanceof Element||console.error(Error(e+" is not an HTML Element"));var n=t.getInstance(e);n&&n.destroy(),this.el=e,this.$el=cash(e)}return _createClass(s,null,[{key:"init",value:function(t,e,i){var n=null;if(e instanceof Element)n=new t(e,i);else if(e&&(e.jquery||e.cash||e instanceof NodeList)){for(var s=[],o=0;o<e.length;o++)s.push(new t(e[o],i));n=s}return n}}]),s}();!function(t){t.Package?M={}:t.M={},M.jQueryLoaded=!!t.jQuery}(window),"function"==typeof define&&define.amd?define("M",[],function(){return M}):"undefined"==typeof exports||exports.nodeType||("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=M),exports.default=M),M.version="1.0.0",M.keys={TAB:9,ENTER:13,ESC:27,ARROW_UP:38,ARROW_DOWN:40},M.tabPressed=!1,M.keyDown=!1;var docHandleKeydown=function(t){M.keyDown=!0,t.which!==M.keys.TAB&&t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||(M.tabPressed=!0)},docHandleKeyup=function(t){M.keyDown=!1,t.which!==M.keys.TAB&&t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||(M.tabPressed=!1)},docHandleFocus=function(t){M.keyDown&&document.body.classList.add("keyboard-focused")},docHandleBlur=function(t){document.body.classList.remove("keyboard-focused")};document.addEventListener("keydown",docHandleKeydown,!0),document.addEventListener("keyup",docHandleKeyup,!0),document.addEventListener("focus",docHandleFocus,!0),document.addEventListener("blur",docHandleBlur,!0),M.initializeJqueryWrapper=function(n,s,o){jQuery.fn[s]=function(e){if(n.prototype[e]){var i=Array.prototype.slice.call(arguments,1);if("get"===e.slice(0,3)){var t=this.first()[0][o];return t[e].apply(t,i)}return this.each(function(){var t=this[o];t[e].apply(t,i)})}if("object"==typeof e||!e)return n.init(this,e),this;
3
+ // jQuery.error("Method "+e+" does not exist on jQuery."+s)
4
+ }},M.AutoInit=function(t){var e=t||document.body,i={Autocomplete:e.querySelectorAll(".autocomplete:not(.no-autoinit)"),Carousel:e.querySelectorAll(".carousel:not(.no-autoinit)"),Chips:e.querySelectorAll(".chips:not(.no-autoinit)"),Collapsible:e.querySelectorAll(".collapsible:not(.no-autoinit)"),Datepicker:e.querySelectorAll(".datepicker:not(.no-autoinit)"),Dropdown:e.querySelectorAll(".dropdown-trigger:not(.no-autoinit)"),Materialbox:e.querySelectorAll(".materialboxed:not(.no-autoinit)"),Modal:e.querySelectorAll(".modal:not(.no-autoinit)"),Parallax:e.querySelectorAll(".parallax:not(.no-autoinit)"),Pushpin:e.querySelectorAll(".pushpin:not(.no-autoinit)"),ScrollSpy:e.querySelectorAll(".scrollspy:not(.no-autoinit)"),FormSelect:e.querySelectorAll("select:not(.no-autoinit)"),Sidenav:e.querySelectorAll(".sidenav:not(.no-autoinit)"),Tabs:e.querySelectorAll(".tabs:not(.no-autoinit)"),TapTarget:e.querySelectorAll(".tap-target:not(.no-autoinit)"),Timepicker:e.querySelectorAll(".timepicker:not(.no-autoinit)"),Tooltip:e.querySelectorAll(".tooltipped:not(.no-autoinit)"),FloatingActionButton:e.querySelectorAll(".fixed-action-btn:not(.no-autoinit)")};for(var n in i){M[n].init(i[n])}},M.objectSelectorString=function(t){return((t.prop("tagName")||"")+(t.attr("id")||"")+(t.attr("class")||"")).replace(/\s/g,"")},M.guid=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}(),M.escapeHash=function(t){return t.replace(/(:|\.|\[|\]|,|=|\/)/g,"\\$1")},M.elementOrParentIsFixed=function(t){var e=$(t),i=e.add(e.parents()),n=!1;return i.each(function(){if("fixed"===$(this).css("position"))return!(n=!0)}),n},M.checkWithinContainer=function(t,e,i){var n={top:!1,right:!1,bottom:!1,left:!1},s=t.getBoundingClientRect(),o=t===document.body?Math.max(s.bottom,window.innerHeight):s.bottom,a=t.scrollLeft,r=t.scrollTop,l=e.left-a,h=e.top-r;return(l<s.left+i||l<i)&&(n.left=!0),(l+e.width>s.right-i||l+e.width>window.innerWidth-i)&&(n.right=!0),(h<s.top+i||h<i)&&(n.top=!0),(h+e.height>o-i||h+e.height>window.innerHeight-i)&&(n.bottom=!0),n},M.checkPossibleAlignments=function(t,e,i,n){var s={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},o="visible"===getComputedStyle(e).overflow,a=e.getBoundingClientRect(),r=Math.min(a.height,window.innerHeight),l=Math.min(a.width,window.innerWidth),h=t.getBoundingClientRect(),d=e.scrollLeft,u=e.scrollTop,c=i.left-d,p=i.top-u,v=i.top+h.height-u;return s.spaceOnRight=o?window.innerWidth-(h.left+i.width):l-(c+i.width),s.spaceOnRight<0&&(s.left=!1),s.spaceOnLeft=o?h.right-i.width:c-i.width+h.width,s.spaceOnLeft<0&&(s.right=!1),s.spaceOnBottom=o?window.innerHeight-(h.top+i.height+n):r-(p+i.height+n),s.spaceOnBottom<0&&(s.top=!1),s.spaceOnTop=o?h.bottom-(i.height+n):v-(i.height-n),s.spaceOnTop<0&&(s.bottom=!1),s},M.getOverflowParent=function(t){return null==t?null:t===document.body||"visible"!==getComputedStyle(t).overflow?t:M.getOverflowParent(t.parentElement)},M.getIdFromTrigger=function(t){var e=t.getAttribute("data-target");return e||(e=(e=t.getAttribute("href"))?e.slice(1):""),e},M.getDocumentScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},M.getDocumentScrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};var getTime=Date.now||function(){return(new Date).getTime()};M.throttle=function(i,n,s){var o=void 0,a=void 0,r=void 0,l=null,h=0;s||(s={});var d=function(){h=!1===s.leading?0:getTime(),l=null,r=i.apply(o,a),o=a=null};return function(){var t=getTime();h||!1!==s.leading||(h=t);var e=n-(t-h);return o=this,a=arguments,e<=0?(clearTimeout(l),l=null,h=t,r=i.apply(o,a),o=a=null):l||!1===s.trailing||(l=setTimeout(d,e)),r}};var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,i){if(i.get||i.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[e]=i.value)},$jscomp.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:"undefined"!=typeof global&&null!=global?global:t},$jscomp.global=$jscomp.getGlobal(this),$jscomp.SYMBOL_PREFIX="jscomp_symbol_",$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){},$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)},$jscomp.symbolCounter_=0,$jscomp.Symbol=function(t){return $jscomp.SYMBOL_PREFIX+(t||"")+$jscomp.symbolCounter_++},$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var t=$jscomp.global.Symbol.iterator;t||(t=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&$jscomp.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}}),$jscomp.initSymbolIterator=function(){}},$jscomp.arrayIterator=function(t){var e=0;return $jscomp.iteratorPrototype(function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}})},$jscomp.iteratorPrototype=function(t){return $jscomp.initSymbolIterator(),(t={next:t})[$jscomp.global.Symbol.iterator]=function(){return this},t},$jscomp.array=$jscomp.array||{},$jscomp.iteratorFromArray=function(e,i){$jscomp.initSymbolIterator(),e instanceof String&&(e+="");var n=0,s={next:function(){if(n<e.length){var t=n++;return{value:i(t,e[t]),done:!1}}return s.next=function(){return{done:!0,value:void 0}},s.next()}};return s[Symbol.iterator]=function(){return s},s},$jscomp.polyfill=function(t,e,i,n){if(e){for(i=$jscomp.global,t=t.split("."),n=0;n<t.length-1;n++){var s=t[n];s in i||(i[s]={}),i=i[s]}(e=e(n=i[t=t[t.length-1]]))!=n&&null!=e&&$jscomp.defineProperty(i,t,{configurable:!0,writable:!0,value:e})}},$jscomp.polyfill("Array.prototype.keys",function(t){return t||function(){return $jscomp.iteratorFromArray(this,function(t){return t})}},"es6-impl","es3");var $jscomp$this=this;M.anime=function(){function s(t){if(!B.col(t))try{return document.querySelectorAll(t)}catch(t){}}function b(t,e){for(var i=t.length,n=2<=arguments.length?e:void 0,s=[],o=0;o<i;o++)if(o in t){var a=t[o];e.call(n,a,o,t)&&s.push(a)}return s}function d(t){return t.reduce(function(t,e){return t.concat(B.arr(e)?d(e):e)},[])}function o(t){return B.arr(t)?t:(B.str(t)&&(t=s(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function a(t,e){return t.some(function(t){return t===e})}function r(t){var e,i={};for(e in t)i[e]=t[e];return i}function u(t,e){var i,n=r(t);for(i in t)n[i]=e.hasOwnProperty(i)?e[i]:t[i];return n}function c(t,e){var i,n=r(t);for(i in e)n[i]=B.und(t[i])?e[i]:t[i];return n}function l(t){if(t=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t))return t[2]}function h(t,e){return B.fnc(t)?t(e.target,e.id,e.total):t}function w(t,e){if(e in t.style)return getComputedStyle(t).getPropertyValue(e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function p(t,e){return B.dom(t)&&a($,e)?"transform":B.dom(t)&&(t.getAttribute(e)||B.svg(t)&&t[e])?"attribute":B.dom(t)&&"transform"!==e&&w(t,e)?"css":null!=t[e]?"object":void 0}function v(t,e){switch(p(t,e)){case"transform":return function(t,i){var e,n=-1<(e=i).indexOf("translate")||"perspective"===e?"px":-1<e.indexOf("rotate")||-1<e.indexOf("skew")?"deg":void 0,n=-1<i.indexOf("scale")?1:0+n;if(!(t=t.style.transform))return n;for(var s=[],o=[],a=[],r=/(\w+)\((.+?)\)/g;s=r.exec(t);)o.push(s[1]),a.push(s[2]);return(t=b(a,function(t,e){return o[e]===i})).length?t[0]:n}(t,e);case"css":return w(t,e);case"attribute":return t.getAttribute(e)}return t[e]||0}function f(t,e){var i=/^(\*=|\+=|-=)/.exec(t);if(!i)return t;var n=l(t)||0;switch(e=parseFloat(e),t=parseFloat(t.replace(i[0],"")),i[0][0]){case"+":return e+t+n;case"-":return e-t+n;case"*":return e*t+n}}function m(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function i(t){t=t.points;for(var e,i=0,n=0;n<t.numberOfItems;n++){var s=t.getItem(n);0<n&&(i+=m(e,s)),e=s}return i}function g(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return 2*Math.PI*t.getAttribute("r");case"rect":return 2*t.getAttribute("width")+2*t.getAttribute("height");case"line":return m({x:t.getAttribute("x1"),y:t.getAttribute("y1")},{x:t.getAttribute("x2"),y:t.getAttribute("y2")});case"polyline":return i(t);case"polygon":var e=t.points;return i(t)+m(e.getItem(e.numberOfItems-1),e.getItem(0))}}function C(e,i){function t(t){return t=void 0===t?0:t,e.el.getPointAtLength(1<=i+t?i+t:0)}var n=t(),s=t(-1),o=t(1);switch(e.property){case"x":return n.x;case"y":return n.y;case"angle":return 180*Math.atan2(o.y-s.y,o.x-s.x)/Math.PI}}function _(t,e){var i,n=/-?\d*\.?\d+/g;if(i=B.pth(t)?t.totalLength:t,B.col(i))if(B.rgb(i)){var s=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(i);i=s?"rgba("+s[1]+",1)":i}else i=B.hex(i)?function(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);t=parseInt(e[1],16);var i=parseInt(e[2],16),e=parseInt(e[3],16);return"rgba("+t+","+i+","+e+",1)"}(i):B.hsl(i)?function(t){function e(t,e,i){return i<0&&(i+=1),1<i&&--i,i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}var i=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);t=parseInt(i[1])/360;var n=parseInt(i[2])/100,s=parseInt(i[3])/100,i=i[4]||1;if(0==n)s=n=t=s;else{var o=s<.5?s*(1+n):s+n-s*n,a=2*s-o,s=e(a,o,t+1/3),n=e(a,o,t);t=e(a,o,t-1/3)}return"rgba("+255*s+","+255*n+","+255*t+","+i+")"}(i):void 0;else s=(s=l(i))?i.substr(0,i.length-s.length):i,i=e&&!/\s/g.test(i)?s+e:s;return{original:i+="",numbers:i.match(n)?i.match(n).map(Number):[0],strings:B.str(t)||e?i.split(n):[]}}function y(t){return b(t=t?d(B.arr(t)?t.map(o):o(t)):[],function(t,e,i){return i.indexOf(t)===e})}function k(t,i){var e=r(i);if(B.arr(t)){var n=t.length;2!==n||B.obj(t[0])?B.fnc(i.duration)||(e.duration=i.duration/n):t={value:t}}return o(t).map(function(t,e){return e=e?0:i.delay,t=B.obj(t)&&!B.pth(t)?t:{value:t},B.und(t.delay)&&(t.delay=e),t}).map(function(t){return c(t,e)})}function E(o,a){var r;return o.tweens.map(function(t){var e=(t=function(t,e){var i,n={};for(i in t){var s=h(t[i],e);B.arr(s)&&1===(s=s.map(function(t){return h(t,e)})).length&&(s=s[0]),n[i]=s}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(t,a)).value,i=v(a.target,o.name),n=r?r.to.original:i,n=B.arr(e)?e[0]:n,s=f(B.arr(e)?e[1]:e,n),i=l(s)||l(n)||l(i);return t.from=_(n,i),t.to=_(s,i),t.start=r?r.end:o.offset,t.end=t.start+t.delay+t.duration,t.easing=function(t){return B.arr(t)?D.apply(this,t):S[t]}(t.easing),t.elasticity=(1e3-Math.min(Math.max(t.elasticity,1),999))/1e3,t.isPath=B.pth(e),t.isColor=B.col(t.from.original),t.isColor&&(t.round=1),r=t})}function M(e,t,i,n){var s="delay"===e;return t.length?(s?Math.min:Math.max).apply(Math,t.map(function(t){return t[e]})):s?n.delay:i.offset+n.delay+n.duration}function n(t){var e,i,n,s,o=u(L,t),a=u(T,t),r=(i=t.targets,(n=y(i)).map(function(t,e){return{target:t,id:e,total:n.length}})),l=[],h=c(o,a);for(e in t)h.hasOwnProperty(e)||"targets"===e||l.push({name:e,offset:h.offset,tweens:k(t[e],a)});return s=l,t=b(d(r.map(function(n){return s.map(function(t){var e=p(n.target,t.name);if(e){var i=E(t,n);t={type:e,property:t.name,animatable:n,tweens:i,duration:i[i.length-1].end,delay:i[0].delay}}else t=void 0;return t})})),function(t){return!B.und(t)}),c(o,{children:[],animatables:r,animations:t,duration:M("duration",t,o,a),delay:M("delay",t,o,a)})}function O(t){function d(){return window.Promise&&new Promise(function(t){return _=t})}function u(t){return k.reversed?k.duration-t:t}function c(e){for(var t=0,i={},n=k.animations,s=n.length;t<s;){var o=n[t],a=o.animatable,r=o.tweens,l=r.length-1,h=r[l];l&&(h=b(r,function(t){return e<t.end})[0]||h);for(var r=Math.min(Math.max(e-h.start-h.delay,0),h.duration)/h.duration,d=isNaN(r)?1:h.easing(r,h.elasticity),r=h.to.strings,u=h.round,l=[],c=void 0,c=h.to.numbers.length,p=0;p<c;p++){var v=void 0,v=h.to.numbers[p],f=h.from.numbers[p],v=h.isPath?C(h.value,d*v):f+d*(v-f);u&&(h.isColor&&2<p||(v=Math.round(v*u)/u)),l.push(v)}if(h=r.length)for(c=r[0],d=0;d<h;d++)u=r[d+1],p=l[d],isNaN(p)||(c=u?c+(p+u):c+(p+" "));else c=l[0];I[o.type](a.target,o.property,c,i,a.id),o.currentValue=c,t++}if(t=Object.keys(i).length)for(n=0;n<t;n++)x||(x=w(document.body,"transform")?"transform":"-webkit-transform"),k.animatables[n].target.style[x]=i[n].join(" ");k.currentTime=e,k.progress=e/k.duration*100}function p(t){k[t]&&k[t](k)}function v(){k.remaining&&!0!==k.remaining&&k.remaining--}function e(t){var e=k.duration,i=k.offset,n=i+k.delay,s=k.currentTime,o=k.reversed,a=u(t);if(k.children.length){var r=k.children,l=r.length;if(a>=k.currentTime)for(var h=0;h<l;h++)r[h].seek(a);else for(;l--;)r[l].seek(a)}(n<=a||!e)&&(k.began||(k.began=!0,p("begin")),p("run")),i<a&&a<e?c(a):(a<=i&&0!==s&&(c(0),o&&v()),(e<=a&&s!==e||!e)&&(c(e),o||v())),p("update"),e<=t&&(k.remaining?(m=f,"alternate"===k.direction&&(k.reversed=!k.reversed)):(k.pause(),k.completed||(k.completed=!0,p("complete"),"Promise"in window&&(_(),y=d()))),g=0)}t=void 0===t?{}:t;var f,m,g=0,_=null,y=d(),k=n(t);return k.reset=function(){var t=k.direction,e=k.loop;for(k.currentTime=0,k.progress=0,k.paused=!0,k.began=!1,k.completed=!1,k.reversed="reverse"===t,k.remaining="alternate"===t&&1===e?2:e,c(0),t=k.children.length;t--;)k.children[t].reset()},k.tick=function(t){f=t,m||(m=f),e((g+f-m)*O.speed)},k.seek=function(t){e(u(t))},k.pause=function(){var t=A.indexOf(k);-1<t&&A.splice(t,1),k.paused=!0},k.play=function(){k.paused&&(k.paused=!1,m=0,g=u(k.currentTime),A.push(k),R||H())},k.reverse=function(){k.reversed=!k.reversed,m=0,g=u(k.currentTime)},k.restart=function(){k.pause(),k.reset(),k.play()},k.finished=y,k.reset(),k.autoplay&&k.play(),k}var x,L={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},T={duration:1e3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},$="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),B={arr:function(t){return Array.isArray(t)},obj:function(t){return-1<Object.prototype.toString.call(t).indexOf("Object")},pth:function(t){return B.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},dom:function(t){return t.nodeType||B.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return B.hex(t)||B.rgb(t)||B.hsl(t)}},D=function(){function u(t,e,i){return(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t}return function(a,r,l,h){if(0<=a&&a<=1&&0<=l&&l<=1){var d=new Float32Array(11);if(a!==r||l!==h)for(var t=0;t<11;++t)d[t]=u(.1*t,a,l);return function(t){if(a===r&&l===h)return t;if(0===t)return 0;if(1===t)return 1;for(var e=0,i=1;10!==i&&d[i]<=t;++i)e+=.1;var i=e+(t-d[--i])/(d[i+1]-d[i])*.1,n=3*(1-3*l+3*a)*i*i+2*(3*l-6*a)*i+3*a;if(.001<=n){for(e=0;e<4&&0!=(n=3*(1-3*l+3*a)*i*i+2*(3*l-6*a)*i+3*a);++e)var s=u(i,a,l)-t,i=i-s/n;t=i}else if(0===n)t=i;else{for(var i=e,e=e+.1,o=0;0<(n=u(s=i+(e-i)/2,a,l)-t)?e=s:i=s,1e-7<Math.abs(n)&&++o<10;);t=s}return u(t,r,h)}}}}(),S=function(){function i(t,e){return 0===t||1===t?t:-Math.pow(2,10*(t-1))*Math.sin(2*(t-1-e/(2*Math.PI)*Math.asin(1))*Math.PI/e)}var t,n="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),e={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],i],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(t,e){return 1-i(1-t,e)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(t,e){return t<.5?i(2*t,e)/2:1-i(-2*t+2,e)/2}]},s={linear:D(.25,.25,.75,.75)},o={};for(t in e)o.type=t,e[o.type].forEach(function(i){return function(t,e){s["ease"+i.type+n[e]]=B.fnc(t)?t:D.apply($jscomp$this,t)}}(o)),o={type:o.type};return s}(),I={css:function(t,e,i){return t.style[e]=i},attribute:function(t,e,i){return t.setAttribute(e,i)},object:function(t,e,i){return t[e]=i},transform:function(t,e,i,n,s){n[s]||(n[s]=[]),n[s].push(e+"("+i+")")}},A=[],R=0,H=function(){function n(){R=requestAnimationFrame(t)}function t(t){var e=A.length;if(e){for(var i=0;i<e;)A[i]&&A[i].tick(t),i++;n()}else cancelAnimationFrame(R),R=0}return n}();return O.version="2.2.0",O.speed=1,O.running=A,O.remove=function(t){t=y(t);for(var e=A.length;e--;)for(var i=A[e],n=i.animations,s=n.length;s--;)a(t,n[s].animatable.target)&&(n.splice(s,1),n.length||i.pause())},O.getValue=v,O.path=function(t,e){var i=B.str(t)?s(t)[0]:t,n=e||100;return function(t){return{el:i,property:t,totalLength:g(i)*(n/100)}}},O.setDashoffset=function(t){var e=g(t);return t.setAttribute("stroke-dasharray",e),e},O.bezier=D,O.easings=S,O.timeline=function(n){var s=O(n);return s.pause(),s.duration=0,s.add=function(t){return s.children.forEach(function(t){t.began=!0,t.completed=!0}),o(t).forEach(function(t){var e=c(t,u(T,n||{}));e.targets=e.targets||n.targets,t=s.duration;var i=e.offset;e.autoplay=!1,e.direction=s.direction,e.offset=B.und(i)?t:f(i,t),s.began=!0,s.completed=!0,s.seek(e.offset),(e=O(e)).began=!0,e.completed=!0,e.duration>t&&(s.duration=e.duration),s.children.push(e)}),s.seek(0),s.reset(),s.autoplay&&s.restart(),s},s},O.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},O}(),function(r,l){"use strict";var e={accordion:!0,onOpenStart:void 0,onOpenEnd:void 0,onCloseStart:void 0,onCloseEnd:void 0,inDuration:300,outDuration:300},t=function(t){function s(t,e){_classCallCheck(this,s);var i=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,t,e));(i.el.M_Collapsible=i).options=r.extend({},s.defaults,e),i.$headers=i.$el.children("li").children(".collapsible-header"),i.$headers.attr("tabindex",0),i._setupEventHandlers();var n=i.$el.children("li.active").children(".collapsible-body");return i.options.accordion?n.first().css("display","block"):n.css("display","block"),i}return _inherits(s,Component),_createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Collapsible=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleCollapsibleClickBound=this._handleCollapsibleClick.bind(this),this._handleCollapsibleKeydownBound=this._handleCollapsibleKeydown.bind(this),this.el.addEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(t){t.addEventListener("keydown",e._handleCollapsibleKeydownBound)})}},{key:"_removeEventHandlers",value:function(){var e=this;this.el.removeEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(t){t.removeEventListener("keydown",e._handleCollapsibleKeydownBound)})}},{key:"_handleCollapsibleClick",value:function(t){var e=r(t.target).closest(".collapsible-header");if(t.target&&e.length){var i=e.closest(".collapsible");if(i[0]===this.el){var n=e.closest("li"),s=i.children("li"),o=n[0].classList.contains("active"),a=s.index(n);o?this.close(a):this.open(a)}}}},{key:"_handleCollapsibleKeydown",value:function(t){13===t.keyCode&&this._handleCollapsibleClickBound(t)}},{key:"_animateIn",value:function(t){var e=this,i=this.$el.children("li").eq(t);if(i.length){var n=i.children(".collapsible-body");l.remove(n[0]),n.css({display:"block",overflow:"hidden",height:0,paddingTop:"",paddingBottom:""});var s=n.css("padding-top"),o=n.css("padding-bottom"),a=n[0].scrollHeight;n.css({paddingTop:0,paddingBottom:0}),l({targets:n[0],height:a,paddingTop:s,paddingBottom:o,duration:this.options.inDuration,easing:"easeInOutCubic",complete:function(t){n.css({overflow:"",paddingTop:"",paddingBottom:"",height:""}),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,i[0])}})}}},{key:"_animateOut",value:function(t){var e=this,i=this.$el.children("li").eq(t);if(i.length){var n=i.children(".collapsible-body");l.remove(n[0]),n.css("overflow","hidden"),l({targets:n[0],height:0,paddingTop:0,paddingBottom:0,duration:this.options.outDuration,easing:"easeInOutCubic",complete:function(){n.css({height:"",overflow:"",padding:"",display:""}),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,i[0])}})}}},{key:"open",value:function(t){var i=this,e=this.$el.children("li").eq(t);if(e.length&&!e[0].classList.contains("active")){if("function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,e[0]),this.options.accordion){var n=this.$el.children("li");this.$el.children("li.active").each(function(t){var e=n.index(r(t));i.close(e)})}e[0].classList.add("active"),this._animateIn(t)}}},{key:"close",value:function(t){var e=this.$el.children("li").eq(t);e.length&&e[0].classList.contains("active")&&("function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,e[0]),e[0].classList.remove("active"),this._animateOut(t))}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Collapsible}},{key:"defaults",get:function(){return e}}]),s}();M.Collapsible=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"collapsible","M_Collapsible")}(cash,M.anime),function(h,i){"use strict";var e={alignment:"left",autoFocus:!0,constrainWidth:!0,container:null,coverTrigger:!0,closeOnClick:!0,hover:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onItemClick:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return i.el.M_Dropdown=i,n._dropdowns.push(i),i.id=M.getIdFromTrigger(t),i.dropdownEl=document.getElementById(i.id),i.$dropdownEl=h(i.dropdownEl),i.options=h.extend({},n.defaults,e),i.isOpen=!1,i.isScrollable=!1,i.isTouchMoving=!1,i.focusedIndex=-1,i.filterQuery=[],i.options.container?h(i.options.container).append(i.dropdownEl):i.$el.after(i.dropdownEl),i._makeDropdownFocusable(),i._resetFilterQueryBound=i._resetFilterQuery.bind(i),i._handleDocumentClickBound=i._handleDocumentClick.bind(i),i._handleDocumentTouchmoveBound=i._handleDocumentTouchmove.bind(i),i._handleDropdownClickBound=i._handleDropdownClick.bind(i),i._handleDropdownKeydownBound=i._handleDropdownKeydown.bind(i),i._handleTriggerKeydownBound=i._handleTriggerKeydown.bind(i),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._resetDropdownStyles(),this._removeEventHandlers(),n._dropdowns.splice(n._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}},{key:"_setupEventHandlers",value:function(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.addEventListener("click",this._handleDropdownClickBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.removeEventListener("click",this._handleDropdownClickBound),this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventListener("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}},{key:"_setupTemporaryEventHandlers",value:function(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound),document.body.addEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_removeTemporaryEventHandlers",value:function(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound),document.body.removeEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_handleClick",value:function(t){t.preventDefault(),this.open()}},{key:"_handleMouseEnter",value:function(){this.open()}},{key:"_handleMouseLeave",value:function(t){var e=t.toElement||t.relatedTarget,i=!!h(e).closest(".dropdown-content").length,n=!1,s=h(e).closest(".dropdown-trigger");s.length&&s[0].M_Dropdown&&s[0].M_Dropdown.isOpen&&(n=!0),n||i||this.close()}},{key:"_handleDocumentClick",value:function(t){var e=this,i=h(t.target);this.options.closeOnClick&&i.closest(".dropdown-content").length&&!this.isTouchMoving?setTimeout(function(){e.close()},0):!i.closest(".dropdown-trigger").length&&i.closest(".dropdown-content").length||setTimeout(function(){e.close()},0),this.isTouchMoving=!1}},{key:"_handleTriggerKeydown",value:function(t){t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ENTER||this.isOpen||(t.preventDefault(),this.open())}},{key:"_handleDocumentTouchmove",value:function(t){h(t.target).closest(".dropdown-content").length&&(this.isTouchMoving=!0)}},{key:"_handleDropdownClick",value:function(t){if("function"==typeof this.options.onItemClick){var e=h(t.target).closest("li")[0];this.options.onItemClick.call(this,e)}}},{key:"_handleDropdownKeydown",value:function(t){if(t.which===M.keys.TAB)t.preventDefault(),this.close();else if(t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||!this.isOpen)if(t.which===M.keys.ENTER&&this.isOpen){var e=this.dropdownEl.children[this.focusedIndex],i=h(e).find("a, button").first();i.length?i[0].click():e&&e.click()}else t.which===M.keys.ESC&&this.isOpen&&(t.preventDefault(),this.close());else{t.preventDefault();var n=t.which===M.keys.ARROW_DOWN?1:-1,s=this.focusedIndex,o=!1;do{if(s+=n,this.dropdownEl.children[s]&&-1!==this.dropdownEl.children[s].tabIndex){o=!0;break}}while(s<this.dropdownEl.children.length&&0<=s);o&&(this.focusedIndex=s,this._focusFocusedItem())}var a=String.fromCharCode(t.which).toLowerCase();if(a&&-1===[9,13,27,38,40].indexOf(t.which)){this.filterQuery.push(a);var r=this.filterQuery.join(""),l=h(this.dropdownEl).find("li").filter(function(t){return 0===h(t).text().toLowerCase().indexOf(r)})[0];l&&(this.focusedIndex=h(l).index(),this._focusFocusedItem())}this.filterTimeout=setTimeout(this._resetFilterQueryBound,1e3)}},{key:"_resetFilterQuery",value:function(){this.filterQuery=[]}},{key:"_resetDropdownStyles",value:function(){this.$dropdownEl.css({display:"",width:"",height:"",left:"",top:"","transform-origin":"",transform:"",opacity:""})}},{key:"_makeDropdownFocusable",value:function(){this.dropdownEl.tabIndex=0,h(this.dropdownEl).children().each(function(t){t.getAttribute("tabindex")||t.setAttribute("tabindex",0)})}},{key:"_focusFocusedItem",value:function(){0<=this.focusedIndex&&this.focusedIndex<this.dropdownEl.children.length&&this.options.autoFocus&&this.dropdownEl.children[this.focusedIndex].focus()}},{key:"_getDropdownPosition",value:function(){this.el.offsetParent.getBoundingClientRect();var t=this.el.getBoundingClientRect(),e=this.dropdownEl.getBoundingClientRect(),i=e.height,n=e.width,s=t.left-e.left,o=t.top-e.top,a={left:s,top:o,height:i,width:n},r=this.dropdownEl.offsetParent?this.dropdownEl.offsetParent:this.dropdownEl.parentNode,l=M.checkPossibleAlignments(this.el,r,a,this.options.coverTrigger?0:t.height),h="top",d=this.options.alignment;if(o+=this.options.coverTrigger?0:t.height,this.isScrollable=!1,l.top||(l.bottom?h="bottom":(this.isScrollable=!0,l.spaceOnTop>l.spaceOnBottom?(h="bottom",i+=l.spaceOnTop,o-=l.spaceOnTop):i+=l.spaceOnBottom)),!l[d]){var u="left"===d?"right":"left";l[u]?d=u:l.spaceOnLeft>l.spaceOnRight?(d="right",n+=l.spaceOnLeft,s-=l.spaceOnLeft):(d="left",n+=l.spaceOnRight)}return"bottom"===h&&(o=o-e.height+(this.options.coverTrigger?t.height:0)),"right"===d&&(s=s-e.width+t.width),{x:s,y:o,verticalAlignment:h,horizontalAlignment:d,height:i,width:n}}},{key:"_animateIn",value:function(){var e=this;i.remove(this.dropdownEl),i({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:function(t){e.options.autoFocus&&e.dropdownEl.focus(),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}})}},{key:"_animateOut",value:function(){var e=this;i.remove(this.dropdownEl),i({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:function(t){e._resetDropdownStyles(),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_placeDropdown",value:function(){var t=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=t+"px";var e=this._getDropdownPosition();this.dropdownEl.style.left=e.x+"px",this.dropdownEl.style.top=e.y+"px",this.dropdownEl.style.height=e.height+"px",this.dropdownEl.style.width=e.width+"px",this.dropdownEl.style.transformOrigin=("left"===e.horizontalAlignment?"0":"100%")+" "+("top"===e.verticalAlignment?"0":"100%")}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._resetDropdownStyles(),this.dropdownEl.style.display="block",this._placeDropdown(),this._animateIn(),this._setupTemporaryEventHandlers())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.focusedIndex=-1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._animateOut(),this._removeTemporaryEventHandlers(),this.options.autoFocus&&this.el.focus())}},{key:"recalculateDimensions",value:function(){this.isOpen&&(this.$dropdownEl.css({width:"",height:"",left:"",top:"","transform-origin":""}),this._placeDropdown())}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Dropdown}},{key:"defaults",get:function(){return e}}]),n}();t._dropdowns=[],M.Dropdown=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"dropdown","M_Dropdown")}(cash,M.anime),function(s,i){"use strict";var e={opacity:.5,inDuration:250,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0,dismissible:!0,startingTop:"4%",endingTop:"10%"},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Modal=i).options=s.extend({},n.defaults,e),i.isOpen=!1,i.id=i.$el.attr("id"),i._openingTrigger=void 0,i.$overlay=s('<div class="modal-overlay"></div>'),i.el.tabIndex=0,i._nthModalOpened=0,n._count++,i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){n._count--,this._removeEventHandlers(),this.el.removeAttribute("style"),this.$overlay.remove(),this.el.M_Modal=void 0}},{key:"_setupEventHandlers",value:function(){this._handleOverlayClickBound=this._handleOverlayClick.bind(this),this._handleModalCloseClickBound=this._handleModalCloseClick.bind(this),1===n._count&&document.body.addEventListener("click",this._handleTriggerClick),this.$overlay[0].addEventListener("click",this._handleOverlayClickBound),this.el.addEventListener("click",this._handleModalCloseClickBound)}},{key:"_removeEventHandlers",value:function(){0===n._count&&document.body.removeEventListener("click",this._handleTriggerClick),this.$overlay[0].removeEventListener("click",this._handleOverlayClickBound),this.el.removeEventListener("click",this._handleModalCloseClickBound)}},{key:"_handleTriggerClick",value:function(t){var e=s(t.target).closest(".modal-trigger");if(e.length){var i=M.getIdFromTrigger(e[0]),n=document.getElementById(i).M_Modal;n&&n.open(e),t.preventDefault()}}},{key:"_handleOverlayClick",value:function(){this.options.dismissible&&this.close()}},{key:"_handleModalCloseClick",value:function(t){s(t.target).closest(".modal-close").length&&this.close()}},{key:"_handleKeydown",value:function(t){27===t.keyCode&&this.options.dismissible&&this.close()}},{key:"_handleFocus",value:function(t){this.el.contains(t.target)||this._nthModalOpened!==n._modalsOpen||this.el.focus()}},{key:"_animateIn",value:function(){var t=this;s.extend(this.el.style,{display:"block",opacity:0}),s.extend(this.$overlay[0].style,{display:"block",opacity:0}),i({targets:this.$overlay[0],opacity:this.options.opacity,duration:this.options.inDuration,easing:"easeOutQuad"});var e={targets:this.el,duration:this.options.inDuration,easing:"easeOutCubic",complete:function(){"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el,t._openingTrigger)}};this.el.classList.contains("bottom-sheet")?s.extend(e,{bottom:0,opacity:1}):s.extend(e,{top:[this.options.startingTop,this.options.endingTop],opacity:1,scaleX:[.8,1],scaleY:[.8,1]}),i(e)}},{key:"_animateOut",value:function(){var t=this;i({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuart"});var e={targets:this.el,duration:this.options.outDuration,easing:"easeOutCubic",complete:function(){t.el.style.display="none",t.$overlay.remove(),"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}};this.el.classList.contains("bottom-sheet")?s.extend(e,{bottom:"-100%",opacity:0}):s.extend(e,{top:[this.options.endingTop,this.options.startingTop],opacity:0,scaleX:.8,scaleY:.8}),i(e)}},{key:"open",value:function(t){if(!this.isOpen)return this.isOpen=!0,n._modalsOpen++,this._nthModalOpened=n._modalsOpen,this.$overlay[0].style.zIndex=1e3+2*n._modalsOpen,this.el.style.zIndex=1e3+2*n._modalsOpen+1,this._openingTrigger=t?t[0]:void 0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el,this._openingTrigger),this.options.preventScrolling&&(document.body.style.overflow="hidden"),this.el.classList.add("open"),this.el.insertAdjacentElement("afterend",this.$overlay[0]),this.options.dismissible&&(this._handleKeydownBound=this._handleKeydown.bind(this),this._handleFocusBound=this._handleFocus.bind(this),document.addEventListener("keydown",this._handleKeydownBound),document.addEventListener("focus",this._handleFocusBound,!0)),i.remove(this.el),i.remove(this.$overlay[0]),this._animateIn(),this.el.focus(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,n._modalsOpen--,this._nthModalOpened=0,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this.el.classList.remove("open"),0===n._modalsOpen&&(document.body.style.overflow=""),this.options.dismissible&&(document.removeEventListener("keydown",this._handleKeydownBound),document.removeEventListener("focus",this._handleFocusBound,!0)),i.remove(this.el),i.remove(this.$overlay[0]),this._animateOut(),this}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Modal}},{key:"defaults",get:function(){return e}}]),n}();t._modalsOpen=0,t._count=0,M.Modal=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"modal","M_Modal")}(cash,M.anime),function(o,a){"use strict";var e={inDuration:275,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Materialbox=i).options=o.extend({},n.defaults,e),i.overlayActive=!1,i.doneAnimating=!0,i.placeholder=o("<div></div>").addClass("material-placeholder"),i.originalWidth=0,i.originalHeight=0,i.originInlineStyles=i.$el.attr("style"),i.caption=i.el.getAttribute("data-caption")||"",i.$el.before(i.placeholder),i.placeholder.append(i.$el),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Materialbox=void 0,o(this.placeholder).after(this.el).remove(),this.$el.removeAttr("style")}},{key:"_setupEventHandlers",value:function(){this._handleMaterialboxClickBound=this._handleMaterialboxClick.bind(this),this.el.addEventListener("click",this._handleMaterialboxClickBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleMaterialboxClickBound)}},{key:"_handleMaterialboxClick",value:function(t){!1===this.doneAnimating||this.overlayActive&&this.doneAnimating?this.close():this.open()}},{key:"_handleWindowScroll",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowResize",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowEscape",value:function(t){27===t.keyCode&&this.doneAnimating&&this.overlayActive&&this.close()}},{key:"_makeAncestorsOverflowVisible",value:function(){this.ancestorsChanged=o();for(var t=this.placeholder[0].parentNode;null!==t&&!o(t).is(document);){var e=o(t);"visible"!==e.css("overflow")&&(e.css("overflow","visible"),void 0===this.ancestorsChanged?this.ancestorsChanged=e:this.ancestorsChanged=this.ancestorsChanged.add(e)),t=t.parentNode}}},{key:"_animateImageIn",value:function(){var t=this,e={targets:this.el,height:[this.originalHeight,this.newHeight],width:[this.originalWidth,this.newWidth],left:M.getDocumentScrollLeft()+this.windowWidth/2-this.placeholder.offset().left-this.newWidth/2,top:M.getDocumentScrollTop()+this.windowHeight/2-this.placeholder.offset().top-this.newHeight/2,duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){t.doneAnimating=!0,"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el)}};this.maxWidth=this.$el.css("max-width"),this.maxHeight=this.$el.css("max-height"),"none"!==this.maxWidth&&(e.maxWidth=this.newWidth),"none"!==this.maxHeight&&(e.maxHeight=this.newHeight),a(e)}},{key:"_animateImageOut",value:function(){var t=this,e={targets:this.el,width:this.originalWidth,height:this.originalHeight,left:0,top:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.placeholder.css({height:"",width:"",position:"",top:"",left:""}),t.attrWidth&&t.$el.attr("width",t.attrWidth),t.attrHeight&&t.$el.attr("height",t.attrHeight),t.$el.removeAttr("style"),t.originInlineStyles&&t.$el.attr("style",t.originInlineStyles),t.$el.removeClass("active"),t.doneAnimating=!0,t.ancestorsChanged.length&&t.ancestorsChanged.css("overflow",""),"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}};a(e)}},{key:"_updateVars",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.caption=this.el.getAttribute("data-caption")||""}},{key:"open",value:function(){var t=this;this._updateVars(),this.originalWidth=this.el.getBoundingClientRect().width,this.originalHeight=this.el.getBoundingClientRect().height,this.doneAnimating=!1,this.$el.addClass("active"),this.overlayActive=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this.placeholder.css({width:this.placeholder[0].getBoundingClientRect().width+"px",height:this.placeholder[0].getBoundingClientRect().height+"px",position:"relative",top:0,left:0}),this._makeAncestorsOverflowVisible(),this.$el.css({position:"absolute","z-index":1e3,"will-change":"left, top, width, height"}),this.attrWidth=this.$el.attr("width"),this.attrHeight=this.$el.attr("height"),this.attrWidth&&(this.$el.css("width",this.attrWidth+"px"),this.$el.removeAttr("width")),this.attrHeight&&(this.$el.css("width",this.attrHeight+"px"),this.$el.removeAttr("height")),this.$overlay=o('<div id="materialbox-overlay"></div>').css({opacity:0}).one("click",function(){t.doneAnimating&&t.close()}),this.$el.before(this.$overlay);var e=this.$overlay[0].getBoundingClientRect();this.$overlay.css({width:this.windowWidth+"px",height:this.windowHeight+"px",left:-1*e.left+"px",top:-1*e.top+"px"}),a.remove(this.el),a.remove(this.$overlay[0]),a({targets:this.$overlay[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}),""!==this.caption&&(this.$photocaption&&a.remove(this.$photoCaption[0]),this.$photoCaption=o('<div class="materialbox-caption"></div>'),this.$photoCaption.text(this.caption),o("body").append(this.$photoCaption),this.$photoCaption.css({display:"inline"}),a({targets:this.$photoCaption[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}));var i=0,n=this.originalWidth/this.windowWidth,s=this.originalHeight/this.windowHeight;this.newWidth=0,this.newHeight=0,s<n?(i=this.originalHeight/this.originalWidth,this.newWidth=.9*this.windowWidth,this.newHeight=.9*this.windowWidth*i):(i=this.originalWidth/this.originalHeight,this.newWidth=.9*this.windowHeight*i,this.newHeight=.9*this.windowHeight),this._animateImageIn(),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),this._handleWindowResizeBound=this._handleWindowResize.bind(this),this._handleWindowEscapeBound=this._handleWindowEscape.bind(this),window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleWindowResizeBound),window.addEventListener("keyup",this._handleWindowEscapeBound)}},{key:"close",value:function(){var t=this;this._updateVars(),this.doneAnimating=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),a.remove(this.el),a.remove(this.$overlay[0]),""!==this.caption&&a.remove(this.$photoCaption[0]),window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleWindowResizeBound),window.removeEventListener("keyup",this._handleWindowEscapeBound),a({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.overlayActive=!1,t.$overlay.remove()}}),this._animateImageOut(),""!==this.caption&&a({targets:this.$photoCaption[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.$photoCaption.remove()}})}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Materialbox}},{key:"defaults",get:function(){return e}}]),n}();M.Materialbox=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"materialbox","M_Materialbox")}(cash,M.anime),function(s){"use strict";var e={responsiveThreshold:0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Parallax=i).options=s.extend({},n.defaults,e),i._enabled=window.innerWidth>i.options.responsiveThreshold,i.$img=i.$el.find("img").first(),i.$img.each(function(){this.complete&&s(this).trigger("load")}),i._updateParallax(),i._setupEventHandlers(),i._setupStyles(),n._parallaxes.push(i),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){n._parallaxes.splice(n._parallaxes.indexOf(this),1),this.$img[0].style.transform="",this._removeEventHandlers(),this.$el[0].M_Parallax=void 0}},{key:"_setupEventHandlers",value:function(){this._handleImageLoadBound=this._handleImageLoad.bind(this),this.$img[0].addEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(n._handleScrollThrottled=M.throttle(n._handleScroll,5),window.addEventListener("scroll",n._handleScrollThrottled),n._handleWindowResizeThrottled=M.throttle(n._handleWindowResize,5),window.addEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_removeEventHandlers",value:function(){this.$img[0].removeEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(window.removeEventListener("scroll",n._handleScrollThrottled),window.removeEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_setupStyles",value:function(){this.$img[0].style.opacity=1}},{key:"_handleImageLoad",value:function(){this._updateParallax()}},{key:"_updateParallax",value:function(){var t=0<this.$el.height()?this.el.parentNode.offsetHeight:500,e=this.$img[0].offsetHeight-t,i=this.$el.offset().top+t,n=this.$el.offset().top,s=M.getDocumentScrollTop(),o=window.innerHeight,a=e*((s+o-n)/(t+o));this._enabled?s<i&&n<s+o&&(this.$img[0].style.transform="translate3D(-50%, "+a+"px, 0)"):this.$img[0].style.transform=""}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Parallax}},{key:"_handleScroll",value:function(){for(var t=0;t<n._parallaxes.length;t++){var e=n._parallaxes[t];e._updateParallax.call(e)}}},{key:"_handleWindowResize",value:function(){for(var t=0;t<n._parallaxes.length;t++){var e=n._parallaxes[t];e._enabled=window.innerWidth>e.options.responsiveThreshold}}},{key:"defaults",get:function(){return e}}]),n}();t._parallaxes=[],M.Parallax=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"parallax","M_Parallax")}(cash),function(a,s){"use strict";var e={duration:300,onShow:null,swipeable:!1,responsiveThreshold:1/0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Tabs=i).options=a.extend({},n.defaults,e),i.$tabLinks=i.$el.children("li.tab").children("a"),i.index=0,i._setupActiveTabLink(),i.options.swipeable?i._setupSwipeableTabs():i._setupNormalTabs(),i._setTabsAndTabWidth(),i._createIndicator(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._indicator.parentNode.removeChild(this._indicator),this.options.swipeable?this._teardownSwipeableTabs():this._teardownNormalTabs(),this.$el[0].M_Tabs=void 0}},{key:"_setupEventHandlers",value:function(){this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound),this._handleTabClickBound=this._handleTabClick.bind(this),this.el.addEventListener("click",this._handleTabClickBound)}},{key:"_removeEventHandlers",value:function(){window.removeEventListener("resize",this._handleWindowResizeBound),this.el.removeEventListener("click",this._handleTabClickBound)}},{key:"_handleWindowResize",value:function(){this._setTabsAndTabWidth(),0!==this.tabWidth&&0!==this.tabsWidth&&(this._indicator.style.left=this._calcLeftPos(this.$activeTabLink)+"px",this._indicator.style.right=this._calcRightPos(this.$activeTabLink)+"px")}},{key:"_handleTabClick",value:function(t){var e=this,i=a(t.target).closest("li.tab"),n=a(t.target).closest("a");if(n.length&&n.parent().hasClass("tab"))if(i.hasClass("disabled"))t.preventDefault();else if(!n.attr("target")){this.$activeTabLink.removeClass("active");var s=this.$content;this.$activeTabLink=n,this.$content=a(M.escapeHash(n[0].hash)),this.$tabLinks=this.$el.children("li.tab").children("a"),this.$activeTabLink.addClass("active");var o=this.index;this.index=Math.max(this.$tabLinks.index(n),0),this.options.swipeable?this._tabsCarousel&&this._tabsCarousel.set(this.index,function(){"function"==typeof e.options.onShow&&e.options.onShow.call(e,e.$content[0])}):this.$content.length&&(this.$content[0].style.display="block",this.$content.addClass("active"),"function"==typeof this.options.onShow&&this.options.onShow.call(this,this.$content[0]),s.length&&!s.is(this.$content)&&(s[0].style.display="none",s.removeClass("active"))),this._setTabsAndTabWidth(),this._animateIndicator(o),t.preventDefault()}}},{key:"_createIndicator",value:function(){var t=this,e=document.createElement("li");e.classList.add("indicator"),this.el.appendChild(e),this._indicator=e,setTimeout(function(){t._indicator.style.left=t._calcLeftPos(t.$activeTabLink)+"px",t._indicator.style.right=t._calcRightPos(t.$activeTabLink)+"px"},0)}},{key:"_setupActiveTabLink",value:function(){this.$activeTabLink=a(this.$tabLinks.filter('[href="'+location.hash+'"]')),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a.active").first()),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a").first()),this.$tabLinks.removeClass("active"),this.$activeTabLink[0].classList.add("active"),this.index=Math.max(this.$tabLinks.index(this.$activeTabLink),0),this.$activeTabLink.length&&(this.$content=a(M.escapeHash(this.$activeTabLink[0].hash)),this.$content.addClass("active"))}},{key:"_setupSwipeableTabs",value:function(){var i=this;window.innerWidth>this.options.responsiveThreshold&&(this.options.swipeable=!1);var n=a();this.$tabLinks.each(function(t){var e=a(M.escapeHash(t.hash));e.addClass("carousel-item"),n=n.add(e)});var t=a('<div class="tabs-content carousel carousel-slider"></div>');n.first().before(t),t.append(n),n[0].style.display="";var e=this.$activeTabLink.closest(".tab").index();this._tabsCarousel=M.Carousel.init(t[0],{fullWidth:!0,noWrap:!0,onCycleTo:function(t){var e=i.index;i.index=a(t).index(),i.$activeTabLink.removeClass("active"),i.$activeTabLink=i.$tabLinks.eq(i.index),i.$activeTabLink.addClass("active"),i._animateIndicator(e),"function"==typeof i.options.onShow&&i.options.onShow.call(i,i.$content[0])}}),this._tabsCarousel.set(e)}},{key:"_teardownSwipeableTabs",value:function(){var t=this._tabsCarousel.$el;this._tabsCarousel.destroy(),t.after(t.children()),t.remove()}},{key:"_setupNormalTabs",value:function(){this.$tabLinks.not(this.$activeTabLink).each(function(t){if(t.hash){var e=a(M.escapeHash(t.hash));e.length&&(e[0].style.display="none")}})}},{key:"_teardownNormalTabs",value:function(){this.$tabLinks.each(function(t){if(t.hash){var e=a(M.escapeHash(t.hash));e.length&&(e[0].style.display="")}})}},{key:"_setTabsAndTabWidth",value:function(){this.tabsWidth=this.$el.width(),this.tabWidth=Math.max(this.tabsWidth,this.el.scrollWidth)/this.$tabLinks.length}},{key:"_calcRightPos",value:function(t){return Math.ceil(this.tabsWidth-t.position().left-t[0].getBoundingClientRect().width)}},{key:"_calcLeftPos",value:function(t){return Math.floor(t.position().left)}},{key:"updateTabIndicator",value:function(){this._setTabsAndTabWidth(),this._animateIndicator(this.index)}},{key:"_animateIndicator",value:function(t){var e=0,i=0;0<=this.index-t?e=90:i=90;var n={targets:this._indicator,left:{value:this._calcLeftPos(this.$activeTabLink),delay:e},right:{value:this._calcRightPos(this.$activeTabLink),delay:i},duration:this.options.duration,easing:"easeOutQuad"};s.remove(this._indicator),s(n)}},{key:"select",value:function(t){var e=this.$tabLinks.filter('[href="#'+t+'"]');e.length&&e.trigger("click")}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Tabs}},{key:"defaults",get:function(){return e}}]),n}();M.Tabs=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"tabs","M_Tabs")}(cash,M.anime),function(d,e){"use strict";var i={exitDelay:200,enterDelay:0,html:null,margin:5,inDuration:250,outDuration:200,position:"bottom",transitionMovement:10},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Tooltip=i).options=d.extend({},n.defaults,e),i.isOpen=!1,i.isHovered=!1,i.isFocused=!1,i._appendTooltipEl(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){d(this.tooltipEl).remove(),this._removeEventHandlers(),this.el.M_Tooltip=void 0}},{key:"_appendTooltipEl",value:function(){var t=document.createElement("div");t.classList.add("material-tooltip"),this.tooltipEl=t;var e=document.createElement("div");e.classList.add("tooltip-content"),e.innerHTML=this.options.html,t.appendChild(e),document.body.appendChild(t)}},{key:"_updateTooltipContent",value:function(){this.tooltipEl.querySelector(".tooltip-content").innerHTML=this.options.html}},{key:"_setupEventHandlers",value:function(){this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this._handleFocusBound=this._handleFocus.bind(this),this._handleBlurBound=this._handleBlur.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.el.addEventListener("focus",this._handleFocusBound,!0),this.el.addEventListener("blur",this._handleBlurBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.el.removeEventListener("focus",this._handleFocusBound,!0),this.el.removeEventListener("blur",this._handleBlurBound,!0)}},{key:"open",value:function(t){this.isOpen||(t=void 0===t||void 0,this.isOpen=!0,this.options=d.extend({},this.options,this._getAttributeOptions()),this._updateTooltipContent(),this._setEnterDelayTimeout(t))}},{key:"close",value:function(){this.isOpen&&(this.isHovered=!1,this.isFocused=!1,this.isOpen=!1,this._setExitDelayTimeout())}},{key:"_setExitDelayTimeout",value:function(){var t=this;clearTimeout(this._exitDelayTimeout),this._exitDelayTimeout=setTimeout(function(){t.isHovered||t.isFocused||t._animateOut()},this.options.exitDelay)}},{key:"_setEnterDelayTimeout",value:function(t){var e=this;clearTimeout(this._enterDelayTimeout),this._enterDelayTimeout=setTimeout(function(){(e.isHovered||e.isFocused||t)&&e._animateIn()},this.options.enterDelay)}},{key:"_positionTooltip",value:function(){var t,e=this.el,i=this.tooltipEl,n=e.offsetHeight,s=e.offsetWidth,o=i.offsetHeight,a=i.offsetWidth,r=this.options.margin,l=void 0,h=void 0;this.xMovement=0,this.yMovement=0,l=e.getBoundingClientRect().top+M.getDocumentScrollTop(),h=e.getBoundingClientRect().left+M.getDocumentScrollLeft(),"top"===this.options.position?(l+=-o-r,h+=s/2-a/2,this.yMovement=-this.options.transitionMovement):"right"===this.options.position?(l+=n/2-o/2,h+=s+r,this.xMovement=this.options.transitionMovement):"left"===this.options.position?(l+=n/2-o/2,h+=-a-r,this.xMovement=-this.options.transitionMovement):(l+=n+r,h+=s/2-a/2,this.yMovement=this.options.transitionMovement),t=this._repositionWithinScreen(h,l,a,o),d(i).css({top:t.y+"px",left:t.x+"px"})}},{key:"_repositionWithinScreen",value:function(t,e,i,n){var s=M.getDocumentScrollLeft(),o=M.getDocumentScrollTop(),a=t-s,r=e-o,l={left:a,top:r,width:i,height:n},h=this.options.margin+this.options.transitionMovement,d=M.checkWithinContainer(document.body,l,h);return d.left?a=h:d.right&&(a-=a+i-window.innerWidth),d.top?r=h:d.bottom&&(r-=r+n-window.innerHeight),{x:a+s,y:r+o}}},{key:"_animateIn",value:function(){this._positionTooltip(),this.tooltipEl.style.visibility="visible",e.remove(this.tooltipEl),e({targets:this.tooltipEl,opacity:1,translateX:this.xMovement,translateY:this.yMovement,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_animateOut",value:function(){e.remove(this.tooltipEl),e({targets:this.tooltipEl,opacity:0,translateX:0,translateY:0,duration:this.options.outDuration,easing:"easeOutCubic"})}},{key:"_handleMouseEnter",value:function(){this.isHovered=!0,this.isFocused=!1,this.open(!1)}},{key:"_handleMouseLeave",value:function(){this.isHovered=!1,this.isFocused=!1,this.close()}},{key:"_handleFocus",value:function(){M.tabPressed&&(this.isFocused=!0,this.open(!1))}},{key:"_handleBlur",value:function(){this.isFocused=!1,this.close()}},{key:"_getAttributeOptions",value:function(){var t={},e=this.el.getAttribute("data-tooltip"),i=this.el.getAttribute("data-position");return e&&(t.html=e),i&&(t.position=i),t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Tooltip}},{key:"defaults",get:function(){return i}}]),n}();M.Tooltip=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"tooltip","M_Tooltip")}(cash,M.anime),function(i){"use strict";var t=t||{},e=document.querySelectorAll.bind(document);function m(t){var e="";for(var i in t)t.hasOwnProperty(i)&&(e+=i+":"+t[i]+";");return e}var g={duration:750,show:function(t,e){if(2===t.button)return!1;var i=e||this,n=document.createElement("div");n.className="waves-ripple",i.appendChild(n);var s,o,a,r,l,h,d,u=(h={top:0,left:0},d=(s=i)&&s.ownerDocument,o=d.documentElement,void 0!==s.getBoundingClientRect&&(h=s.getBoundingClientRect()),a=null!==(l=r=d)&&l===l.window?r:9===r.nodeType&&r.defaultView,{top:h.top+a.pageYOffset-o.clientTop,left:h.left+a.pageXOffset-o.clientLeft}),c=t.pageY-u.top,p=t.pageX-u.left,v="scale("+i.clientWidth/100*10+")";"touches"in t&&(c=t.touches[0].pageY-u.top,p=t.touches[0].pageX-u.left),n.setAttribute("data-hold",Date.now()),n.setAttribute("data-scale",v),n.setAttribute("data-x",p),n.setAttribute("data-y",c);var f={top:c+"px",left:p+"px"};n.className=n.className+" waves-notransition",n.setAttribute("style",m(f)),n.className=n.className.replace("waves-notransition",""),f["-webkit-transform"]=v,f["-moz-transform"]=v,f["-ms-transform"]=v,f["-o-transform"]=v,f.transform=v,f.opacity="1",f["-webkit-transition-duration"]=g.duration+"ms",f["-moz-transition-duration"]=g.duration+"ms",f["-o-transition-duration"]=g.duration+"ms",f["transition-duration"]=g.duration+"ms",f["-webkit-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-moz-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-o-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",n.setAttribute("style",m(f))},hide:function(t){l.touchup(t);var e=this,i=(e.clientWidth,null),n=e.getElementsByClassName("waves-ripple");if(!(0<n.length))return!1;var s=(i=n[n.length-1]).getAttribute("data-x"),o=i.getAttribute("data-y"),a=i.getAttribute("data-scale"),r=350-(Date.now()-Number(i.getAttribute("data-hold")));r<0&&(r=0),setTimeout(function(){var t={top:o+"px",left:s+"px",opacity:"0","-webkit-transition-duration":g.duration+"ms","-moz-transition-duration":g.duration+"ms","-o-transition-duration":g.duration+"ms","transition-duration":g.duration+"ms","-webkit-transform":a,"-moz-transform":a,"-ms-transform":a,"-o-transform":a,transform:a};i.setAttribute("style",m(t)),setTimeout(function(){try{e.removeChild(i)}catch(t){return!1}},g.duration)},r)},wrapInput:function(t){for(var e=0;e<t.length;e++){var i=t[e];if("input"===i.tagName.toLowerCase()){var n=i.parentNode;if("i"===n.tagName.toLowerCase()&&-1!==n.className.indexOf("waves-effect"))continue;var s=document.createElement("i");s.className=i.className+" waves-input-wrapper";var o=i.getAttribute("style");o||(o=""),s.setAttribute("style",o),i.className="waves-button-input",i.removeAttribute("style"),n.replaceChild(s,i),s.appendChild(i)}}}},l={touches:0,allowEvent:function(t){var e=!0;return"touchstart"===t.type?l.touches+=1:"touchend"===t.type||"touchcancel"===t.type?setTimeout(function(){0<l.touches&&(l.touches-=1)},500):"mousedown"===t.type&&0<l.touches&&(e=!1),e},touchup:function(t){l.allowEvent(t)}};function n(t){var e=function(t){if(!1===l.allowEvent(t))return null;for(var e=null,i=t.target||t.srcElement;null!==i.parentNode;){if(!(i instanceof SVGElement)&&-1!==i.className.indexOf("waves-effect")){e=i;break}i=i.parentNode}return e}(t);null!==e&&(g.show(t,e),"ontouchstart"in i&&(e.addEventListener("touchend",g.hide,!1),e.addEventListener("touchcancel",g.hide,!1)),e.addEventListener("mouseup",g.hide,!1),e.addEventListener("mouseleave",g.hide,!1),e.addEventListener("dragend",g.hide,!1))}t.displayEffect=function(t){"duration"in(t=t||{})&&(g.duration=t.duration),g.wrapInput(e(".waves-effect")),"ontouchstart"in i&&document.body.addEventListener("touchstart",n,!1),document.body.addEventListener("mousedown",n,!1)},t.attach=function(t){"input"===t.tagName.toLowerCase()&&(g.wrapInput([t]),t=t.parentNode),"ontouchstart"in i&&t.addEventListener("touchstart",n,!1),t.addEventListener("mousedown",n,!1)},i.Waves=t,document.addEventListener("DOMContentLoaded",function(){t.displayEffect()},!1)}(window),function(i,n){"use strict";var t={html:"",displayLength:4e3,inDuration:300,outDuration:375,classes:"",completeCallback:null,activationPercent:.8},e=function(){function s(t){_classCallCheck(this,s),this.options=i.extend({},s.defaults,t),this.message=this.options.html,this.panning=!1,this.timeRemaining=this.options.displayLength,0===s._toasts.length&&s._createContainer(),s._toasts.push(this);var e=this._createToast();(e.M_Toast=this).el=e,this.$el=i(e),this._animateIn(),this._setTimer()}return _createClass(s,[{key:"_createToast",value:function(){var t=document.createElement("div");return t.classList.add("toast"),this.options.classes.length&&i(t).addClass(this.options.classes),("object"==typeof HTMLElement?this.message instanceof HTMLElement:this.message&&"object"==typeof this.message&&null!==this.message&&1===this.message.nodeType&&"string"==typeof this.message.nodeName)?t.appendChild(this.message):this.message.jquery?i(t).append(this.message[0]):t.innerHTML=this.message,s._container.appendChild(t),t}},{key:"_animateIn",value:function(){n({targets:this.el,top:0,opacity:1,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_setTimer",value:function(){var t=this;this.timeRemaining!==1/0&&(this.counterInterval=setInterval(function(){t.panning||(t.timeRemaining-=20),t.timeRemaining<=0&&t.dismiss()},20))}},{key:"dismiss",value:function(){var t=this;window.clearInterval(this.counterInterval);var e=this.el.offsetWidth*this.options.activationPercent;this.wasSwiped&&(this.el.style.transition="transform .05s, opacity .05s",this.el.style.transform="translateX("+e+"px)",this.el.style.opacity=0),n({targets:this.el,opacity:0,marginTop:-40,duration:this.options.outDuration,easing:"easeOutExpo",complete:function(){"function"==typeof t.options.completeCallback&&t.options.completeCallback(),t.$el.remove(),s._toasts.splice(s._toasts.indexOf(t),1),0===s._toasts.length&&s._removeContainer()}})}}],[{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Toast}},{key:"_createContainer",value:function(){var t=document.createElement("div");t.setAttribute("id","toast-container"),t.addEventListener("touchstart",s._onDragStart),t.addEventListener("touchmove",s._onDragMove),t.addEventListener("touchend",s._onDragEnd),t.addEventListener("mousedown",s._onDragStart),document.addEventListener("mousemove",s._onDragMove),document.addEventListener("mouseup",s._onDragEnd),document.body.appendChild(t),s._container=t}},{key:"_removeContainer",value:function(){document.removeEventListener("mousemove",s._onDragMove),document.removeEventListener("mouseup",s._onDragEnd),i(s._container).remove(),s._container=null}},{key:"_onDragStart",value:function(t){if(t.target&&i(t.target).closest(".toast").length){var e=i(t.target).closest(".toast")[0].M_Toast;e.panning=!0,(s._draggedToast=e).el.classList.add("panning"),e.el.style.transition="",e.startingXPos=s._xPos(t),e.time=Date.now(),e.xPos=s._xPos(t)}}},{key:"_onDragMove",value:function(t){if(s._draggedToast){t.preventDefault();var e=s._draggedToast;e.deltaX=Math.abs(e.xPos-s._xPos(t)),e.xPos=s._xPos(t),e.velocityX=e.deltaX/(Date.now()-e.time),e.time=Date.now();var i=e.xPos-e.startingXPos,n=e.el.offsetWidth*e.options.activationPercent;e.el.style.transform="translateX("+i+"px)",e.el.style.opacity=1-Math.abs(i/n)}}},{key:"_onDragEnd",value:function(){if(s._draggedToast){var t=s._draggedToast;t.panning=!1,t.el.classList.remove("panning");var e=t.xPos-t.startingXPos,i=t.el.offsetWidth*t.options.activationPercent;Math.abs(e)>i||1<t.velocityX?(t.wasSwiped=!0,t.dismiss()):(t.el.style.transition="transform .2s, opacity .2s",t.el.style.transform="",t.el.style.opacity=""),s._draggedToast=null}}},{key:"_xPos",value:function(t){return t.targetTouches&&1<=t.targetTouches.length?t.targetTouches[0].clientX:t.clientX}},{key:"dismissAll",value:function(){for(var t in s._toasts)s._toasts[t].dismiss()}},{key:"defaults",get:function(){return t}}]),s}();e._toasts=[],e._container=null,e._draggedToast=null,M.Toast=e,M.toast=function(t){return new e(t)}}(cash,M.anime),function(s,o){"use strict";var e={edge:"left",draggable:!0,inDuration:250,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Sidenav=i).id=i.$el.attr("id"),i.options=s.extend({},n.defaults,e),i.isOpen=!1,i.isFixed=i.el.classList.contains("sidenav-fixed"),i.isDragged=!1,i.lastWindowWidth=window.innerWidth,i.lastWindowHeight=window.innerHeight,i._createOverlay(),i._createDragTarget(),i._setupEventHandlers(),i._setupClasses(),i._setupFixed(),n._sidenavs.push(i),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._enableBodyScrolling(),this._overlay.parentNode.removeChild(this._overlay),this.dragTarget.parentNode.removeChild(this.dragTarget),this.el.M_Sidenav=void 0,this.el.style.transform="";var t=n._sidenavs.indexOf(this);0<=t&&n._sidenavs.splice(t,1)}},{key:"_createOverlay",value:function(){var t=document.createElement("div");this._closeBound=this.close.bind(this),t.classList.add("sidenav-overlay"),t.addEventListener("click",this._closeBound),document.body.appendChild(t),this._overlay=t}},{key:"_setupEventHandlers",value:function(){0===n._sidenavs.length&&document.body.addEventListener("click",this._handleTriggerClick),this._handleDragTargetDragBound=this._handleDragTargetDrag.bind(this),this._handleDragTargetReleaseBound=this._handleDragTargetRelease.bind(this),this._handleCloseDragBound=this._handleCloseDrag.bind(this),this._handleCloseReleaseBound=this._handleCloseRelease.bind(this),this._handleCloseTriggerClickBound=this._handleCloseTriggerClick.bind(this),this.dragTarget.addEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.addEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.addEventListener("touchmove",this._handleCloseDragBound),this._overlay.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("touchmove",this._handleCloseDragBound),this.el.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&(this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound))}},{key:"_removeEventHandlers",value:function(){1===n._sidenavs.length&&document.body.removeEventListener("click",this._handleTriggerClick),this.dragTarget.removeEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.removeEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.removeEventListener("touchmove",this._handleCloseDragBound),this._overlay.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("touchmove",this._handleCloseDragBound),this.el.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&window.removeEventListener("resize",this._handleWindowResizeBound)}},{key:"_handleTriggerClick",value:function(t){var e=s(t.target).closest(".sidenav-trigger");if(t.target&&e.length){var i=M.getIdFromTrigger(e[0]),n=document.getElementById(i).M_Sidenav;n&&n.open(e),t.preventDefault()}}},{key:"_startDrag",value:function(t){var e=t.targetTouches[0].clientX;this.isDragged=!0,this._startingXpos=e,this._xPos=this._startingXpos,this._time=Date.now(),this._width=this.el.getBoundingClientRect().width,this._overlay.style.display="block",this._initialScrollTop=this.isOpen?this.el.scrollTop:M.getDocumentScrollTop(),this._verticallyScrolling=!1,o.remove(this.el),o.remove(this._overlay)}},{key:"_dragMoveUpdate",value:function(t){var e=t.targetTouches[0].clientX,i=this.isOpen?this.el.scrollTop:M.getDocumentScrollTop();this.deltaX=Math.abs(this._xPos-e),this._xPos=e,this.velocityX=this.deltaX/(Date.now()-this._time),this._time=Date.now(),this._initialScrollTop!==i&&(this._verticallyScrolling=!0)}},{key:"_handleDragTargetDrag",value:function(t){if(this.options.draggable&&!this._isCurrentlyFixed()&&!this._verticallyScrolling){this.isDragged||this._startDrag(t),this._dragMoveUpdate(t);var e=this._xPos-this._startingXpos,i=0<e?"right":"left";e=Math.min(this._width,Math.abs(e)),this.options.edge===i&&(e=0);var n=e,s="translateX(-100%)";"right"===this.options.edge&&(s="translateX(100%)",n=-n),this.percentOpen=Math.min(1,e/this._width),this.el.style.transform=s+" translateX("+n+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleDragTargetRelease",value:function(){this.isDragged&&(.2<this.percentOpen?this.open():this._animateOut(),this.isDragged=!1,this._verticallyScrolling=!1)}},{key:"_handleCloseDrag",value:function(t){if(this.isOpen){if(!this.options.draggable||this._isCurrentlyFixed()||this._verticallyScrolling)return;this.isDragged||this._startDrag(t),this._dragMoveUpdate(t);var e=this._xPos-this._startingXpos,i=0<e?"right":"left";e=Math.min(this._width,Math.abs(e)),this.options.edge!==i&&(e=0);var n=-e;"right"===this.options.edge&&(n=-n),this.percentOpen=Math.min(1,1-e/this._width),this.el.style.transform="translateX("+n+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleCloseRelease",value:function(){this.isOpen&&this.isDragged&&(.8<this.percentOpen?this._animateIn():this.close(),this.isDragged=!1,this._verticallyScrolling=!1)}},{key:"_handleCloseTriggerClick",value:function(t){s(t.target).closest(".sidenav-close").length&&!this._isCurrentlyFixed()&&this.close()}},{key:"_handleWindowResize",value:function(){this.lastWindowWidth!==window.innerWidth&&(992<window.innerWidth?this.open():this.close()),this.lastWindowWidth=window.innerWidth,this.lastWindowHeight=window.innerHeight}},{key:"_setupClasses",value:function(){"right"===this.options.edge&&(this.el.classList.add("right-aligned"),this.dragTarget.classList.add("right-aligned"))}},{key:"_removeClasses",value:function(){this.el.classList.remove("right-aligned"),this.dragTarget.classList.remove("right-aligned")}},{key:"_setupFixed",value:function(){this._isCurrentlyFixed()&&this.open()}},{key:"_isCurrentlyFixed",value:function(){return this.isFixed&&992<window.innerWidth}},{key:"_createDragTarget",value:function(){var t=document.createElement("div");t.classList.add("drag-target"),document.body.appendChild(t),this.dragTarget=t}},{key:"_preventBodyScrolling",value:function(){document.body.style.overflow="hidden"}},{key:"_enableBodyScrolling",value:function(){document.body.style.overflow=""}},{key:"open",value:function(){!0!==this.isOpen&&(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._isCurrentlyFixed()?(o.remove(this.el),o({targets:this.el,translateX:0,duration:0,easing:"easeOutQuad"}),this._enableBodyScrolling(),this._overlay.style.display="none"):(this.options.preventScrolling&&this._preventBodyScrolling(),this.isDragged&&1==this.percentOpen||this._animateIn()))}},{key:"close",value:function(){if(!1!==this.isOpen)if(this.isOpen=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._isCurrentlyFixed()){var t="left"===this.options.edge?"-105%":"105%";this.el.style.transform="translateX("+t+")"}else this._enableBodyScrolling(),this.isDragged&&0==this.percentOpen?this._overlay.style.display="none":this._animateOut()}},{key:"_animateIn",value:function(){this._animateSidenavIn(),this._animateOverlayIn()}},{key:"_animateSidenavIn",value:function(){var t=this,e="left"===this.options.edge?-1:1;this.isDragged&&(e="left"===this.options.edge?e+this.percentOpen:e-this.percentOpen),o.remove(this.el),o({targets:this.el,translateX:[100*e+"%",0],duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el)}})}},{key:"_animateOverlayIn",value:function(){var t=0;this.isDragged?t=this.percentOpen:s(this._overlay).css({display:"block"}),o.remove(this._overlay),o({targets:this._overlay,opacity:[t,1],duration:this.options.inDuration,easing:"easeOutQuad"})}},{key:"_animateOut",value:function(){this._animateSidenavOut(),this._animateOverlayOut()}},{key:"_animateSidenavOut",value:function(){var t=this,e="left"===this.options.edge?-1:1,i=0;this.isDragged&&(i="left"===this.options.edge?e+this.percentOpen:e-this.percentOpen),o.remove(this.el),o({targets:this.el,translateX:[100*i+"%",105*e+"%"],duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}})}},{key:"_animateOverlayOut",value:function(){var t=this;o.remove(this._overlay),o({targets:this._overlay,opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){s(t._overlay).css("display","none")}})}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Sidenav}},{key:"defaults",get:function(){return e}}]),n}();t._sidenavs=[],M.Sidenav=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"sidenav","M_Sidenav")}(cash,M.anime),function(o,a){"use strict";var e={throttle:100,scrollOffset:200,activeClass:"active",getActiveElement:function(t){return'a[href="#'+t+'"]'}},t=function(t){function c(t,e){_classCallCheck(this,c);var i=_possibleConstructorReturn(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,c,t,e));return(i.el.M_ScrollSpy=i).options=o.extend({},c.defaults,e),c._elements.push(i),c._count++,c._increment++,i.tickId=-1,i.id=c._increment,i._setupEventHandlers(),i._handleWindowScroll(),i}return _inherits(c,Component),_createClass(c,[{key:"destroy",value:function(){c._elements.splice(c._elements.indexOf(this),1),c._elementsInView.splice(c._elementsInView.indexOf(this),1),c._visibleElements.splice(c._visibleElements.indexOf(this.$el),1),c._count--,this._removeEventHandlers(),o(this.options.getActiveElement(this.$el.attr("id"))).removeClass(this.options.activeClass),this.el.M_ScrollSpy=void 0}},{key:"_setupEventHandlers",value:function(){var t=M.throttle(this._handleWindowScroll,200);this._handleThrottledResizeBound=t.bind(this),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),1===c._count&&(window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleThrottledResizeBound),document.body.addEventListener("click",this._handleTriggerClick))}},{key:"_removeEventHandlers",value:function(){0===c._count&&(window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleThrottledResizeBound),document.body.removeEventListener("click",this._handleTriggerClick))}},{key:"_handleTriggerClick",value:function(t){for(var e=o(t.target),i=c._elements.length-1;0<=i;i--){var n=c._elements[i];if(e.is('a[href="#'+n.$el.attr("id")+'"]')){t.preventDefault();var s=n.$el.offset().top+1;a({targets:[document.documentElement,document.body],scrollTop:s-n.options.scrollOffset,duration:400,easing:"easeOutCubic"});break}}}},{key:"_handleWindowScroll",value:function(){c._ticks++;for(var t=M.getDocumentScrollTop(),e=M.getDocumentScrollLeft(),i=e+window.innerWidth,n=t+window.innerHeight,s=c._findElements(t,i,n,e),o=0;o<s.length;o++){var a=s[o];a.tickId<0&&a._enter(),a.tickId=c._ticks}for(var r=0;r<c._elementsInView.length;r++){var l=c._elementsInView[r],h=l.tickId;0<=h&&h!==c._ticks&&(l._exit(),l.tickId=-1)}c._elementsInView=s}},{key:"_enter",value:function(){(c._visibleElements=c._visibleElements.filter(function(t){return 0!=t.height()}))[0]?(o(this.options.getActiveElement(c._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),c._visibleElements[0][0].M_ScrollSpy&&this.id<c._visibleElements[0][0].M_ScrollSpy.id?c._visibleElements.unshift(this.$el):c._visibleElements.push(this.$el)):c._visibleElements.push(this.$el),o(this.options.getActiveElement(c._visibleElements[0].attr("id"))).addClass(this.options.activeClass)}},{key:"_exit",value:function(){var e=this;(c._visibleElements=c._visibleElements.filter(function(t){return 0!=t.height()}))[0]&&(o(this.options.getActiveElement(c._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),(c._visibleElements=c._visibleElements.filter(function(t){return t.attr("id")!=e.$el.attr("id")}))[0]&&o(this.options.getActiveElement(c._visibleElements[0].attr("id"))).addClass(this.options.activeClass))}}],[{key:"init",value:function(t,e){return _get(c.__proto__||Object.getPrototypeOf(c),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_ScrollSpy}},{key:"_findElements",value:function(t,e,i,n){for(var s=[],o=0;o<c._elements.length;o++){var a=c._elements[o],r=t+a.options.scrollOffset||200;if(0<a.$el.height()){var l=a.$el.offset().top,h=a.$el.offset().left,d=h+a.$el.width(),u=l+a.$el.height();!(e<h||d<n||i<l||u<r)&&s.push(a)}}return s}},{key:"defaults",get:function(){return e}}]),c}();t._elements=[],t._elementsInView=[],t._visibleElements=[],t._count=0,t._increment=0,t._ticks=0,M.ScrollSpy=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"scrollSpy","M_ScrollSpy")}(cash,M.anime),function(h){"use strict";var e={data:{},limit:1/0,onAutocomplete:null,minLength:1,sortFunction:function(t,e,i){return t.indexOf(i)-e.indexOf(i)}},t=function(t){function s(t,e){_classCallCheck(this,s);var i=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,t,e));return(i.el.M_Autocomplete=i).options=h.extend({},s.defaults,e),i.isOpen=!1,i.count=0,i.activeIndex=-1,i.oldVal,i.$inputField=i.$el.closest(".input-field"),i.$active=h(),i._mousedown=!1,i._setupDropdown(),i._setupEventHandlers(),i}return _inherits(s,Component),_createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_Autocomplete=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputBlurBound=this._handleInputBlur.bind(this),this._handleInputKeyupAndFocusBound=this._handleInputKeyupAndFocus.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleContainerMousedownAndTouchstartBound=this._handleContainerMousedownAndTouchstart.bind(this),this._handleContainerMouseupAndTouchendBound=this._handleContainerMouseupAndTouchend.bind(this),this.el.addEventListener("blur",this._handleInputBlurBound),this.el.addEventListener("keyup",this._handleInputKeyupAndFocusBound),this.el.addEventListener("focus",this._handleInputKeyupAndFocusBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("click",this._handleInputClickBound),this.container.addEventListener("mousedown",this._handleContainerMousedownAndTouchstartBound),this.container.addEventListener("mouseup",this._handleContainerMouseupAndTouchendBound),void 0!==window.ontouchstart&&(this.container.addEventListener("touchstart",this._handleContainerMousedownAndTouchstartBound),this.container.addEventListener("touchend",this._handleContainerMouseupAndTouchendBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("blur",this._handleInputBlurBound),this.el.removeEventListener("keyup",this._handleInputKeyupAndFocusBound),this.el.removeEventListener("focus",this._handleInputKeyupAndFocusBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("click",this._handleInputClickBound),this.container.removeEventListener("mousedown",this._handleContainerMousedownAndTouchstartBound),this.container.removeEventListener("mouseup",this._handleContainerMouseupAndTouchendBound),void 0!==window.ontouchstart&&(this.container.removeEventListener("touchstart",this._handleContainerMousedownAndTouchstartBound),this.container.removeEventListener("touchend",this._handleContainerMouseupAndTouchendBound))}},{key:"_setupDropdown",value:function(){var e=this;this.container=document.createElement("ul"),this.container.id="autocomplete-options-"+M.guid(),h(this.container).addClass("autocomplete-content dropdown-content"),this.$inputField.append(this.container),this.el.setAttribute("data-target",this.container.id),this.dropdown=M.Dropdown.init(this.el,{autoFocus:!1,closeOnClick:!1,coverTrigger:!1,onItemClick:function(t){e.selectOption(h(t))}}),this.el.removeEventListener("click",this.dropdown._handleClickBound)}},{key:"_removeDropdown",value:function(){this.container.parentNode.removeChild(this.container)}},{key:"_handleInputBlur",value:function(){this._mousedown||(this.close(),this._resetAutocomplete())}},{key:"_handleInputKeyupAndFocus",value:function(t){"keyup"===t.type&&(s._keydown=!1),this.count=0;var e=this.el.value.toLowerCase();13!==t.keyCode&&38!==t.keyCode&&40!==t.keyCode&&(this.oldVal===e||!M.tabPressed&&"focus"===t.type||this.open(),this.oldVal=e)}},{key:"_handleInputKeydown",value:function(t){s._keydown=!0;var e=t.keyCode,i=void 0,n=h(this.container).children("li").length;e===M.keys.ENTER&&0<=this.activeIndex?(i=h(this.container).children("li").eq(this.activeIndex)).length&&(this.selectOption(i),t.preventDefault()):e!==M.keys.ARROW_UP&&e!==M.keys.ARROW_DOWN||(t.preventDefault(),e===M.keys.ARROW_UP&&0<this.activeIndex&&this.activeIndex--,e===M.keys.ARROW_DOWN&&this.activeIndex<n-1&&this.activeIndex++,this.$active.removeClass("active"),0<=this.activeIndex&&(this.$active=h(this.container).children("li").eq(this.activeIndex),this.$active.addClass("active")))}},{key:"_handleInputClick",value:function(t){this.open()}},{key:"_handleContainerMousedownAndTouchstart",value:function(t){this._mousedown=!0}},{key:"_handleContainerMouseupAndTouchend",value:function(t){this._mousedown=!1}},{key:"_highlight",value:function(t,e){var i=e.find("img"),n=e.text().toLowerCase().indexOf(""+t.toLowerCase()),s=n+t.length-1,o=e.text().slice(0,n),a=e.text().slice(n,s+1),r=e.text().slice(s+1);e.html("<span>"+o+"<span class='highlight'>"+a+"</span>"+r+"</span>"),i.length&&e.prepend(i)}},{key:"_resetCurrentElement",value:function(){this.activeIndex=-1,this.$active.removeClass("active")}},{key:"_resetAutocomplete",value:function(){h(this.container).empty(),this._resetCurrentElement(),this.oldVal=null,this.isOpen=!1,this._mousedown=!1}},{key:"selectOption",value:function(t){var e=t.text().trim();this.el.value=e,this.$el.trigger("change"),this._resetAutocomplete(),this.close(),"function"==typeof this.options.onAutocomplete&&this.options.onAutocomplete.call(this,e)}},{key:"_renderDropdown",value:function(t,i){var n=this;this._resetAutocomplete();var e=[];for(var s in t)if(t.hasOwnProperty(s)&&-1!==s.toLowerCase().indexOf(i)){if(this.count>=this.options.limit)break;var o={data:t[s],key:s};e.push(o),this.count++}if(this.options.sortFunction){e.sort(function(t,e){return n.options.sortFunction(t.key.toLowerCase(),e.key.toLowerCase(),i.toLowerCase())})}for(var a=0;a<e.length;a++){var r=e[a],l=h("<li></li>");r.data?l.append('<img src="'+r.data+'" class="right circle"><span>'+r.key+"</span>"):l.append("<span>"+r.key+"</span>"),h(this.container).append(l),this._highlight(i,l)}}},{key:"open",value:function(){var t=this.el.value.toLowerCase();this._resetAutocomplete(),t.length>=this.options.minLength&&(this.isOpen=!0,this._renderDropdown(this.options.data,t)),this.dropdown.isOpen?this.dropdown.recalculateDimensions():this.dropdown.open()}},{key:"close",value:function(){this.dropdown.close()}},{key:"updateData",value:function(t){var e=this.el.value.toLowerCase();this.options.data=t,this.isOpen&&this._renderDropdown(t,e)}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Autocomplete}},{key:"defaults",get:function(){return e}}]),s}();t._keydown=!1,M.Autocomplete=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"autocomplete","M_Autocomplete")}(cash),function(d){M.updateTextFields=function(){d("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea").each(function(t,e){var i=d(this);0<t.value.length||d(t).is(":focus")||t.autofocus||null!==i.attr("placeholder")?i.siblings("label").addClass("active"):t.validity?i.siblings("label").toggleClass("active",!0===t.validity.badInput):i.siblings("label").removeClass("active")})},M.validate_field=function(t){var e=null!==t.attr("data-length"),i=parseInt(t.attr("data-length")),n=t[0].value.length;0!==n||!1!==t[0].validity.badInput||t.is(":required")?t.hasClass("validate")&&(t.is(":valid")&&e&&n<=i||t.is(":valid")&&!e?(t.removeClass("invalid"),t.addClass("valid")):(t.removeClass("valid"),t.addClass("invalid"))):t.hasClass("validate")&&(t.removeClass("valid"),t.removeClass("invalid"))},M.textareaAutoResize=function(t){if(t instanceof Element&&(t=d(t)),t.length){var e=d(".hiddendiv").first();e.length||(e=d('<div class="hiddendiv common"></div>'),d("body").append(e));var i=t.css("font-family"),n=t.css("font-size"),s=t.css("line-height"),o=t.css("padding-top"),a=t.css("padding-right"),r=t.css("padding-bottom"),l=t.css("padding-left");n&&e.css("font-size",n),i&&e.css("font-family",i),s&&e.css("line-height",s),o&&e.css("padding-top",o),a&&e.css("padding-right",a),r&&e.css("padding-bottom",r),l&&e.css("padding-left",l),t.data("original-height")||t.data("original-height",t.height()),"off"===t.attr("wrap")&&e.css("overflow-wrap","normal").css("white-space","pre"),e.text(t[0].value+"\n");var h=e.html().replace(/\n/g,"<br>");e.html(h),0<t[0].offsetWidth&&0<t[0].offsetHeight?e.css("width",t.width()+"px"):e.css("width",window.innerWidth/2+"px"),t.data("original-height")<=e.innerHeight()?t.css("height",e.innerHeight()+"px"):t[0].value.length<t.data("previous-length")&&t.css("height",t.data("original-height")+"px"),t.data("previous-length",t[0].value.length)}else console.error("No textarea element found")},d(document).ready(function(){var n="input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea";d(document).on("change",n,function(){0===this.value.length&&null===d(this).attr("placeholder")||d(this).siblings("label").addClass("active"),M.validate_field(d(this))}),d(document).ready(function(){M.updateTextFields()}),d(document).on("reset",function(t){var e=d(t.target);e.is("form")&&(e.find(n).removeClass("valid").removeClass("invalid"),e.find(n).each(function(t){this.value.length&&d(this).siblings("label").removeClass("active")}),setTimeout(function(){e.find("select").each(function(){this.M_FormSelect&&d(this).trigger("change")})},0))}),document.addEventListener("focus",function(t){d(t.target).is(n)&&d(t.target).siblings("label, .prefix").addClass("active")},!0),document.addEventListener("blur",function(t){var e=d(t.target);if(e.is(n)){var i=".prefix";0===e[0].value.length&&!0!==e[0].validity.badInput&&null===e.attr("placeholder")&&(i+=", label"),e.siblings(i).removeClass("active"),M.validate_field(e)}},!0);d(document).on("keyup","input[type=radio], input[type=checkbox]",function(t){if(t.which===M.keys.TAB)return d(this).addClass("tabbed"),void d(this).one("blur",function(t){d(this).removeClass("tabbed")})});var t=".materialize-textarea";d(t).each(function(){var t=d(this);t.data("original-height",t.height()),t.data("previous-length",this.value.length),M.textareaAutoResize(t)}),d(document).on("keyup",t,function(){M.textareaAutoResize(d(this))}),d(document).on("keydown",t,function(){M.textareaAutoResize(d(this))}),d(document).on("change",'.file-field input[type="file"]',function(){for(var t=d(this).closest(".file-field").find("input.file-path"),e=d(this)[0].files,i=[],n=0;n<e.length;n++)i.push(e[n].name);t[0].value=i.join(", "),t.trigger("change")})})}(cash),function(s,o){"use strict";var e={indicators:!0,height:400,duration:500,interval:6e3},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Slider=i).options=s.extend({},n.defaults,e),i.$slider=i.$el.find(".slides"),i.$slides=i.$slider.children("li"),i.activeIndex=i.$slides.filter(function(t){return s(t).hasClass("active")}).first().index(),-1!=i.activeIndex&&(i.$active=i.$slides.eq(i.activeIndex)),i._setSliderHeight(),i.$slides.find(".caption").each(function(t){i._animateCaptionIn(t,0)}),i.$slides.find("img").each(function(t){var e="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";s(t).attr("src")!==e&&(s(t).css("background-image",'url("'+s(t).attr("src")+'")'),s(t).attr("src",e))}),i._setupIndicators(),i.$active?i.$active.css("display","block"):(i.$slides.first().addClass("active"),o({targets:i.$slides.first()[0],opacity:1,duration:i.options.duration,easing:"easeOutQuad"}),i.activeIndex=0,i.$active=i.$slides.eq(i.activeIndex),i.options.indicators&&i.$indicators.eq(i.activeIndex).addClass("active")),i.$active.find("img").each(function(t){o({targets:i.$active.find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:i.options.duration,easing:"easeOutQuad"})}),i._setupEventHandlers(),i.start(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this.pause(),this._removeIndicators(),this._removeEventHandlers(),this.el.M_Slider=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleIntervalBound=this._handleInterval.bind(this),this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.options.indicators&&this.$indicators.each(function(t){t.addEventListener("click",e._handleIndicatorClickBound)})}},{key:"_removeEventHandlers",value:function(){var e=this;this.options.indicators&&this.$indicators.each(function(t){t.removeEventListener("click",e._handleIndicatorClickBound)})}},{key:"_handleIndicatorClick",value:function(t){var e=s(t.target).index();this.set(e)}},{key:"_handleInterval",value:function(){var t=this.$slider.find(".active").index();this.$slides.length===t+1?t=0:t+=1,this.set(t)}},{key:"_animateCaptionIn",value:function(t,e){var i={targets:t,opacity:0,duration:e,easing:"easeOutQuad"};s(t).hasClass("center-align")?i.translateY=-100:s(t).hasClass("right-align")?i.translateX=100:s(t).hasClass("left-align")&&(i.translateX=-100),o(i)}},{key:"_setSliderHeight",value:function(){this.$el.hasClass("fullscreen")||(this.options.indicators?this.$el.css("height",this.options.height+40+"px"):this.$el.css("height",this.options.height+"px"),this.$slider.css("height",this.options.height+"px"))}},{key:"_setupIndicators",value:function(){var n=this;this.options.indicators&&(this.$indicators=s('<ul class="indicators"></ul>'),this.$slides.each(function(t,e){var i=s('<li class="indicator-item"></li>');n.$indicators.append(i[0])}),this.$el.append(this.$indicators[0]),this.$indicators=this.$indicators.children("li.indicator-item"))}},{key:"_removeIndicators",value:function(){this.$el.find("ul.indicators").remove()}},{key:"set",value:function(t){var e=this;if(t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.activeIndex!=t){this.$active=this.$slides.eq(this.activeIndex);var i=this.$active.find(".caption");this.$active.removeClass("active"),o({targets:this.$active[0],opacity:0,duration:this.options.duration,easing:"easeOutQuad",complete:function(){e.$slides.not(".active").each(function(t){o({targets:t,opacity:0,translateX:0,translateY:0,duration:0,easing:"easeOutQuad"})})}}),this._animateCaptionIn(i[0],this.options.duration),this.options.indicators&&(this.$indicators.eq(this.activeIndex).removeClass("active"),this.$indicators.eq(t).addClass("active")),o({targets:this.$slides.eq(t)[0],opacity:1,duration:this.options.duration,easing:"easeOutQuad"}),o({targets:this.$slides.eq(t).find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:this.options.duration,delay:this.options.duration,easing:"easeOutQuad"}),this.$slides.eq(t).addClass("active"),this.activeIndex=t,this.start()}}},{key:"pause",value:function(){clearInterval(this.interval)}},{key:"start",value:function(){clearInterval(this.interval),this.interval=setInterval(this._handleIntervalBound,this.options.duration+this.options.interval)}},{key:"next",value:function(){var t=this.activeIndex+1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}},{key:"prev",value:function(){var t=this.activeIndex-1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Slider}},{key:"defaults",get:function(){return e}}]),n}();M.Slider=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"slider","M_Slider")}(cash,M.anime),function(n,s){n(document).on("click",".card",function(t){if(n(this).children(".card-reveal").length){var i=n(t.target).closest(".card");void 0===i.data("initialOverflow")&&i.data("initialOverflow",void 0===i.css("overflow")?"":i.css("overflow"));var e=n(this).find(".card-reveal");n(t.target).is(n(".card-reveal .card-title"))||n(t.target).is(n(".card-reveal .card-title i"))?s({targets:e[0],translateY:0,duration:225,easing:"easeInOutQuad",complete:function(t){var e=t.animatables[0].target;n(e).css({display:"none"}),i.css("overflow",i.data("initialOverflow"))}}):(n(t.target).is(n(".card .activator"))||n(t.target).is(n(".card .activator i")))&&(i.css("overflow","hidden"),e.css({display:"block"}),s({targets:e[0],translateY:"-100%",duration:300,easing:"easeInOutQuad"}))}})}(cash,M.anime),function(h){"use strict";var e={data:[],placeholder:"",secondaryPlaceholder:"",autocompleteOptions:{},limit:1/0,onChipAdd:null,onChipSelect:null,onChipDelete:null},t=function(t){function l(t,e){_classCallCheck(this,l);var i=_possibleConstructorReturn(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,l,t,e));return(i.el.M_Chips=i).options=h.extend({},l.defaults,e),i.$el.addClass("chips input-field"),i.chipsData=[],i.$chips=h(),i._setupInput(),i.hasAutocomplete=0<Object.keys(i.options.autocompleteOptions).length,i.$input.attr("id")||i.$input.attr("id",M.guid()),i.options.data.length&&(i.chipsData=i.options.data,i._renderChips(i.chipsData)),i.hasAutocomplete&&i._setupAutocomplete(),i._setPlaceholder(),i._setupLabel(),i._setupEventHandlers(),i}return _inherits(l,Component),_createClass(l,[{key:"getData",value:function(){return this.chipsData}},{key:"destroy",value:function(){this._removeEventHandlers(),this.$chips.remove(),this.el.M_Chips=void 0}},{key:"_setupEventHandlers",value:function(){this._handleChipClickBound=this._handleChipClick.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputFocusBound=this._handleInputFocus.bind(this),this._handleInputBlurBound=this._handleInputBlur.bind(this),this.el.addEventListener("click",this._handleChipClickBound),document.addEventListener("keydown",l._handleChipsKeydown),document.addEventListener("keyup",l._handleChipsKeyup),this.el.addEventListener("blur",l._handleChipsBlur,!0),this.$input[0].addEventListener("focus",this._handleInputFocusBound),this.$input[0].addEventListener("blur",this._handleInputBlurBound),this.$input[0].addEventListener("keydown",this._handleInputKeydownBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleChipClickBound),document.removeEventListener("keydown",l._handleChipsKeydown),document.removeEventListener("keyup",l._handleChipsKeyup),this.el.removeEventListener("blur",l._handleChipsBlur,!0),this.$input[0].removeEventListener("focus",this._handleInputFocusBound),this.$input[0].removeEventListener("blur",this._handleInputBlurBound),this.$input[0].removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleChipClick",value:function(t){var e=h(t.target).closest(".chip"),i=h(t.target).is(".close");if(e.length){var n=e.index();i?(this.deleteChip(n),this.$input[0].focus()):this.selectChip(n)}else this.$input[0].focus()}},{key:"_handleInputFocus",value:function(){this.$el.addClass("focus")}},{key:"_handleInputBlur",value:function(){this.$el.removeClass("focus")}},{key:"_handleInputKeydown",value:function(t){if(l._keydown=!0,13===t.keyCode){if(this.hasAutocomplete&&this.autocomplete&&this.autocomplete.isOpen)return;t.preventDefault(),this.addChip({tag:this.$input[0].value}),this.$input[0].value=""}else 8!==t.keyCode&&37!==t.keyCode||""!==this.$input[0].value||!this.chipsData.length||(t.preventDefault(),this.selectChip(this.chipsData.length-1))}},{key:"_renderChip",value:function(t){if(t.tag){var e=document.createElement("div"),i=document.createElement("i");if(e.classList.add("chip"),e.textContent=t.tag,e.setAttribute("tabindex",0),h(i).addClass("material-icons close"),i.textContent="close",t.image){var n=document.createElement("img");n.setAttribute("src",t.image),e.insertBefore(n,e.firstChild)}return e.appendChild(i),e}}},{key:"_renderChips",value:function(){this.$chips.remove();for(var t=0;t<this.chipsData.length;t++){var e=this._renderChip(this.chipsData[t]);this.$el.append(e),this.$chips.add(e)}this.$el.append(this.$input[0])}},{key:"_setupAutocomplete",value:function(){var e=this;this.options.autocompleteOptions.onAutocomplete=function(t){e.addChip({tag:t}),e.$input[0].value="",e.$input[0].focus()},this.autocomplete=M.Autocomplete.init(this.$input[0],this.options.autocompleteOptions)}},{key:"_setupInput",value:function(){this.$input=this.$el.find("input"),this.$input.length||(this.$input=h("<input></input>"),this.$el.append(this.$input)),this.$input.addClass("input")}},{key:"_setupLabel",value:function(){this.$label=this.$el.find("label"),this.$label.length&&this.$label.setAttribute("for",this.$input.attr("id"))}},{key:"_setPlaceholder",value:function(){void 0!==this.chipsData&&!this.chipsData.length&&this.options.placeholder?h(this.$input).prop("placeholder",this.options.placeholder):(void 0===this.chipsData||this.chipsData.length)&&this.options.secondaryPlaceholder&&h(this.$input).prop("placeholder",this.options.secondaryPlaceholder)}},{key:"_isValid",value:function(t){if(t.hasOwnProperty("tag")&&""!==t.tag){for(var e=!1,i=0;i<this.chipsData.length;i++)if(this.chipsData[i].tag===t.tag){e=!0;break}return!e}return!1}},{key:"addChip",value:function(t){if(this._isValid(t)&&!(this.chipsData.length>=this.options.limit)){var e=this._renderChip(t);this.$chips.add(e),this.chipsData.push(t),h(this.$input).before(e),this._setPlaceholder(),"function"==typeof this.options.onChipAdd&&this.options.onChipAdd.call(this,this.$el,e)}}},{key:"deleteChip",value:function(t){var e=this.$chips.eq(t);this.$chips.eq(t).remove(),this.$chips=this.$chips.filter(function(t){return 0<=h(t).index()}),this.chipsData.splice(t,1),this._setPlaceholder(),"function"==typeof this.options.onChipDelete&&this.options.onChipDelete.call(this,this.$el,e[0])}},{key:"selectChip",value:function(t){var e=this.$chips.eq(t);(this._selectedChip=e)[0].focus(),"function"==typeof this.options.onChipSelect&&this.options.onChipSelect.call(this,this.$el,e[0])}}],[{key:"init",value:function(t,e){return _get(l.__proto__||Object.getPrototypeOf(l),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Chips}},{key:"_handleChipsKeydown",value:function(t){l._keydown=!0;var e=h(t.target).closest(".chips"),i=t.target&&e.length;if(!h(t.target).is("input, textarea")&&i){var n=e[0].M_Chips;if(8===t.keyCode||46===t.keyCode){t.preventDefault();var s=n.chipsData.length;if(n._selectedChip){var o=n._selectedChip.index();n.deleteChip(o),n._selectedChip=null,s=Math.max(o-1,0)}n.chipsData.length&&n.selectChip(s)}else if(37===t.keyCode){if(n._selectedChip){var a=n._selectedChip.index()-1;if(a<0)return;n.selectChip(a)}}else if(39===t.keyCode&&n._selectedChip){var r=n._selectedChip.index()+1;r>=n.chipsData.length?n.$input[0].focus():n.selectChip(r)}}}},{key:"_handleChipsKeyup",value:function(t){l._keydown=!1}},{key:"_handleChipsBlur",value:function(t){l._keydown||(h(t.target).closest(".chips")[0].M_Chips._selectedChip=null)}},{key:"defaults",get:function(){return e}}]),l}();t._keydown=!1,M.Chips=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"chips","M_Chips"),h(document).ready(function(){h(document.body).on("click",".chip .close",function(){var t=h(this).closest(".chips");t.length&&t[0].M_Chips||h(this).closest(".chip").remove()})})}(cash),function(s){"use strict";var e={top:0,bottom:1/0,offset:0,onPositionChange:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Pushpin=i).options=s.extend({},n.defaults,e),i.originalOffset=i.el.offsetTop,n._pushpins.push(i),i._setupEventHandlers(),i._updatePosition(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this.el.style.top=null,this._removePinClasses(),this._removeEventHandlers();var t=n._pushpins.indexOf(this);n._pushpins.splice(t,1)}},{key:"_setupEventHandlers",value:function(){document.addEventListener("scroll",n._updateElements)}},{key:"_removeEventHandlers",value:function(){document.removeEventListener("scroll",n._updateElements)}},{key:"_updatePosition",value:function(){var t=M.getDocumentScrollTop()+this.options.offset;this.options.top<=t&&this.options.bottom>=t&&!this.el.classList.contains("pinned")&&(this._removePinClasses(),this.el.style.top=this.options.offset+"px",this.el.classList.add("pinned"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pinned")),t<this.options.top&&!this.el.classList.contains("pin-top")&&(this._removePinClasses(),this.el.style.top=0,this.el.classList.add("pin-top"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-top")),t>this.options.bottom&&!this.el.classList.contains("pin-bottom")&&(this._removePinClasses(),this.el.classList.add("pin-bottom"),this.el.style.top=this.options.bottom-this.originalOffset+"px","function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-bottom"))}},{key:"_removePinClasses",value:function(){this.el.classList.remove("pin-top"),this.el.classList.remove("pinned"),this.el.classList.remove("pin-bottom")}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Pushpin}},{key:"_updateElements",value:function(){for(var t in n._pushpins){n._pushpins[t]._updatePosition()}}},{key:"defaults",get:function(){return e}}]),n}();t._pushpins=[],M.Pushpin=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"pushpin","M_Pushpin")}(cash),function(r,s){"use strict";var e={direction:"top",hoverEnabled:!0,toolbarEnabled:!1};r.fn.reverse=[].reverse;var t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_FloatingActionButton=i).options=r.extend({},n.defaults,e),i.isOpen=!1,i.$anchor=i.$el.children("a").first(),i.$menu=i.$el.children("ul").first(),i.$floatingBtns=i.$el.find("ul .btn-floating"),i.$floatingBtnsReverse=i.$el.find("ul .btn-floating").reverse(),i.offsetY=0,i.offsetX=0,i.$el.addClass("direction-"+i.options.direction),"top"===i.options.direction?i.offsetY=40:"right"===i.options.direction?i.offsetX=-40:"bottom"===i.options.direction?i.offsetY=-40:i.offsetX=40,i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}},{key:"_setupEventHandlers",value:function(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener("mouseenter",this._handleOpenBound),this.el.addEventListener("mouseleave",this._handleCloseBound)):this.el.addEventListener("click",this._handleFABClickBound)}},{key:"_removeEventHandlers",value:function(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener("mouseenter",this._handleOpenBound),this.el.removeEventListener("mouseleave",this._handleCloseBound)):this.el.removeEventListener("click",this._handleFABClickBound)}},{key:"_handleFABClick",value:function(){this.isOpen?this.close():this.open()}},{key:"_handleDocumentClick",value:function(t){r(t.target).closest(this.$menu).length||this.close()}},{key:"open",value:function(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}},{key:"close",value:function(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener("scroll",this._handleCloseBound,!0),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}},{key:"_animateInFAB",value:function(){var e=this;this.$el.addClass("active");var i=0;this.$floatingBtnsReverse.each(function(t){s({targets:t,opacity:1,scale:[.4,1],translateY:[e.offsetY,0],translateX:[e.offsetX,0],duration:275,delay:i,easing:"easeInOutQuad"}),i+=40})}},{key:"_animateOutFAB",value:function(){var e=this;this.$floatingBtnsReverse.each(function(t){s.remove(t),s({targets:t,opacity:0,scale:.4,translateY:e.offsetY,translateX:e.offsetX,duration:175,easing:"easeOutQuad",complete:function(){e.$el.removeClass("active")}})})}},{key:"_animateInToolbar",value:function(){var t,e=this,i=window.innerWidth,n=window.innerHeight,s=this.el.getBoundingClientRect(),o=r('<div class="fab-backdrop"></div>'),a=this.$anchor.css("background-color");this.$anchor.append(o),this.offsetX=s.left-i/2+s.width/2,this.offsetY=n-s.bottom,t=i/o[0].clientWidth,this.btnBottom=s.bottom,this.btnLeft=s.left,this.btnWidth=s.width,this.$el.addClass("active"),this.$el.css({"text-align":"center",width:"100%",bottom:0,left:0,transform:"translateX("+this.offsetX+"px)",transition:"none"}),this.$anchor.css({transform:"translateY("+-this.offsetY+"px)",transition:"none"}),o.css({"background-color":a}),setTimeout(function(){e.$el.css({transform:"",transition:"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"}),e.$anchor.css({overflow:"visible",transform:"",transition:"transform .2s"}),setTimeout(function(){e.$el.css({overflow:"hidden","background-color":a}),o.css({transform:"scale("+t+")",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"}),e.$menu.children("li").children("a").css({opacity:1}),e._handleDocumentClickBound=e._handleDocumentClick.bind(e),window.addEventListener("scroll",e._handleCloseBound,!0),document.body.addEventListener("click",e._handleDocumentClickBound,!0)},100)},0)}},{key:"_animateOutToolbar",value:function(){var t=this,e=window.innerWidth,i=window.innerHeight,n=this.$el.find(".fab-backdrop"),s=this.$anchor.css("background-color");this.offsetX=this.btnLeft-e/2+this.btnWidth/2,this.offsetY=i-this.btnBottom,this.$el.removeClass("active"),this.$el.css({"background-color":"transparent",transition:"none"}),this.$anchor.css({transition:"none"}),n.css({transform:"scale(0)","background-color":s}),this.$menu.children("li").children("a").css({opacity:""}),setTimeout(function(){n.remove(),t.$el.css({"text-align":"",width:"",bottom:"",left:"",overflow:"","background-color":"",transform:"translate3d("+-t.offsetX+"px,0,0)"}),t.$anchor.css({overflow:"",transform:"translate3d(0,"+t.offsetY+"px,0)"}),setTimeout(function(){t.$el.css({transform:"translate3d(0,0,0)",transition:"transform .2s"}),t.$anchor.css({transform:"translate3d(0,0,0)",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"})},20)},200)}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_FloatingActionButton}},{key:"defaults",get:function(){return e}}]),n}();M.FloatingActionButton=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"floatingActionButton","M_FloatingActionButton")}(cash,M.anime),function(g){"use strict";var e={autoClose:!1,format:"mmm dd, yyyy",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",previousMonth:"‹",nextMonth:"›",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},t=function(t){function B(t,e){_classCallCheck(this,B);var i=_possibleConstructorReturn(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,B,t,e));(i.el.M_Datepicker=i).options=g.extend({},B.defaults,e),e&&e.hasOwnProperty("i18n")&&"object"==typeof e.i18n&&(i.options.i18n=g.extend({},B.defaults.i18n,e.i18n)),i.options.minDate&&i.options.minDate.setHours(0,0,0,0),i.options.maxDate&&i.options.maxDate.setHours(0,0,0,0),i.id=M.guid(),i._setupVariables(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupEventHandlers(),i.options.defaultDate||(i.options.defaultDate=new Date(Date.parse(i.el.value)));var n=i.options.defaultDate;return B._isDate(n)?i.options.setDefaultDate?(i.setDate(n,!0),i.setInputValue()):i.gotoDate(n):i.gotoDate(new Date),i.isOpen=!1,i}return _inherits(B,Component),_createClass(B,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),g(this.modalEl).remove(),this.destroySelects(),this.el.M_Datepicker=void 0}},{key:"destroySelects",value:function(){var t=this.calendarEl.querySelector(".orig-select-year");t&&M.FormSelect.getInstance(t).destroy();var e=this.calendarEl.querySelector(".orig-select-month");e&&M.FormSelect.getInstance(e).destroy()}},{key:"_insertHTMLIntoDOM",value:function(){this.options.showClearBtn&&(g(this.clearBtn).css({visibility:""}),this.clearBtn.innerHTML=this.options.i18n.clear),this.doneBtn.innerHTML=this.options.i18n.done,this.cancelBtn.innerHTML=this.options.i18n.cancel,this.options.container?this.$modalEl.appendTo(this.options.container):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var t=this;this.modalEl.id="modal-"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){t.isOpen=!1}})}},{key:"toString",value:function(t){var e=this;return t=t||this.options.format,B._isDate(this.date)?t.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(function(t){return e.formats[t]?e.formats[t]():t}).join(""):""}},{key:"setDate",value:function(t,e){if(!t)return this.date=null,this._renderDateDisplay(),this.draw();if("string"==typeof t&&(t=new Date(Date.parse(t))),B._isDate(t)){var i=this.options.minDate,n=this.options.maxDate;B._isDate(i)&&t<i?t=i:B._isDate(n)&&n<t&&(t=n),this.date=new Date(t.getTime()),this._renderDateDisplay(),B._setToStartOfDay(this.date),this.gotoDate(this.date),e||"function"!=typeof this.options.onSelect||this.options.onSelect.call(this,this.date)}}},{key:"setInputValue",value:function(){this.el.value=this.toString(),this.$el.trigger("change",{firedBy:this})}},{key:"_renderDateDisplay",value:function(){var t=B._isDate(this.date)?this.date:new Date,e=this.options.i18n,i=e.weekdaysShort[t.getDay()],n=e.monthsShort[t.getMonth()],s=t.getDate();this.yearTextEl.innerHTML=t.getFullYear(),this.dateTextEl.innerHTML=i+", "+n+" "+s}},{key:"gotoDate",value:function(t){var e=!0;if(B._isDate(t)){if(this.calendars){var i=new Date(this.calendars[0].year,this.calendars[0].month,1),n=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),s=t.getTime();n.setMonth(n.getMonth()+1),n.setDate(n.getDate()-1),e=s<i.getTime()||n.getTime()<s}e&&(this.calendars=[{month:t.getMonth(),year:t.getFullYear()}]),this.adjustCalendars()}}},{key:"adjustCalendars",value:function(){this.calendars[0]=this.adjustCalendar(this.calendars[0]),this.draw()}},{key:"adjustCalendar",value:function(t){return t.month<0&&(t.year-=Math.ceil(Math.abs(t.month)/12),t.month+=12),11<t.month&&(t.year+=Math.floor(Math.abs(t.month)/12),t.month-=12),t}},{key:"nextMonth",value:function(){this.calendars[0].month++,this.adjustCalendars()}},{key:"prevMonth",value:function(){this.calendars[0].month--,this.adjustCalendars()}},{key:"render",value:function(t,e,i){var n=this.options,s=new Date,o=B._getDaysInMonth(t,e),a=new Date(t,e,1).getDay(),r=[],l=[];B._setToStartOfDay(s),0<n.firstDay&&(a-=n.firstDay)<0&&(a+=7);for(var h=0===e?11:e-1,d=11===e?0:e+1,u=0===e?t-1:t,c=11===e?t+1:t,p=B._getDaysInMonth(u,h),v=o+a,f=v;7<f;)f-=7;v+=7-f;for(var m=!1,g=0,_=0;g<v;g++){var y=new Date(t,e,g-a+1),k=!!B._isDate(this.date)&&B._compareDates(y,this.date),b=B._compareDates(y,s),w=-1!==n.events.indexOf(y.toDateString()),C=g<a||o+a<=g,E=g-a+1,M=e,O=t,x=n.startRange&&B._compareDates(n.startRange,y),L=n.endRange&&B._compareDates(n.endRange,y),T=n.startRange&&n.endRange&&n.startRange<y&&y<n.endRange;C&&(g<a?(E=p+E,M=h,O=u):(E-=o,M=d,O=c));var $={day:E,month:M,year:O,hasEvent:w,isSelected:k,isToday:b,isDisabled:n.minDate&&y<n.minDate||n.maxDate&&y>n.maxDate||n.disableWeekends&&B._isWeekend(y)||n.disableDayFn&&n.disableDayFn(y),isEmpty:C,isStartRange:x,isEndRange:L,isInRange:T,showDaysInNextAndPreviousMonths:n.showDaysInNextAndPreviousMonths};l.push(this.renderDay($)),7==++_&&(r.push(this.renderRow(l,n.isRTL,m)),_=0,m=!(l=[]))}return this.renderTable(n,r,i)}},{key:"renderDay",value:function(t){var e=[],i="false";if(t.isEmpty){if(!t.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';e.push("is-outside-current-month"),e.push("is-selection-disabled")}return t.isDisabled&&e.push("is-disabled"),t.isToday&&e.push("is-today"),t.isSelected&&(e.push("is-selected"),i="true"),t.hasEvent&&e.push("has-event"),t.isInRange&&e.push("is-inrange"),t.isStartRange&&e.push("is-startrange"),t.isEndRange&&e.push("is-endrange"),'<td data-day="'+t.day+'" class="'+e.join(" ")+'" aria-selected="'+i+'"><button class="datepicker-day-button" type="button" data-year="'+t.year+'" data-month="'+t.month+'" data-day="'+t.day+'">'+t.day+"</button></td>"}},{key:"renderRow",value:function(t,e,i){return'<tr class="datepicker-row'+(i?" is-selected":"")+'">'+(e?t.reverse():t).join("")+"</tr>"}},{key:"renderTable",value:function(t,e,i){return'<div class="datepicker-table-wrapper"><table cellpadding="0" cellspacing="0" class="datepicker-table" role="grid" aria-labelledby="'+i+'">'+this.renderHead(t)+this.renderBody(e)+"</table></div>"}},{key:"renderHead",value:function(t){var e=void 0,i=[];for(e=0;e<7;e++)i.push('<th scope="col"><abbr title="'+this.renderDayName(t,e)+'">'+this.renderDayName(t,e,!0)+"</abbr></th>");return"<thead><tr>"+(t.isRTL?i.reverse():i).join("")+"</tr></thead>"}},{key:"renderBody",value:function(t){return"<tbody>"+t.join("")+"</tbody>"}},{key:"renderTitle",value:function(t,e,i,n,s,o){var a,r,l=void 0,h=void 0,d=void 0,u=this.options,c=i===u.minYear,p=i===u.maxYear,v='<div id="'+o+'" class="datepicker-controls" role="heading" aria-live="assertive">',f=!0,m=!0;for(d=[],l=0;l<12;l++)d.push('<option value="'+(i===s?l-e:12+l-e)+'"'+(l===n?' selected="selected"':"")+(c&&l<u.minMonth||p&&l>u.maxMonth?'disabled="disabled"':"")+">"+u.i18n.months[l]+"</option>");for(a='<select class="datepicker-select orig-select-month" tabindex="-1">'+d.join("")+"</select>",g.isArray(u.yearRange)?(l=u.yearRange[0],h=u.yearRange[1]+1):(l=i-u.yearRange,h=1+i+u.yearRange),d=[];l<h&&l<=u.maxYear;l++)l>=u.minYear&&d.push('<option value="'+l+'" '+(l===i?'selected="selected"':"")+">"+l+"</option>");r='<select class="datepicker-select orig-select-year" tabindex="-1">'+d.join("")+"</select>";v+='<button class="month-prev'+(f?"":" is-disabled")+'" type="button"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg></button>',v+='<div class="selects-container">',u.showMonthAfterYear?v+=r+a:v+=a+r,v+="</div>",c&&(0===n||u.minMonth>=n)&&(f=!1),p&&(11===n||u.maxMonth<=n)&&(m=!1);return(v+='<button class="month-next'+(m?"":" is-disabled")+'" type="button"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></svg></button>')+"</div>"}},{key:"draw",value:function(t){if(this.isOpen||t){var e,i=this.options,n=i.minYear,s=i.maxYear,o=i.minMonth,a=i.maxMonth,r="";this._y<=n&&(this._y=n,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=s&&(this._y=s,!isNaN(a)&&this._m>a&&(this._m=a)),e="datepicker-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<1;l++)this._renderDateDisplay(),r+=this.renderTitle(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,e)+this.render(this.calendars[l].year,this.calendars[l].month,e);this.destroySelects(),this.calendarEl.innerHTML=r;var h=this.calendarEl.querySelector(".orig-select-year"),d=this.calendarEl.querySelector(".orig-select-month");M.FormSelect.init(h,{classes:"select-year",dropdownOptions:{container:document.body,constrainWidth:!1}}),M.FormSelect.init(d,{classes:"select-month",dropdownOptions:{container:document.body,constrainWidth:!1}}),h.addEventListener("change",this._handleYearChange.bind(this)),d.addEventListener("change",this._handleMonthChange.bind(this)),"function"==typeof this.options.onDraw&&this.options.onDraw(this)}}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this._closeBound=this.close.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("change",this._handleInputChangeBound),this.calendarEl.addEventListener("click",this._handleCalendarClickBound),this.doneBtn.addEventListener("click",this._finishSelectionBound),this.cancelBtn.addEventListener("click",this._closeBound),this.options.showClearBtn&&(this._handleClearClickBound=this._handleClearClick.bind(this),this.clearBtn.addEventListener("click",this._handleClearClickBound))}},{key:"_setupVariables",value:function(){var e=this;this.$modalEl=g(B._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(".datepicker-calendar"),this.yearTextEl=this.modalEl.querySelector(".year-text"),this.dateTextEl=this.modalEl.querySelector(".date-text"),this.options.showClearBtn&&(this.clearBtn=this.modalEl.querySelector(".datepicker-clear")),this.doneBtn=this.modalEl.querySelector(".datepicker-done"),this.cancelBtn=this.modalEl.querySelector(".datepicker-cancel"),this.formats={d:function(){return e.date.getDate()},dd:function(){var t=e.date.getDate();return(t<10?"0":"")+t},ddd:function(){return e.options.i18n.weekdaysShort[e.date.getDay()]},dddd:function(){return e.options.i18n.weekdays[e.date.getDay()]},m:function(){return e.date.getMonth()+1},mm:function(){var t=e.date.getMonth()+1;return(t<10?"0":"")+t},mmm:function(){return e.options.i18n.monthsShort[e.date.getMonth()]},mmmm:function(){return e.options.i18n.months[e.date.getMonth()]},yy:function(){return(""+e.date.getFullYear()).slice(2)},yyyy:function(){return e.date.getFullYear()}}}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("change",this._handleInputChangeBound),this.calendarEl.removeEventListener("click",this._handleCalendarClickBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:"_handleCalendarClick",value:function(t){if(this.isOpen){var e=g(t.target);e.hasClass("is-disabled")||(!e.hasClass("datepicker-day-button")||e.hasClass("is-empty")||e.parent().hasClass("is-disabled")?e.closest(".month-prev").length?this.prevMonth():e.closest(".month-next").length&&this.nextMonth():(this.setDate(new Date(t.target.getAttribute("data-year"),t.target.getAttribute("data-month"),t.target.getAttribute("data-day"))),this.options.autoClose&&this._finishSelection()))}}},{key:"_handleClearClick",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:"_handleMonthChange",value:function(t){this.gotoMonth(t.target.value)}},{key:"_handleYearChange",value:function(t){this.gotoYear(t.target.value)}},{key:"gotoMonth",value:function(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())}},{key:"gotoYear",value:function(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())}},{key:"_handleInputChange",value:function(t){var e=void 0;t.firedBy!==this&&(e=this.options.parse?this.options.parse(this.el.value,this.options.format):new Date(Date.parse(this.el.value)),B._isDate(e)&&this.setDate(e))}},{key:"renderDayName",value:function(t,e,i){for(e+=t.firstDay;7<=e;)e-=7;return i?t.i18n.weekdaysAbbrev[e]:t.i18n.weekdays[e]}},{key:"_finishSelection",value:function(){this.setInputValue(),this.close()}},{key:"open",value:function(){if(!this.isOpen)return this.isOpen=!0,"function"==typeof this.options.onOpen&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,"function"==typeof this.options.onClose&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:"init",value:function(t,e){return _get(B.__proto__||Object.getPrototypeOf(B),"init",this).call(this,this,t,e)}},{key:"_isDate",value:function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())}},{key:"_isWeekend",value:function(t){var e=t.getDay();return 0===e||6===e}},{key:"_setToStartOfDay",value:function(t){B._isDate(t)&&t.setHours(0,0,0,0)}},{key:"_getDaysInMonth",value:function(t,e){return[31,B._isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}},{key:"_isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"_compareDates",value:function(t,e){return t.getTime()===e.getTime()}},{key:"_setToStartOfDay",value:function(t){B._isDate(t)&&t.setHours(0,0,0,0)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Datepicker}},{key:"defaults",get:function(){return e}}]),B}();t._template=['<div class= "modal datepicker-modal">','<div class="modal-content datepicker-container">','<div class="datepicker-date-display">','<span class="year-text"></span>','<span class="date-text"></span>',"</div>",'<div class="datepicker-calendar-container">','<div class="datepicker-calendar"></div>','<div class="datepicker-footer">','<button class="btn-flat datepicker-clear waves-effect" style="visibility: hidden;" type="button"></button>','<div class="confirmation-btns">','<button class="btn-flat datepicker-cancel waves-effect" type="button"></button>','<button class="btn-flat datepicker-done waves-effect" type="button"></button>',"</div>","</div>","</div>","</div>","</div>"].join(""),M.Datepicker=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"datepicker","M_Datepicker")}(cash),function(h){"use strict";var e={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:"now",fromNow:0,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok"},autoClose:!1,twelveHour:!0,vibrate:!0,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onSelect:null},t=function(t){function f(t,e){_classCallCheck(this,f);var i=_possibleConstructorReturn(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,f,t,e));return(i.el.M_Timepicker=i).options=h.extend({},f.defaults,e),i.id=M.guid(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupVariables(),i._setupEventHandlers(),i._clockSetup(),i._pickerSetup(),i}return _inherits(f,Component),_createClass(f,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),h(this.modalEl).remove(),this.el.M_Timepicker=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleClockClickStartBound=this._handleClockClickStart.bind(this),this._handleDocumentClickMoveBound=this._handleDocumentClickMove.bind(this),this._handleDocumentClickEndBound=this._handleDocumentClickEnd.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.plate.addEventListener("mousedown",this._handleClockClickStartBound),this.plate.addEventListener("touchstart",this._handleClockClickStartBound),h(this.spanHours).on("click",this.showView.bind(this,"hours")),h(this.spanMinutes).on("click",this.showView.bind(this,"minutes"))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:"_handleClockClickStart",value:function(t){t.preventDefault();var e=this.plate.getBoundingClientRect(),i=e.left,n=e.top;this.x0=i+this.options.dialRadius,this.y0=n+this.options.dialRadius,this.moved=!1;var s=f._Pos(t);this.dx=s.x-this.x0,this.dy=s.y-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener("mousemove",this._handleDocumentClickMoveBound),document.addEventListener("touchmove",this._handleDocumentClickMoveBound),document.addEventListener("mouseup",this._handleDocumentClickEndBound),document.addEventListener("touchend",this._handleDocumentClickEndBound)}},{key:"_handleDocumentClickMove",value:function(t){t.preventDefault();var e=f._Pos(t),i=e.x-this.x0,n=e.y-this.y0;this.moved=!0,this.setHand(i,n,!1,!0)}},{key:"_handleDocumentClickEnd",value:function(t){var e=this;t.preventDefault(),document.removeEventListener("mouseup",this._handleDocumentClickEndBound),document.removeEventListener("touchend",this._handleDocumentClickEndBound);var i=f._Pos(t),n=i.x-this.x0,s=i.y-this.y0;this.moved&&n===this.dx&&s===this.dy&&this.setHand(n,s),"hours"===this.currentView?this.showView("minutes",this.options.duration/2):this.options.autoClose&&(h(this.minutesView).addClass("timepicker-dial-out"),setTimeout(function(){e.done()},this.options.duration/2)),"function"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.hours,this.minutes),document.removeEventListener("mousemove",this._handleDocumentClickMoveBound),document.removeEventListener("touchmove",this._handleDocumentClickMoveBound)}},{key:"_insertHTMLIntoDOM",value:function(){this.$modalEl=h(f._template),this.modalEl=this.$modalEl[0],this.modalEl.id="modal-"+this.id;var t=document.querySelector(this.options.container);this.options.container&&t?this.$modalEl.appendTo(t):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var t=this;this.modal=M.Modal.init(this.modalEl,{onOpenStart:this.options.onOpenStart,onOpenEnd:this.options.onOpenEnd,onCloseStart:this.options.onCloseStart,onCloseEnd:function(){"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t),t.isOpen=!1}})}},{key:"_setupVariables",value:function(){this.currentView="hours",this.vibrate=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,this._canvas=this.modalEl.querySelector(".timepicker-canvas"),this.plate=this.modalEl.querySelector(".timepicker-plate"),this.hoursView=this.modalEl.querySelector(".timepicker-hours"),this.minutesView=this.modalEl.querySelector(".timepicker-minutes"),this.spanHours=this.modalEl.querySelector(".timepicker-span-hours"),this.spanMinutes=this.modalEl.querySelector(".timepicker-span-minutes"),this.spanAmPm=this.modalEl.querySelector(".timepicker-span-am-pm"),this.footer=this.modalEl.querySelector(".timepicker-footer"),this.amOrPm="PM"}},{key:"_pickerSetup",value:function(){var t=h('<button class="btn-flat timepicker-clear waves-effect" style="visibility: hidden;" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.clear+"</button>").appendTo(this.footer).on("click",this.clear.bind(this));this.options.showClearBtn&&t.css({visibility:""});var e=h('<div class="confirmation-btns"></div>');h('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.cancel+"</button>").appendTo(e).on("click",this.close.bind(this)),h('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.done+"</button>").appendTo(e).on("click",this.done.bind(this)),e.appendTo(this.footer)}},{key:"_clockSetup",value:function(){this.options.twelveHour&&(this.$amBtn=h('<div class="am-btn">AM</div>'),this.$pmBtn=h('<div class="pm-btn">PM</div>'),this.$amBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),this.$pmBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}},{key:"_buildSVGClock",value:function(){var t=this.options.dialRadius,e=this.options.tickRadius,i=2*t,n=f._createSVGEl("svg");n.setAttribute("class","timepicker-svg"),n.setAttribute("width",i),n.setAttribute("height",i);var s=f._createSVGEl("g");s.setAttribute("transform","translate("+t+","+t+")");var o=f._createSVGEl("circle");o.setAttribute("class","timepicker-canvas-bearing"),o.setAttribute("cx",0),o.setAttribute("cy",0),o.setAttribute("r",4);var a=f._createSVGEl("line");a.setAttribute("x1",0),a.setAttribute("y1",0);var r=f._createSVGEl("circle");r.setAttribute("class","timepicker-canvas-bg"),r.setAttribute("r",e),s.appendChild(a),s.appendChild(r),s.appendChild(o),n.appendChild(s),this._canvas.appendChild(n),this.hand=a,this.bg=r,this.bearing=o,this.g=s}},{key:"_buildHoursView",value:function(){var t=h('<div class="timepicker-tick"></div>');if(this.options.twelveHour)for(var e=1;e<13;e+=1){var i=t.clone(),n=e/6*Math.PI,s=this.options.outerRadius;i.css({left:this.options.dialRadius+Math.sin(n)*s-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(n)*s-this.options.tickRadius+"px"}),i.html(0===e?"00":e),this.hoursView.appendChild(i[0])}else for(var o=0;o<24;o+=1){var a=t.clone(),r=o/6*Math.PI,l=0<o&&o<13?this.options.innerRadius:this.options.outerRadius;a.css({left:this.options.dialRadius+Math.sin(r)*l-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(r)*l-this.options.tickRadius+"px"}),a.html(0===o?"00":o),this.hoursView.appendChild(a[0])}}},{key:"_buildMinutesView",value:function(){for(var t=h('<div class="timepicker-tick"></div>'),e=0;e<60;e+=5){var i=t.clone(),n=e/30*Math.PI;i.css({left:this.options.dialRadius+Math.sin(n)*this.options.outerRadius-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(n)*this.options.outerRadius-this.options.tickRadius+"px"}),i.html(f._addLeadingZero(e)),this.minutesView.appendChild(i[0])}}},{key:"_handleAmPmClick",value:function(t){var e=h(t.target);this.amOrPm=e.hasClass("am-btn")?"AM":"PM",this._updateAmPmView()}},{key:"_updateAmPmView",value:function(){this.options.twelveHour&&(this.$amBtn.toggleClass("text-primary","AM"===this.amOrPm),this.$pmBtn.toggleClass("text-primary","PM"===this.amOrPm))}},{key:"_updateTimeFromInput",value:function(){var t=((this.el.value||this.options.defaultTime||"")+"").split(":");if(this.options.twelveHour&&void 0!==t[1]&&(0<t[1].toUpperCase().indexOf("AM")?this.amOrPm="AM":this.amOrPm="PM",t[1]=t[1].replace("AM","").replace("PM","")),"now"===t[0]){var e=new Date(+new Date+this.options.fromNow);t=[e.getHours(),e.getMinutes()],this.options.twelveHour&&(this.amOrPm=12<=t[0]&&t[0]<24?"PM":"AM")}this.hours=+t[0]||0,this.minutes=+t[1]||0,this.spanHours.innerHTML=this.hours,this.spanMinutes.innerHTML=f._addLeadingZero(this.minutes),this._updateAmPmView()}},{key:"showView",value:function(t,e){"minutes"===t&&h(this.hoursView).css("visibility");var i="hours"===t,n=i?this.hoursView:this.minutesView,s=i?this.minutesView:this.hoursView;this.currentView=t,h(this.spanHours).toggleClass("text-primary",i),h(this.spanMinutes).toggleClass("text-primary",!i),s.classList.add("timepicker-dial-out"),h(n).css("visibility","visible").removeClass("timepicker-dial-out"),this.resetClock(e),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout(function(){h(s).css("visibility","hidden")},this.options.duration)}},{key:"resetClock",value:function(t){var e=this.currentView,i=this[e],n="hours"===e,s=i*(Math.PI/(n?6:30)),o=n&&0<i&&i<13?this.options.innerRadius:this.options.outerRadius,a=Math.sin(s)*o,r=-Math.cos(s)*o,l=this;t?(h(this.canvas).addClass("timepicker-canvas-out"),setTimeout(function(){h(l.canvas).removeClass("timepicker-canvas-out"),l.setHand(a,r)},t)):this.setHand(a,r)}},{key:"setHand",value:function(t,e,i){var n=this,s=Math.atan2(t,-e),o="hours"===this.currentView,a=Math.PI/(o||i?6:30),r=Math.sqrt(t*t+e*e),l=o&&r<(this.options.outerRadius+this.options.innerRadius)/2,h=l?this.options.innerRadius:this.options.outerRadius;this.options.twelveHour&&(h=this.options.outerRadius),s<0&&(s=2*Math.PI+s);var d=Math.round(s/a);s=d*a,this.options.twelveHour?o?0===d&&(d=12):(i&&(d*=5),60===d&&(d=0)):o?(12===d&&(d=0),d=l?0===d?12:d:0===d?0:d+12):(i&&(d*=5),60===d&&(d=0)),this[this.currentView]!==d&&this.vibrate&&this.options.vibrate&&(this.vibrateTimer||(navigator[this.vibrate](10),this.vibrateTimer=setTimeout(function(){n.vibrateTimer=null},100))),this[this.currentView]=d,o?this.spanHours.innerHTML=d:this.spanMinutes.innerHTML=f._addLeadingZero(d);var u=Math.sin(s)*(h-this.options.tickRadius),c=-Math.cos(s)*(h-this.options.tickRadius),p=Math.sin(s)*h,v=-Math.cos(s)*h;this.hand.setAttribute("x2",u),this.hand.setAttribute("y2",c),this.bg.setAttribute("cx",p),this.bg.setAttribute("cy",v)}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,this._updateTimeFromInput(),this.showView("hours"),this.modal.open())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.modal.close())}},{key:"done",value:function(t,e){var i=this.el.value,n=e?"":f._addLeadingZero(this.hours)+":"+f._addLeadingZero(this.minutes);this.time=n,!e&&this.options.twelveHour&&(n=n+" "+this.amOrPm),(this.el.value=n)!==i&&this.$el.trigger("change"),this.close(),this.el.focus()}},{key:"clear",value:function(){this.done(null,!0)}}],[{key:"init",value:function(t,e){return _get(f.__proto__||Object.getPrototypeOf(f),"init",this).call(this,this,t,e)}},{key:"_addLeadingZero",value:function(t){return(t<10?"0":"")+t}},{key:"_createSVGEl",value:function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}},{key:"_Pos",value:function(t){return t.targetTouches&&1<=t.targetTouches.length?{x:t.targetTouches[0].clientX,y:t.targetTouches[0].clientY}:{x:t.clientX,y:t.clientY}}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Timepicker}},{key:"defaults",get:function(){return e}}]),f}();t._template=['<div class= "modal timepicker-modal">','<div class="modal-content timepicker-container">','<div class="timepicker-digital-display">','<div class="timepicker-text-container">','<div class="timepicker-display-column">','<span class="timepicker-span-hours text-primary"></span>',":",'<span class="timepicker-span-minutes"></span>',"</div>",'<div class="timepicker-display-column timepicker-display-am-pm">','<div class="timepicker-span-am-pm"></div>',"</div>","</div>","</div>",'<div class="timepicker-analog-display">','<div class="timepicker-plate">','<div class="timepicker-canvas"></div>','<div class="timepicker-dial timepicker-hours"></div>','<div class="timepicker-dial timepicker-minutes timepicker-dial-out"></div>',"</div>",'<div class="timepicker-footer"></div>',"</div>","</div>","</div>"].join(""),M.Timepicker=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"timepicker","M_Timepicker")}(cash),function(s){"use strict";var e={},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_CharacterCounter=i).options=s.extend({},n.defaults,e),i.isInvalid=!1,i.isValidLength=!1,i._setupCounter(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.CharacterCounter=void 0,this._removeCounter()}},{key:"_setupEventHandlers",value:function(){this._handleUpdateCounterBound=this.updateCounter.bind(this),this.el.addEventListener("focus",this._handleUpdateCounterBound,!0),this.el.addEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("focus",this._handleUpdateCounterBound,!0),this.el.removeEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_setupCounter",value:function(){this.counterEl=document.createElement("span"),s(this.counterEl).addClass("character-counter").css({float:"right","font-size":"12px",height:1}),this.$el.parent().append(this.counterEl)}},{key:"_removeCounter",value:function(){s(this.counterEl).remove()}},{key:"updateCounter",value:function(){var t=+this.$el.attr("data-length"),e=this.el.value.length;this.isValidLength=e<=t;var i=e;t&&(i+="/"+t,this._validateInput()),s(this.counterEl).html(i)}},{key:"_validateInput",value:function(){this.isValidLength&&this.isInvalid?(this.isInvalid=!1,this.$el.removeClass("invalid")):this.isValidLength||this.isInvalid||(this.isInvalid=!0,this.$el.removeClass("valid"),this.$el.addClass("invalid"))}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_CharacterCounter}},{key:"defaults",get:function(){return e}}]),n}();M.CharacterCounter=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"characterCounter","M_CharacterCounter")}(cash),function(b){"use strict";var e={duration:200,dist:-100,shift:0,padding:0,numVisible:5,fullWidth:!1,indicators:!1,noWrap:!1,onCycleTo:null},t=function(t){function i(t,e){_classCallCheck(this,i);var n=_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,i,t,e));return(n.el.M_Carousel=n).options=b.extend({},i.defaults,e),n.hasMultipleSlides=1<n.$el.find(".carousel-item").length,n.showIndicators=n.options.indicators&&n.hasMultipleSlides,n.noWrap=n.options.noWrap||!n.hasMultipleSlides,n.pressed=!1,n.dragged=!1,n.offset=n.target=0,n.images=[],n.itemWidth=n.$el.find(".carousel-item").first().innerWidth(),n.itemHeight=n.$el.find(".carousel-item").first().innerHeight(),n.dim=2*n.itemWidth+n.options.padding||1,n._autoScrollBound=n._autoScroll.bind(n),n._trackBound=n._track.bind(n),n.options.fullWidth&&(n.options.dist=0,n._setCarouselHeight(),n.showIndicators&&n.$el.find(".carousel-fixed-item").addClass("with-indicators")),n.$indicators=b('<ul class="indicators"></ul>'),n.$el.find(".carousel-item").each(function(t,e){if(n.images.push(t),n.showIndicators){var i=b('<li class="indicator-item"></li>');0===e&&i[0].classList.add("active"),n.$indicators.append(i)}}),n.showIndicators&&n.$el.append(n.$indicators),n.count=n.images.length,n.options.numVisible=Math.min(n.count,n.options.numVisible),n.xform="transform",["webkit","Moz","O","ms"].every(function(t){var e=t+"Transform";return void 0===document.body.style[e]||(n.xform=e,!1)}),n._setupEventHandlers(),n._scroll(n.offset),n}return _inherits(i,Component),_createClass(i,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Carousel=void 0}},{key:"_setupEventHandlers",value:function(){var i=this;this._handleCarouselTapBound=this._handleCarouselTap.bind(this),this._handleCarouselDragBound=this._handleCarouselDrag.bind(this),this._handleCarouselReleaseBound=this._handleCarouselRelease.bind(this),this._handleCarouselClickBound=this._handleCarouselClick.bind(this),void 0!==window.ontouchstart&&(this.el.addEventListener("touchstart",this._handleCarouselTapBound),this.el.addEventListener("touchmove",this._handleCarouselDragBound),this.el.addEventListener("touchend",this._handleCarouselReleaseBound)),this.el.addEventListener("mousedown",this._handleCarouselTapBound),this.el.addEventListener("mousemove",this._handleCarouselDragBound),this.el.addEventListener("mouseup",this._handleCarouselReleaseBound),this.el.addEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.addEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&(this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.$indicators.find(".indicator-item").each(function(t,e){t.addEventListener("click",i._handleIndicatorClickBound)}));var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){var i=this;void 0!==window.ontouchstart&&(this.el.removeEventListener("touchstart",this._handleCarouselTapBound),this.el.removeEventListener("touchmove",this._handleCarouselDragBound),this.el.removeEventListener("touchend",this._handleCarouselReleaseBound)),this.el.removeEventListener("mousedown",this._handleCarouselTapBound),this.el.removeEventListener("mousemove",this._handleCarouselDragBound),this.el.removeEventListener("mouseup",this._handleCarouselReleaseBound),this.el.removeEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.removeEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&this.$indicators.find(".indicator-item").each(function(t,e){t.removeEventListener("click",i._handleIndicatorClickBound)}),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleCarouselTap",value:function(t){"mousedown"===t.type&&b(t.target).is("img")&&t.preventDefault(),this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this._xpos(t),this.referenceY=this._ypos(t),this.velocity=this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this._trackBound,100)}},{key:"_handleCarouselDrag",value:function(t){var e=void 0,i=void 0,n=void 0;if(this.pressed)if(e=this._xpos(t),i=this._ypos(t),n=this.reference-e,Math.abs(this.referenceY-i)<30&&!this.verticalDragged)(2<n||n<-2)&&(this.dragged=!0,this.reference=e,this._scroll(this.offset+n));else{if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1;this.verticalDragged=!0}if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1}},{key:"_handleCarouselRelease",value:function(t){if(this.pressed)return this.pressed=!1,clearInterval(this.ticker),this.target=this.offset,(10<this.velocity||this.velocity<-10)&&(this.amplitude=.9*this.velocity,this.target=this.offset+this.amplitude),this.target=Math.round(this.target/this.dim)*this.dim,this.noWrap&&(this.target>=this.dim*(this.count-1)?this.target=this.dim*(this.count-1):this.target<0&&(this.target=0)),this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound),this.dragged&&(t.preventDefault(),t.stopPropagation()),!1}},{key:"_handleCarouselClick",value:function(t){if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1;if(!this.options.fullWidth){var e=b(t.target).closest(".carousel-item").index();0!==this._wrap(this.center)-e&&(t.preventDefault(),t.stopPropagation()),this._cycleTo(e)}}},{key:"_handleIndicatorClick",value:function(t){t.stopPropagation();var e=b(t.target).closest(".indicator-item");e.length&&this._cycleTo(e.index())}},{key:"_handleResize",value:function(t){this.options.fullWidth?(this.itemWidth=this.$el.find(".carousel-item").first().innerWidth(),this.imageHeight=this.$el.find(".carousel-item.active").height(),this.dim=2*this.itemWidth+this.options.padding,this.offset=2*this.center*this.itemWidth,this.target=this.offset,this._setCarouselHeight(!0)):this._scroll()}},{key:"_setCarouselHeight",value:function(t){var i=this,e=this.$el.find(".carousel-item.active").length?this.$el.find(".carousel-item.active").first():this.$el.find(".carousel-item").first(),n=e.find("img").first();if(n.length)if(n[0].complete){var s=n.height();if(0<s)this.$el.css("height",s+"px");else{var o=n[0].naturalWidth,a=n[0].naturalHeight,r=this.$el.width()/o*a;this.$el.css("height",r+"px")}}else n.one("load",function(t,e){i.$el.css("height",t.offsetHeight+"px")});else if(!t){var l=e.height();this.$el.css("height",l+"px")}}},{key:"_xpos",value:function(t){return t.targetTouches&&1<=t.targetTouches.length?t.targetTouches[0].clientX:t.clientX}},{key:"_ypos",value:function(t){return t.targetTouches&&1<=t.targetTouches.length?t.targetTouches[0].clientY:t.clientY}},{key:"_wrap",value:function(t){return t>=this.count?t%this.count:t<0?this._wrap(this.count+t%this.count):t}},{key:"_track",value:function(){var t,e,i,n;e=(t=Date.now())-this.timestamp,this.timestamp=t,i=this.offset-this.frame,this.frame=this.offset,n=1e3*i/(1+e),this.velocity=.8*n+.2*this.velocity}},{key:"_autoScroll",value:function(){var t=void 0,e=void 0;this.amplitude&&(t=Date.now()-this.timestamp,2<(e=this.amplitude*Math.exp(-t/this.options.duration))||e<-2?(this._scroll(this.target-e),requestAnimationFrame(this._autoScrollBound)):this._scroll(this.target))}},{key:"_scroll",value:function(t){var e=this;this.$el.hasClass("scrolling")||this.el.classList.add("scrolling"),null!=this.scrollingTimeout&&window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=window.setTimeout(function(){e.$el.removeClass("scrolling")},this.options.duration);var i,n,s,o,a=void 0,r=void 0,l=void 0,h=void 0,d=void 0,u=void 0,c=this.center,p=1/this.options.numVisible;if(this.offset="number"==typeof t?t:this.offset,this.center=Math.floor((this.offset+this.dim/2)/this.dim),o=-(s=(n=this.offset-this.center*this.dim)<0?1:-1)*n*2/this.dim,i=this.count>>1,this.options.fullWidth?(l="translateX(0)",u=1):(l="translateX("+(this.el.clientWidth-this.itemWidth)/2+"px) ",l+="translateY("+(this.el.clientHeight-this.itemHeight)/2+"px)",u=1-p*o),this.showIndicators){var v=this.center%this.count,f=this.$indicators.find(".indicator-item.active");f.index()!==v&&(f.removeClass("active"),this.$indicators.find(".indicator-item").eq(v)[0].classList.add("active"))}if(!this.noWrap||0<=this.center&&this.center<this.count){r=this.images[this._wrap(this.center)],b(r).hasClass("active")||(this.$el.find(".carousel-item").removeClass("active"),r.classList.add("active"));var m=l+" translateX("+-n/2+"px) translateX("+s*this.options.shift*o*a+"px) translateZ("+this.options.dist*o+"px)";this._updateItemStyle(r,u,0,m)}for(a=1;a<=i;++a){if(this.options.fullWidth?(h=this.options.dist,d=a===i&&n<0?1-o:1):(h=this.options.dist*(2*a+o*s),d=1-p*(2*a+o*s)),!this.noWrap||this.center+a<this.count){r=this.images[this._wrap(this.center+a)];var g=l+" translateX("+(this.options.shift+(this.dim*a-n)/2)+"px) translateZ("+h+"px)";this._updateItemStyle(r,d,-a,g)}if(this.options.fullWidth?(h=this.options.dist,d=a===i&&0<n?1-o:1):(h=this.options.dist*(2*a-o*s),d=1-p*(2*a-o*s)),!this.noWrap||0<=this.center-a){r=this.images[this._wrap(this.center-a)];var _=l+" translateX("+(-this.options.shift+(-this.dim*a-n)/2)+"px) translateZ("+h+"px)";this._updateItemStyle(r,d,-a,_)}}if(!this.noWrap||0<=this.center&&this.center<this.count){r=this.images[this._wrap(this.center)];var y=l+" translateX("+-n/2+"px) translateX("+s*this.options.shift*o+"px) translateZ("+this.options.dist*o+"px)";this._updateItemStyle(r,u,0,y)}var k=this.$el.find(".carousel-item").eq(this._wrap(this.center));c!==this.center&&"function"==typeof this.options.onCycleTo&&this.options.onCycleTo.call(this,k[0],this.dragged),"function"==typeof this.oneTimeCallback&&(this.oneTimeCallback.call(this,k[0],this.dragged),this.oneTimeCallback=null)}},{key:"_updateItemStyle",value:function(t,e,i,n){t.style[this.xform]=n,t.style.zIndex=i,t.style.opacity=e,t.style.visibility="visible"}},{key:"_cycleTo",value:function(t,e){var i=this.center%this.count-t;this.noWrap||(i<0?Math.abs(i+this.count)<Math.abs(i)&&(i+=this.count):0<i&&Math.abs(i-this.count)<i&&(i-=this.count)),this.target=this.dim*Math.round(this.offset/this.dim),i<0?this.target+=this.dim*Math.abs(i):0<i&&(this.target-=this.dim*i),"function"==typeof e&&(this.oneTimeCallback=e),this.offset!==this.target&&(this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound))}},{key:"next",value:function(t){(void 0===t||isNaN(t))&&(t=1);var e=this.center+t;if(e>=this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:"prev",value:function(t){(void 0===t||isNaN(t))&&(t=1);var e=this.center-t;if(e>=this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:"set",value:function(t,e){if((void 0===t||isNaN(t))&&(t=0),t>this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t,e)}}],[{key:"init",value:function(t,e){return _get(i.__proto__||Object.getPrototypeOf(i),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Carousel}},{key:"defaults",get:function(){return e}}]),i}();M.Carousel=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"carousel","M_Carousel")}(cash),function(S){"use strict";var e={onOpen:void 0,onClose:void 0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_TapTarget=i).options=S.extend({},n.defaults,e),i.isOpen=!1,i.$origin=S("#"+i.$el.attr("data-target")),i._setup(),i._calculatePositioning(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.TapTarget=void 0}},{key:"_setupEventHandlers",value:function(){this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleTargetClickBound=this._handleTargetClick.bind(this),this._handleOriginClickBound=this._handleOriginClick.bind(this),this.el.addEventListener("click",this._handleTargetClickBound),this.originEl.addEventListener("click",this._handleOriginClickBound);var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleTargetClickBound),this.originEl.removeEventListener("click",this._handleOriginClickBound),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleTargetClick",value:function(t){this.open()}},{key:"_handleOriginClick",value:function(t){this.close()}},{key:"_handleResize",value:function(t){this._calculatePositioning()}},{key:"_handleDocumentClick",value:function(t){S(t.target).closest(".tap-target-wrapper").length||(this.close(),t.preventDefault(),t.stopPropagation())}},{key:"_setup",value:function(){this.wrapper=this.$el.parent()[0],this.waveEl=S(this.wrapper).find(".tap-target-wave")[0],this.originEl=S(this.wrapper).find(".tap-target-origin")[0],this.contentEl=this.$el.find(".tap-target-content")[0],S(this.wrapper).hasClass(".tap-target-wrapper")||(this.wrapper=document.createElement("div"),this.wrapper.classList.add("tap-target-wrapper"),this.$el.before(S(this.wrapper)),this.wrapper.append(this.el)),this.contentEl||(this.contentEl=document.createElement("div"),this.contentEl.classList.add("tap-target-content"),this.$el.append(this.contentEl)),this.waveEl||(this.waveEl=document.createElement("div"),this.waveEl.classList.add("tap-target-wave"),this.originEl||(this.originEl=this.$origin.clone(!0,!0),this.originEl.addClass("tap-target-origin"),this.originEl.removeAttr("id"),this.originEl.removeAttr("style"),this.originEl=this.originEl[0],this.waveEl.append(this.originEl)),this.wrapper.append(this.waveEl))}},{key:"_calculatePositioning",value:function(){var t="fixed"===this.$origin.css("position");if(!t)for(var e=this.$origin.parents(),i=0;i<e.length&&!(t="fixed"==S(e[i]).css("position"));i++);var n=this.$origin.outerWidth(),s=this.$origin.outerHeight(),o=t?this.$origin.offset().top-M.getDocumentScrollTop():this.$origin.offset().top,a=t?this.$origin.offset().left-M.getDocumentScrollLeft():this.$origin.offset().left,r=window.innerWidth,l=window.innerHeight,h=r/2,d=l/2,u=a<=h,c=h<a,p=o<=d,v=d<o,f=.25*r<=a&&a<=.75*r,m=this.$el.outerWidth(),g=this.$el.outerHeight(),_=o+s/2-g/2,y=a+n/2-m/2,k=t?"fixed":"absolute",b=f?m:m/2+n,w=g/2,C=p?g/2:0,E=u&&!f?m/2-n:0,O=n,x=v?"bottom":"top",L=2*n,T=L,$=g/2-T/2,B=m/2-L/2,D={};D.top=p?_+"px":"",D.right=c?r-y-m+"px":"",D.bottom=v?l-_-g+"px":"",D.left=u?y+"px":"",D.position=k,S(this.wrapper).css(D),S(this.contentEl).css({width:b+"px",height:w+"px",top:C+"px",right:"0px",bottom:"0px",left:E+"px",padding:O+"px",verticalAlign:x}),S(this.waveEl).css({top:$+"px",left:B+"px",width:L+"px",height:T+"px"})}},{key:"open",value:function(){this.isOpen||("function"==typeof this.options.onOpen&&this.options.onOpen.call(this,this.$origin[0]),this.isOpen=!0,this.wrapper.classList.add("open"),document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound))}},{key:"close",value:function(){this.isOpen&&("function"==typeof this.options.onClose&&this.options.onClose.call(this,this.$origin[0]),this.isOpen=!1,this.wrapper.classList.remove("open"),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound))}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_TapTarget}},{key:"defaults",get:function(){return e}}]),n}();M.TapTarget=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"tapTarget","M_TapTarget")}(cash),function(d){"use strict";var e={classes:"",dropdownOptions:{}},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return i.$el.hasClass("browser-default")?_possibleConstructorReturn(i):((i.el.M_FormSelect=i).options=d.extend({},n.defaults,e),i.isMultiple=i.$el.prop("multiple"),i.el.tabIndex=-1,i._keysSelected={},i._valueDict={},i._setupDropdown(),i._setupEventHandlers(),i)}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_FormSelect=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleSelectChangeBound=this._handleSelectChange.bind(this),this._handleOptionClickBound=this._handleOptionClick.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),d(this.dropdownOptions).find("li:not(.optgroup)").each(function(t){t.addEventListener("click",e._handleOptionClickBound)}),this.el.addEventListener("change",this._handleSelectChangeBound),this.input.addEventListener("click",this._handleInputClickBound)}},{key:"_removeEventHandlers",value:function(){var e=this;d(this.dropdownOptions).find("li:not(.optgroup)").each(function(t){t.removeEventListener("click",e._handleOptionClickBound)}),this.el.removeEventListener("change",this._handleSelectChangeBound),this.input.removeEventListener("click",this._handleInputClickBound)}},{key:"_handleSelectChange",value:function(t){this._setValueToInput()}},{key:"_handleOptionClick",value:function(t){t.preventDefault();var e=d(t.target).closest("li")[0],i=e.id;if(!d(e).hasClass("disabled")&&!d(e).hasClass("optgroup")&&i.length){var n=!0;if(this.isMultiple){var s=d(this.dropdownOptions).find("li.disabled.selected");s.length&&(s.removeClass("selected"),s.find('input[type="checkbox"]').prop("checked",!1),this._toggleEntryFromArray(s[0].id)),n=this._toggleEntryFromArray(i)}else d(this.dropdownOptions).find("li").removeClass("selected"),d(e).toggleClass("selected",n);d(this._valueDict[i].el).prop("selected")!==n&&(d(this._valueDict[i].el).prop("selected",n),this.$el.trigger("change"))}t.stopPropagation()}},{key:"_handleInputClick",value:function(){this.dropdown&&this.dropdown.isOpen&&(this._setValueToInput(),this._setSelectedStates())}},{key:"_setupDropdown",value:function(){var n=this;this.wrapper=document.createElement("div"),d(this.wrapper).addClass("select-wrapper "+this.options.classes),this.$el.before(d(this.wrapper)),this.wrapper.appendChild(this.el),this.el.disabled&&this.wrapper.classList.add("disabled"),this.$selectOptions=this.$el.children("option, optgroup"),this.dropdownOptions=document.createElement("ul"),this.dropdownOptions.id="select-options-"+M.guid(),d(this.dropdownOptions).addClass("dropdown-content select-dropdown "+(this.isMultiple?"multiple-select-dropdown":"")),this.$selectOptions.length&&this.$selectOptions.each(function(t){if(d(t).is("option")){var e=void 0;e=n.isMultiple?n._appendOptionWithIcon(n.$el,t,"multiple"):n._appendOptionWithIcon(n.$el,t),n._addOptionToValueDict(t,e)}else if(d(t).is("optgroup")){var i=d(t).children("option");d(n.dropdownOptions).append(d('<li class="optgroup"><span>'+t.getAttribute("label")+"</span></li>")[0]),i.each(function(t){var e=n._appendOptionWithIcon(n.$el,t,"optgroup-option");n._addOptionToValueDict(t,e)})}}),this.$el.after(this.dropdownOptions),this.input=document.createElement("input"),d(this.input).addClass("select-dropdown dropdown-trigger"),this.input.setAttribute("type","text"),this.input.setAttribute("readonly","true"),this.input.setAttribute("data-target",this.dropdownOptions.id),this.el.disabled&&d(this.input).prop("disabled","true"),this.$el.before(this.input),this._setValueToInput();var t=d('<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');if(this.$el.before(t[0]),!this.el.disabled){var e=d.extend({},this.options.dropdownOptions);e.onOpenEnd=function(t){var e=d(n.dropdownOptions).find(".selected").first();if(e.length&&(M.keyDown=!0,n.dropdown.focusedIndex=e.index(),n.dropdown._focusFocusedItem(),M.keyDown=!1,n.dropdown.isScrollable)){var i=e[0].getBoundingClientRect().top-n.dropdownOptions.getBoundingClientRect().top;i-=n.dropdownOptions.clientHeight/2,n.dropdownOptions.scrollTop=i}},this.isMultiple&&(e.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,e)}this._setSelectedStates()}},{key:"_addOptionToValueDict",value:function(t,e){var i=Object.keys(this._valueDict).length,n=this.dropdownOptions.id+i,s={};e.id=n,s.el=t,s.optionEl=e,this._valueDict[n]=s}},{key:"_removeDropdown",value:function(){d(this.wrapper).find(".caret").remove(),d(this.input).remove(),d(this.dropdownOptions).remove(),d(this.wrapper).before(this.$el),d(this.wrapper).remove()}},{key:"_appendOptionWithIcon",value:function(t,e,i){var n=e.disabled?"disabled ":"",s="optgroup-option"===i?"optgroup-option ":"",o=this.isMultiple?'<label><input type="checkbox"'+n+'"/><span>'+e.innerHTML+"</span></label>":e.innerHTML,a=d("<li></li>"),r=d("<span></span>");r.html(o),a.addClass(n+" "+s),a.append(r);var l=e.getAttribute("data-icon");if(l){var h=d('<img alt="" src="'+l+'">');a.prepend(h)}return d(this.dropdownOptions).append(a[0]),a[0]}},{key:"_toggleEntryFromArray",value:function(t){var e=!this._keysSelected.hasOwnProperty(t),i=d(this._valueDict[t].optionEl);return e?this._keysSelected[t]=!0:delete this._keysSelected[t],i.toggleClass("selected",e),i.find('input[type="checkbox"]').prop("checked",e),i.prop("selected",e),e}},{key:"_setValueToInput",value:function(){var i=[];if(this.$el.find("option").each(function(t){if(d(t).prop("selected")){var e=d(t).text();i.push(e)}}),!i.length){var t=this.$el.find("option:disabled").eq(0);t.length&&""===t[0].value&&i.push(t.text())}this.input.value=i.join(", ")}},{key:"_setSelectedStates",value:function(){for(var t in this._keysSelected={},this._valueDict){var e=this._valueDict[t],i=d(e.el).prop("selected");d(e.optionEl).find('input[type="checkbox"]').prop("checked",i),i?(this._activateOption(d(this.dropdownOptions),d(e.optionEl)),this._keysSelected[t]=!0):d(e.optionEl).removeClass("selected")}}},{key:"_activateOption",value:function(t,e){e&&(this.isMultiple||t.find("li.selected").removeClass("selected"),d(e).addClass("selected"))}},{key:"getSelectedValues",value:function(){var t=[];for(var e in this._keysSelected)t.push(this._valueDict[e].el.value);return t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_FormSelect}},{key:"defaults",get:function(){return e}}]),n}();M.FormSelect=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"formSelect","M_FormSelect")}(cash),function(s,e){"use strict";var i={},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Range=i).options=s.extend({},n.defaults,e),i._mousedown=!1,i._setupThumb(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeThumb(),this.el.M_Range=void 0}},{key:"_setupEventHandlers",value:function(){this._handleRangeChangeBound=this._handleRangeChange.bind(this),this._handleRangeMousedownTouchstartBound=this._handleRangeMousedownTouchstart.bind(this),this._handleRangeInputMousemoveTouchmoveBound=this._handleRangeInputMousemoveTouchmove.bind(this),this._handleRangeMouseupTouchendBound=this._handleRangeMouseupTouchend.bind(this),this._handleRangeBlurMouseoutTouchleaveBound=this._handleRangeBlurMouseoutTouchleave.bind(this),this.el.addEventListener("change",this._handleRangeChangeBound),this.el.addEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.addEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.addEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("change",this._handleRangeChangeBound),this.el.removeEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_handleRangeChange",value:function(){s(this.value).html(this.$el.val()),s(this.thumb).hasClass("active")||this._showRangeBubble();var t=this._calcRangeOffset();s(this.thumb).addClass("active").css("left",t+"px")}},{key:"_handleRangeMousedownTouchstart",value:function(t){if(s(this.value).html(this.$el.val()),this._mousedown=!0,this.$el.addClass("active"),s(this.thumb).hasClass("active")||this._showRangeBubble(),"input"!==t.type){var e=this._calcRangeOffset();s(this.thumb).addClass("active").css("left",e+"px")}}},{key:"_handleRangeInputMousemoveTouchmove",value:function(){if(this._mousedown){s(this.thumb).hasClass("active")||this._showRangeBubble();var t=this._calcRangeOffset();s(this.thumb).addClass("active").css("left",t+"px"),s(this.value).html(this.$el.val())}}},{key:"_handleRangeMouseupTouchend",value:function(){this._mousedown=!1,this.$el.removeClass("active")}},{key:"_handleRangeBlurMouseoutTouchleave",value:function(){if(!this._mousedown){var t=7+parseInt(this.$el.css("padding-left"))+"px";s(this.thumb).hasClass("active")&&(e.remove(this.thumb),e({targets:this.thumb,height:0,width:0,top:10,easing:"easeOutQuad",marginLeft:t,duration:100})),s(this.thumb).removeClass("active")}}},{key:"_setupThumb",value:function(){this.thumb=document.createElement("span"),this.value=document.createElement("span"),s(this.thumb).addClass("thumb"),s(this.value).addClass("value"),s(this.thumb).append(this.value),this.$el.after(this.thumb)}},{key:"_removeThumb",value:function(){s(this.thumb).remove()}},{key:"_showRangeBubble",value:function(){var t=-7+parseInt(s(this.thumb).parent().css("padding-left"))+"px";e.remove(this.thumb),e({targets:this.thumb,height:30,width:30,top:-30,marginLeft:t,duration:300,easing:"easeOutQuint"})}},{key:"_calcRangeOffset",value:function(){var t=this.$el.width()-15,e=parseFloat(this.$el.attr("max"))||100,i=parseFloat(this.$el.attr("min"))||0;return(parseFloat(this.$el.val())-i)/(e-i)*t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Range}},{key:"defaults",get:function(){return i}}]),n}();M.Range=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"range","M_Range"),t.init(s("input[type=range]"))}(cash,M.anime);
 
 
new/admin/{admin-after-settings-page.php → admin_commons/admin-after-settings-page.php} RENAMED
File without changes
new/admin/admin_commons/admin-show-hide.php ADDED
@@ -0,0 +1,482 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin Show/Hide
4
+ *
5
+ * @package ctc
6
+ * @subpackage Administration
7
+ * @since 2.8
8
+ */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) exit;
11
+
12
+ $show_or_hide = ( '' == $options ) ? '' : esc_attr( $options['show_or_hide'] );
13
+
14
+ $list_hideon_pages = ( '' == $options ) ? '' : esc_attr( $options['list_hideon_pages'] );
15
+ $list_hideon_cat = ( '' == $options ) ? '' : esc_attr( $options['list_hideon_cat'] );
16
+ $list_showon_pages = ( '' == $options ) ? '' : esc_attr( $options['list_showon_pages'] );
17
+ $list_showon_cat = ( '' == $options ) ? '' : esc_attr( $options['list_showon_cat'] );
18
+
19
+
20
+ ?>
21
+
22
+ <ul class="collapsible">
23
+ <li class="active">
24
+ <div class="collapsible-header">Show/Hide on Selected pages</div>
25
+ <div class="collapsible-body">
26
+
27
+ <?php
28
+
29
+
30
+ // Hide on Mobile Devices
31
+ if ( isset( $options['hideon_mobile'] ) ) {
32
+ ?>
33
+ <p>
34
+ <label>
35
+ <input name="<?php echo $dbrow ?>[hideon_mobile]" type="checkbox" value="1" <?php checked( $options['hideon_mobile'], 1 ); ?> id="hideon_mobile" />
36
+ <span>Hide on - Mobile Devices</span>
37
+ </label>
38
+ </p>
39
+ <?php
40
+ } else {
41
+ ?>
42
+ <p>
43
+ <label>
44
+ <input name="<?php echo $dbrow ?>[hideon_mobile]" type="checkbox" value="1" id="hideon_mobile" />
45
+ <span>Hide on - Mobile Devices</span>
46
+ </label>
47
+ </p>
48
+ <?php
49
+ }
50
+
51
+ // Hide on Desktop Devices
52
+ if ( isset( $options['hideon_desktop'] ) ) {
53
+ ?>
54
+ <p>
55
+ <label>
56
+ <input name="<?php echo $dbrow ?>[hideon_desktop]" type="checkbox" value="1" <?php checked( $options['hideon_desktop'], 1 ); ?> id="hideon_desktop" />
57
+ <span>Hide on - Desktop Devices</span>
58
+ </label>
59
+ </p>
60
+ <?php
61
+ } else {
62
+ ?>
63
+ <p>
64
+ <label>
65
+ <input name="<?php echo $dbrow ?>[hideon_desktop]" type="checkbox" value="1" id="hideon_desktop" />
66
+ <span>Hide on - Desktop Devices</span>
67
+ </label>
68
+ </p>
69
+ <?php
70
+ }
71
+ ?>
72
+ <!-- <p class="description">plugin detects device based on HTTP User agent </p> -->
73
+ <p class="description">If working in reverse it might be the cache plugin not detecting the devices - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/hide-based-on-device/">more info</a> </p>
74
+ <br><hr><br>
75
+
76
+ <span class="description"><b>Select Show/Hide:</b></span>
77
+
78
+ <div class="row" style="margin-bottom: 0px;">
79
+ <div class="input-field col s8">
80
+ <select name="<?php echo $dbrow ?>[show_or_hide]" class="select_show_or_hide">
81
+ <option value="hide" <?php echo $show_or_hide == "hide" ? 'SELECTED' : ''; ?> >Hide on selected pages</option>
82
+ <option value="show" <?php echo $show_or_hide == "show" ? 'SELECTED' : ''; ?> >Show on selected pages</option>
83
+ </select>
84
+ <!-- <label><?php _e( 'enable' , 'click-to-chat-for-whatsapp' ) ?></label> -->
85
+ </div>
86
+ </div>
87
+
88
+
89
+
90
+ <!-- ######### Hide ######### -->
91
+
92
+
93
+
94
+ <p class="description ctc_show_hide_display show-hide_display-none hidebased" style="margin-bottom: 15px">
95
+ <?php echo 'Select pages to Hide styles <span style="color: green;"> ( Default Shows on all pages ) ' ?>
96
+ </p>
97
+ <!-- <br><br> -->
98
+ <?php
99
+
100
+ // checkboxes - Hide based on Type of posts
101
+
102
+ // Single Posts
103
+ if ( isset( $options['hideon_posts'] ) ) {
104
+ ?>
105
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
106
+ <label>
107
+ <input name="<?php echo $dbrow ?>[hideon_posts]" type="checkbox" value="1" <?php checked( $options['hideon_posts'], 1 ); ?> id="filled-in-box1" />
108
+ <span>Hide on - Posts</span>
109
+ </label>
110
+ </p>
111
+ <?php
112
+ } else {
113
+ ?>
114
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
115
+ <label>
116
+ <input name="<?php echo $dbrow ?>[hideon_posts]" type="checkbox" value="1" id="filled-in-box1" />
117
+ <span>Hide on - Posts</span>
118
+ </label>
119
+ </p>
120
+ <?php
121
+ }
122
+
123
+
124
+ // Page
125
+ if ( isset( $options['hideon_page'] ) ) {
126
+ ?>
127
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
128
+ <label>
129
+ <input name="<?php echo $dbrow ?>[hideon_page]" type="checkbox" value="1" <?php checked( $options['hideon_page'], 1 ); ?> id="filled-in-box2" />
130
+ <span>Hide on - Pages</span>
131
+ </label>
132
+ </p>
133
+ <?php
134
+ } else {
135
+ ?>
136
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
137
+ <label>
138
+ <input name="<?php echo $dbrow ?>[hideon_page]" type="checkbox" value="1" id="filled-in-box2" />
139
+ <span>Hide on - Pages</span>
140
+ </label>
141
+ </p>
142
+ <?php
143
+ }
144
+
145
+
146
+
147
+
148
+ // Home Page
149
+ // is_home and is_front_page - combined. calling as home/front page
150
+ if ( isset( $options['hideon_homepage'] ) ) {
151
+ ?>
152
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
153
+ <label>
154
+ <input name="<?php echo $dbrow ?>[hideon_homepage]" type="checkbox" value="1" <?php checked( $options['hideon_homepage'], 1 ); ?> id="filled-in-box3" />
155
+ <span>Hide on - Home/Front Page</span>
156
+ </label>
157
+ </p>
158
+ <?php
159
+ } else {
160
+ ?>
161
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
162
+ <label>
163
+ <input name="<?php echo $dbrow ?>[hideon_homepage]" type="checkbox" value="1" id="filled-in-box3" />
164
+ <span>Hide on - Home/Front Page</span>
165
+ </label>
166
+ </p>
167
+ <?php
168
+ }
169
+
170
+
171
+ // Category
172
+ if ( isset( $options['hideon_category'] ) ) {
173
+ ?>
174
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
175
+ <label>
176
+ <input name="<?php echo $dbrow ?>[hideon_category]" type="checkbox" value="1" <?php checked( $options['hideon_category'], 1 ); ?> id="filled-in-box5" />
177
+ <span>Hide on - Category</span>
178
+ </label>
179
+ </p>
180
+ <?php
181
+ } else {
182
+ ?>
183
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
184
+ <label>
185
+ <input name="<?php echo $dbrow ?>[hideon_category]" type="checkbox" value="1" id="filled-in-box5" />
186
+ <span>Hide on - Category</span>
187
+ </label>
188
+ </p>
189
+ <?php
190
+ }
191
+
192
+
193
+
194
+ // Archive
195
+ if ( isset( $options['hideon_archive'] ) ) {
196
+ ?>
197
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
198
+ <label>
199
+ <input name="<?php echo $dbrow ?>[hideon_archive]" type="checkbox" value="1" <?php checked( $options['hideon_archive'], 1 ); ?> id="filled-in-box6" />
200
+ <span>Hide on - Archive</span>
201
+ </label>
202
+ </p>
203
+ <?php
204
+ } else {
205
+ ?>
206
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
207
+ <label>
208
+ <input name="<?php echo $dbrow ?>[hideon_archive]" type="checkbox" value="1" id="filled-in-box6" />
209
+ <span>Hide on - Archive</span>
210
+ </label>
211
+ </p>
212
+ <?php
213
+ }
214
+
215
+
216
+ // 404 Page
217
+ if ( isset( $options['hideon_404'] ) ) {
218
+ ?>
219
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
220
+ <label>
221
+ <input name="<?php echo $dbrow ?>[hideon_404]" type="checkbox" value="1" <?php checked( $options['hideon_404'], 1 ); ?> id="hideon_404" />
222
+ <span>Hide on - 404 Page</span>
223
+ </label>
224
+ </p>
225
+ <?php
226
+ } else {
227
+ ?>
228
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
229
+ <label>
230
+ <input name="<?php echo $dbrow ?>[hideon_404]" type="checkbox" value="1" id="hideon_404" />
231
+ <span>Hide on - 404 Page</span>
232
+ </label>
233
+ </p>
234
+ <?php
235
+ }
236
+
237
+
238
+ // WooCommerce single product pages
239
+ if ( isset( $options['hideon_wooproduct'] ) ) {
240
+ ?>
241
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
242
+ <label>
243
+ <input name="<?php echo $dbrow ?>[hideon_wooproduct]" type="checkbox" value="1" <?php checked( $options['hideon_wooproduct'], 1 ); ?> id="hideon_wooproduct" />
244
+ <span>Hide on - WooCommerce single product pages</span>
245
+ </label>
246
+ </p>
247
+ <?php
248
+ } else {
249
+ ?>
250
+ <p class="ctc_show_hide_display show-hide_display-none hidebased">
251
+ <label>
252
+ <input name="<?php echo $dbrow ?>[hideon_wooproduct]" type="checkbox" value="1" id="hideon_wooproduct" />
253
+ <span>Hide on - WooCommerce single product pages</span>
254
+ </label>
255
+ </p>
256
+ <?php
257
+ }
258
+
259
+
260
+ ?>
261
+ <p class="description ctc_show_hide_display show-hide_display-none hidebased">Check to hide Styles based on the type of pages</p>
262
+ <br>
263
+
264
+ <!-- ID's list to hide styles -->
265
+ <div class="row ctc_show_hide_display show-hide_display-none hidebased">
266
+ <div class="input-field col s7">
267
+ <input name="<?php echo $dbrow ?>[list_hideon_pages]" value="<?php echo $list_hideon_pages ?>" id="ccw_list_id_tohide" type="text" class="input-margin">
268
+ <label for="ccw_list_id_tohide">Id's list to Hide - add ',' after each id </label>
269
+ <p class="description"> Add Post, Page, Media - ID's to hide, can add multiple id's by separating with a comma ( , ) </p>
270
+ </div>
271
+ </div>
272
+
273
+ <!-- Categorys list - to hide -->
274
+ <div class="row ctc_show_hide_display show-hide_display-none hidebased">
275
+ <div class="input-field col s7">
276
+ <input name="<?php echo $dbrow ?>[list_hideon_cat]" value="<?php echo $list_hideon_cat ?>" id="ccw_list_cat_tohide" type="text" class="input-margin">
277
+ <label for="ccw_list_cat_tohide"><?php _e( 'Category name\'s to Hide - add \',\' after each category name' , 'click-to-chat-for-whatsapp' ) ?> </label>
278
+ <p class="description">Add Categories name to hide, can add multiple Categories by separating with a comma ( , ) </p>
279
+ </div>
280
+ </div>
281
+
282
+
283
+
284
+ <!-- ######### Show ######### -->
285
+
286
+
287
+
288
+ <p class="description ctc_show_hide_display show-hide_display-none showbased" style="margin-bottom: 15px">
289
+ <?php echo 'Select pages to display styles <span style="background-color: #dddddd; color: red;"> ( Default hides on all pages ) ' ?>
290
+ </p>
291
+ <?php
292
+
293
+ // checkboxes - Show based on Type of posts
294
+
295
+ // Single Posts
296
+ if ( isset( $options['showon_posts'] ) ) {
297
+ ?>
298
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
299
+ <label>
300
+ <input name="<?php echo $dbrow ?>[showon_posts]" type="checkbox" value="1" <?php checked( $options['showon_posts'], 1 ); ?> id="show_filled-in-box1" />
301
+ <span>Show on - Posts</span>
302
+ </label>
303
+ </p>
304
+ <?php
305
+ } else {
306
+ ?>
307
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
308
+ <label>
309
+ <input name="<?php echo $dbrow ?>[showon_posts]" type="checkbox" value="1" id="show_filled-in-box1" />
310
+ <span>Show on - Posts</span>
311
+ </label>
312
+ </p>
313
+ <?php
314
+ }
315
+
316
+
317
+ // Page
318
+ if ( isset( $options['showon_page'] ) ) {
319
+ ?>
320
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
321
+ <label>
322
+ <input name="<?php echo $dbrow ?>[showon_page]" type="checkbox" value="1" <?php checked( $options['showon_page'], 1 ); ?> id="show_filled-in-box2" />
323
+ <span>Show on - Pages</span>
324
+ </label>
325
+ </p>
326
+ <?php
327
+ } else {
328
+ ?>
329
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
330
+ <label>
331
+ <input name="<?php echo $dbrow ?>[showon_page]" type="checkbox" value="1" id="show_filled-in-box2" />
332
+ <span>Show on - Pages</span>
333
+ </label>
334
+ </p>
335
+ <?php
336
+ }
337
+
338
+
339
+ // Home Page
340
+ // is_home and is_front_page - combined. calling as home/front page
341
+ if ( isset( $options['showon_homepage'] ) ) {
342
+ ?>
343
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
344
+ <label>
345
+ <input name="<?php echo $dbrow ?>[showon_homepage]" type="checkbox" value="1" <?php checked( $options['showon_homepage'], 1 ); ?> id="show_filled-in-box3" />
346
+ <span>Show on - Home/Front Page</span>
347
+ </label>
348
+ </p>
349
+ <?php
350
+ } else {
351
+ ?>
352
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
353
+ <label>
354
+ <input name="<?php echo $dbrow ?>[showon_homepage]" type="checkbox" value="1" id="show_filled-in-box3" />
355
+ <span>Show on - Home/Front Page</span>
356
+ </label>
357
+ </p>
358
+ <?php
359
+ }
360
+
361
+
362
+ // Category
363
+ if ( isset( $options['showon_category'] ) ) {
364
+ ?>
365
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
366
+ <label>
367
+ <input name="<?php echo $dbrow ?>[showon_category]" type="checkbox" value="1" <?php checked( $options['showon_category'], 1 ); ?> id="show_filled-in-box5" />
368
+ <span>Show on - Category</span>
369
+ </label>
370
+ </p>
371
+ <?php
372
+ } else {
373
+ ?>
374
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
375
+ <label>
376
+ <input name="<?php echo $dbrow ?>[showon_category]" type="checkbox" value="1" id="show_filled-in-box5" />
377
+ <span>Show on - Category</span>
378
+ </label>
379
+ </p>
380
+ <?php
381
+ }
382
+
383
+ // Archive
384
+ if ( isset( $options['showon_archive'] ) ) {
385
+ ?>
386
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
387
+ <label>
388
+ <input name="<?php echo $dbrow ?>[showon_archive]" type="checkbox" value="1" <?php checked( $options['showon_archive'], 1 ); ?> id="show_filled-in-box6" />
389
+ <span>Show on - Archive</span>
390
+ </label>
391
+ </p>
392
+ <?php
393
+ } else {
394
+ ?>
395
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
396
+ <label>
397
+ <input name="<?php echo $dbrow ?>[showon_archive]" type="checkbox" value="1" id="show_filled-in-box6" />
398
+ <span>Show on - Archive</span>
399
+ </label>
400
+ </p>
401
+ <?php
402
+ }
403
+
404
+
405
+ // 404 Page
406
+ if ( isset( $options['showon_404'] ) ) {
407
+ ?>
408
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
409
+ <label>
410
+ <input name="<?php echo $dbrow ?>[showon_404]" type="checkbox" value="1" <?php checked( $options['showon_404'], 1 ); ?> id="showon_404" />
411
+ <span>Show on - 404 Page</span>
412
+ </label>
413
+ </p>
414
+ <?php
415
+ } else {
416
+ ?>
417
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
418
+ <label>
419
+ <input name="<?php echo $dbrow ?>[showon_404]" type="checkbox" value="1" id="showon_404" />
420
+ <span>Show on - 404 Page</span>
421
+ </label>
422
+ </p>
423
+ <?php
424
+ }
425
+
426
+
427
+ // WooCommerce single product pages
428
+ if ( isset( $options['showon_wooproduct'] ) ) {
429
+ ?>
430
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
431
+ <label>
432
+ <input name="<?php echo $dbrow ?>[showon_wooproduct]" type="checkbox" value="1" <?php checked( $options['showon_wooproduct'], 1 ); ?> id="showon_wooproduct" />
433
+ <span>Show on - WooCommerce Single product pages</span>
434
+ </label>
435
+ </p>
436
+ <?php
437
+ } else {
438
+ ?>
439
+ <p class="ctc_show_hide_display show-hide_display-none showbased">
440
+ <label>
441
+ <input name="<?php echo $dbrow ?>[showon_wooproduct]" type="checkbox" value="1" id="showon_wooproduct" />
442
+ <span>Show on - WooCommerce Single product pages</span>
443
+ </label>
444
+ </p>
445
+ <?php
446
+ }
447
+
448
+
449
+ ?>
450
+ <p class="description ctc_show_hide_display show-hide_display-none showbased">Check to display Styles based on type of the page</p>
451
+ <br>
452
+
453
+ <!-- ID's list to show styles -->
454
+ <div class="row ctc_show_hide_display show-hide_display-none showbased">
455
+ <div class="input-field col s7">
456
+ <input name="<?php echo $dbrow ?>[list_showon_pages]" value="<?php echo $list_showon_pages ?>" id="ccw_list_id_toshow" type="text" class="input-margin">
457
+ <label for="ccw_list_id_toshow">Id's list to show - add ',' after each id </label>
458
+ <p class="description"> Add Post, Page, Media - ID's to show styles, can add multiple id's by separating with a comma ( , ) </p>
459
+ </div>
460
+ </div>
461
+
462
+
463
+ <!-- Categorys list - to show -->
464
+ <div class="row ctc_show_hide_display show-hide_display-none showbased">
465
+ <div class="input-field col s7">
466
+ <input name="<?php echo $dbrow ?>[list_showon_cat]" value="<?php echo $list_showon_cat ?>" id="ccw_list_cat_toshow" type="text" class="input-margin">
467
+ <label for="ccw_list_cat_toshow"><?php _e( 'Category name\'s to Show - add \',\' after each category name' , 'click-to-chat-for-whatsapp' ) ?> </label>
468
+ <p class="description">Add Categories name to show styles, can add multiple Categories by separating with a comma ( , ) </p>
469
+ </div>
470
+ </div>
471
+
472
+ <p class="description"><a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/show-hide-styles/">more info</a> </p>
473
+ <br>
474
+ <p class="description">Usescases:</p>
475
+ <p class="description">> <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-only-on-selected-pages/">Show only on selected pages</a></p>
476
+ <p class="description">> <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/hide-only-on-selected-pages/">Hide only on selected pages</a> </p>
477
+ <p class="description">> <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-hide-on-mobile-desktop/">Show/Hide on Mobile/Desktop</a></p>
478
+
479
+
480
+ </div>
481
+ </li>
482
+ <ul>
new/admin/admin_commons/class-ht-ctc-admin-others.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Other function, features .. to
4
+ *
5
+ * admin notices
6
+ * If whatsapp number not added.
7
+ *
8
+ * @since 2.7
9
+ * @package ctc
10
+ * @subpackage admin
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) exit;
14
+
15
+ if ( ! class_exists( 'HT_CTC_Admin_Others' ) ) :
16
+
17
+ class HT_CTC_Admin_Others {
18
+
19
+ public function __construct() {
20
+ $this->admin_hooks();
21
+ }
22
+
23
+ function admin_hooks() {
24
+
25
+ $ht_ctc_main_options = get_option('ht_ctc_main_options');
26
+
27
+ // if number blank
28
+ if ( isset( $ht_ctc_main_options['enable_chat'] ) ) {
29
+ $ht_ctc_chat_options = get_option('ht_ctc_chat_options');
30
+
31
+ if ( isset( $ht_ctc_chat_options['number'] ) ) {
32
+ if ( '' == $ht_ctc_chat_options['number'] ) {
33
+ add_action('admin_notices', array( $this, 'ifnumberblank') );
34
+ }
35
+ }
36
+ }
37
+
38
+ // if group id blank
39
+ if ( isset( $ht_ctc_main_options['enable_group'] ) ) {
40
+ $ht_ctc_group = get_option('ht_ctc_group');
41
+
42
+ if ( isset( $ht_ctc_group['group_id'] ) ) {
43
+ if ( '' == $ht_ctc_group['group_id'] ) {
44
+ add_action('admin_notices', array( $this, 'ifgroupblank') );
45
+ }
46
+ }
47
+
48
+ }
49
+
50
+ // if share_text blank
51
+ if ( isset( $ht_ctc_main_options['enable_share'] ) ) {
52
+ $ht_ctc_share = get_option('ht_ctc_share');
53
+
54
+ if ( isset( $ht_ctc_share['share_text'] ) ) {
55
+ if ( '' == $ht_ctc_share['share_text'] ) {
56
+ add_action('admin_notices', array( $this, 'ifshareblank') );
57
+ }
58
+ }
59
+ }
60
+
61
+
62
+ }
63
+
64
+ function ifnumberblank() {
65
+ ?>
66
+ <div class="notice notice-info is-dismissible">
67
+ <p>Click to Chat is almost ready. <a href="<?php echo admin_url('admin.php?page=click-to-chat');?>">Add WhatsApp Number</a> to display the chat options and let visitors chat.</p>
68
+ <!-- <a href="?dismis">Dismiss</a> -->
69
+ </div>
70
+ <?php
71
+ }
72
+
73
+ function ifgroupblank() {
74
+ ?>
75
+ <div class="notice notice-info is-dismissible">
76
+ <p>Click to Chat is almost ready. <a href="<?php echo admin_url('admin.php?page=click-to-chat-group-feature');?>">Add WhatsApp Group ID</a> to display the options to let visitors join in your WhatsApp Group.</p>
77
+ <!-- <a href="?dismis">Dismiss</a> -->
78
+ </div>
79
+ <?php
80
+ }
81
+
82
+ function ifshareblank() {
83
+ ?>
84
+ <div class="notice notice-info is-dismissible">
85
+ <p>Click to Chat is almost ready. <a href="<?php echo admin_url('admin.php?page=click-to-chat-share-feature');?>">Add Share Text</a> to let vistiors Share your Webpages.</p>
86
+ <!-- <a href="?dismis">Dismiss</a> -->
87
+ </div>
88
+ <?php
89
+ }
90
+
91
+
92
+ }
93
+
94
+ new HT_CTC_Admin_Others();
95
+
96
+ endif; // END class_exists check
new/admin/{class-ht-ctc-metabox.php → admin_commons/class-ht-ctc-metabox.php} RENAMED
File without changes
new/admin/class-ht-ctc-admin-customize-styles.php CHANGED
@@ -121,6 +121,7 @@ class HT_CTC_Admin_Customize_Styles {
121
  function ht_ctc_s2_cb() {
122
 
123
  $options = get_option('ht_ctc_s2');
 
124
  ?>
125
  <ul class="collapsible" data-collapsible="accordion">
126
  <li>
@@ -134,7 +135,7 @@ class HT_CTC_Admin_Customize_Styles {
134
  <p>Image Size</p>
135
  </div>
136
  <div class="input-field col s6">
137
- <input name="ht_ctc_s2[s2_img_size]" value="<?php echo esc_attr( $options['s2_img_size'] ) ?>" id="s2_img_size" type="text" class="" >
138
  <label for="s2_img_size">Image Size</label>
139
  </div>
140
  </div>
@@ -154,6 +155,7 @@ class HT_CTC_Admin_Customize_Styles {
154
  function ht_ctc_s3_cb() {
155
 
156
  $options = get_option('ht_ctc_s3');
 
157
  ?>
158
  <ul class="collapsible" data-collapsible="accordion">
159
  <li>
@@ -166,7 +168,7 @@ class HT_CTC_Admin_Customize_Styles {
166
  <p>Image Size</p>
167
  </div>
168
  <div class="input-field col s6">
169
- <input name="ht_ctc_s3[s3_img_size]" value="<?php echo esc_attr( $options['s3_img_size'] ) ?>" id="s3_img_size" type="text" class="" >
170
  <label for="s3_img_size">Image Size</label>
171
  </div>
172
  </div>
@@ -185,6 +187,9 @@ class HT_CTC_Admin_Customize_Styles {
185
  function ht_ctc_s4_cb() {
186
 
187
  $options = get_option('ht_ctc_s4');
 
 
 
188
  ?>
189
  <ul class="collapsible" data-collapsible="accordion">
190
  <li>
@@ -197,7 +202,7 @@ class HT_CTC_Admin_Customize_Styles {
197
  <p>Text Color</p>
198
  </div>
199
  <div class="input-field col s6">
200
- <input class="ht-ctc-color" name="ht_ctc_s4[s4_text_color]" data-default-color="#7f7d7d" value="<?php echo esc_attr( $options['s4_text_color'] ) ?>" id="s4_text_color" type="text">
201
  </div>
202
  </div>
203
 
@@ -207,7 +212,7 @@ class HT_CTC_Admin_Customize_Styles {
207
  <p>Background Color</p>
208
  </div>
209
  <div class="input-field col s6">
210
- <input id="s4_bg_color" class="ht-ctc-color" data-default-color="#e4e4e4" name="ht_ctc_s4[s4_bg_color]" value="<?php echo esc_attr( $options['s4_bg_color'] ) ?>" type="text" style="height: 1.375rem;" >
211
  </div>
212
  </div>
213
 
@@ -217,7 +222,7 @@ class HT_CTC_Admin_Customize_Styles {
217
  <p>Image URL</p>
218
  </div>
219
  <div class="input-field col s6">
220
- <input name="ht_ctc_s4[s4_img_url]" value="<?php echo esc_attr( $options['s4_img_url'] ) ?>" id="s4_img_url" type="text" class="" >
221
  <label for="s4_img_url">Image URL</label>
222
  </div>
223
  </div>
@@ -238,6 +243,18 @@ class HT_CTC_Admin_Customize_Styles {
238
  function ht_ctc_s5_cb() {
239
 
240
  $options = get_option('ht_ctc_s5');
 
 
 
 
 
 
 
 
 
 
 
 
241
  ?>
242
  <ul class="collapsible" data-collapsible="accordion">
243
  <li>
@@ -250,7 +267,7 @@ class HT_CTC_Admin_Customize_Styles {
250
  <p>Line 1</p>
251
  </div>
252
  <div class="input-field col s6">
253
- <input name="ht_ctc_s5[s5_line_1]" value="<?php echo esc_attr( $options['s5_line_1'] ) ?>" id="s5_line_1" type="text" class="" >
254
  <label for="s5_line_1">Line 1</label>
255
  </div>
256
  </div>
@@ -261,7 +278,7 @@ class HT_CTC_Admin_Customize_Styles {
261
  <p>Line 2</p>
262
  </div>
263
  <div class="input-field col s6">
264
- <input name="ht_ctc_s5[s5_line_2]" value="<?php echo esc_attr( $options['s5_line_2'] ) ?>" id="s5_line_2" type="text" class="" >
265
  <label for="s5_line_2">Line 2</label>
266
  </div>
267
  </div>
@@ -272,7 +289,7 @@ class HT_CTC_Admin_Customize_Styles {
272
  <p>Line 1 - Text Color</p>
273
  </div>
274
  <div class="input-field col s6">
275
- <input class="ht-ctc-color" name="ht_ctc_s5[s5_line_1_color]" data-default-color="#000000" value="<?php echo esc_attr( $options['s5_line_1_color'] ) ?>" id="s5_line_1_color" type="text">
276
  </div>
277
  </div>
278
 
@@ -282,7 +299,7 @@ class HT_CTC_Admin_Customize_Styles {
282
  <p>Line 2 - Text Color</p>
283
  </div>
284
  <div class="input-field col s6">
285
- <input class="ht-ctc-color" name="ht_ctc_s5[s5_line_2_color]" data-default-color="#000000" value="<?php echo esc_attr( $options['s5_line_2_color'] ) ?>" id="s5_line_2_color" type="text">
286
  </div>
287
  </div>
288
 
@@ -292,7 +309,7 @@ class HT_CTC_Admin_Customize_Styles {
292
  <p>Content Box Background Color</p>
293
  </div>
294
  <div class="input-field col s6">
295
- <input class="ht-ctc-color" name="ht_ctc_s5[s5_background_color]" data-default-color="#ffffff" value="<?php echo esc_attr( $options['s5_background_color'] ) ?>" id="s5_background_color" type="text">
296
  </div>
297
  </div>
298
 
@@ -302,7 +319,7 @@ class HT_CTC_Admin_Customize_Styles {
302
  <p>Content Box Border Color</p>
303
  </div>
304
  <div class="input-field col s6">
305
- <input class="ht-ctc-color" name="ht_ctc_s5[s5_border_color]" data-default-color="#dddddd" value="<?php echo esc_attr( $options['s5_border_color'] ) ?>" id="s5_border_color" type="text">
306
  </div>
307
  </div>
308
 
@@ -312,7 +329,7 @@ class HT_CTC_Admin_Customize_Styles {
312
  <p>Image URL</p>
313
  </div>
314
  <div class="input-field col s6">
315
- <input name="ht_ctc_s5[s5_img]" value="<?php echo esc_attr( $options['s5_img'] ) ?>" id="s5_img" type="text" class="" >
316
  <label for="s5_img">Leave blank for default image</label>
317
  </div>
318
  </div>
@@ -323,7 +340,7 @@ class HT_CTC_Admin_Customize_Styles {
323
  <p>Image Height</p>
324
  </div>
325
  <div class="input-field col s6">
326
- <input name="ht_ctc_s5[s5_img_height]" value="<?php echo esc_attr( $options['s5_img_height'] ) ?>" id="s5_img_height" type="text" class="" >
327
  <label for="s5_img_height">Image Height</label>
328
  </div>
329
  </div>
@@ -334,7 +351,7 @@ class HT_CTC_Admin_Customize_Styles {
334
  <p>Image Width</p>
335
  </div>
336
  <div class="input-field col s6">
337
- <input name="ht_ctc_s5[s5_img_width]" value="<?php echo esc_attr( $options['s5_img_width'] ) ?>" id="s5_img_width" type="text" class="" >
338
  <label for="s5_img_width">Image Width</label>
339
  </div>
340
  </div>
@@ -345,7 +362,7 @@ class HT_CTC_Admin_Customize_Styles {
345
  <p>Content Box Height</p>
346
  </div>
347
  <div class="input-field col s6">
348
- <input name="ht_ctc_s5[s5_content_height]" value="<?php echo esc_attr( $options['s5_content_height'] ) ?>" id="s5_content_height" type="text" class="" >
349
  <label for="s5_content_height">Content Box Height</label>
350
  </div>
351
  </div>
@@ -356,16 +373,12 @@ class HT_CTC_Admin_Customize_Styles {
356
  <p>Content Box Width</p>
357
  </div>
358
  <div class="input-field col s6">
359
- <input name="ht_ctc_s5[s5_content_width]" value="<?php echo esc_attr( $options['s5_content_width'] ) ?>" id="s5_content_width" type="text" class="" >
360
  <label for="s5_content_width">Content Box Width</label>
361
  </div>
362
  </div>
363
 
364
  <!-- s5_img_position -->
365
- <?php
366
- $select_s5_img_position = esc_attr( $options['s5_img_position'] );
367
- ?>
368
-
369
  <div class="row">
370
  <div class="col s6">
371
  <p>Image Position</p>
@@ -380,8 +393,6 @@ class HT_CTC_Admin_Customize_Styles {
380
  </div>
381
 
382
 
383
-
384
-
385
  </div>
386
  </div>
387
  </li>
@@ -397,6 +408,10 @@ class HT_CTC_Admin_Customize_Styles {
397
  function ht_ctc_s6_cb() {
398
 
399
  $options = get_option('ht_ctc_s6');
 
 
 
 
400
  ?>
401
  <ul class="collapsible" data-collapsible="accordion">
402
  <li>
@@ -409,8 +424,8 @@ class HT_CTC_Admin_Customize_Styles {
409
  <p>Text Color</p>
410
  </div>
411
  <div class="input-field col s6">
412
- <!-- <input id="s6_txt_color" class="ht-ctc-color" data-default-color="#006ccc" name="ht_ctc_s6[s6_txt_color]" value="<?php echo esc_attr( $options['s6_txt_color'] ) ?>" type="text" style="height: 1.375rem;" > -->
413
- <input id="s6_txt_color" class="ht-ctc-color" name="ht_ctc_s6[s6_txt_color]" value="<?php echo esc_attr( $options['s6_txt_color'] ) ?>" type="text" style="height: 1.375rem;" >
414
  </div>
415
  </div>
416
 
@@ -421,16 +436,12 @@ class HT_CTC_Admin_Customize_Styles {
421
  <p>Text Color on Hover</p>
422
  </div>
423
  <div class="input-field col s6">
424
- <!-- <input id="s6_txt_color_on_hover" class="ht-ctc-color" data-default-color="#006ccc" name="ht_ctc_s6[s6_txt_color_on_hover]" value="<?php echo esc_attr( $options['s6_txt_color_on_hover'] ) ?>" type="text" style="height: 1.375rem;" > -->
425
- <input id="s6_txt_color_on_hover" class="ht-ctc-color" name="ht_ctc_s6[s6_txt_color_on_hover]" value="<?php echo esc_attr( $options['s6_txt_color_on_hover'] ) ?>" type="text" style="height: 1.375rem;" >
426
  </div>
427
  </div>
428
 
429
  <!-- Text Decoration - none/initial/underline/overline/... -->
430
- <?php
431
- $text_decoration_value = esc_attr( $options['s6_txt_decoration'] );
432
- ?>
433
-
434
  <div class="row">
435
  <div class="col s6">
436
  <p>Text Decoration</p>
@@ -448,10 +459,6 @@ class HT_CTC_Admin_Customize_Styles {
448
  </div>
449
 
450
  <!-- Text Decoration when hover - none/initial/underline/overline/... -->
451
- <?php
452
- $text_decoration_hover_value = $options['s6_txt_decoration_on_hover'];
453
- ?>
454
-
455
  <div class="row">
456
  <div class="col s6">
457
  <p>Text Decoration when Hover</p>
@@ -481,6 +488,13 @@ class HT_CTC_Admin_Customize_Styles {
481
  function ht_ctc_s7_cb() {
482
 
483
  $options = get_option('ht_ctc_s7');
 
 
 
 
 
 
 
484
  ?>
485
  <ul class="collapsible" data-collapsible="accordion">
486
  <li>
@@ -493,7 +507,7 @@ class HT_CTC_Admin_Customize_Styles {
493
  <p>Icon Size</p>
494
  </div>
495
  <div class="input-field col s6">
496
- <input name="ht_ctc_s7[s7_icon_size]" value="<?php echo esc_attr( $options['s7_icon_size'] ) ?>" id="s7_icon_size" type="text" class="" >
497
  <label for="s7_icon_size">Icon Size</label>
498
  </div>
499
  </div>
@@ -504,7 +518,7 @@ class HT_CTC_Admin_Customize_Styles {
504
  <p>Icon Color</p>
505
  </div>
506
  <div class="input-field col s6">
507
- <input id="s7_icon_color" class="ht-ctc-color" data-default-color="#ffffff" name="ht_ctc_s7[s7_icon_color]" value="<?php echo esc_attr( $options['s7_icon_color'] ) ?>" type="text" style="height: 1.375rem;" >
508
  </div>
509
  </div>
510
 
@@ -514,7 +528,7 @@ class HT_CTC_Admin_Customize_Styles {
514
  <p>Icon Color on Hover</p>
515
  </div>
516
  <div class="input-field col s6">
517
- <input id="s7_icon_color_hover" class="ht-ctc-color" data-default-color="#6b6b6b" name="ht_ctc_s7[s7_icon_color_hover]" value="<?php echo esc_attr( $options['s7_icon_color_hover'] ) ?>" type="text" style="height: 1.375rem;" >
518
  </div>
519
  </div>
520
 
@@ -524,7 +538,7 @@ class HT_CTC_Admin_Customize_Styles {
524
  <p>Border Padding Size</p>
525
  </div>
526
  <div class="input-field col s6">
527
- <input name="ht_ctc_s7[s7_border_size]" value="<?php echo esc_attr( $options['s7_border_size'] ) ?>" id="s7_border_size" type="text" class="" >
528
  <label for="s7_border_size">Border Padding Size</label>
529
  <p class="description">E.g. 12px</p>
530
  </div>
@@ -536,7 +550,7 @@ class HT_CTC_Admin_Customize_Styles {
536
  <p>Border Padding Color</p>
537
  </div>
538
  <div class="input-field col s6">
539
- <input id="s7_border_color" class="ht-ctc-color" data-default-color="#25D366" name="ht_ctc_s7[s7_border_color]" value="<?php echo esc_attr( $options['s7_border_color'] ) ?>" type="text" style="height: 1.375rem;" >
540
  </div>
541
  </div>
542
 
@@ -546,7 +560,7 @@ class HT_CTC_Admin_Customize_Styles {
546
  <p>Border Padding Color on Hover</p>
547
  </div>
548
  <div class="input-field col s6">
549
- <input id="s7_border_color_hover" class="ht-ctc-color" data-default-color="#25D366" name="ht_ctc_s7[s7_border_color_hover]" value="<?php echo esc_attr( $options['s7_border_color_hover'] ) ?>" type="text" style="height: 1.375rem;" >
550
  </div>
551
  </div>
552
 
@@ -556,7 +570,7 @@ class HT_CTC_Admin_Customize_Styles {
556
  <p>Border radius</p>
557
  </div>
558
  <div class="input-field col s6">
559
- <input name="ht_ctc_s7[s7_border_radius]" value="<?php echo esc_attr( $options['s7_border_radius'] ) ?>" id="s7_border_radius" type="text" class="" >
560
  <label for="s7_border_radius">Border radius</label>
561
  <p class="description">E.g. 10px, 50% ( for round border add 50% )</p>
562
  </div>
@@ -577,6 +591,16 @@ class HT_CTC_Admin_Customize_Styles {
577
  function ht_ctc_s8_cb() {
578
 
579
  $options = get_option('ht_ctc_s8');
 
 
 
 
 
 
 
 
 
 
580
  ?>
581
  <ul class="collapsible" data-collapsible="accordion">
582
  <li>
@@ -590,7 +614,7 @@ class HT_CTC_Admin_Customize_Styles {
590
  <p>Text Color</p>
591
  </div>
592
  <div class="input-field col s6">
593
- <input id="s8_txt_color" class="ht-ctc-color" data-default-color="#ffffff" name="ht_ctc_s8[s8_txt_color]" value="<?php echo esc_attr( $options['s8_txt_color'] ) ?>" type="text" style="height: 1.375rem;" >
594
  <!-- <label for="s3_img_url">Text Color</label> -->
595
  <!-- <p class="description">Default Color: #ffffff</p> -->
596
  </div>
@@ -602,7 +626,7 @@ class HT_CTC_Admin_Customize_Styles {
602
  <p>Text Color on Hover</p>
603
  </div>
604
  <div class="input-field col s6">
605
- <input id="s8_txt_color_on_hover" class="ht-ctc-color" data-default-color="#ffffff" name="ht_ctc_s8[s8_txt_color_on_hover]" value="<?php echo esc_attr( $options['s8_txt_color_on_hover'] ) ?>" type="text" style="height: 1.375rem;" >
606
  <!-- <label for="s3_img_url">Text Color on Hover</label> -->
607
  <!-- <p class="description">Default Color: #ffffff</p> -->
608
  </div>
@@ -614,7 +638,7 @@ class HT_CTC_Admin_Customize_Styles {
614
  <p>Background Color</p>
615
  </div>
616
  <div class="input-field col s6">
617
- <input id="s8_bg_color" class="ht-ctc-color" data-default-color="#26a69a" name="ht_ctc_s8[s8_bg_color]" value="<?php echo esc_attr( $options['s8_bg_color'] ) ?>" type="text" style="height: 1.375rem;" >
618
  <!-- <label for="s3_img_url">Background Color</label> -->
619
  <!-- <p class="description">Default Color: #26a69a</p> -->
620
  </div>
@@ -626,7 +650,7 @@ class HT_CTC_Admin_Customize_Styles {
626
  <p>Background Color on Hover</p>
627
  </div>
628
  <div class="input-field col s6">
629
- <input id="s8_bg_color_on_hover" class="ht-ctc-color" data-default-color="#26a69a" name="ht_ctc_s8[s8_bg_color_on_hover]" value="<?php echo esc_attr( $options['s8_bg_color_on_hover'] ) ?>" type="text" style="height: 1.375rem;" >
630
  <!-- <label for="s3_img_url">Background Color on Hover</label> -->
631
  <!-- <p class="description">Default Color: #26a69a</p> -->
632
  </div>
@@ -638,7 +662,7 @@ class HT_CTC_Admin_Customize_Styles {
638
  <p>Icon Color</p>
639
  </div>
640
  <div class="input-field col s6">
641
- <input id="s8_icon_color" class="ht-ctc-color" data-default-color="#ffffff" name="ht_ctc_s8[s8_icon_color]" value="<?php echo esc_attr( $options['s8_icon_color'] ) ?>" type="text" style="height: 1.375rem;" >
642
  <!-- <label for="s3_img_url">Icon Color</label> -->
643
  <!-- <p class="description">Default Color: #ffffff</p> -->
644
  </div>
@@ -650,7 +674,7 @@ class HT_CTC_Admin_Customize_Styles {
650
  <p>Icon Color on Hover</p>
651
  </div>
652
  <div class="input-field col s6">
653
- <input id="s8_icon_color_on_hover" class="ht-ctc-color" data-default-color="#ffffff" name="ht_ctc_s8[s8_icon_color_on_hover]" value="<?php echo esc_attr( $options['s8_icon_color_on_hover'] ) ?>" type="text" style="height: 1.375rem;" >
654
  <!-- <label for="s3_img_url">Icon Color on Hover</label> -->
655
  <!-- <p class="description">Default Color: #ffffff</p> -->
656
  </div>
@@ -659,10 +683,6 @@ class HT_CTC_Admin_Customize_Styles {
659
 
660
 
661
  <!-- icon position - left/right -->
662
- <?php
663
- $icon_position_value = esc_attr( $options['s8_icon_position'] );
664
- ?>
665
-
666
  <div class="row">
667
  <div class="col s6">
668
  <p>Icon Position</p>
@@ -684,7 +704,7 @@ class HT_CTC_Admin_Customize_Styles {
684
  <p>Text Size</p>
685
  </div>
686
  <div class="input-field col s6">
687
- <input name="ht_ctc_s8[s8_text_size]" value="<?php echo esc_attr( $options['s8_text_size'] ) ?>" id="s8_text_size" type="text" class="" >
688
  <label for="s8_text_size">Text Size - E.g. 12px</label>
689
  <span class="helper-text">Leave blank for default settings</span>
690
  </div>
@@ -696,17 +716,13 @@ class HT_CTC_Admin_Customize_Styles {
696
  <p>Icon Size</p>
697
  </div>
698
  <div class="input-field col s6">
699
- <input name="ht_ctc_s8[s8_icon_size]" value="<?php echo esc_attr( $options['s8_icon_size'] ) ?>" id="s8_icon_size" type="text" class="" >
700
  <label for="s8_icon_size">Icon Size - E.g. 16px</label>
701
  <span class="helper-text">Leave blank for default settings</span>
702
  </div>
703
  </div>
704
 
705
  <!-- button size - btn, btn-large -->
706
- <?php
707
- $s8_btn_size = esc_attr( $options['s8_btn_size'] );
708
- ?>
709
-
710
  <div class="row">
711
  <div class="col s6">
712
  <p>Button Size</p>
@@ -734,6 +750,12 @@ class HT_CTC_Admin_Customize_Styles {
734
  function ht_ctc_s99_cb() {
735
 
736
  $options = get_option('ht_ctc_s99');
 
 
 
 
 
 
737
  ?>
738
  <ul class="collapsible" data-collapsible="accordion">
739
  <li>
@@ -746,7 +768,7 @@ class HT_CTC_Admin_Customize_Styles {
746
  <p>Image URL</p>
747
  </div> -->
748
  <div class="input-field col s12">
749
- <input name="ht_ctc_s99[s99_dekstop_img_url]" value="<?php echo esc_attr( $options['s99_dekstop_img_url'] ) ?>" id="s99_dekstop_img_url" type="text" class="" >
750
  <label for="s99_dekstop_img_url">Image URL - Desktop</label>
751
  </div>
752
  </div>
@@ -757,7 +779,7 @@ class HT_CTC_Admin_Customize_Styles {
757
  <p>Image URL</p>
758
  </div> -->
759
  <div class="input-field col s12">
760
- <input name="ht_ctc_s99[s99_mobile_img_url]" value="<?php echo esc_attr( $options['s99_mobile_img_url'] ) ?>" id="s99_mobile_img_url" type="text" class="" >
761
  <label for="s99_mobile_img_url">Image URL - Mobile</label>
762
  </div>
763
  </div>
@@ -768,7 +790,7 @@ class HT_CTC_Admin_Customize_Styles {
768
  <p>Desktop - Image Height</p>
769
  </div>
770
  <div class="input-field col s6">
771
- <input name="ht_ctc_s99[s99_desktop_img_height]" value="<?php echo esc_attr( $options['s99_desktop_img_height'] ) ?>" id="s99_desktop_img_height" type="text" class="" >
772
  <label for="s99_desktop_img_height">Desktop - Image Height</label>
773
  </div>
774
  </div>
@@ -779,7 +801,7 @@ class HT_CTC_Admin_Customize_Styles {
779
  <p>Desktop - Image Width</p>
780
  </div>
781
  <div class="input-field col s6">
782
- <input name="ht_ctc_s99[s99_desktop_img_width]" value="<?php echo esc_attr( $options['s99_desktop_img_width'] ) ?>" id="s99_desktop_img_width" type="text" class="" >
783
  <label for="s99_desktop_img_width">Desktop - Image Width</label>
784
  </div>
785
  </div>
@@ -790,7 +812,7 @@ class HT_CTC_Admin_Customize_Styles {
790
  <p>Mobile - Image Height</p>
791
  </div>
792
  <div class="input-field col s6">
793
- <input name="ht_ctc_s99[s99_mobile_img_height]" value="<?php echo esc_attr( $options['s99_mobile_img_height'] ) ?>" id="s99_mobile_img_height" type="text" class="" >
794
  <label for="s99_mobile_img_height">Mobile - Image Height</label>
795
  </div>
796
  </div>
@@ -801,7 +823,7 @@ class HT_CTC_Admin_Customize_Styles {
801
  <p>Mobile - Image Width</p>
802
  </div>
803
  <div class="input-field col s6">
804
- <input name="ht_ctc_s99[s99_mobile_img_width]" value="<?php echo esc_attr( $options['s99_mobile_img_width'] ) ?>" id="s99_mobile_img_width" type="text" class="" >
805
  <label for="s99_mobile_img_width">Mobile - Image Width</label>
806
  </div>
807
  </div>
@@ -823,7 +845,6 @@ class HT_CTC_Admin_Customize_Styles {
823
  function ht_ctc_othersettings_cb() {
824
 
825
  $options = get_option('ht_ctc_othersettings');
826
- $detectdevice = esc_attr( $options['detectdevice'] );
827
  ?>
828
 
829
  <ul class="collapsible" data-collapsible="accordion">
@@ -831,24 +852,6 @@ class HT_CTC_Admin_Customize_Styles {
831
  <div class="collapsible-header">Other settings</div>
832
  <div class="collapsible-body">
833
 
834
-
835
- <!-- detect device -->
836
- <div class="row">
837
- <div class="col s6">
838
- <p>Detect Device</p>
839
- </div>
840
- <div class="input-field col s6">
841
- <select name="ht_ctc_othersettings[detectdevice]" class="select">
842
- <option value="screen" <?php echo $detectdevice == 'screen' ? 'SELECTED' : ''; ?> >Screen Width</option>
843
- <option value="http" <?php echo $detectdevice == 'http' ? 'SELECTED' : ''; ?> >HTTP User Agent</option>
844
- </select>
845
- <!-- <label>Detect Device</label> -->
846
- </div>
847
- <p class="description"> This feature is <b>depreacted</b> </p>
848
- <p class="description">Screen Width: Mobile < 1024 >= desktop. <br> HTTP User Agent: wp_is_mobile <br> - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/detect-device/">more info</a> </p>
849
- </div>
850
- <br><br>
851
-
852
  <?php
853
 
854
  // Facebook Analytics
121
  function ht_ctc_s2_cb() {
122
 
123
  $options = get_option('ht_ctc_s2');
124
+ $s2_img_size = ( '' == $options ) ? '' : esc_attr( $options['s2_img_size'] );
125
  ?>
126
  <ul class="collapsible" data-collapsible="accordion">
127
  <li>
135
  <p>Image Size</p>
136
  </div>
137
  <div class="input-field col s6">
138
+ <input name="ht_ctc_s2[s2_img_size]" value="<?php echo $s2_img_size ?>" id="s2_img_size" type="text" class="" >
139
  <label for="s2_img_size">Image Size</label>
140
  </div>
141
  </div>
155
  function ht_ctc_s3_cb() {
156
 
157
  $options = get_option('ht_ctc_s3');
158
+ $s3_img_size = ( '' == $options ) ? '' : esc_attr( $options['s3_img_size'] );
159
  ?>
160
  <ul class="collapsible" data-collapsible="accordion">
161
  <li>
168
  <p>Image Size</p>
169
  </div>
170
  <div class="input-field col s6">
171
+ <input name="ht_ctc_s3[s3_img_size]" value="<?php echo $s3_img_size ?>" id="s3_img_size" type="text" class="" >
172
  <label for="s3_img_size">Image Size</label>
173
  </div>
174
  </div>
187
  function ht_ctc_s4_cb() {
188
 
189
  $options = get_option('ht_ctc_s4');
190
+ $s4_text_color = ( '' == $options ) ? '' : esc_attr( $options['s4_text_color'] );
191
+ $s4_bg_color = ( '' == $options ) ? '' : esc_attr( $options['s4_bg_color'] );
192
+ $s4_img_url = ( '' == $options ) ? '' : esc_attr( $options['s4_img_url'] );
193
  ?>
194
  <ul class="collapsible" data-collapsible="accordion">
195
  <li>
202
  <p>Text Color</p>
203
  </div>
204
  <div class="input-field col s6">
205
+ <input class="ht-ctc-color" name="ht_ctc_s4[s4_text_color]" data-default-color="#7f7d7d" value="<?php echo $s4_text_color ?>" id="s4_text_color" type="text">
206
  </div>
207
  </div>
208
 
212
  <p>Background Color</p>
213
  </div>
214
  <div class="input-field col s6">
215
+ <input id="s4_bg_color" class="ht-ctc-color" data-default-color="#e4e4e4" name="ht_ctc_s4[s4_bg_color]" value="<?php echo $s4_bg_color ?>" type="text" style="height: 1.375rem;" >
216
  </div>
217
  </div>
218
 
222
  <p>Image URL</p>
223
  </div>
224
  <div class="input-field col s6">
225
+ <input name="ht_ctc_s4[s4_img_url]" value="<?php echo $s4_img_url ?>" id="s4_img_url" type="text" class="" >
226
  <label for="s4_img_url">Image URL</label>
227
  </div>
228
  </div>
243
  function ht_ctc_s5_cb() {
244
 
245
  $options = get_option('ht_ctc_s5');
246
+ $s5_line_1 = ( '' == $options ) ? '' : esc_attr( $options['s5_line_1'] );
247
+ $s5_line_2 = ( '' == $options ) ? '' : esc_attr( $options['s5_line_2'] );
248
+ $s5_line_1_color = ( '' == $options ) ? '' : esc_attr( $options['s5_line_1_color'] );
249
+ $s5_line_2_color = ( '' == $options ) ? '' : esc_attr( $options['s5_line_2_color'] );
250
+ $s5_background_color = ( '' == $options ) ? '' : esc_attr( $options['s5_background_color'] );
251
+ $s5_border_color = ( '' == $options ) ? '' : esc_attr( $options['s5_border_color'] );
252
+ $s5_img = ( '' == $options ) ? '' : esc_attr( $options['s5_img'] );
253
+ $s5_img_height = ( '' == $options ) ? '' : esc_attr( $options['s5_img_height'] );
254
+ $s5_img_width = ( '' == $options ) ? '' : esc_attr( $options['s5_img_width'] );
255
+ $s5_content_height = ( '' == $options ) ? '' : esc_attr( $options['s5_content_height'] );
256
+ $s5_content_width = ( '' == $options ) ? '' : esc_attr( $options['s5_content_width'] );
257
+ $select_s5_img_position = ( '' == $options ) ? '' : esc_attr( $options['s5_img_position'] );
258
  ?>
259
  <ul class="collapsible" data-collapsible="accordion">
260
  <li>
267
  <p>Line 1</p>
268
  </div>
269
  <div class="input-field col s6">
270
+ <input name="ht_ctc_s5[s5_line_1]" value="<?php echo $s5_line_1 ?>" id="s5_line_1" type="text" class="" >
271
  <label for="s5_line_1">Line 1</label>
272
  </div>
273
  </div>
278
  <p>Line 2</p>
279
  </div>
280
  <div class="input-field col s6">
281
+ <input name="ht_ctc_s5[s5_line_2]" value="<?php echo $s5_line_2 ?>" id="s5_line_2" type="text" class="" >
282
  <label for="s5_line_2">Line 2</label>
283
  </div>
284
  </div>
289
  <p>Line 1 - Text Color</p>
290
  </div>
291
  <div class="input-field col s6">
292
+ <input class="ht-ctc-color" name="ht_ctc_s5[s5_line_1_color]" data-default-color="#000000" value="<?php echo $s5_line_1_color ?>" id="s5_line_1_color" type="text">
293
  </div>
294
  </div>
295
 
299
  <p>Line 2 - Text Color</p>
300
  </div>
301
  <div class="input-field col s6">
302
+ <input class="ht-ctc-color" name="ht_ctc_s5[s5_line_2_color]" data-default-color="#000000" value="<?php echo $s5_line_2_color ?>" id="s5_line_2_color" type="text">
303
  </div>
304
  </div>
305
 
309
  <p>Content Box Background Color</p>
310
  </div>
311
  <div class="input-field col s6">
312
+ <input class="ht-ctc-color" name="ht_ctc_s5[s5_background_color]" data-default-color="#ffffff" value="<?php echo $s5_background_color ?>" id="s5_background_color" type="text">
313
  </div>
314
  </div>
315
 
319
  <p>Content Box Border Color</p>
320
  </div>
321
  <div class="input-field col s6">
322
+ <input class="ht-ctc-color" name="ht_ctc_s5[s5_border_color]" data-default-color="#dddddd" value="<?php echo $s5_border_color ?>" id="s5_border_color" type="text">
323
  </div>
324
  </div>
325
 
329
  <p>Image URL</p>
330
  </div>
331
  <div class="input-field col s6">
332
+ <input name="ht_ctc_s5[s5_img]" value="<?php echo $s5_img ?>" id="s5_img" type="text" class="" >
333
  <label for="s5_img">Leave blank for default image</label>
334
  </div>
335
  </div>
340
  <p>Image Height</p>
341
  </div>
342
  <div class="input-field col s6">
343
+ <input name="ht_ctc_s5[s5_img_height]" value="<?php echo $s5_img_height ?>" id="s5_img_height" type="text" class="" >
344
  <label for="s5_img_height">Image Height</label>
345
  </div>
346
  </div>
351
  <p>Image Width</p>
352
  </div>
353
  <div class="input-field col s6">
354
+ <input name="ht_ctc_s5[s5_img_width]" value="<?php echo $s5_img_width ?>" id="s5_img_width" type="text" class="" >
355
  <label for="s5_img_width">Image Width</label>
356
  </div>
357
  </div>
362
  <p>Content Box Height</p>
363
  </div>
364
  <div class="input-field col s6">
365
+ <input name="ht_ctc_s5[s5_content_height]" value="<?php echo $s5_content_height ?>" id="s5_content_height" type="text" class="" >
366
  <label for="s5_content_height">Content Box Height</label>
367
  </div>
368
  </div>
373
  <p>Content Box Width</p>
374
  </div>
375
  <div class="input-field col s6">
376
+ <input name="ht_ctc_s5[s5_content_width]" value="<?php echo $s5_content_width ?>" id="s5_content_width" type="text" class="" >
377
  <label for="s5_content_width">Content Box Width</label>
378
  </div>
379
  </div>
380
 
381
  <!-- s5_img_position -->
 
 
 
 
382
  <div class="row">
383
  <div class="col s6">
384
  <p>Image Position</p>
393
  </div>
394
 
395
 
 
 
396
  </div>
397
  </div>
398
  </li>
408
  function ht_ctc_s6_cb() {
409
 
410
  $options = get_option('ht_ctc_s6');
411
+ $s6_txt_color = ( '' == $options ) ? '' : esc_attr( $options['s6_txt_color'] );
412
+ $s6_txt_color_on_hover = ( '' == $options ) ? '' : esc_attr( $options['s6_txt_color_on_hover'] );
413
+ $text_decoration_value = ( '' == $options ) ? '' : esc_attr( $options['s6_txt_decoration'] );
414
+ $text_decoration_hover_value = ( '' == $options ) ? '' : esc_attr( $options['s6_txt_decoration_on_hover'] );
415
  ?>
416
  <ul class="collapsible" data-collapsible="accordion">
417
  <li>
424
  <p>Text Color</p>
425
  </div>
426
  <div class="input-field col s6">
427
+ <!-- <input id="s6_txt_color" class="ht-ctc-color" data-default-color="#006ccc" name="ht_ctc_s6[s6_txt_color]" value="<?php echo $s6_txt_color ?>" type="text" style="height: 1.375rem;" > -->
428
+ <input id="s6_txt_color" class="ht-ctc-color" name="ht_ctc_s6[s6_txt_color]" value="<?php echo $s6_txt_color ?>" type="text" style="height: 1.375rem;" >
429
  </div>
430
  </div>
431
 
436
  <p>Text Color on Hover</p>
437
  </div>
438
  <div class="input-field col s6">
439
+ <!-- <input id="s6_txt_color_on_hover" class="ht-ctc-color" data-default-color="#006ccc" name="ht_ctc_s6[s6_txt_color_on_hover]" value="<?php echo $s6_txt_color_on_hover ?>" type="text" style="height: 1.375rem;" > -->
440
+ <input id="s6_txt_color_on_hover" class="ht-ctc-color" name="ht_ctc_s6[s6_txt_color_on_hover]" value="<?php echo $s6_txt_color_on_hover ?>" type="text" style="height: 1.375rem;" >
441
  </div>
442
  </div>
443
 
444
  <!-- Text Decoration - none/initial/underline/overline/... -->
 
 
 
 
445
  <div class="row">
446
  <div class="col s6">
447
  <p>Text Decoration</p>
459
  </div>
460
 
461
  <!-- Text Decoration when hover - none/initial/underline/overline/... -->
 
 
 
 
462
  <div class="row">
463
  <div class="col s6">
464
  <p>Text Decoration when Hover</p>
488
  function ht_ctc_s7_cb() {
489
 
490
  $options = get_option('ht_ctc_s7');
491
+ $s7_icon_size = ( '' == $options ) ? '' : esc_attr( $options['s7_icon_size'] );
492
+ $s7_icon_color = ( '' == $options ) ? '' : esc_attr( $options['s7_icon_color'] );
493
+ $s7_icon_color_hover = ( '' == $options ) ? '' : esc_attr( $options['s7_icon_color_hover'] );
494
+ $s7_border_size = ( '' == $options ) ? '' : esc_attr( $options['s7_border_size'] );
495
+ $s7_border_color = ( '' == $options ) ? '' : esc_attr( $options['s7_border_color'] );
496
+ $s7_border_color_hover = ( '' == $options ) ? '' : esc_attr( $options['s7_border_color_hover'] );
497
+ $s7_border_radius = ( '' == $options ) ? '' : esc_attr( $options['s7_border_radius'] );
498
  ?>
499
  <ul class="collapsible" data-collapsible="accordion">
500
  <li>
507
  <p>Icon Size</p>
508
  </div>
509
  <div class="input-field col s6">
510
+ <input name="ht_ctc_s7[s7_icon_size]" value="<?php echo $s7_icon_size ?>" id="s7_icon_size" type="text" class="" >
511
  <label for="s7_icon_size">Icon Size</label>
512
  </div>
513
  </div>
518
  <p>Icon Color</p>
519
  </div>
520
  <div class="input-field col s6">
521
+ <input id="s7_icon_color" class="ht-ctc-color" data-default-color="#ffffff" name="ht_ctc_s7[s7_icon_color]" value="<?php echo $s7_icon_color ?>" type="text" style="height: 1.375rem;" >
522
  </div>
523
  </div>
524
 
528
  <p>Icon Color on Hover</p>
529
  </div>
530
  <div class="input-field col s6">
531
+ <input id="s7_icon_color_hover" class="ht-ctc-color" data-default-color="#6b6b6b" name="ht_ctc_s7[s7_icon_color_hover]" value="<?php echo $s7_icon_color_hover ?>" type="text" style="height: 1.375rem;" >
532
  </div>
533
  </div>
534
 
538
  <p>Border Padding Size</p>
539
  </div>
540
  <div class="input-field col s6">
541
+ <input name="ht_ctc_s7[s7_border_size]" value="<?php echo $s7_border_size ?>" id="s7_border_size" type="text" class="" >
542
  <label for="s7_border_size">Border Padding Size</label>
543
  <p class="description">E.g. 12px</p>
544
  </div>
550
  <p>Border Padding Color</p>
551
  </div>
552
  <div class="input-field col s6">
553
+ <input id="s7_border_color" class="ht-ctc-color" data-default-color="#25D366" name="ht_ctc_s7[s7_border_color]" value="<?php echo $s7_border_color ?>" type="text" style="height: 1.375rem;" >
554
  </div>
555
  </div>
556
 
560
  <p>Border Padding Color on Hover</p>
561
  </div>
562
  <div class="input-field col s6">
563
+ <input id="s7_border_color_hover" class="ht-ctc-color" data-default-color="#25D366" name="ht_ctc_s7[s7_border_color_hover]" value="<?php echo $s7_border_color_hover ?>" type="text" style="height: 1.375rem;" >
564
  </div>
565
  </div>
566
 
570
  <p>Border radius</p>
571
  </div>
572
  <div class="input-field col s6">
573
+ <input name="ht_ctc_s7[s7_border_radius]" value="<?php echo $s7_border_radius ?>" id="s7_border_radius" type="text" class="" >
574
  <label for="s7_border_radius">Border radius</label>
575
  <p class="description">E.g. 10px, 50% ( for round border add 50% )</p>
576
  </div>
591
  function ht_ctc_s8_cb() {
592
 
593
  $options = get_option('ht_ctc_s8');
594
+ $s8_txt_color = ( '' == $options ) ? '' : esc_attr( $options['s8_txt_color'] );
595
+ $s8_txt_color_on_hover = ( '' == $options ) ? '' : esc_attr( $options['s8_txt_color_on_hover'] );
596
+ $s8_bg_color = ( '' == $options ) ? '' : esc_attr( $options['s8_bg_color'] );
597
+ $s8_bg_color_on_hover = ( '' == $options ) ? '' : esc_attr( $options['s8_bg_color_on_hover'] );
598
+ $s8_icon_color = ( '' == $options ) ? '' : esc_attr( $options['s8_icon_color'] );
599
+ $s8_icon_color_on_hover = ( '' == $options ) ? '' : esc_attr( $options['s8_icon_color_on_hover'] );
600
+ $icon_position_value = ( '' == $options ) ? '' : esc_attr( $options['s8_icon_position'] );
601
+ $s8_text_size = ( '' == $options ) ? '' : esc_attr( $options['s8_text_size'] );
602
+ $s8_icon_size = ( '' == $options ) ? '' : esc_attr( $options['s8_icon_size'] );
603
+ $s8_btn_size = ( '' == $options ) ? '' : esc_attr( $options['s8_btn_size'] );
604
  ?>
605
  <ul class="collapsible" data-collapsible="accordion">
606
  <li>
614
  <p>Text Color</p>
615
  </div>
616
  <div class="input-field col s6">
617
+ <input id="s8_txt_color" class="ht-ctc-color" data-default-color="#ffffff" name="ht_ctc_s8[s8_txt_color]" value="<?php echo $s8_txt_color ?>" type="text" style="height: 1.375rem;" >
618
  <!-- <label for="s3_img_url">Text Color</label> -->
619
  <!-- <p class="description">Default Color: #ffffff</p> -->
620
  </div>
626
  <p>Text Color on Hover</p>
627
  </div>
628
  <div class="input-field col s6">
629
+ <input id="s8_txt_color_on_hover" class="ht-ctc-color" data-default-color="#ffffff" name="ht_ctc_s8[s8_txt_color_on_hover]" value="<?php echo $s8_txt_color_on_hover ?>" type="text" style="height: 1.375rem;" >
630
  <!-- <label for="s3_img_url">Text Color on Hover</label> -->
631
  <!-- <p class="description">Default Color: #ffffff</p> -->
632
  </div>
638
  <p>Background Color</p>
639
  </div>
640
  <div class="input-field col s6">
641
+ <input id="s8_bg_color" class="ht-ctc-color" data-default-color="#26a69a" name="ht_ctc_s8[s8_bg_color]" value="<?php echo $s8_bg_color ?>" type="text" style="height: 1.375rem;" >
642
  <!-- <label for="s3_img_url">Background Color</label> -->
643
  <!-- <p class="description">Default Color: #26a69a</p> -->
644
  </div>
650
  <p>Background Color on Hover</p>
651
  </div>
652
  <div class="input-field col s6">
653
+ <input id="s8_bg_color_on_hover" class="ht-ctc-color" data-default-color="#26a69a" name="ht_ctc_s8[s8_bg_color_on_hover]" value="<?php echo $s8_bg_color_on_hover ?>" type="text" style="height: 1.375rem;" >
654
  <!-- <label for="s3_img_url">Background Color on Hover</label> -->
655
  <!-- <p class="description">Default Color: #26a69a</p> -->
656
  </div>
662
  <p>Icon Color</p>
663
  </div>
664
  <div class="input-field col s6">
665
+ <input id="s8_icon_color" class="ht-ctc-color" data-default-color="#ffffff" name="ht_ctc_s8[s8_icon_color]" value="<?php echo $s8_icon_color ?>" type="text" style="height: 1.375rem;" >
666
  <!-- <label for="s3_img_url">Icon Color</label> -->
667
  <!-- <p class="description">Default Color: #ffffff</p> -->
668
  </div>
674
  <p>Icon Color on Hover</p>
675
  </div>
676
  <div class="input-field col s6">
677
+ <input id="s8_icon_color_on_hover" class="ht-ctc-color" data-default-color="#ffffff" name="ht_ctc_s8[s8_icon_color_on_hover]" value="<?php echo $s8_icon_color_on_hover ?>" type="text" style="height: 1.375rem;" >
678
  <!-- <label for="s3_img_url">Icon Color on Hover</label> -->
679
  <!-- <p class="description">Default Color: #ffffff</p> -->
680
  </div>
683
 
684
 
685
  <!-- icon position - left/right -->
 
 
 
 
686
  <div class="row">
687
  <div class="col s6">
688
  <p>Icon Position</p>
704
  <p>Text Size</p>
705
  </div>
706
  <div class="input-field col s6">
707
+ <input name="ht_ctc_s8[s8_text_size]" value="<?php echo $s8_text_size ?>" id="s8_text_size" type="text" class="" >
708
  <label for="s8_text_size">Text Size - E.g. 12px</label>
709
  <span class="helper-text">Leave blank for default settings</span>
710
  </div>
716
  <p>Icon Size</p>
717
  </div>
718
  <div class="input-field col s6">
719
+ <input name="ht_ctc_s8[s8_icon_size]" value="<?php echo $s8_icon_size ?>" id="s8_icon_size" type="text" class="" >
720
  <label for="s8_icon_size">Icon Size - E.g. 16px</label>
721
  <span class="helper-text">Leave blank for default settings</span>
722
  </div>
723
  </div>
724
 
725
  <!-- button size - btn, btn-large -->
 
 
 
 
726
  <div class="row">
727
  <div class="col s6">
728
  <p>Button Size</p>
750
  function ht_ctc_s99_cb() {
751
 
752
  $options = get_option('ht_ctc_s99');
753
+ $s99_dekstop_img_url = ( '' == $options ) ? '' : esc_attr( $options['s99_dekstop_img_url'] );
754
+ $s99_mobile_img_url = ( '' == $options ) ? '' : esc_attr( $options['s99_mobile_img_url'] );
755
+ $s99_desktop_img_height = ( '' == $options ) ? '' : esc_attr( $options['s99_desktop_img_height'] );
756
+ $s99_desktop_img_width = ( '' == $options ) ? '' : esc_attr( $options['s99_desktop_img_width'] );
757
+ $s99_mobile_img_height = ( '' == $options ) ? '' : esc_attr( $options['s99_mobile_img_height'] );
758
+ $s99_mobile_img_width = ( '' == $options ) ? '' : esc_attr( $options['s99_mobile_img_width'] );
759
  ?>
760
  <ul class="collapsible" data-collapsible="accordion">
761
  <li>
768
  <p>Image URL</p>
769
  </div> -->
770
  <div class="input-field col s12">
771
+ <input name="ht_ctc_s99[s99_dekstop_img_url]" value="<?php echo $s99_dekstop_img_url ?>" id="s99_dekstop_img_url" type="text" class="" >
772
  <label for="s99_dekstop_img_url">Image URL - Desktop</label>
773
  </div>
774
  </div>
779
  <p>Image URL</p>
780
  </div> -->
781
  <div class="input-field col s12">
782
+ <input name="ht_ctc_s99[s99_mobile_img_url]" value="<?php echo $s99_mobile_img_url ?>" id="s99_mobile_img_url" type="text" class="" >
783
  <label for="s99_mobile_img_url">Image URL - Mobile</label>
784
  </div>
785
  </div>
790
  <p>Desktop - Image Height</p>
791
  </div>
792
  <div class="input-field col s6">
793
+ <input name="ht_ctc_s99[s99_desktop_img_height]" value="<?php echo $s99_desktop_img_height ?>" id="s99_desktop_img_height" type="text" class="" >
794
  <label for="s99_desktop_img_height">Desktop - Image Height</label>
795
  </div>
796
  </div>
801
  <p>Desktop - Image Width</p>
802
  </div>
803
  <div class="input-field col s6">
804
+ <input name="ht_ctc_s99[s99_desktop_img_width]" value="<?php echo $s99_desktop_img_width ?>" id="s99_desktop_img_width" type="text" class="" >
805
  <label for="s99_desktop_img_width">Desktop - Image Width</label>
806
  </div>
807
  </div>
812
  <p>Mobile - Image Height</p>
813
  </div>
814
  <div class="input-field col s6">
815
+ <input name="ht_ctc_s99[s99_mobile_img_height]" value="<?php echo $s99_mobile_img_height ?>" id="s99_mobile_img_height" type="text" class="" >
816
  <label for="s99_mobile_img_height">Mobile - Image Height</label>
817
  </div>
818
  </div>
823
  <p>Mobile - Image Width</p>
824
  </div>
825
  <div class="input-field col s6">
826
+ <input name="ht_ctc_s99[s99_mobile_img_width]" value="<?php echo $s99_mobile_img_width ?>" id="s99_mobile_img_width" type="text" class="" >
827
  <label for="s99_mobile_img_width">Mobile - Image Width</label>
828
  </div>
829
  </div>
845
  function ht_ctc_othersettings_cb() {
846
 
847
  $options = get_option('ht_ctc_othersettings');
 
848
  ?>
849
 
850
  <ul class="collapsible" data-collapsible="accordion">
852
  <div class="collapsible-header">Other settings</div>
853
  <div class="collapsible-body">
854
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
855
  <?php
856
 
857
  // Facebook Analytics
new/admin/class-ht-ctc-admin-group-page.php CHANGED
@@ -88,10 +88,11 @@ class HT_CTC_Admin_Group_Page {
88
  // WhatsApp Group ID.
89
  function group_id_cb() {
90
  $options = get_option('ht_ctc_group');
 
91
  ?>
92
  <div class="row">
93
  <div class="input-field col s12">
94
- <input name="ht_ctc_group[group_id]" value="<?php echo esc_attr( $options['group_id'] ) ?>" id="whatsapp_group_id" type="text" class="input-margin">
95
  <label for="whatsapp_group_id">WhatsApp Group ID.</label>
96
  <p class="description">Enter WhatsApp Group ID. E.g. 9EHLsEsOeJk6AVtE8AvXiA - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/find-whatsapp-group-id/">more info</a> </p>
97
  </div>
@@ -102,10 +103,11 @@ class HT_CTC_Admin_Group_Page {
102
  // call to action
103
  function group_cta_cb() {
104
  $options = get_option('ht_ctc_group');
 
105
  ?>
106
  <div class="row">
107
  <div class="input-field col s12">
108
- <input name="ht_ctc_group[call_to_action]" value="<?php echo esc_attr( $options['call_to_action'] ) ?>" id="call_to_action" type="text" class="input-margin">
109
  <label for="call_to_action">Call to Action</label>
110
  <p class="description"> Text that appears along with WhatsApp icon/button - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/call-to-action/">more info</a> </p>
111
  </div>
@@ -118,7 +120,7 @@ class HT_CTC_Admin_Group_Page {
118
  // Desktop - select style
119
  function group_ctc_desktop_style_cb() {
120
  $options = get_option('ht_ctc_group');
121
- $style_value = esc_attr( $options['style_desktop'] );
122
  ?>
123
  <div class="row">
124
  <div class="input-field col s12" style="margin-bottom: 0px;">
@@ -147,7 +149,7 @@ class HT_CTC_Admin_Group_Page {
147
  // Mobile - select style
148
  function group_ctc_mobile_style_cb() {
149
  $options = get_option('ht_ctc_group');
150
- $style_value = esc_attr( $options['style_mobile'] );
151
  ?>
152
  <div class="row" style="margin-bottom: 0px;">
153
  <div class="input-field col s12">
@@ -175,8 +177,10 @@ class HT_CTC_Admin_Group_Page {
175
  function group_ctc_position_cb() {
176
  $options = get_option('ht_ctc_group');
177
 
178
- $side_1 = esc_attr( $options['side_1'] );
179
- $side_2 = esc_attr( $options['side_2'] );
 
 
180
  ?>
181
  <!-- side - 1 -->
182
  <div class="row">
@@ -189,7 +193,7 @@ class HT_CTC_Admin_Group_Page {
189
  </div>
190
 
191
  <div class="input-field col s6">
192
- <input name="ht_ctc_group[side_1_value]" value="<?php echo esc_attr( $options['side_1_value'] ) ?>" id="side_1_value" type="text" class="input-margin">
193
  <label for="side_1_value">e.g. 10px</label>
194
  </div>
195
  </div>
@@ -205,7 +209,7 @@ class HT_CTC_Admin_Group_Page {
205
  </div>
206
 
207
  <div class="input-field col s6">
208
- <input name="ht_ctc_group[side_2_value]" value="<?php echo esc_attr( $options['side_2_value'] ) ?>" id="side_2_value" type="text" class="input-margin">
209
  <label for="side_2_value">e.g. 10px</label>
210
  </div>
211
  </div>
@@ -220,462 +224,10 @@ class HT_CTC_Admin_Group_Page {
220
  // show/hide
221
  function group_show_hide_cb() {
222
 
223
-
224
  $options = get_option('ht_ctc_group');
225
 
226
- $show_or_hide = esc_attr( $options['show_or_hide'] );
227
- ?>
228
-
229
- <ul class="collapsible">
230
- <li>
231
- <div class="collapsible-header">Show/Hide</div>
232
- <div class="collapsible-body">
233
-
234
- <?php
235
-
236
-
237
- // Hide on Mobile Devices
238
- if ( isset( $options['hideon_mobile'] ) ) {
239
- ?>
240
- <p>
241
- <label>
242
- <input name="ht_ctc_group[hideon_mobile]" type="checkbox" value="1" <?php checked( $options['hideon_mobile'], 1 ); ?> id="hideon_mobile" />
243
- <span>Hide on - Mobile Devices</span>
244
- </label>
245
- </p>
246
- <?php
247
- } else {
248
- ?>
249
- <p>
250
- <label>
251
- <input name="ht_ctc_group[hideon_mobile]" type="checkbox" value="1" id="hideon_mobile" />
252
- <span>Hide on - Mobile Devices</span>
253
- </label>
254
- </p>
255
- <?php
256
- }
257
-
258
- // Hide on Desktop Devices
259
- if ( isset( $options['hideon_desktop'] ) ) {
260
- ?>
261
- <p>
262
- <label>
263
- <input name="ht_ctc_group[hideon_desktop]" type="checkbox" value="1" <?php checked( $options['hideon_desktop'], 1 ); ?> id="hideon_desktop" />
264
- <span>Hide on - Desktop Devices</span>
265
- </label>
266
- </p>
267
- <?php
268
- } else {
269
- ?>
270
- <p>
271
- <label>
272
- <input name="ht_ctc_group[hideon_desktop]" type="checkbox" value="1" id="hideon_desktop" />
273
- <span>Hide on - Desktop Devices</span>
274
- </label>
275
- </p>
276
- <?php
277
- }
278
- ?>
279
- <!-- <p class="description">plugin detects device based on HTTP User agent </p> -->
280
- <p class="description">If working in reverse it might be the cache plugin not detecting the devices - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/hide-based-on-device/">more info</a> </p>
281
-
282
-
283
- <div class="row" style="margin-bottom: 0px;">
284
- <div class="input-field col s12">
285
- <select name="ht_ctc_group[show_or_hide]" class="select_show_or_hide">
286
- <option value="hide" <?php echo $show_or_hide == "hide" ? 'SELECTED' : ''; ?> >Hide on selected pages</option>
287
- <option value="show" <?php echo $show_or_hide == "show" ? 'SELECTED' : ''; ?> >Show on selected pages</option>
288
- </select>
289
- <!-- <label><?php _e( 'enable' , 'click-to-chat-for-whatsapp' ) ?></label> -->
290
- </div>
291
- </div>
292
-
293
-
294
- <!-- ######### Hide ######### -->
295
-
296
-
297
- <p class="description ctc_show_hide_display show-hide_display-none hidebased" style="margin-bottom: 15px">
298
- <?php echo 'Select pages to Hide styles <span style="color: green;"> ( Default shows on all pages ) ' ?>
299
- </p>
300
- <!-- <br><br> -->
301
- <?php
302
-
303
- // checkboxes - Hide based on Type of posts
304
-
305
- // Single Posts
306
- if ( isset( $options['hideon_posts'] ) ) {
307
- ?>
308
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
309
- <label>
310
- <input name="ht_ctc_group[hideon_posts]" type="checkbox" value="1" <?php checked( $options['hideon_posts'], 1 ); ?> id="filled-in-box1" />
311
- <span>Hide on - Posts</span>
312
- </label>
313
- </p>
314
- <?php
315
- } else {
316
- ?>
317
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
318
- <label>
319
- <input name="ht_ctc_group[hideon_posts]" type="checkbox" value="1" id="filled-in-box1" />
320
- <span>Hide on - Posts</span>
321
- </label>
322
- </p>
323
- <?php
324
- }
325
-
326
-
327
- // Page
328
- if ( isset( $options['hideon_page'] ) ) {
329
- ?>
330
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
331
- <label>
332
- <input name="ht_ctc_group[hideon_page]" type="checkbox" value="1" <?php checked( $options['hideon_page'], 1 ); ?> id="filled-in-box2" />
333
- <span>Hide on - Pages</span>
334
- </label>
335
- </p>
336
- <?php
337
- } else {
338
- ?>
339
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
340
- <label>
341
- <input name="ht_ctc_group[hideon_page]" type="checkbox" value="1" id="filled-in-box2" />
342
- <span>Hide on - Pages</span>
343
- </label>
344
- </p>
345
- <?php
346
- }
347
-
348
-
349
-
350
-
351
- // Home Page
352
- // is_home and is_front_page - combined. calling as home/front page
353
- if ( isset( $options['hideon_homepage'] ) ) {
354
- ?>
355
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
356
- <label>
357
- <input name="ht_ctc_group[hideon_homepage]" type="checkbox" value="1" <?php checked( $options['hideon_homepage'], 1 ); ?> id="filled-in-box3" />
358
- <span>Hide on - Home/Front Page</span>
359
- </label>
360
- </p>
361
- <?php
362
- } else {
363
- ?>
364
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
365
- <label>
366
- <input name="ht_ctc_group[hideon_homepage]" type="checkbox" value="1" id="filled-in-box3" />
367
- <span>Hide on - Home/Front Page</span>
368
- </label>
369
- </p>
370
- <?php
371
- }
372
-
373
-
374
- // Category
375
- if ( isset( $options['hideon_category'] ) ) {
376
- ?>
377
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
378
- <label>
379
- <input name="ht_ctc_group[hideon_category]" type="checkbox" value="1" <?php checked( $options['hideon_category'], 1 ); ?> id="filled-in-box5" />
380
- <span>Hide on - Category</span>
381
- </label>
382
- </p>
383
- <?php
384
- } else {
385
- ?>
386
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
387
- <label>
388
- <input name="ht_ctc_group[hideon_category]" type="checkbox" value="1" id="filled-in-box5" />
389
- <span>Hide on - Category</span>
390
- </label>
391
- </p>
392
- <?php
393
- }
394
-
395
-
396
-
397
- // Archive
398
- if ( isset( $options['hideon_archive'] ) ) {
399
- ?>
400
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
401
- <label>
402
- <input name="ht_ctc_group[hideon_archive]" type="checkbox" value="1" <?php checked( $options['hideon_archive'], 1 ); ?> id="filled-in-box6" />
403
- <span>Hide on - Archive</span>
404
- </label>
405
- </p>
406
- <?php
407
- } else {
408
- ?>
409
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
410
- <label>
411
- <input name="ht_ctc_group[hideon_archive]" type="checkbox" value="1" id="filled-in-box6" />
412
- <span>Hide on - Archive</span>
413
- </label>
414
- </p>
415
- <?php
416
- }
417
-
418
-
419
- // 404 Page
420
- if ( isset( $options['hideon_404'] ) ) {
421
- ?>
422
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
423
- <label>
424
- <input name="ht_ctc_group[hideon_404]" type="checkbox" value="1" <?php checked( $options['hideon_404'], 1 ); ?> id="hideon_404" />
425
- <span>Hide on - 404 Page</span>
426
- </label>
427
- </p>
428
- <?php
429
- } else {
430
- ?>
431
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
432
- <label>
433
- <input name="ht_ctc_group[hideon_404]" type="checkbox" value="1" id="hideon_404" />
434
- <span>Hide on - 404 Page</span>
435
- </label>
436
- </p>
437
- <?php
438
- }
439
-
440
-
441
- // WooCommerce single product pages
442
- if ( isset( $options['hideon_wooproduct'] ) ) {
443
- ?>
444
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
445
- <label>
446
- <input name="ht_ctc_group[hideon_wooproduct]" type="checkbox" value="1" <?php checked( $options['hideon_wooproduct'], 1 ); ?> id="hideon_wooproduct" />
447
- <span>Hide on - WooCommerce single product pages</span>
448
- </label>
449
- </p>
450
- <?php
451
- } else {
452
- ?>
453
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
454
- <label>
455
- <input name="ht_ctc_group[hideon_wooproduct]" type="checkbox" value="1" id="hideon_wooproduct" />
456
- <span>Hide on - WooCommerce single product pages</span>
457
- </label>
458
- </p>
459
- <?php
460
- }
461
-
462
-
463
- ?>
464
- <p class="description ctc_show_hide_display show-hide_display-none hidebased">Check to hide Styles based on the type of pages </p>
465
-
466
- <!-- ID's list to hide styles -->
467
- <div class="row ctc_show_hide_display show-hide_display-none hidebased">
468
- <div class="input-field col s12">
469
- <input name="ht_ctc_group[list_hideon_pages]" value="<?php echo esc_attr( $options['list_hideon_pages'] ) ?>" id="ccw_list_id_tohide" type="text" class="input-margin">
470
- <label for="ccw_list_id_tohide">Id's list to Hide - add ',' after each id </label>
471
- <p class="description">Add Post, Pages, Media - ID's to hide, can add multiple id's by separating with a comma ( , )</p>
472
- </div>
473
- </div>
474
-
475
- <!-- Categorys list - to hide -->
476
- <div class="row ctc_show_hide_display show-hide_display-none hidebased">
477
- <div class="input-field col s12">
478
- <input name="ht_ctc_group[list_hideon_cat]" value="<?php echo esc_attr( $options['list_hideon_cat'] ) ?>" id="ccw_list_cat_tohide" type="text" class="input-margin">
479
- <label for="ccw_list_cat_tohide"><?php _e( 'Category name\'s to Hide - add \',\' after each category name' , 'click-to-chat-for-whatsapp' ) ?> </label>
480
- <p class="description">Category name\'s to hide, can add multiple Categories by separating with a comma ( , )</p>
481
- </div>
482
- </div>
483
-
484
-
485
- <!-- ######### Show ######### -->
486
-
487
-
488
- <p class="description ctc_show_hide_display show-hide_display-none showbased" style="margin-bottom: 15px">
489
- <?php echo 'Select pages to display styles <span style="background-color: #dddddd; color: red;"> ( Default hides on all pages ) ' ?>
490
- </p>
491
- <?php
492
-
493
- // checkboxes - Show based on Type of posts
494
-
495
- // Single Posts
496
- if ( isset( $options['showon_posts'] ) ) {
497
- ?>
498
- <p class="ctc_show_hide_display show-hide_display-none showbased">
499
- <label>
500
- <input name="ht_ctc_group[showon_posts]" type="checkbox" value="1" <?php checked( $options['showon_posts'], 1 ); ?> id="show_filled-in-box1" />
501
- <span>Show on - Posts</span>
502
- </label>
503
- </p>
504
- <?php
505
- } else {
506
- ?>
507
- <p class="ctc_show_hide_display show-hide_display-none showbased">
508
- <label>
509
- <input name="ht_ctc_group[showon_posts]" type="checkbox" value="1" id="show_filled-in-box1" />
510
- <span>Show on - Posts</span>
511
- </label>
512
- </p>
513
- <?php
514
- }
515
-
516
-
517
- // Page
518
- if ( isset( $options['showon_page'] ) ) {
519
- ?>
520
- <p class="ctc_show_hide_display show-hide_display-none showbased">
521
- <label>
522
- <input name="ht_ctc_group[showon_page]" type="checkbox" value="1" <?php checked( $options['showon_page'], 1 ); ?> id="show_filled-in-box2" />
523
- <span>Show on - Pages</span>
524
- </label>
525
- </p>
526
- <?php
527
- } else {
528
- ?>
529
- <p class="ctc_show_hide_display show-hide_display-none showbased">
530
- <label>
531
- <input name="ht_ctc_group[showon_page]" type="checkbox" value="1" id="show_filled-in-box2" />
532
- <span>Show on - Pages</span>
533
- </label>
534
- </p>
535
- <?php
536
- }
537
-
538
-
539
- // Home Page
540
- // is_home and is_front_page - combined. calling as home/front page
541
- if ( isset( $options['showon_homepage'] ) ) {
542
- ?>
543
- <p class="ctc_show_hide_display show-hide_display-none showbased">
544
- <label>
545
- <input name="ht_ctc_group[showon_homepage]" type="checkbox" value="1" <?php checked( $options['showon_homepage'], 1 ); ?> id="show_filled-in-box3" />
546
- <span>Show on - Home/Front Page</span>
547
- </label>
548
- </p>
549
- <?php
550
- } else {
551
- ?>
552
- <p class="ctc_show_hide_display show-hide_display-none showbased">
553
- <label>
554
- <input name="ht_ctc_group[showon_homepage]" type="checkbox" value="1" id="show_filled-in-box3" />
555
- <span>Show on - Home/Front Page</span>
556
- </label>
557
- </p>
558
- <?php
559
- }
560
-
561
-
562
- // Category
563
- if ( isset( $options['showon_category'] ) ) {
564
- ?>
565
- <p class="ctc_show_hide_display show-hide_display-none showbased">
566
- <label>
567
- <input name="ht_ctc_group[showon_category]" type="checkbox" value="1" <?php checked( $options['showon_category'], 1 ); ?> id="show_filled-in-box5" />
568
- <span>Show on - Category</span>
569
- </label>
570
- </p>
571
- <?php
572
- } else {
573
- ?>
574
- <p class="ctc_show_hide_display show-hide_display-none showbased">
575
- <label>
576
- <input name="ht_ctc_group[showon_category]" type="checkbox" value="1" id="show_filled-in-box5" />
577
- <span>Show on - Category</span>
578
- </label>
579
- </p>
580
- <?php
581
- }
582
-
583
- // Archive
584
- if ( isset( $options['showon_archive'] ) ) {
585
- ?>
586
- <p class="ctc_show_hide_display show-hide_display-none showbased">
587
- <label>
588
- <input name="ht_ctc_group[showon_archive]" type="checkbox" value="1" <?php checked( $options['showon_archive'], 1 ); ?> id="show_filled-in-box6" />
589
- <span>Show on - Archive</span>
590
- </label>
591
- </p>
592
- <?php
593
- } else {
594
- ?>
595
- <p class="ctc_show_hide_display show-hide_display-none showbased">
596
- <label>
597
- <input name="ht_ctc_group[showon_archive]" type="checkbox" value="1" id="show_filled-in-box6" />
598
- <span>Show on - Archive</span>
599
- </label>
600
- </p>
601
- <?php
602
- }
603
-
604
-
605
- // 404 Page
606
- if ( isset( $options['showon_404'] ) ) {
607
- ?>
608
- <p class="ctc_show_hide_display show-hide_display-none showbased">
609
- <label>
610
- <input name="ht_ctc_group[showon_404]" type="checkbox" value="1" <?php checked( $options['showon_404'], 1 ); ?> id="showon_404" />
611
- <span>Show on - 404 Page</span>
612
- </label>
613
- </p>
614
- <?php
615
- } else {
616
- ?>
617
- <p class="ctc_show_hide_display show-hide_display-none showbased">
618
- <label>
619
- <input name="ht_ctc_group[showon_404]" type="checkbox" value="1" id="showon_404" />
620
- <span>Show on - 404 Page</span>
621
- </label>
622
- </p>
623
- <?php
624
- }
625
-
626
-
627
- // WooCommerce single product pages
628
- if ( isset( $options['showon_wooproduct'] ) ) {
629
- ?>
630
- <p class="ctc_show_hide_display show-hide_display-none showbased">
631
- <label>
632
- <input name="ht_ctc_group[showon_wooproduct]" type="checkbox" value="1" <?php checked( $options['showon_wooproduct'], 1 ); ?> id="show_filled-in-box7" />
633
- <span>Show on - WooCommerce Single product pages</span>
634
- </label>
635
- </p>
636
- <?php
637
- } else {
638
- ?>
639
- <p class="ctc_show_hide_display show-hide_display-none showbased">
640
- <label>
641
- <input name="ht_ctc_group[showon_wooproduct]" type="checkbox" value="1" id="show_filled-in-box7" />
642
- <span>Show on - WooCommerce Single product pages</span>
643
- </label>
644
- </p>
645
- <?php
646
- }
647
-
648
-
649
- ?>
650
- <p class="description ctc_show_hide_display show-hide_display-none showbased">Check to display Styles based on type of the page</p>
651
-
652
- <!-- ID's list to show styles -->
653
- <div class="row ctc_show_hide_display show-hide_display-none showbased">
654
- <div class="input-field col s12">
655
- <input name="ht_ctc_group[list_showon_pages]" value="<?php echo esc_attr( $options['list_showon_pages'] ) ?>" id="ccw_list_id_toshow" type="text" class="input-margin">
656
- <label for="ccw_list_id_toshow">Id's list to show - add ',' after each id </label>
657
- <p class="description">Add Post, Page, Media - ID's to show styles, can add multiple id's by separating with a comma ( , )</p>
658
- </div>
659
- </div>
660
-
661
- <!-- Categorys list - to show -->
662
- <div class="row ctc_show_hide_display show-hide_display-none showbased">
663
- <div class="input-field col s12">
664
- <input name="ht_ctc_group[list_showon_cat]" value="<?php echo esc_attr( $options['list_showon_cat'] ) ?>" id="ccw_list_cat_toshow" type="text" class="input-margin">
665
- <label for="ccw_list_cat_toshow"><?php _e( 'Category name\'s to Show - add \',\' after each category name' , 'click-to-chat-for-whatsapp' ) ?> </label>
666
- <p class="description">Add Categories name to show styles, can add multiple Categories by separating with a comma ( , )</p>
667
- </div>
668
- </div>
669
-
670
- <p class="description"> - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/show-hide-styles/">more info</a> </p>
671
-
672
-
673
- </div>
674
- </li>
675
- <ul>
676
-
677
-
678
- <?php
679
 
680
  }
681
 
88
  // WhatsApp Group ID.
89
  function group_id_cb() {
90
  $options = get_option('ht_ctc_group');
91
+ $value = ( '' == $options ) ? '' : esc_attr( $options['group_id'] );
92
  ?>
93
  <div class="row">
94
  <div class="input-field col s12">
95
+ <input name="ht_ctc_group[group_id]" value="<?php echo $value ?>" id="whatsapp_group_id" type="text" class="input-margin">
96
  <label for="whatsapp_group_id">WhatsApp Group ID.</label>
97
  <p class="description">Enter WhatsApp Group ID. E.g. 9EHLsEsOeJk6AVtE8AvXiA - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/find-whatsapp-group-id/">more info</a> </p>
98
  </div>
103
  // call to action
104
  function group_cta_cb() {
105
  $options = get_option('ht_ctc_group');
106
+ $value = ( '' == $options ) ? '' : esc_attr( $options['call_to_action'] );
107
  ?>
108
  <div class="row">
109
  <div class="input-field col s12">
110
+ <input name="ht_ctc_group[call_to_action]" value="<?php echo $value ?>" id="call_to_action" type="text" class="input-margin">
111
  <label for="call_to_action">Call to Action</label>
112
  <p class="description"> Text that appears along with WhatsApp icon/button - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/call-to-action/">more info</a> </p>
113
  </div>
120
  // Desktop - select style
121
  function group_ctc_desktop_style_cb() {
122
  $options = get_option('ht_ctc_group');
123
+ $style_value = ( '' == $options ) ? '' : esc_attr( $options['style_desktop'] );
124
  ?>
125
  <div class="row">
126
  <div class="input-field col s12" style="margin-bottom: 0px;">
149
  // Mobile - select style
150
  function group_ctc_mobile_style_cb() {
151
  $options = get_option('ht_ctc_group');
152
+ $style_value = ( '' == $options ) ? '' : esc_attr( $options['style_mobile'] );
153
  ?>
154
  <div class="row" style="margin-bottom: 0px;">
155
  <div class="input-field col s12">
177
  function group_ctc_position_cb() {
178
  $options = get_option('ht_ctc_group');
179
 
180
+ $side_1 = ( '' == $options ) ? '' : esc_attr( $options['side_1'] );
181
+ $side_2 = ( '' == $options ) ? '' : esc_attr( $options['side_2'] );
182
+ $side_1_value = ( '' == $options ) ? '' : esc_attr( $options['side_1_value'] );
183
+ $side_2_value = ( '' == $options ) ? '' : esc_attr( $options['side_2_value'] );
184
  ?>
185
  <!-- side - 1 -->
186
  <div class="row">
193
  </div>
194
 
195
  <div class="input-field col s6">
196
+ <input name="ht_ctc_group[side_1_value]" value="<?php echo $side_1_value ?>" id="side_1_value" type="text" class="input-margin">
197
  <label for="side_1_value">e.g. 10px</label>
198
  </div>
199
  </div>
209
  </div>
210
 
211
  <div class="input-field col s6">
212
+ <input name="ht_ctc_group[side_2_value]" value="<?php echo $side_2_value ?>" id="side_2_value" type="text" class="input-margin">
213
  <label for="side_2_value">e.g. 10px</label>
214
  </div>
215
  </div>
224
  // show/hide
225
  function group_show_hide_cb() {
226
 
227
+ $dbrow = 'ht_ctc_group';
228
  $options = get_option('ht_ctc_group');
229
 
230
+ include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/admin-show-hide.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
231
 
232
  }
233
 
new/admin/class-ht-ctc-admin-main-page.php CHANGED
@@ -147,7 +147,7 @@ class HT_CTC_Admin_Main_Page {
147
  <div class="col s12 m8 l4">
148
  <div class="row">
149
  <!-- after settings page / faq -->
150
- <?php include_once HT_CTC_PLUGIN_DIR .'new/admin/admin-after-settings-page.php'; ?>
151
  </div>
152
  </div>
153
  </div>
@@ -215,13 +215,15 @@ class HT_CTC_Admin_Main_Page {
215
  // WhatsApp number
216
  function number_cb() {
217
  $options = get_option('ht_ctc_chat_options');
 
218
  ?>
219
  <div class="row">
220
  <div class="input-field col s12">
221
- <input name="ht_ctc_chat_options[number]" value="<?php echo esc_attr( $options['number'] ) ?>" id="whatsapp_number" type="text" class="input-margin">
222
- <label for="whatsapp_number">Enter WhatsApp number </label>
 
223
  <p class="description">Enter 'WhatsApp' or 'WhatsApp business' number with country code
224
- <br> ( e.g. 916123456789 - herein e.g. 91 is country code, 6123456789 is the mobile number ) - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/whatsapp-number/">more info</a> ) </p>
225
  </div>
226
  </div>
227
  <?php
@@ -230,15 +232,16 @@ class HT_CTC_Admin_Main_Page {
230
  // pre-filled - message
231
  function prefilled_cb() {
232
  $options = get_option('ht_ctc_chat_options');
 
233
  $blogname = HT_CTC_BLOG_NAME;
234
  $placeholder = "Hello $blogname!! \nName: \nLike to know more information about {{title}}, {{url}}";
235
  ?>
236
  <div class="row">
237
  <div class="input-field col s12">
238
  <!-- <input name="ht_ctc_chat_options[pre_filled]" value="<?php // echo esc_attr( $options['pre_filled'] ) ?>" id="pre_filled" type="text" class="input-margin"> -->
239
- <textarea style="min-height: 84px;" placeholder="<?php echo $placeholder ?>" name="ht_ctc_chat_options[pre_filled]" id="pre_filled" class="materialize-textarea input-margin"><?php echo esc_attr( $options['pre_filled'] ) ?></textarea>
240
  <label for="pre_filled">Pre-filled message</label>
241
- <p class="description">Text that appears in the WhatsApp Chat window. Add variables {url}, {title} to replace current webpage URL, Post title - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/pre-filled-message/">more info</a> </p>
242
  </div>
243
  </div>
244
  <?php
@@ -247,10 +250,11 @@ class HT_CTC_Admin_Main_Page {
247
  // call to action
248
  function cta_cb() {
249
  $options = get_option('ht_ctc_chat_options');
 
250
  ?>
251
  <div class="row">
252
  <div class="input-field col s12">
253
- <input name="ht_ctc_chat_options[call_to_action]" value="<?php echo esc_attr( $options['call_to_action'] ) ?>" id="call_to_action" type="text" class="input-margin">
254
  <label for="call_to_action">Call to Action</label>
255
  <p class="description"> Text that appears along with WhatsApp icon/button - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/call-to-action/">more info</a> </p>
256
  </div>
@@ -262,7 +266,7 @@ class HT_CTC_Admin_Main_Page {
262
  // Desktop - select style
263
  function ctc_desktop_style_cb() {
264
  $options = get_option('ht_ctc_chat_options');
265
- $style_value = esc_attr( $options['style_desktop'] );
266
  ?>
267
  <div class="row">
268
  <div class="input-field col s12" style="margin-bottom: 0px;">
@@ -290,7 +294,7 @@ class HT_CTC_Admin_Main_Page {
290
  // Mobile - select style
291
  function ctc_mobile_style_cb() {
292
  $options = get_option('ht_ctc_chat_options');
293
- $style_value = esc_attr( $options['style_mobile'] );
294
  ?>
295
  <div class="row" style="margin-bottom: 0px;">
296
  <div class="input-field col s12">
@@ -323,10 +327,11 @@ class HT_CTC_Admin_Main_Page {
323
  // position to place
324
  function ctc_position_cb() {
325
  $options = get_option('ht_ctc_chat_options');
 
 
 
 
326
 
327
- $side_1 = esc_attr( $options['side_1'] );
328
- $side_1_value = esc_attr( $options['side_1_value'] );
329
- $side_2 = esc_attr( $options['side_2'] );
330
  ?>
331
  <!-- side - 1 -->
332
  <div class="row">
@@ -338,7 +343,7 @@ class HT_CTC_Admin_Main_Page {
338
  <label>top / bottom </label>
339
  </div>
340
  <div class="input-field col s6">
341
- <input name="ht_ctc_chat_options[side_1_value]" value="<?php echo esc_attr( $options['side_1_value'] ) ?>" id="side_1_value" type="text" class="input-margin">
342
  <label for="side_1_value">e.g. 10px</label>
343
  </div>
344
  </div>
@@ -355,7 +360,7 @@ class HT_CTC_Admin_Main_Page {
355
  </div>
356
 
357
  <div class="input-field col s6">
358
- <input name="ht_ctc_chat_options[side_2_value]" value="<?php echo esc_attr( $options['side_2_value'] ) ?>" id="side_2_value" type="text" class="input-margin">
359
  <label for="side_2_value">e.g. 10px</label>
360
  </div>
361
  </div>
@@ -417,475 +422,10 @@ class HT_CTC_Admin_Main_Page {
417
  // show/hide
418
  function ctc_show_hide_cb() {
419
 
420
-
421
  $options = get_option('ht_ctc_chat_options');
422
 
423
- $show_or_hide = esc_attr( $options['show_or_hide'] );
424
- ?>
425
-
426
- <ul class="collapsible">
427
- <li>
428
- <div class="collapsible-header">Show/Hide</div>
429
- <div class="collapsible-body">
430
-
431
- <?php
432
-
433
-
434
- // Hide on Mobile Devices
435
- if ( isset( $options['hideon_mobile'] ) ) {
436
- ?>
437
- <p>
438
- <label>
439
- <input name="ht_ctc_chat_options[hideon_mobile]" type="checkbox" value="1" <?php checked( $options['hideon_mobile'], 1 ); ?> id="hideon_mobile" />
440
- <span>Hide on - Mobile Devices</span>
441
- </label>
442
- </p>
443
- <?php
444
- } else {
445
- ?>
446
- <p>
447
- <label>
448
- <input name="ht_ctc_chat_options[hideon_mobile]" type="checkbox" value="1" id="hideon_mobile" />
449
- <span>Hide on - Mobile Devices</span>
450
- </label>
451
- </p>
452
- <?php
453
- }
454
-
455
- // Hide on Desktop Devices
456
- if ( isset( $options['hideon_desktop'] ) ) {
457
- ?>
458
- <p>
459
- <label>
460
- <input name="ht_ctc_chat_options[hideon_desktop]" type="checkbox" value="1" <?php checked( $options['hideon_desktop'], 1 ); ?> id="hideon_desktop" />
461
- <span>Hide on - Desktop Devices</span>
462
- </label>
463
- </p>
464
- <?php
465
- } else {
466
- ?>
467
- <p>
468
- <label>
469
- <input name="ht_ctc_chat_options[hideon_desktop]" type="checkbox" value="1" id="hideon_desktop" />
470
- <span>Hide on - Desktop Devices</span>
471
- </label>
472
- </p>
473
- <?php
474
- }
475
- ?>
476
- <!-- <p class="description">plugin detects device based on HTTP User agent </p> -->
477
- <p class="description">If working in reverse it might be the cache plugin not detecting the devices - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/hide-based-on-device/">more info</a> </p>
478
- <br><hr><br>
479
-
480
- <span class="description">Select Show/Hide:</span>
481
-
482
- <div class="row" style="margin-bottom: 0px;">
483
- <div class="input-field col s8">
484
- <select name="ht_ctc_chat_options[show_or_hide]" class="select_show_or_hide">
485
- <option value="hide" <?php echo $show_or_hide == "hide" ? 'SELECTED' : ''; ?> >Hide on selected pages</option>
486
- <option value="show" <?php echo $show_or_hide == "show" ? 'SELECTED' : ''; ?> >Show on selected pages</option>
487
- </select>
488
- <!-- <label><?php _e( 'enable' , 'click-to-chat-for-whatsapp' ) ?></label> -->
489
- </div>
490
- </div>
491
-
492
-
493
-
494
- <!-- ######### Hide ######### -->
495
-
496
-
497
-
498
- <p class="description ctc_show_hide_display show-hide_display-none hidebased" style="margin-bottom: 15px">
499
- <?php echo 'Select pages to Hide styles <span style="color: green;"> ( Default Shows on all pages ) ' ?>
500
- </p>
501
- <!-- <br><br> -->
502
- <?php
503
-
504
- // checkboxes - Hide based on Type of posts
505
-
506
- // Single Posts
507
- if ( isset( $options['hideon_posts'] ) ) {
508
- ?>
509
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
510
- <label>
511
- <input name="ht_ctc_chat_options[hideon_posts]" type="checkbox" value="1" <?php checked( $options['hideon_posts'], 1 ); ?> id="filled-in-box1" />
512
- <span>Hide on - Posts</span>
513
- </label>
514
- </p>
515
- <?php
516
- } else {
517
- ?>
518
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
519
- <label>
520
- <input name="ht_ctc_chat_options[hideon_posts]" type="checkbox" value="1" id="filled-in-box1" />
521
- <span>Hide on - Posts</span>
522
- </label>
523
- </p>
524
- <?php
525
- }
526
-
527
-
528
- // Page
529
- if ( isset( $options['hideon_page'] ) ) {
530
- ?>
531
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
532
- <label>
533
- <input name="ht_ctc_chat_options[hideon_page]" type="checkbox" value="1" <?php checked( $options['hideon_page'], 1 ); ?> id="filled-in-box2" />
534
- <span>Hide on - Pages</span>
535
- </label>
536
- </p>
537
- <?php
538
- } else {
539
- ?>
540
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
541
- <label>
542
- <input name="ht_ctc_chat_options[hideon_page]" type="checkbox" value="1" id="filled-in-box2" />
543
- <span>Hide on - Pages</span>
544
- </label>
545
- </p>
546
- <?php
547
- }
548
-
549
-
550
-
551
-
552
- // Home Page
553
- // is_home and is_front_page - combined. calling as home/front page
554
- if ( isset( $options['hideon_homepage'] ) ) {
555
- ?>
556
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
557
- <label>
558
- <input name="ht_ctc_chat_options[hideon_homepage]" type="checkbox" value="1" <?php checked( $options['hideon_homepage'], 1 ); ?> id="filled-in-box3" />
559
- <span>Hide on - Home/Front Page</span>
560
- </label>
561
- </p>
562
- <?php
563
- } else {
564
- ?>
565
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
566
- <label>
567
- <input name="ht_ctc_chat_options[hideon_homepage]" type="checkbox" value="1" id="filled-in-box3" />
568
- <span>Hide on - Home/Front Page</span>
569
- </label>
570
- </p>
571
- <?php
572
- }
573
-
574
-
575
- // Category
576
- if ( isset( $options['hideon_category'] ) ) {
577
- ?>
578
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
579
- <label>
580
- <input name="ht_ctc_chat_options[hideon_category]" type="checkbox" value="1" <?php checked( $options['hideon_category'], 1 ); ?> id="filled-in-box5" />
581
- <span>Hide on - Category</span>
582
- </label>
583
- </p>
584
- <?php
585
- } else {
586
- ?>
587
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
588
- <label>
589
- <input name="ht_ctc_chat_options[hideon_category]" type="checkbox" value="1" id="filled-in-box5" />
590
- <span>Hide on - Category</span>
591
- </label>
592
- </p>
593
- <?php
594
- }
595
-
596
-
597
-
598
- // Archive
599
- if ( isset( $options['hideon_archive'] ) ) {
600
- ?>
601
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
602
- <label>
603
- <input name="ht_ctc_chat_options[hideon_archive]" type="checkbox" value="1" <?php checked( $options['hideon_archive'], 1 ); ?> id="filled-in-box6" />
604
- <span>Hide on - Archive</span>
605
- </label>
606
- </p>
607
- <?php
608
- } else {
609
- ?>
610
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
611
- <label>
612
- <input name="ht_ctc_chat_options[hideon_archive]" type="checkbox" value="1" id="filled-in-box6" />
613
- <span>Hide on - Archive</span>
614
- </label>
615
- </p>
616
- <?php
617
- }
618
-
619
-
620
- // 404 Page
621
- if ( isset( $options['hideon_404'] ) ) {
622
- ?>
623
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
624
- <label>
625
- <input name="ht_ctc_chat_options[hideon_404]" type="checkbox" value="1" <?php checked( $options['hideon_404'], 1 ); ?> id="hideon_404" />
626
- <span>Hide on - 404 Page</span>
627
- </label>
628
- </p>
629
- <?php
630
- } else {
631
- ?>
632
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
633
- <label>
634
- <input name="ht_ctc_chat_options[hideon_404]" type="checkbox" value="1" id="hideon_404" />
635
- <span>Hide on - 404 Page</span>
636
- </label>
637
- </p>
638
- <?php
639
- }
640
-
641
-
642
- // WooCommerce single product pages
643
- if ( isset( $options['hideon_wooproduct'] ) ) {
644
- ?>
645
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
646
- <label>
647
- <input name="ht_ctc_chat_options[hideon_wooproduct]" type="checkbox" value="1" <?php checked( $options['hideon_wooproduct'], 1 ); ?> id="hideon_wooproduct" />
648
- <span>Hide on - WooCommerce single product pages</span>
649
- </label>
650
- </p>
651
- <?php
652
- } else {
653
- ?>
654
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
655
- <label>
656
- <input name="ht_ctc_chat_options[hideon_wooproduct]" type="checkbox" value="1" id="hideon_wooproduct" />
657
- <span>Hide on - WooCommerce single product pages</span>
658
- </label>
659
- </p>
660
- <?php
661
- }
662
-
663
-
664
- ?>
665
- <p class="description ctc_show_hide_display show-hide_display-none hidebased">Check to hide Styles based on the type of pages</p>
666
- <br>
667
-
668
- <!-- ID's list to hide styles -->
669
- <div class="row ctc_show_hide_display show-hide_display-none hidebased">
670
- <div class="input-field col s7">
671
- <input name="ht_ctc_chat_options[list_hideon_pages]" value="<?php echo esc_attr( $options['list_hideon_pages'] ) ?>" id="ccw_list_id_tohide" type="text" class="input-margin">
672
- <label for="ccw_list_id_tohide">Id's list to Hide - add ',' after each id </label>
673
- <p class="description"> Add Post, Page, Media - ID's to hide, can add multiple id's by separating with a comma ( , ) </p>
674
- </div>
675
- </div>
676
-
677
- <!-- Categorys list - to hide -->
678
- <div class="row ctc_show_hide_display show-hide_display-none hidebased">
679
- <div class="input-field col s7">
680
- <input name="ht_ctc_chat_options[list_hideon_cat]" value="<?php echo esc_attr( $options['list_hideon_cat'] ) ?>" id="ccw_list_cat_tohide" type="text" class="input-margin">
681
- <label for="ccw_list_cat_tohide"><?php _e( 'Category name\'s to Hide - add \',\' after each category name' , 'click-to-chat-for-whatsapp' ) ?> </label>
682
- <p class="description">Add Categories name to hide, can add multiple Categories by separating with a comma ( , ) </p>
683
- </div>
684
- </div>
685
-
686
-
687
-
688
- <!-- ######### Show ######### -->
689
-
690
-
691
-
692
- <p class="description ctc_show_hide_display show-hide_display-none showbased" style="margin-bottom: 15px">
693
- <?php echo 'Select pages to display styles <span style="background-color: #dddddd; color: red;"> ( Default hides on all pages ) ' ?>
694
- </p>
695
- <?php
696
-
697
- // checkboxes - Show based on Type of posts
698
-
699
- // Single Posts
700
- if ( isset( $options['showon_posts'] ) ) {
701
- ?>
702
- <p class="ctc_show_hide_display show-hide_display-none showbased">
703
- <label>
704
- <input name="ht_ctc_chat_options[showon_posts]" type="checkbox" value="1" <?php checked( $options['showon_posts'], 1 ); ?> id="show_filled-in-box1" />
705
- <span>Show on - Posts</span>
706
- </label>
707
- </p>
708
- <?php
709
- } else {
710
- ?>
711
- <p class="ctc_show_hide_display show-hide_display-none showbased">
712
- <label>
713
- <input name="ht_ctc_chat_options[showon_posts]" type="checkbox" value="1" id="show_filled-in-box1" />
714
- <span>Show on - Posts</span>
715
- </label>
716
- </p>
717
- <?php
718
- }
719
-
720
-
721
- // Page
722
- if ( isset( $options['showon_page'] ) ) {
723
- ?>
724
- <p class="ctc_show_hide_display show-hide_display-none showbased">
725
- <label>
726
- <input name="ht_ctc_chat_options[showon_page]" type="checkbox" value="1" <?php checked( $options['showon_page'], 1 ); ?> id="show_filled-in-box2" />
727
- <span>Show on - Pages</span>
728
- </label>
729
- </p>
730
- <?php
731
- } else {
732
- ?>
733
- <p class="ctc_show_hide_display show-hide_display-none showbased">
734
- <label>
735
- <input name="ht_ctc_chat_options[showon_page]" type="checkbox" value="1" id="show_filled-in-box2" />
736
- <span>Show on - Pages</span>
737
- </label>
738
- </p>
739
- <?php
740
- }
741
-
742
-
743
- // Home Page
744
- // is_home and is_front_page - combined. calling as home/front page
745
- if ( isset( $options['showon_homepage'] ) ) {
746
- ?>
747
- <p class="ctc_show_hide_display show-hide_display-none showbased">
748
- <label>
749
- <input name="ht_ctc_chat_options[showon_homepage]" type="checkbox" value="1" <?php checked( $options['showon_homepage'], 1 ); ?> id="show_filled-in-box3" />
750
- <span>Show on - Home/Front Page</span>
751
- </label>
752
- </p>
753
- <?php
754
- } else {
755
- ?>
756
- <p class="ctc_show_hide_display show-hide_display-none showbased">
757
- <label>
758
- <input name="ht_ctc_chat_options[showon_homepage]" type="checkbox" value="1" id="show_filled-in-box3" />
759
- <span>Show on - Home/Front Page</span>
760
- </label>
761
- </p>
762
- <?php
763
- }
764
-
765
-
766
- // Category
767
- if ( isset( $options['showon_category'] ) ) {
768
- ?>
769
- <p class="ctc_show_hide_display show-hide_display-none showbased">
770
- <label>
771
- <input name="ht_ctc_chat_options[showon_category]" type="checkbox" value="1" <?php checked( $options['showon_category'], 1 ); ?> id="show_filled-in-box5" />
772
- <span>Show on - Category</span>
773
- </label>
774
- </p>
775
- <?php
776
- } else {
777
- ?>
778
- <p class="ctc_show_hide_display show-hide_display-none showbased">
779
- <label>
780
- <input name="ht_ctc_chat_options[showon_category]" type="checkbox" value="1" id="show_filled-in-box5" />
781
- <span>Show on - Category</span>
782
- </label>
783
- </p>
784
- <?php
785
- }
786
-
787
- // Archive
788
- if ( isset( $options['showon_archive'] ) ) {
789
- ?>
790
- <p class="ctc_show_hide_display show-hide_display-none showbased">
791
- <label>
792
- <input name="ht_ctc_chat_options[showon_archive]" type="checkbox" value="1" <?php checked( $options['showon_archive'], 1 ); ?> id="show_filled-in-box6" />
793
- <span>Show on - Archive</span>
794
- </label>
795
- </p>
796
- <?php
797
- } else {
798
- ?>
799
- <p class="ctc_show_hide_display show-hide_display-none showbased">
800
- <label>
801
- <input name="ht_ctc_chat_options[showon_archive]" type="checkbox" value="1" id="show_filled-in-box6" />
802
- <span>Show on - Archive</span>
803
- </label>
804
- </p>
805
- <?php
806
- }
807
-
808
-
809
- // 404 Page
810
- if ( isset( $options['showon_404'] ) ) {
811
- ?>
812
- <p class="ctc_show_hide_display show-hide_display-none showbased">
813
- <label>
814
- <input name="ht_ctc_chat_options[showon_404]" type="checkbox" value="1" <?php checked( $options['showon_404'], 1 ); ?> id="showon_404" />
815
- <span>Show on - 404 Page</span>
816
- </label>
817
- </p>
818
- <?php
819
- } else {
820
- ?>
821
- <p class="ctc_show_hide_display show-hide_display-none showbased">
822
- <label>
823
- <input name="ht_ctc_chat_options[showon_404]" type="checkbox" value="1" id="showon_404" />
824
- <span>Show on - 404 Page</span>
825
- </label>
826
- </p>
827
- <?php
828
- }
829
-
830
-
831
- // WooCommerce single product pages
832
- if ( isset( $options['showon_wooproduct'] ) ) {
833
- ?>
834
- <p class="ctc_show_hide_display show-hide_display-none showbased">
835
- <label>
836
- <input name="ht_ctc_chat_options[showon_wooproduct]" type="checkbox" value="1" <?php checked( $options['showon_wooproduct'], 1 ); ?> id="showon_wooproduct" />
837
- <span>Show on - WooCommerce Single product pages</span>
838
- </label>
839
- </p>
840
- <?php
841
- } else {
842
- ?>
843
- <p class="ctc_show_hide_display show-hide_display-none showbased">
844
- <label>
845
- <input name="ht_ctc_chat_options[showon_wooproduct]" type="checkbox" value="1" id="showon_wooproduct" />
846
- <span>Show on - WooCommerce Single product pages</span>
847
- </label>
848
- </p>
849
- <?php
850
- }
851
-
852
-
853
- ?>
854
- <p class="description ctc_show_hide_display show-hide_display-none showbased">Check to display Styles based on type of the page</p>
855
- <br>
856
-
857
- <!-- ID's list to show styles -->
858
- <div class="row ctc_show_hide_display show-hide_display-none showbased">
859
- <div class="input-field col s7">
860
- <input name="ht_ctc_chat_options[list_showon_pages]" value="<?php echo esc_attr( $options['list_showon_pages'] ) ?>" id="ccw_list_id_toshow" type="text" class="input-margin">
861
- <label for="ccw_list_id_toshow">Id's list to show - add ',' after each id </label>
862
- <p class="description"> Add Post, Page, Media - ID's to show styles, can add multiple id's by separating with a comma ( , ) </p>
863
- </div>
864
- </div>
865
-
866
-
867
- <!-- Categorys list - to show -->
868
- <div class="row ctc_show_hide_display show-hide_display-none showbased">
869
- <div class="input-field col s7">
870
- <input name="ht_ctc_chat_options[list_showon_cat]" value="<?php echo esc_attr( $options['list_showon_cat'] ) ?>" id="ccw_list_cat_toshow" type="text" class="input-margin">
871
- <label for="ccw_list_cat_toshow"><?php _e( 'Category name\'s to Show - add \',\' after each category name' , 'click-to-chat-for-whatsapp' ) ?> </label>
872
- <p class="description">Add Categories name to show styles, can add multiple Categories by separating with a comma ( , ) </p>
873
- </div>
874
- </div>
875
-
876
- <p class="description"><a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/show-hide-styles/">more info</a> </p>
877
- <br>
878
- <p class="description">Usescases:</p>
879
- <p class="description">> <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-only-on-selected-pages/">Show only on selected pages</a></p>
880
- <p class="description">> <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/hide-only-on-selected-pages/">Hide only on selected pages</a> </p>
881
- <p class="description">> <a target="_blank" href="https://holithemes.com/plugins/click-to-chat/show-hide-on-mobile-desktop/">Show/Hide on Mobile/Desktop</a></p>
882
-
883
-
884
- </div>
885
- </li>
886
- <ul>
887
-
888
- <?php
889
 
890
  }
891
 
@@ -926,6 +466,9 @@ class HT_CTC_Admin_Main_Page {
926
  <div class="collapsible-header">Enable features ( Chat, Share, Group, others )</div>
927
  <div class="collapsible-body">
928
 
 
 
 
929
  <?php
930
 
931
  // enable chat
@@ -1033,6 +576,32 @@ class HT_CTC_Admin_Main_Page {
1033
  <br>
1034
 
1035
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1036
 
1037
  </div>
1038
  </div>
147
  <div class="col s12 m8 l4">
148
  <div class="row">
149
  <!-- after settings page / faq -->
150
+ <?php include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/admin-after-settings-page.php'; ?>
151
  </div>
152
  </div>
153
  </div>
215
  // WhatsApp number
216
  function number_cb() {
217
  $options = get_option('ht_ctc_chat_options');
218
+ $value = ( '' == $options ) ? '' : esc_attr( $options['number'] );
219
  ?>
220
  <div class="row">
221
  <div class="input-field col s12">
222
+ <input name="ht_ctc_chat_options[number]" value="<?php echo $value ?>" id="whatsapp_number" type="text" class="input-margin tooltipped" data-position="top" data-tooltip="Country Code and Number">
223
+ <label for="whatsapp_number">WhatsApp Number with Country Code</label>
224
+ <!-- <span class="helper-text">Country code + number</span> -->
225
  <p class="description">Enter 'WhatsApp' or 'WhatsApp business' number with country code
226
+ <br> ( E.g. 916123456789 - herein e.g. 91 is country code, 6123456789 is the mobile number ) - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/whatsapp-number/">more info</a> ) </p>
227
  </div>
228
  </div>
229
  <?php
232
  // pre-filled - message
233
  function prefilled_cb() {
234
  $options = get_option('ht_ctc_chat_options');
235
+ $value = ( '' == $options ) ? '' : esc_attr( $options['pre_filled'] );
236
  $blogname = HT_CTC_BLOG_NAME;
237
  $placeholder = "Hello $blogname!! \nName: \nLike to know more information about {{title}}, {{url}}";
238
  ?>
239
  <div class="row">
240
  <div class="input-field col s12">
241
  <!-- <input name="ht_ctc_chat_options[pre_filled]" value="<?php // echo esc_attr( $options['pre_filled'] ) ?>" id="pre_filled" type="text" class="input-margin"> -->
242
+ <textarea style="min-height: 84px;" placeholder="<?php echo $placeholder ?>" name="ht_ctc_chat_options[pre_filled]" id="pre_filled" class="materialize-textarea input-margin"><?php echo $value ?></textarea>
243
  <label for="pre_filled">Pre-filled message</label>
244
+ <p class="description">Text that appears in the WhatsApp Chat window. Add variables {site}, {url}, {title} to replace with site name, current webpage URL, Post title - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/pre-filled-message/">more info</a> </p>
245
  </div>
246
  </div>
247
  <?php
250
  // call to action
251
  function cta_cb() {
252
  $options = get_option('ht_ctc_chat_options');
253
+ $value = ( '' == $options ) ? '' : esc_attr( $options['call_to_action'] );
254
  ?>
255
  <div class="row">
256
  <div class="input-field col s12">
257
+ <input name="ht_ctc_chat_options[call_to_action]" value="<?php echo $value ?>" id="call_to_action" type="text" class="input-margin">
258
  <label for="call_to_action">Call to Action</label>
259
  <p class="description"> Text that appears along with WhatsApp icon/button - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/call-to-action/">more info</a> </p>
260
  </div>
266
  // Desktop - select style
267
  function ctc_desktop_style_cb() {
268
  $options = get_option('ht_ctc_chat_options');
269
+ $style_value = ( '' == $options ) ? '' : esc_attr( $options['style_desktop'] );
270
  ?>
271
  <div class="row">
272
  <div class="input-field col s12" style="margin-bottom: 0px;">
294
  // Mobile - select style
295
  function ctc_mobile_style_cb() {
296
  $options = get_option('ht_ctc_chat_options');
297
+ $style_value = ( '' == $options ) ? '' : esc_attr( $options['style_mobile'] );
298
  ?>
299
  <div class="row" style="margin-bottom: 0px;">
300
  <div class="input-field col s12">
327
  // position to place
328
  function ctc_position_cb() {
329
  $options = get_option('ht_ctc_chat_options');
330
+ $side_1 = ( '' == $options ) ? '' : esc_attr( $options['side_1'] );
331
+ $side_1_value = ( '' == $options ) ? '' : esc_attr( $options['side_1_value'] );
332
+ $side_2 = ( '' == $options ) ? '' : esc_attr( $options['side_2'] );
333
+ $side_2_value = ( '' == $options ) ? '' : esc_attr( $options['side_2_value'] );
334
 
 
 
 
335
  ?>
336
  <!-- side - 1 -->
337
  <div class="row">
343
  <label>top / bottom </label>
344
  </div>
345
  <div class="input-field col s6">
346
+ <input name="ht_ctc_chat_options[side_1_value]" value="<?php echo $side_1_value ?>" id="side_1_value" type="text" class="input-margin">
347
  <label for="side_1_value">e.g. 10px</label>
348
  </div>
349
  </div>
360
  </div>
361
 
362
  <div class="input-field col s6">
363
+ <input name="ht_ctc_chat_options[side_2_value]" value="<?php echo $side_2_value ?>" id="side_2_value" type="text" class="input-margin">
364
  <label for="side_2_value">e.g. 10px</label>
365
  </div>
366
  </div>
422
  // show/hide
423
  function ctc_show_hide_cb() {
424
 
425
+ $dbrow = 'ht_ctc_chat_options';
426
  $options = get_option('ht_ctc_chat_options');
427
 
428
+ include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/admin-show-hide.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
429
 
430
  }
431
 
466
  <div class="collapsible-header">Enable features ( Chat, Share, Group, others )</div>
467
  <div class="collapsible-body">
468
 
469
+ <!-- not make empty table -->
470
+ <input name="ht_ctc_main_options[hello]" value="hello" id="" type="text" class="hide" >
471
+
472
  <?php
473
 
474
  // enable chat
576
  <br>
577
 
578
 
579
+ <?php
580
+
581
+ // Facebook Pixel
582
+ if ( isset( $options['fb_pixel'] ) ) {
583
+ ?>
584
+ <p>
585
+ <label>
586
+ <input name="ht_ctc_main_options[fb_pixel]" type="checkbox" value="1" <?php checked( $options['fb_pixel'], 1 ); ?> id="fb_pixel" />
587
+ <span>Facebook Pixel</span>
588
+ </label>
589
+ </p>
590
+ <?php
591
+ } else {
592
+ ?>
593
+ <p>
594
+ <label>
595
+ <input name="ht_ctc_main_options[fb_pixel]" type="checkbox" value="1" id="fb_pixel" />
596
+ <span>Facebook Pixel</span>
597
+ </label>
598
+ </p>
599
+ <?php
600
+ }
601
+ ?>
602
+ <p class="description">If Facebook Pixel installed creates an Event there - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/facebook-pixel/">more info</a> </p>
603
+ <br>
604
+
605
 
606
  </div>
607
  </div>
new/admin/class-ht-ctc-admin-others.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
- /**
3
- * Other function, features .. to
4
- *
5
- * admin notices
6
- * If whatsapp number not added.
7
- *
8
- * @since 2.7
9
- * @package ctc
10
- * @subpackage admin
11
- */
12
-
13
- if ( ! defined( 'ABSPATH' ) ) exit;
14
-
15
- if ( ! class_exists( 'HT_CTC_Admin_Others' ) ) :
16
-
17
- class HT_CTC_Admin_Others {
18
-
19
- public function __construct() {
20
- $this->admin_hooks();
21
- }
22
-
23
- function admin_hooks() {
24
-
25
- // if number blank
26
- $ht_ctc_chat_options = get_option('ht_ctc_chat_options');
27
-
28
- if ( isset( $ht_ctc_chat_options['number'] ) ) {
29
- if ( '' == $ht_ctc_chat_options['number'] ) {
30
- add_action('admin_notices', array( $this, 'ifnumberblank') );
31
- }
32
- }
33
-
34
- }
35
-
36
- function ifnumberblank() {
37
- ?>
38
- <div class="notice notice-info is-dismissible">
39
- <p>Click to Chat is almost ready. <a href="<?php echo admin_url('admin.php?page=click-to-chat');?>">Add WhatsApp Number</a> to let vistiors chat.</p>
40
- <!-- <a href="?dismis">Dismiss</a> -->
41
- </div>
42
- <?php
43
- }
44
-
45
-
46
- }
47
-
48
- new HT_CTC_Admin_Others();
49
-
50
- endif; // END class_exists check
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
new/admin/class-ht-ctc-admin-scripts.php CHANGED
@@ -16,6 +16,9 @@ class HT_CTC_Admin_Scripts {
16
 
17
  // Register css styles, javascript files only on 'click-to-chat' page
18
  function register_scripts_admin($hook) {
 
 
 
19
 
20
  // hook ..
21
  if( 'toplevel_page_click-to-chat' == $hook || 'click-to-chat_page_click-to-chat-chat-feature' == $hook || 'click-to-chat_page_click-to-chat-group-feature' == $hook || 'click-to-chat_page_click-to-chat-share-feature' == $hook || 'click-to-chat_page_click-to-chat-customize-styles' == $hook ) {
@@ -24,8 +27,8 @@ class HT_CTC_Admin_Scripts {
24
  wp_enqueue_style('ctc_admin_md_css', plugins_url( 'new/admin/admin_assets/css/materialize.min.css', HT_CTC_PLUGIN_FILE ) , '', HT_CTC_VERSION );
25
  wp_enqueue_style('ctc_admin_css', plugins_url( 'new/admin/admin_assets/css/admin.css', HT_CTC_PLUGIN_FILE ) , '', HT_CTC_VERSION );
26
 
27
- wp_enqueue_script( 'ctc_admin_md_js', plugins_url( 'new/admin/admin_assets/js/materialize.min.js', HT_CTC_PLUGIN_FILE ), array( 'jquery' ), HT_CTC_VERSION, true );
28
- wp_enqueue_script( 'ctc_admin_js', plugins_url( 'new/admin/admin_assets/js/admin.js', HT_CTC_PLUGIN_FILE ), array( 'jquery', 'wp-color-picker', 'ctc_admin_md_js' ), HT_CTC_VERSION, true );
29
  } else {
30
  return;
31
  }
16
 
17
  // Register css styles, javascript files only on 'click-to-chat' page
18
  function register_scripts_admin($hook) {
19
+
20
+ // true/false
21
+ $load_js_bottom = apply_filters( 'ht_ctc_fh_load_js_bottom', true );
22
 
23
  // hook ..
24
  if( 'toplevel_page_click-to-chat' == $hook || 'click-to-chat_page_click-to-chat-chat-feature' == $hook || 'click-to-chat_page_click-to-chat-group-feature' == $hook || 'click-to-chat_page_click-to-chat-share-feature' == $hook || 'click-to-chat_page_click-to-chat-customize-styles' == $hook ) {
27
  wp_enqueue_style('ctc_admin_md_css', plugins_url( 'new/admin/admin_assets/css/materialize.min.css', HT_CTC_PLUGIN_FILE ) , '', HT_CTC_VERSION );
28
  wp_enqueue_style('ctc_admin_css', plugins_url( 'new/admin/admin_assets/css/admin.css', HT_CTC_PLUGIN_FILE ) , '', HT_CTC_VERSION );
29
 
30
+ wp_enqueue_script( 'ctc_admin_md_js', plugins_url( 'new/admin/admin_assets/js/materialize.min.js', HT_CTC_PLUGIN_FILE ), array( 'jquery' ), HT_CTC_VERSION, $load_js_bottom );
31
+ wp_enqueue_script( 'ctc_admin_js', plugins_url( 'new/admin/admin_assets/js/admin.js', HT_CTC_PLUGIN_FILE ), array( 'jquery', 'wp-color-picker', 'ctc_admin_md_js' ), HT_CTC_VERSION, $load_js_bottom );
32
  } else {
33
  return;
34
  }
new/admin/class-ht-ctc-admin-share-page.php CHANGED
@@ -89,10 +89,11 @@ class HT_CTC_Admin_Share_Page {
89
  // WhatsApp share ID.
90
  function share_text_cb() {
91
  $options = get_option('ht_ctc_share');
 
92
  ?>
93
  <div class="row">
94
  <div class="input-field col s12">
95
- <input name="ht_ctc_share[share_text]" value="<?php echo esc_attr( $options['share_text'] ) ?>" id="whatsapp_share_text" type="text" class="input-margin">
96
  <label for="whatsapp_share_text">Share Text</label>
97
  <p class="description">Placeholder {{url}} returns current webpage URL - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/share-text/">more info</a> ) </p>
98
  </div>
@@ -103,10 +104,11 @@ class HT_CTC_Admin_Share_Page {
103
  // call to action
104
  function share_cta_cb() {
105
  $options = get_option('ht_ctc_share');
 
106
  ?>
107
  <div class="row">
108
  <div class="input-field col s12">
109
- <input name="ht_ctc_share[call_to_action]" value="<?php echo esc_attr( $options['call_to_action'] ) ?>" id="call_to_action" type="text" class="input-margin">
110
  <label for="call_to_action">Call to Action</label>
111
  <p class="description">Text that appears along with WhatsApp icon/button - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/call-to-action/">more info</a> </p>
112
  </div>
@@ -119,7 +121,7 @@ class HT_CTC_Admin_Share_Page {
119
  // Desktop - select style
120
  function share_ctc_desktop_style_cb() {
121
  $options = get_option('ht_ctc_share');
122
- $style_value = esc_attr( $options['style_desktop'] );
123
  ?>
124
  <div class="row">
125
  <div class="input-field col s12" style="margin-bottom: 0px;">
@@ -148,7 +150,7 @@ class HT_CTC_Admin_Share_Page {
148
  // Mobile - select style
149
  function share_ctc_mobile_style_cb() {
150
  $options = get_option('ht_ctc_share');
151
- $style_value = esc_attr( $options['style_mobile'] );
152
  ?>
153
  <div class="row" style="margin-bottom: 0px;">
154
  <div class="input-field col s12">
@@ -175,8 +177,10 @@ class HT_CTC_Admin_Share_Page {
175
  function share_ctc_position_cb() {
176
  $options = get_option('ht_ctc_share');
177
 
178
- $side_1 = esc_attr( $options['side_1'] );
179
- $side_2 = esc_attr( $options['side_2'] );
 
 
180
  ?>
181
  <!-- side - 1 -->
182
  <div class="row">
@@ -189,7 +193,7 @@ class HT_CTC_Admin_Share_Page {
189
  </div>
190
 
191
  <div class="input-field col s6">
192
- <input name="ht_ctc_share[side_1_value]" value="<?php echo esc_attr( $options['side_1_value'] ) ?>" id="side_1_value" type="text" class="input-margin">
193
  <label for="side_1_value">e.g. 10px</label>
194
  </div>
195
  </div>
@@ -205,7 +209,7 @@ class HT_CTC_Admin_Share_Page {
205
  </div>
206
 
207
  <div class="input-field col s6">
208
- <input name="ht_ctc_share[side_2_value]" value="<?php echo esc_attr( $options['side_2_value'] ) ?>" id="side_2_value" type="text" class="input-margin">
209
  <label for="side_2_value">e.g. 10px</label>
210
  </div>
211
  </div>
@@ -268,463 +272,10 @@ class HT_CTC_Admin_Share_Page {
268
  // show/hide
269
  function share_show_hide_cb() {
270
 
271
-
272
  $options = get_option('ht_ctc_share');
273
 
274
- $show_or_hide = esc_attr( $options['show_or_hide'] );
275
- ?>
276
-
277
- <ul class="collapsible">
278
- <li>
279
- <div class="collapsible-header">Show/Hide</div>
280
- <div class="collapsible-body">
281
-
282
- <?php
283
-
284
-
285
- // Hide on Mobile Devices
286
- if ( isset( $options['hideon_mobile'] ) ) {
287
- ?>
288
- <p>
289
- <label>
290
- <input name="ht_ctc_share[hideon_mobile]" type="checkbox" value="1" <?php checked( $options['hideon_mobile'], 1 ); ?> id="hideon_mobile" />
291
- <span>Hide on - Mobile Devices</span>
292
- </label>
293
- </p>
294
- <?php
295
- } else {
296
- ?>
297
- <p>
298
- <label>
299
- <input name="ht_ctc_share[hideon_mobile]" type="checkbox" value="1" id="hideon_mobile" />
300
- <span>Hide on - Mobile Devices</span>
301
- </label>
302
- </p>
303
- <?php
304
- }
305
-
306
- // Hide on Desktop Devices
307
- if ( isset( $options['hideon_desktop'] ) ) {
308
- ?>
309
- <p>
310
- <label>
311
- <input name="ht_ctc_share[hideon_desktop]" type="checkbox" value="1" <?php checked( $options['hideon_desktop'], 1 ); ?> id="hideon_desktop" />
312
- <span>Hide on - Desktop Devices</span>
313
- </label>
314
- </p>
315
- <?php
316
- } else {
317
- ?>
318
- <p>
319
- <label>
320
- <input name="ht_ctc_share[hideon_desktop]" type="checkbox" value="1" id="hideon_desktop" />
321
- <span>Hide on - Desktop Devices</span>
322
- </label>
323
- </p>
324
- <?php
325
- }
326
- ?>
327
- <!-- <p class="description">plugin detects device based on HTTP User agent </p> -->
328
- <p class="description">If working in reverse it might be the cache plugin not detecting the devices - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/hide-based-on-device/">more info</a> </p>
329
-
330
-
331
- <div class="row" style="margin-bottom: 0px;">
332
- <div class="input-field col s12">
333
- <select name="ht_ctc_share[show_or_hide]" class="select_show_or_hide">
334
- <option value="hide" <?php echo $show_or_hide == "hide" ? 'SELECTED' : ''; ?> >Hide on selected pages</option>
335
- <option value="show" <?php echo $show_or_hide == "show" ? 'SELECTED' : ''; ?> >Show on selected pages</option>
336
- </select>
337
- <!-- <label><?php _e( 'enable' , 'click-to-chat-for-whatsapp' ) ?></label> -->
338
- </div>
339
- </div>
340
-
341
-
342
- <!-- ######### Hide ######### -->
343
-
344
-
345
- <p class="description ctc_show_hide_display show-hide_display-none hidebased" style="margin-bottom: 15px">
346
- <?php echo 'Select pages to Hide styles <span style="color: green;"> ( Default Shows on all pages ) ' ?>
347
- </p>
348
- <?php
349
-
350
- // checkboxes - Hide based on Type of posts
351
-
352
- // Single Posts
353
- if ( isset( $options['hideon_posts'] ) ) {
354
- ?>
355
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
356
- <label>
357
- <input name="ht_ctc_share[hideon_posts]" type="checkbox" value="1" <?php checked( $options['hideon_posts'], 1 ); ?> id="filled-in-box1" />
358
- <span>Hide on - Posts</span>
359
- </label>
360
- </p>
361
- <?php
362
- } else {
363
- ?>
364
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
365
- <label>
366
- <input name="ht_ctc_share[hideon_posts]" type="checkbox" value="1" id="filled-in-box1" />
367
- <span>Hide on - Posts</span>
368
- </label>
369
- </p>
370
- <?php
371
- }
372
-
373
-
374
- // Page
375
- if ( isset( $options['hideon_page'] ) ) {
376
- ?>
377
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
378
- <label>
379
- <input name="ht_ctc_share[hideon_page]" type="checkbox" value="1" <?php checked( $options['hideon_page'], 1 ); ?> id="filled-in-box2" />
380
- <span>Hide on - Pages</span>
381
- </label>
382
- </p>
383
- <?php
384
- } else {
385
- ?>
386
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
387
- <label>
388
- <input name="ht_ctc_share[hideon_page]" type="checkbox" value="1" id="filled-in-box2" />
389
- <span>Hide on - Pages</span>
390
- </label>
391
- </p>
392
- <?php
393
- }
394
-
395
-
396
-
397
-
398
- // Home Page
399
- // is_home and is_front_page - combined. calling as home/front page
400
- if ( isset( $options['hideon_homepage'] ) ) {
401
- ?>
402
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
403
- <label>
404
- <input name="ht_ctc_share[hideon_homepage]" type="checkbox" value="1" <?php checked( $options['hideon_homepage'], 1 ); ?> id="filled-in-box3" />
405
- <span>Hide on - Home/Front Page</span>
406
- </label>
407
- </p>
408
- <?php
409
- } else {
410
- ?>
411
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
412
- <label>
413
- <input name="ht_ctc_share[hideon_homepage]" type="checkbox" value="1" id="filled-in-box3" />
414
- <span>Hide on - Home/Front Page</span>
415
- </label>
416
- </p>
417
- <?php
418
- }
419
-
420
-
421
- // Category
422
- if ( isset( $options['hideon_category'] ) ) {
423
- ?>
424
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
425
- <label>
426
- <input name="ht_ctc_share[hideon_category]" type="checkbox" value="1" <?php checked( $options['hideon_category'], 1 ); ?> id="filled-in-box5" />
427
- <span>Hide on - Category</span>
428
- </label>
429
- </p>
430
- <?php
431
- } else {
432
- ?>
433
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
434
- <label>
435
- <input name="ht_ctc_share[hideon_category]" type="checkbox" value="1" id="filled-in-box5" />
436
- <span>Hide on - Category</span>
437
- </label>
438
- </p>
439
- <?php
440
- }
441
-
442
-
443
-
444
- // Archive
445
- if ( isset( $options['hideon_archive'] ) ) {
446
- ?>
447
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
448
- <label>
449
- <input name="ht_ctc_share[hideon_archive]" type="checkbox" value="1" <?php checked( $options['hideon_archive'], 1 ); ?> id="filled-in-box6" />
450
- <span>Hide on - Archive</span>
451
- </label>
452
- </p>
453
- <?php
454
- } else {
455
- ?>
456
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
457
- <label>
458
- <input name="ht_ctc_share[hideon_archive]" type="checkbox" value="1" id="filled-in-box6" />
459
- <span>Hide on - Archive</span>
460
- </label>
461
- </p>
462
- <?php
463
- }
464
-
465
-
466
- // 404 Page
467
- if ( isset( $options['hideon_404'] ) ) {
468
- ?>
469
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
470
- <label>
471
- <input name="ht_ctc_share[hideon_404]" type="checkbox" value="1" <?php checked( $options['hideon_404'], 1 ); ?> id="hideon_404" />
472
- <span>Hide on - 404 Page</span>
473
- </label>
474
- </p>
475
- <?php
476
- } else {
477
- ?>
478
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
479
- <label>
480
- <input name="ht_ctc_share[hideon_404]" type="checkbox" value="1" id="hideon_404" />
481
- <span>Hide on - 404 Page</span>
482
- </label>
483
- </p>
484
- <?php
485
- }
486
-
487
-
488
- // WooCommerce single product pages
489
- if ( isset( $options['hideon_wooproduct'] ) ) {
490
- ?>
491
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
492
- <label>
493
- <input name="ht_ctc_share[hideon_wooproduct]" type="checkbox" value="1" <?php checked( $options['hideon_wooproduct'], 1 ); ?> id="hideon_wooproduct" />
494
- <span>Hide on - WooCommerce single product pages</span>
495
- </label>
496
- </p>
497
- <?php
498
- } else {
499
- ?>
500
- <p class="ctc_show_hide_display show-hide_display-none hidebased">
501
- <label>
502
- <input name="ht_ctc_share[hideon_wooproduct]" type="checkbox" value="1" id="hideon_wooproduct" />
503
- <span>Hide on - WooCommerce single product pages</span>
504
- </label>
505
- </p>
506
- <?php
507
- }
508
-
509
-
510
- ?>
511
- <p class="description ctc_show_hide_display show-hide_display-none hidebased">Check to hide Styles based on the type of pages</p>
512
-
513
- <!-- ID's list to hide styles -->
514
- <div class="row ctc_show_hide_display show-hide_display-none hidebased">
515
- <div class="input-field col s12">
516
- <input name="ht_ctc_share[list_hideon_pages]" value="<?php echo esc_attr( $options['list_hideon_pages'] ) ?>" id="ccw_list_id_tohide" type="text" class="input-margin">
517
- <label for="ccw_list_id_tohide">Id's list to Hide - add ',' after each id </label>
518
- <p class="description">Add Post, Page, Media - ID's to hide, can add multiple id's by separating with a comma ( , )</p>
519
- </div>
520
- </div>
521
-
522
- <!-- Categorys list - to hide -->
523
- <div class="row ctc_show_hide_display show-hide_display-none hidebased">
524
- <div class="input-field col s12">
525
- <input name="ht_ctc_share[list_hideon_cat]" value="<?php echo esc_attr( $options['list_hideon_cat'] ) ?>" id="ccw_list_cat_tohide" type="text" class="input-margin">
526
- <label for="ccw_list_cat_tohide"><?php _e( 'Category name\'s to Hide - add \',\' after each category name' , 'click-to-chat-for-whatsapp' ) ?> </label>
527
- <p class="description">Add Categories name to hide, can add multiple Categories by separating with a comma ( , )</p>
528
- </div>
529
- </div>
530
-
531
-
532
-
533
- <!-- ######### Show ######### -->
534
-
535
-
536
- <p class="description ctc_show_hide_display show-hide_display-none showbased" style="margin-bottom: 15px">
537
- <?php echo 'Select pages to display styles <span style="background-color: #dddddd; color: red;"> ( Default hides on all pages ) ' ?>
538
- </p>
539
- <?php
540
-
541
- // checkboxes - Show based on Type of posts
542
-
543
- // Single Posts
544
- if ( isset( $options['showon_posts'] ) ) {
545
- ?>
546
- <p class="ctc_show_hide_display show-hide_display-none showbased">
547
- <label>
548
- <input name="ht_ctc_share[showon_posts]" type="checkbox" value="1" <?php checked( $options['showon_posts'], 1 ); ?> id="show_filled-in-box1" />
549
- <span>Show on - Posts</span>
550
- </label>
551
- </p>
552
- <?php
553
- } else {
554
- ?>
555
- <p class="ctc_show_hide_display show-hide_display-none showbased">
556
- <label>
557
- <input name="ht_ctc_share[showon_posts]" type="checkbox" value="1" id="show_filled-in-box1" />
558
- <span>Show on - Posts</span>
559
- </label>
560
- </p>
561
- <?php
562
- }
563
-
564
-
565
- // Page
566
- if ( isset( $options['showon_page'] ) ) {
567
- ?>
568
- <p class="ctc_show_hide_display show-hide_display-none showbased">
569
- <label>
570
- <input name="ht_ctc_share[showon_page]" type="checkbox" value="1" <?php checked( $options['showon_page'], 1 ); ?> id="show_filled-in-box2" />
571
- <span>Show on - Pages</span>
572
- </label>
573
- </p>
574
- <?php
575
- } else {
576
- ?>
577
- <p class="ctc_show_hide_display show-hide_display-none showbased">
578
- <label>
579
- <input name="ht_ctc_share[showon_page]" type="checkbox" value="1" id="show_filled-in-box2" />
580
- <span>Show on - Pages</span>
581
- </label>
582
- </p>
583
- <?php
584
- }
585
-
586
-
587
- // Home Page
588
- // is_home and is_front_page - combined. calling as home/front page
589
- if ( isset( $options['showon_homepage'] ) ) {
590
- ?>
591
- <p class="ctc_show_hide_display show-hide_display-none showbased">
592
- <label>
593
- <input name="ht_ctc_share[showon_homepage]" type="checkbox" value="1" <?php checked( $options['showon_homepage'], 1 ); ?> id="show_filled-in-box3" />
594
- <span>Show on - Home/Front Page</span>
595
- </label>
596
- </p>
597
- <?php
598
- } else {
599
- ?>
600
- <p class="ctc_show_hide_display show-hide_display-none showbased">
601
- <label>
602
- <input name="ht_ctc_share[showon_homepage]" type="checkbox" value="1" id="show_filled-in-box3" />
603
- <span>Show on - Home/Front Page</span>
604
- </label>
605
- </p>
606
- <?php
607
- }
608
-
609
-
610
- // Category
611
- if ( isset( $options['showon_category'] ) ) {
612
- ?>
613
- <p class="ctc_show_hide_display show-hide_display-none showbased">
614
- <label>
615
- <input name="ht_ctc_share[showon_category]" type="checkbox" value="1" <?php checked( $options['showon_category'], 1 ); ?> id="show_filled-in-box5" />
616
- <span>Show on - Category</span>
617
- </label>
618
- </p>
619
- <?php
620
- } else {
621
- ?>
622
- <p class="ctc_show_hide_display show-hide_display-none showbased">
623
- <label>
624
- <input name="ht_ctc_share[showon_category]" type="checkbox" value="1" id="show_filled-in-box5" />
625
- <span>Show on - Category</span>
626
- </label>
627
- </p>
628
- <?php
629
- }
630
-
631
- // Archive
632
- if ( isset( $options['showon_archive'] ) ) {
633
- ?>
634
- <p class="ctc_show_hide_display show-hide_display-none showbased">
635
- <label>
636
- <input name="ht_ctc_share[showon_archive]" type="checkbox" value="1" <?php checked( $options['showon_archive'], 1 ); ?> id="show_filled-in-box6" />
637
- <span>Show on - Archive</span>
638
- </label>
639
- </p>
640
- <?php
641
- } else {
642
- ?>
643
- <p class="ctc_show_hide_display show-hide_display-none showbased">
644
- <label>
645
- <input name="ht_ctc_share[showon_archive]" type="checkbox" value="1" id="show_filled-in-box6" />
646
- <span>Show on - Archive</span>
647
- </label>
648
- </p>
649
- <?php
650
- }
651
-
652
-
653
- // 404 Page
654
- if ( isset( $options['showon_404'] ) ) {
655
- ?>
656
- <p class="ctc_show_hide_display show-hide_display-none showbased">
657
- <label>
658
- <input name="ht_ctc_share[showon_404]" type="checkbox" value="1" <?php checked( $options['showon_404'], 1 ); ?> id="showon_404" />
659
- <span>Show on - 404 Page</span>
660
- </label>
661
- </p>
662
- <?php
663
- } else {
664
- ?>
665
- <p class="ctc_show_hide_display show-hide_display-none showbased">
666
- <label>
667
- <input name="ht_ctc_share[showon_404]" type="checkbox" value="1" id="showon_404" />
668
- <span>Show on - 404 Page</span>
669
- </label>
670
- </p>
671
- <?php
672
- }
673
-
674
-
675
- // WooCommerce single product pages
676
- if ( isset( $options['showon_wooproduct'] ) ) {
677
- ?>
678
- <p class="ctc_show_hide_display show-hide_display-none showbased">
679
- <label>
680
- <input name="ht_ctc_share[showon_wooproduct]" type="checkbox" value="1" <?php checked( $options['showon_wooproduct'], 1 ); ?> id="showon_wooproduct" />
681
- <span>Show on - WooCommerce Single product pages</span>
682
- </label>
683
- </p>
684
- <?php
685
- } else {
686
- ?>
687
- <p class="ctc_show_hide_display show-hide_display-none showbased">
688
- <label>
689
- <input name="ht_ctc_share[showon_wooproduct]" type="checkbox" value="1" id="showon_wooproduct" />
690
- <span>Show on - WooCommerce Single product pages</span>
691
- </label>
692
- </p>
693
- <?php
694
- }
695
-
696
-
697
- ?>
698
- <p class="description ctc_show_hide_display show-hide_display-none showbased"><?php _e( 'Check to display Styles based on type of the page' , 'click-to-chat-for-whatsapp' ) ?></p>
699
-
700
- <!-- ID's list to show styles -->
701
- <div class="row ctc_show_hide_display show-hide_display-none showbased">
702
- <div class="input-field col s12">
703
- <input name="ht_ctc_share[list_showon_pages]" value="<?php echo esc_attr( $options['list_showon_pages'] ) ?>" id="ccw_list_id_toshow" type="text" class="input-margin">
704
- <label for="ccw_list_id_toshow">Id's list to show - add ',' after each id </label>
705
- <p class="description"> Add Post, Pages, Media - ID's to show styles, can add multiple id's separate with a comma ( , ) </p>
706
- </div>
707
- </div>
708
-
709
- <!-- Categorys list - to show -->
710
- <div class="row ctc_show_hide_display show-hide_display-none showbased">
711
- <div class="input-field col s12">
712
- <input name="ht_ctc_share[list_showon_cat]" value="<?php echo esc_attr( $options['list_showon_cat'] ) ?>" id="ccw_list_cat_toshow" type="text" class="input-margin">
713
- <label for="ccw_list_cat_toshow"><?php _e( 'Category name\'s to Show - add \',\' after each category name' , 'click-to-chat-for-whatsapp' ) ?> </label>
714
- <p class="description"><?php _e( 'Category name\'s to show styles, can add multiple Categories separate with a comma ( , )' , 'click-to-chat-for-whatsapp' ) ?> </p>
715
- </div>
716
- </div>
717
-
718
-
719
- <p class="description"><a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/show-hide-styles/">more info</a> </p>
720
-
721
-
722
- </div>
723
- </li>
724
- <ul>
725
-
726
-
727
- <?php
728
 
729
  }
730
 
89
  // WhatsApp share ID.
90
  function share_text_cb() {
91
  $options = get_option('ht_ctc_share');
92
+ $value = ( '' == $options ) ? '' : esc_attr( $options['share_text'] );
93
  ?>
94
  <div class="row">
95
  <div class="input-field col s12">
96
+ <input name="ht_ctc_share[share_text]" value="<?php echo $value ?>" id="whatsapp_share_text" type="text" class="input-margin">
97
  <label for="whatsapp_share_text">Share Text</label>
98
  <p class="description">Placeholder {{url}} returns current webpage URL - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/share-text/">more info</a> ) </p>
99
  </div>
104
  // call to action
105
  function share_cta_cb() {
106
  $options = get_option('ht_ctc_share');
107
+ $value = ( '' == $options ) ? '' : esc_attr( $options['call_to_action'] );
108
  ?>
109
  <div class="row">
110
  <div class="input-field col s12">
111
+ <input name="ht_ctc_share[call_to_action]" value="<?php echo $value ?>" id="call_to_action" type="text" class="input-margin">
112
  <label for="call_to_action">Call to Action</label>
113
  <p class="description">Text that appears along with WhatsApp icon/button - <a target="_blank" href="https://www.holithemes.com/plugins/click-to-chat/call-to-action/">more info</a> </p>
114
  </div>
121
  // Desktop - select style
122
  function share_ctc_desktop_style_cb() {
123
  $options = get_option('ht_ctc_share');
124
+ $style_value = ( '' == $options ) ? '' : esc_attr( $options['style_desktop'] );
125
  ?>
126
  <div class="row">
127
  <div class="input-field col s12" style="margin-bottom: 0px;">
150
  // Mobile - select style
151
  function share_ctc_mobile_style_cb() {
152
  $options = get_option('ht_ctc_share');
153
+ $style_value = ( '' == $options ) ? '' : esc_attr( $options['style_mobile'] );
154
  ?>
155
  <div class="row" style="margin-bottom: 0px;">
156
  <div class="input-field col s12">
177
  function share_ctc_position_cb() {
178
  $options = get_option('ht_ctc_share');
179
 
180
+ $side_1 = ( '' == $options ) ? '' : esc_attr( $options['side_1'] );
181
+ $side_2 = ( '' == $options ) ? '' : esc_attr( $options['side_2'] );
182
+ $side_1_value = ( '' == $options ) ? '' : esc_attr( $options['side_1_value'] );
183
+ $side_2_value = ( '' == $options ) ? '' : esc_attr( $options['side_2_value'] );
184
  ?>
185
  <!-- side - 1 -->
186
  <div class="row">
193
  </div>
194
 
195
  <div class="input-field col s6">
196
+ <input name="ht_ctc_share[side_1_value]" value="<?php echo $side_1_value ?>" id="side_1_value" type="text" class="input-margin">
197
  <label for="side_1_value">e.g. 10px</label>
198
  </div>
199
  </div>
209
  </div>
210
 
211
  <div class="input-field col s6">
212
+ <input name="ht_ctc_share[side_2_value]" value="<?php echo $side_2_value ?>" id="side_2_value" type="text" class="input-margin">
213
  <label for="side_2_value">e.g. 10px</label>
214
  </div>
215
  </div>
272
  // show/hide
273
  function share_show_hide_cb() {
274
 
275
+ $dbrow = 'ht_ctc_share';
276
  $options = get_option('ht_ctc_share');
277
 
278
+ include_once HT_CTC_PLUGIN_DIR .'new/admin/admin_commons/admin-show-hide.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
 
280
  }
281
 
new/admin/class-ht-ctc-db.php CHANGED
@@ -61,13 +61,12 @@ class HT_CTC_DB {
61
  *
62
  * checkboxes ..
63
  * fb_analytics facebook analytics using js sdk
64
- * detectdevice screen(screensize), http(httpuseragent)
65
  *
66
  */
67
  public function ht_ctc_othersettings() {
68
 
69
  $values = array(
70
- 'detectdevice' => 'screen',
71
  );
72
 
73
  $ht_ctc_main_options = get_option('ht_ctc_main_options');
@@ -97,11 +96,9 @@ class HT_CTC_DB {
97
  * enable_group enable_group_chat
98
  * enable_share enable_share
99
  *
100
- * enable_ga Google analytics
101
- * enable_fba Facebook Analytics
102
- * enable_fbp Facebook Pixel ( pro )
103
  *
104
- * enable_woo enable_woocommerce
105
  */
106
  public function ht_ctc_main_options() {
107
 
@@ -140,8 +137,8 @@ class HT_CTC_DB {
140
  'number' => '',
141
  'pre_filled' => '',
142
  'call_to_action' => 'WhatsApp us',
143
- 'style_desktop' => '2',
144
- 'style_mobile' => '3',
145
 
146
  'side_1' => 'bottom',
147
  'side_1_value' => '10px',
61
  *
62
  * checkboxes ..
63
  * fb_analytics facebook analytics using js sdk
 
64
  *
65
  */
66
  public function ht_ctc_othersettings() {
67
 
68
  $values = array(
69
+ 'hello' => 'hello',
70
  );
71
 
72
  $ht_ctc_main_options = get_option('ht_ctc_main_options');
96
  * enable_group enable_group_chat
97
  * enable_share enable_share
98
  *
99
+ * google_analytics enable Google analytics
100
+ * fb_pixel enable Facebook Pixel
 
101
  *
 
102
  */
103
  public function ht_ctc_main_options() {
104
 
137
  'number' => '',
138
  'pre_filled' => '',
139
  'call_to_action' => 'WhatsApp us',
140
+ 'style_desktop' => '1',
141
+ 'style_mobile' => '2',
142
 
143
  'side_1' => 'bottom',
144
  'side_1_value' => '10px',
new/class-ht-ctc.php CHANGED
@@ -117,6 +117,7 @@ class HT_CTC {
117
 
118
  include_once HT_CTC_PLUGIN_DIR .'new/inc/commons/class-ht-ctc-ismobile.php';
119
  include_once HT_CTC_PLUGIN_DIR .'new/inc/commons/class-ht-ctc-values.php';
 
120
 
121
  $this->device_type = new HT_CTC_IsMobile();
122
  $this->values = new HT_CTC_Values();
117
 
118
  include_once HT_CTC_PLUGIN_DIR .'new/inc/commons/class-ht-ctc-ismobile.php';
119
  include_once HT_CTC_PLUGIN_DIR .'new/inc/commons/class-ht-ctc-values.php';
120
+ include_once HT_CTC_PLUGIN_DIR .'new/inc/commons/class-ht-ctc-hooks.php';
121
 
122
  $this->device_type = new HT_CTC_IsMobile();
123
  $this->values = new HT_CTC_Values();
new/inc/assets/js/app.js CHANGED
@@ -1,17 +1,53 @@
1
  /**
2
  * Click to Chat
3
  */
4
-
5
  var url = window.location.href;
6
 
7
  // is_mobile yes/no, desktop > 1024
8
  var is_mobile = 'yes';
9
  if (typeof screen.width !== "undefined" ) {
10
  is_mobile = ( screen.width > 1024 ) ? "no" : "yes";
11
- }
12
 
13
  // post title
14
- var post_title = (typeof ht_ctc_var !== "undefined" ) ? ht_ctc_var.post_title : document.title;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  // shortcode link
17
  function ht_ctc_shortcode_click(values) {
@@ -44,14 +80,12 @@ function ht_ctc_link(values) {
44
  // group
45
  var base_link = 'https://chat.whatsapp.com/';
46
 
47
- // var group_id = ht_ctc_var_group.group_id;
48
  var group_id = values.getAttribute('data-group_id');
49
 
50
  window.open(base_link + group_id, '_blank', 'noopener');
51
 
52
  } else if (return_type == 'share') {
53
  // share
54
- // var share_text = ht_ctc_var_share.share_text;
55
  var share_text = values.getAttribute('data-share_text');
56
 
57
  var webandapi = values.getAttribute('data-webandapi');
@@ -73,13 +107,6 @@ function ht_ctc_link(values) {
73
  pre_filled = encodeURI(pre_filled);
74
  var webandapi = values.getAttribute('data-webandapi');
75
 
76
- // if detect decive using user agent
77
- var detectdevice = values.getAttribute('data-detectdevice');
78
- if ( 'http' == detectdevice ) {
79
- var wpdevice = values.getAttribute('data-wpdevice');
80
- is_mobile = ( 'mobile' == wpdevice ) ? 'yes' : 'no';
81
- }
82
-
83
  // web/api.whatsapp or wa.me
84
  if ( 'webapi' == webandapi ) {
85
  if (is_mobile == 'yes') {
@@ -103,52 +130,90 @@ function ht_ctc_analytics(values) {
103
 
104
  var return_type = values.getAttribute('data-return_type');
105
 
 
 
 
 
 
 
 
 
 
106
  // Google Analytics
107
  var is_ga_enable = values.getAttribute('data-is_ga_enable');
108
  if ( 'yes' == is_ga_enable ) {
109
- ht_ctc_ga( return_type );
 
 
 
 
 
 
110
  }
111
 
112
  // FB Analytics
113
  var is_fb_an_enable = values.getAttribute('data-is_fb_an_enable');
114
  if ( 'yes' == is_fb_an_enable ) {
115
- ht_ctc_fb_an( return_type );
116
  }
117
 
118
  }
119
 
120
- // Google Analytics
121
- function ht_ctc_ga( return_type ) {
122
 
123
  var ga_category = 'Click to Chat for WhatsApp';
124
- var ga_action = 'return type: ' + return_type ;
125
  var ga_label = post_title + ', ' + url ;
126
 
127
- // // ga('send', 'event', 'Contact', 'Call Now Button', 'Phone');
128
-
129
- if ("ga" in window) {
130
- // if ( ga.window && ga.create) {
131
- tracker = ga.getAll()[0];
132
- if (tracker) tracker.send("event", ga_category, ga_action, ga_label );
133
- } else if ("gtag" in window) {
134
  gtag('event', ga_action, {
135
  'event_category': ga_category,
136
  'event_label': ga_label,
137
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  }
139
 
140
  }
141
 
142
  // FB Analytics
143
- function ht_ctc_fb_an( return_type ) {
144
 
145
  var fb_event_name = 'Click to Chat for WhatsApp';
146
 
147
  var params = {};
148
  params['Category'] = 'Click to Chat for WhatsApp';
149
- params['Action'] = 'return type: ' + return_type;
 
150
  params['Label'] = post_title + ', ' + url ;
151
 
152
- // if fb analytics is not installed, then uncheck fb analytics option from main plugin settings
153
- FB.AppEvents.logEvent( fb_event_name, null, params);
 
154
  }
1
  /**
2
  * Click to Chat
3
  */
 
4
  var url = window.location.href;
5
 
6
  // is_mobile yes/no, desktop > 1024
7
  var is_mobile = 'yes';
8
  if (typeof screen.width !== "undefined" ) {
9
  is_mobile = ( screen.width > 1024 ) ? "no" : "yes";
10
+ }
11
 
12
  // post title
13
+ var post_title = (typeof document.title !== "undefined" ) ? document.title : '';
14
+
15
+
16
+ document.addEventListener('DOMContentLoaded', function() {
17
+
18
+ var ht_ctc_chat = document.querySelector('.ht-ctc-chat');
19
+ (ht_ctc_chat) ? hide_basedon_device(ht_ctc_chat) : '';
20
+
21
+ var ht_ctc_share = document.querySelector('.ht-ctc-share');
22
+ (ht_ctc_share) ? hide_basedon_device(ht_ctc_share) : '';
23
+
24
+ var ht_ctc_group = document.querySelector('.ht-ctc-group');
25
+ (ht_ctc_group) ? hide_basedon_device(ht_ctc_group) : '';
26
+
27
+ // Hide based on device
28
+ function hide_basedon_device(p) {
29
+ if (is_mobile == 'yes') {
30
+ var display_mobile = p.getAttribute('data-display_mobile');
31
+ if ( 'show' == display_mobile ) {
32
+ display(p)
33
+ }
34
+ } else {
35
+ var display_desktop = p.getAttribute('data-display_desktop');
36
+ if ( 'show' == display_desktop ) {
37
+ display(p)
38
+ }
39
+ }
40
+ }
41
+
42
+ function display(p) {
43
+ // p.style.removeProperty('display');
44
+ // var x = p.style.getPropertyValue("display");
45
+ p.style.display = "block";
46
+ }
47
+
48
+ });
49
+
50
+
51
 
52
  // shortcode link
53
  function ht_ctc_shortcode_click(values) {
80
  // group
81
  var base_link = 'https://chat.whatsapp.com/';
82
 
 
83
  var group_id = values.getAttribute('data-group_id');
84
 
85
  window.open(base_link + group_id, '_blank', 'noopener');
86
 
87
  } else if (return_type == 'share') {
88
  // share
 
89
  var share_text = values.getAttribute('data-share_text');
90
 
91
  var webandapi = values.getAttribute('data-webandapi');
107
  pre_filled = encodeURI(pre_filled);
108
  var webandapi = values.getAttribute('data-webandapi');
109
 
 
 
 
 
 
 
 
110
  // web/api.whatsapp or wa.me
111
  if ( 'webapi' == webandapi ) {
112
  if (is_mobile == 'yes') {
130
 
131
  var return_type = values.getAttribute('data-return_type');
132
 
133
+ var id = '';
134
+ if ( 'chat' == return_type ) {
135
+ id = values.getAttribute('data-number');
136
+ } else if ( 'group' == return_type ) {
137
+ id = values.getAttribute('data-group_id');
138
+ } else if ( 'share' == return_type ) {
139
+ id = 'share_text';
140
+ }
141
+
142
  // Google Analytics
143
  var is_ga_enable = values.getAttribute('data-is_ga_enable');
144
  if ( 'yes' == is_ga_enable ) {
145
+ ht_ctc_ga( return_type, id );
146
+ }
147
+
148
+ // FB Pixel
149
+ var is_fb_pixel = values.getAttribute('data-is_fb_pixel');
150
+ if ( 'yes' == is_fb_pixel ) {
151
+ ht_ctc_fb_pixel( return_type, id );
152
  }
153
 
154
  // FB Analytics
155
  var is_fb_an_enable = values.getAttribute('data-is_fb_an_enable');
156
  if ( 'yes' == is_fb_an_enable ) {
157
+ ht_ctc_fb_an( return_type, id );
158
  }
159
 
160
  }
161
 
162
+ // Google Analytics - have to improve
163
+ function ht_ctc_ga( return_type, id ) {
164
 
165
  var ga_category = 'Click to Chat for WhatsApp';
166
+ var ga_action = return_type + ': ' + id ;
167
  var ga_label = post_title + ', ' + url ;
168
 
169
+ if (typeof gtag !== "undefined") {
 
 
 
 
 
 
170
  gtag('event', ga_action, {
171
  'event_category': ga_category,
172
  'event_label': ga_label,
173
  });
174
+ } else if (typeof ga !== "undefined") {
175
+ if (ga.getAll()[0]) ga.getAll()[0].send("event", ga_category, ga_action, ga_label );
176
+ // ga('send', 'event', ga_category, ga_action, ga_label);
177
+ }
178
+
179
+ // else if (typeof dataLayer !== "undefined") {
180
+ // dataLayer.push({
181
+ // 'event': 'Click to Chat',
182
+ // 'event_category': ga_category,
183
+ // 'event_label': ga_label
184
+ // });
185
+ // }
186
+
187
+
188
+ }
189
+
190
+ // FB Pixel
191
+ function ht_ctc_fb_pixel( return_type, id ) {
192
+
193
+ if (typeof fbq !== "undefined") {
194
+ fbq('trackCustom', 'Click to Chat by HoliThemes', {
195
+ 'Category': 'Click to Chat for WhatsApp',
196
+ 'return_type': return_type,
197
+ 'ID': id,
198
+ 'Title': post_title,
199
+ 'URL': url
200
+ });
201
  }
202
 
203
  }
204
 
205
  // FB Analytics
206
+ function ht_ctc_fb_an( return_type, id ) {
207
 
208
  var fb_event_name = 'Click to Chat for WhatsApp';
209
 
210
  var params = {};
211
  params['Category'] = 'Click to Chat for WhatsApp';
212
+ params['return_type'] = return_type;
213
+ params['ID'] = id;
214
  params['Label'] = post_title + ', ' + url ;
215
 
216
+ if (typeof FB !== "undefined") {
217
+ FB.AppEvents.logEvent( fb_event_name, null, params);
218
+ }
219
  }
new/inc/chat/chat-show-hide.php DELETED
@@ -1,200 +0,0 @@
1
- <?php
2
- /**
3
- *
4
- * @included from - class-ht-ctc-chat.php
5
- *
6
- * sets $display - yes to show styles or no to hide styles
7
- */
8
-
9
- $this_page_id = get_the_ID();
10
-
11
-
12
- // yes to display style and no to hide styles
13
- // @uses at 'class-ht-ctc-chat.php'
14
- $display = 'yes';
15
-
16
-
17
- // show / hide
18
- if ( 'show' == $options['show_or_hide'] ) {
19
- // show based no
20
-
21
- // in show - default display is no
22
- $display = 'no';
23
-
24
- $pages_list_toshow = $options['list_showon_pages'];
25
- $pages_list_toshow_array = explode(',', $pages_list_toshow);
26
-
27
- if( ( is_single() || is_page() ) && in_array( $this_page_id, $pages_list_toshow_array ) ) {
28
- $display = 'yes';
29
- return;
30
- }
31
-
32
- if ( is_single() && isset( $options['showon_posts'] ) ) {
33
- $display = 'yes';
34
- return;
35
- }
36
-
37
- if ( is_page() && isset( $options['showon_page'] ) ) {
38
- if ( ( !is_home() ) && ( !is_front_page() ) ) {
39
- $display = 'yes';
40
- return;
41
- }
42
- }
43
-
44
- // is_home and is_front_page - combined.
45
- if ( ( is_home() || is_front_page() ) && ( isset( $options['showon_homepage'] ) ) ) {
46
- $display = 'yes';
47
- return;
48
- }
49
-
50
-
51
- if ( is_category() && isset( $options['showon_category'] ) ) {
52
- $display = 'yes';
53
- return;
54
- }
55
-
56
- if ( is_archive() && isset( $options['showon_archive'] ) ) {
57
- $display = 'yes';
58
- return;
59
- }
60
-
61
- if ( is_404() && isset( $options['showon_404'] ) ) {
62
- $display = 'yes';
63
- return;
64
- }
65
-
66
- // show on woocommerce single product pages.
67
- if ( isset( $options['showon_wooproduct'] ) ) {
68
- if ( function_exists( 'is_product' ) ) {
69
- if ( is_product() ) {
70
- $display = 'yes';
71
- return;
72
- }
73
- }
74
- }
75
-
76
- // Hide styles on this catergorys - list
77
- $list_showon_cat = $options['list_showon_cat'];
78
-
79
- // avoid calling foreach, explode when hide on categorys list is empty
80
- if( $list_showon_cat ) {
81
-
82
- // Get current post Categorys list and create an array for that..
83
- $current_categorys_array = array();
84
- $current_categorys = get_the_category();
85
- foreach ( $current_categorys as $category ) {
86
- $current_categorys_array[] = strtolower($category->name);
87
- }
88
-
89
- $list_showon_cat_array = explode(',', $list_showon_cat);
90
-
91
- foreach ( $list_showon_cat_array as $category ) {
92
- $category_trim = trim($category);
93
- if ( in_array( strtolower($category_trim), $current_categorys_array ) ) {
94
- $display = 'yes';
95
- return;
96
- }
97
- }
98
- }
99
-
100
- } else {
101
-
102
- // hide based on
103
-
104
- // in hide - default display is yes
105
- $display = 'yes';
106
-
107
-
108
- $pages_list_tohide = $options['list_hideon_pages'];
109
- $pages_list_tohide_array = explode(',', $pages_list_tohide);
110
-
111
- if( ( is_single() || is_page() ) && in_array( $this_page_id, $pages_list_tohide_array ) ) {
112
- $display = 'no';
113
- return;
114
- }
115
-
116
- if ( is_single() && isset( $options['hideon_posts'] ) ) {
117
- $display = 'no';
118
- return;
119
- }
120
-
121
- if ( is_page() && isset( $options['hideon_page'] ) ) {
122
- if ( ( !is_home() ) && ( !is_front_page() ) ) {
123
- $display = 'no';
124
- return;
125
- }
126
- }
127
-
128
- // is_home and is_front_page - combined.
129
- if ( ( is_home() || is_front_page() ) && ( isset( $options['hideon_homepage'] ) ) ) {
130
- $display = 'no';
131
- return;
132
- }
133
-
134
- if ( is_category() && isset( $options['hideon_category'] ) ) {
135
- $display = 'no';
136
- return;
137
- }
138
-
139
- if ( is_archive() && isset( $options['hideon_archive'] ) ) {
140
- $display = 'no';
141
- return;
142
- }
143
-
144
- if ( is_404() && isset( $options['hideon_404'] ) ) {
145
- $display = 'no';
146
- return;
147
- }
148
-
149
- // hide on woocommerce single product pages.
150
- if ( isset( $options['hideon_wooproduct'] ) ) {
151
- if ( function_exists( 'is_product' ) ) {
152
- if ( is_product() ) {
153
- $display = 'no';
154
- return;
155
- }
156
- }
157
- }
158
-
159
- // Hide styles on this catergorys - list
160
- $list_hideon_cat = $options['list_hideon_cat'];
161
-
162
- // avoid calling foreach, explode when hide on categorys list is empty
163
- if( $list_hideon_cat ) {
164
-
165
- // Get current post Categorys list and create an array for that..
166
- $current_categorys_array = array();
167
- $current_categorys = get_the_category();
168
- foreach ( $current_categorys as $category ) {
169
- $current_categorys_array[] = strtolower($category->name);
170
- }
171
-
172
- $list_hideon_cat_array = explode(',', $list_hideon_cat);
173
-
174
- foreach ( $list_hideon_cat_array as $category ) {
175
- $category_trim = trim($category);
176
- if ( in_array( strtolower($category_trim), $current_categorys_array ) ) {
177
- $display = 'no';
178
- return;
179
- }
180
- }
181
- }
182
-
183
- }
184
-
185
-
186
- // Hide based on device
187
-
188
- if ( function_exists( 'wp_is_mobile' ) ) {
189
- if ( wp_is_mobile() ) {
190
- // mobile
191
- if ( isset( $options['hideon_mobile'] ) ) {
192
- $display = 'no';
193
- }
194
- } else {
195
- // desktop
196
- if ( isset( $options['hideon_desktop'] ) ) {
197
- $display = 'no';
198
- }
199
- }
200
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
new/inc/chat/class-ht-ctc-chat-shortcode.php CHANGED
@@ -23,7 +23,6 @@ class HT_CTC_Chat_Shortcode {
23
  public function shortcode( $atts = [], $content = null, $shortcode = '' ) {
24
 
25
  $options = get_option( 'ht_ctc_chat_options' );
26
- $other = get_option('ht_ctc_othersettings');
27
  $main_options = ht_ctc()->values->ctc_main_options;
28
 
29
  $number_db = esc_attr( $options['number'] );
@@ -167,16 +166,9 @@ class HT_CTC_Chat_Shortcode {
167
  $class_names = "ht-ctc-sc-chat sc-style-$style";
168
 
169
  // analytics
170
- $is_ga_enable = 'no';
171
- $is_fb_an_enable = 'no';
172
-
173
- if ( isset( $main_options['google_analytics'] ) ) {
174
- $is_ga_enable = 'yes';
175
- }
176
-
177
- if ( isset( $other['fb_analytics'] ) ) {
178
- $is_fb_an_enable = 'yes';
179
- }
180
 
181
 
182
  $o = '';
@@ -185,13 +177,13 @@ class HT_CTC_Chat_Shortcode {
185
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
186
 
187
  if ( is_file( $sc_path ) ) {
188
- $o .= '<div onclick="ht_ctc_shortcode_click(this);" data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-style="'.$style.'" data-is_ga_enable="'.$is_ga_enable.'" data-is_fb_an_enable="'.$is_fb_an_enable.'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
189
  include $sc_path;
190
  $o .= '</div>';
191
  } else {
192
  // if style is not in the list..
193
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CTC_PLUGIN_FILE );
194
- $o .= '<div onclick="ht_ctc_shortcode_click(this);" data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$is_ga_enable.'" data-is_fb_an_enable="'.$is_fb_an_enable.'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
195
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="WhatsApp chat" style="height: 50px; '.$css.' " >';
196
  $o .= '</div>';
197
  }
23
  public function shortcode( $atts = [], $content = null, $shortcode = '' ) {
24
 
25
  $options = get_option( 'ht_ctc_chat_options' );
 
26
  $main_options = ht_ctc()->values->ctc_main_options;
27
 
28
  $number_db = esc_attr( $options['number'] );
166
  $class_names = "ht-ctc-sc-chat sc-style-$style";
167
 
168
  // analytics
169
+ $is_ga_enable = apply_filters( 'ht_ctc_fh_is_ga_enable', 'no' );
170
+ $is_fb_pixel = apply_filters( 'ht_ctc_fh_is_fb_pixel', 'no' );
171
+ $is_fb_an_enable = apply_filters( 'ht_ctc_fh_is_fb_an_enable', 'no' );
 
 
 
 
 
 
 
172
 
173
 
174
  $o = '';
177
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
178
 
179
  if ( is_file( $sc_path ) ) {
180
+ $o .= '<div onclick="ht_ctc_shortcode_click(this);" data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-style="'.$style.'" data-is_ga_enable="'.$is_ga_enable.'" data-is_fb_an_enable="'.$is_fb_an_enable.'" data-is_fb_pixel="'.$is_fb_pixel.'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
181
  include $sc_path;
182
  $o .= '</div>';
183
  } else {
184
  // if style is not in the list..
185
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CTC_PLUGIN_FILE );
186
+ $o .= '<div onclick="ht_ctc_shortcode_click(this);" data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$is_ga_enable.'" data-is_fb_an_enable="'.$is_fb_an_enable.'" data-is_fb_pixel="'.$is_fb_pixel.'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
187
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="WhatsApp chat" style="height: 50px; '.$css.' " >';
188
  $o .= '</div>';
189
  }
new/inc/chat/class-ht-ctc-chat.php CHANGED
@@ -13,24 +13,27 @@ if ( ! class_exists( 'HT_CTC_Chat' ) ) :
13
 
14
  class HT_CTC_Chat {
15
 
16
-
17
- /**
18
- * Which features are enable - based on this call function ..
19
- */
20
  public function chat() {
21
 
22
  $options = get_option('ht_ctc_chat_options');
23
 
 
 
 
 
 
 
 
24
 
25
  // show/hide ..
26
- include_once HT_CTC_PLUGIN_DIR .'new/inc/chat/chat-show-hide.php';
 
27
 
28
  if ( 'no' == $display ) {
29
  return;
30
  }
31
 
32
  $main_options = ht_ctc()->values->ctc_main_options;
33
- $other = get_option('ht_ctc_othersettings');
34
 
35
  // position
36
  include_once HT_CTC_PLUGIN_DIR .'new/inc/chat/chat-position.php';
@@ -70,8 +73,7 @@ class HT_CTC_Chat {
70
  $page_url = get_permalink();
71
  $post_title = esc_html( get_the_title() );
72
 
73
- // number
74
- $number = esc_attr( $options['number'] );
75
 
76
  // number - at page level
77
  $page_number = esc_attr( get_post_meta( $page_id, 'ht_ctc_page_number', true ) );
@@ -91,16 +93,9 @@ class HT_CTC_Chat {
91
  $pre_filled = str_replace( array('{{url}}', '{url}', '{{title}}', '{title}', '{{site}}', '{site}' ), array( $page_url, $page_url, $post_title, $post_title, HT_CTC_BLOG_NAME, HT_CTC_BLOG_NAME ), $pre_filled );
92
 
93
  // analytics
94
- $is_ga_enable = 'no';
95
- $is_fb_an_enable = 'no';
96
-
97
- if ( isset( $main_options['google_analytics'] ) ) {
98
- $is_ga_enable = 'yes';
99
- }
100
-
101
- if ( isset( $other['fb_analytics'] ) ) {
102
- $is_fb_an_enable = 'yes';
103
- }
104
 
105
  // webapi: web/api.whatsapp, wa: wa.me
106
  $webandapi = 'wa';
@@ -108,25 +103,35 @@ class HT_CTC_Chat {
108
  $webandapi = 'webapi';
109
  }
110
 
111
- // screen: screen_size@js, http: httpuseragent@php
112
- $detectdevice = esc_attr( $other['detectdevice'] );
 
 
 
 
 
 
113
 
 
114
  // call style
115
  $path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles/style-' . $style. '.php';
116
 
117
  if ( is_file( $path ) ) {
 
 
118
  ?>
119
  <div onclick="ht_ctc_click(this);" class="<?php echo $class_names ?>"
120
- style="position: fixed; <?php echo $position ?> cursor: pointer; z-index: 99999999;"
121
  data-return_type="chat"
122
  data-style="<?php echo $style ?>"
123
  data-number="<?php echo $number ?>"
124
  data-pre_filled="<?php echo $pre_filled ?>"
125
  data-is_ga_enable="<?php echo $is_ga_enable ?>"
 
126
  data-is_fb_an_enable="<?php echo $is_fb_an_enable ?>"
127
  data-webandapi="<?php echo $webandapi ?>"
128
- data-detectdevice="<?php echo $detectdevice ?>"
129
- data-wpdevice="<?php echo $wp_device ?>"
130
  >
131
  <?php include $path; ?>
132
  </div>
13
 
14
  class HT_CTC_Chat {
15
 
 
 
 
 
16
  public function chat() {
17
 
18
  $options = get_option('ht_ctc_chat_options');
19
 
20
+ // number
21
+ $number = esc_attr( $options['number'] );
22
+
23
+ // return if whatsapp number is blank
24
+ if ( '' == $number ) {
25
+ return;
26
+ }
27
 
28
  // show/hide ..
29
+ // include_once HT_CTC_PLUGIN_DIR .'new/inc/chat/chat-show-hide.php';
30
+ include HT_CTC_PLUGIN_DIR .'new/inc/commons/show-hide.php';
31
 
32
  if ( 'no' == $display ) {
33
  return;
34
  }
35
 
36
  $main_options = ht_ctc()->values->ctc_main_options;
 
37
 
38
  // position
39
  include_once HT_CTC_PLUGIN_DIR .'new/inc/chat/chat-position.php';
73
  $page_url = get_permalink();
74
  $post_title = esc_html( get_the_title() );
75
 
76
+
 
77
 
78
  // number - at page level
79
  $page_number = esc_attr( get_post_meta( $page_id, 'ht_ctc_page_number', true ) );
93
  $pre_filled = str_replace( array('{{url}}', '{url}', '{{title}}', '{title}', '{{site}}', '{site}' ), array( $page_url, $page_url, $post_title, $post_title, HT_CTC_BLOG_NAME, HT_CTC_BLOG_NAME ), $pre_filled );
94
 
95
  // analytics
96
+ $is_ga_enable = apply_filters( 'ht_ctc_fh_is_ga_enable', 'no' );
97
+ $is_fb_pixel = apply_filters( 'ht_ctc_fh_is_fb_pixel', 'no' );
98
+ $is_fb_an_enable = apply_filters( 'ht_ctc_fh_is_fb_an_enable', 'no' );
 
 
 
 
 
 
 
99
 
100
  // webapi: web/api.whatsapp, wa: wa.me
101
  $webandapi = 'wa';
103
  $webandapi = 'webapi';
104
  }
105
 
106
+ $display_mobile = 'show';
107
+ if ( isset( $options['hideon_mobile'] ) ) {
108
+ $display_mobile = 'hide';
109
+ }
110
+ $display_desktop = 'show';
111
+ if ( isset( $options['hideon_desktop'] ) ) {
112
+ $display_desktop = 'hide';
113
+ }
114
 
115
+
116
  // call style
117
  $path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles/style-' . $style. '.php';
118
 
119
  if ( is_file( $path ) ) {
120
+
121
+ do_action('ht_ctc_ah_before_fixed_position');
122
  ?>
123
  <div onclick="ht_ctc_click(this);" class="<?php echo $class_names ?>"
124
+ style="display: none; position: fixed; <?php echo $position ?> cursor: pointer; z-index: 99999999;"
125
  data-return_type="chat"
126
  data-style="<?php echo $style ?>"
127
  data-number="<?php echo $number ?>"
128
  data-pre_filled="<?php echo $pre_filled ?>"
129
  data-is_ga_enable="<?php echo $is_ga_enable ?>"
130
+ data-is_fb_pixel="<?php echo $is_fb_pixel ?>"
131
  data-is_fb_an_enable="<?php echo $is_fb_an_enable ?>"
132
  data-webandapi="<?php echo $webandapi ?>"
133
+ data-display_mobile="<?php echo $display_mobile ?>"
134
+ data-display_desktop="<?php echo $display_desktop ?>"
135
  >
136
  <?php include $path; ?>
137
  </div>
new/inc/class-ht-ctc-main.php CHANGED
@@ -14,28 +14,20 @@ class HT_CTC_Main {
14
  $this->enables();
15
  }
16
 
17
-
18
- /**
19
- * Which features are enable - based on this call function..
20
- *
21
- */
22
  public function enables() {
23
 
24
  $options = get_option( 'ht_ctc_main_options' );
25
 
26
-
27
  // if enable call 'chat' features
28
  if ( isset( $options['enable_chat'] ) ) {
29
  include_once HT_CTC_PLUGIN_DIR .'new/inc/chat/class-ht-ctc-chat.php';
30
-
31
  include_once HT_CTC_PLUGIN_DIR . 'new/inc/chat/class-ht-ctc-chat-shortcode.php';
32
  }
33
 
34
-
35
  // if enable call 'group' features
36
  if ( isset( $options['enable_group'] ) ) {
37
  include_once HT_CTC_PLUGIN_DIR .'new/inc/group/class-ht-ctc-group.php';
38
-
39
  include_once HT_CTC_PLUGIN_DIR . 'new/inc/group/class-ht-ctc-group-shortcode.php';
40
 
41
  }
@@ -43,27 +35,15 @@ class HT_CTC_Main {
43
  // if enabled call 'share' features
44
  if ( isset( $options['enable_share'] ) ) {
45
  include_once HT_CTC_PLUGIN_DIR .'new/inc/share/class-ht-ctc-share.php';
46
-
47
  include_once HT_CTC_PLUGIN_DIR . 'new/inc/share/class-ht-ctc-share-shortcode.php';
48
 
49
  }
50
  }
51
 
52
 
53
- public function variables() {
54
-
55
- // include variables.. as of now display on all pages ..
56
- include_once HT_CTC_PLUGIN_DIR .'new/inc/commons/ht-ctc-variables.php';
57
-
58
- }
59
-
60
 
61
  }
62
 
63
- $ht_ctc_main = new HT_CTC_Main();
64
-
65
- // variables
66
- add_action( 'wp_footer', array( $ht_ctc_main, 'variables' ) );
67
-
68
 
69
  endif; // END class_exists check
14
  $this->enables();
15
  }
16
 
17
+ // If feature enabled load that class..
 
 
 
 
18
  public function enables() {
19
 
20
  $options = get_option( 'ht_ctc_main_options' );
21
 
 
22
  // if enable call 'chat' features
23
  if ( isset( $options['enable_chat'] ) ) {
24
  include_once HT_CTC_PLUGIN_DIR .'new/inc/chat/class-ht-ctc-chat.php';
 
25
  include_once HT_CTC_PLUGIN_DIR . 'new/inc/chat/class-ht-ctc-chat-shortcode.php';
26
  }
27
 
 
28
  // if enable call 'group' features
29
  if ( isset( $options['enable_group'] ) ) {
30
  include_once HT_CTC_PLUGIN_DIR .'new/inc/group/class-ht-ctc-group.php';
 
31
  include_once HT_CTC_PLUGIN_DIR . 'new/inc/group/class-ht-ctc-group-shortcode.php';
32
 
33
  }
35
  // if enabled call 'share' features
36
  if ( isset( $options['enable_share'] ) ) {
37
  include_once HT_CTC_PLUGIN_DIR .'new/inc/share/class-ht-ctc-share.php';
 
38
  include_once HT_CTC_PLUGIN_DIR . 'new/inc/share/class-ht-ctc-share-shortcode.php';
39
 
40
  }
41
  }
42
 
43
 
 
 
 
 
 
 
 
44
 
45
  }
46
 
47
+ new HT_CTC_Main();
 
 
 
 
48
 
49
  endif; // END class_exists check
new/inc/commons/class-ht-ctc-hooks.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Hooks
4
+ * @since 2.8
5
+ */
6
+
7
+ if ( ! defined( 'ABSPATH' ) ) exit;
8
+
9
+ if ( ! class_exists( 'HT_CTC_Hooks' ) ) :
10
+
11
+ class HT_CTC_Hooks {
12
+
13
+ public $version = HT_CTC_VERSION;
14
+
15
+ public $main_options = '';
16
+ public $other_options = '';
17
+
18
+ public function __construct() {
19
+ $this->hooks();
20
+ $this->main_options = get_option('ht_ctc_main_options');
21
+ $this->other_options = get_option('ht_ctc_othersettings');
22
+ }
23
+
24
+ private function hooks() {
25
+ // action hooks
26
+ add_action( 'ht_ctc_ah_before_fixed_position', array($this, 'comment') );
27
+
28
+ // filter hooks
29
+ add_filter( 'ht_ctc_fh_is_ga_enable', array($this, 'is_ga_enable') );
30
+ add_filter( 'ht_ctc_fh_is_fb_pixel', array($this, 'is_fb_pixel') );
31
+ add_filter( 'ht_ctc_fh_is_fb_an_enable', array($this, 'is_fb_an_enable') );
32
+ }
33
+
34
+ // comment before floting style
35
+ function comment() {
36
+ $comment = "<!-- Click to Chat - https://holithemes.com/plugins/click-to-chat/ v$this->version -->";
37
+ echo $comment;
38
+ }
39
+
40
+ // is_ga_enable
41
+ function is_ga_enable( $is_ga_enable ) {
42
+ return (isset( $this->main_options['google_analytics'] )) ? 'yes' : $is_ga_enable;
43
+ }
44
+
45
+ // is_fb_pixel
46
+ function is_fb_pixel( $is_fb_pixel ) {
47
+ return (isset( $this->main_options['fb_pixel'] )) ? 'yes' : $is_fb_pixel;
48
+ }
49
+
50
+ // is_fb_an_enable
51
+ function is_fb_an_enable( $is_fb_an_enable ) {
52
+ return (isset( $this->other_options['fb_analytics'] )) ? 'yes' : $is_fb_an_enable;
53
+ }
54
+
55
+
56
+
57
+ }
58
+
59
+ new HT_CTC_Hooks();
60
+
61
+ endif; // END class_exists check
new/inc/commons/class-ht-ctc-scripts.php CHANGED
@@ -26,11 +26,9 @@ class HT_CTC_Scripts {
26
  // style-8 - enqueue at style page
27
  wp_register_style('ht_ctc_mdstyle8_css', plugins_url( 'new/inc/assets/css/mdstyle8.css', HT_CTC_PLUGIN_FILE ) , '', HT_CTC_VERSION );
28
 
29
-
30
  // js
31
- wp_enqueue_script( 'ht_ctc_app_js', plugins_url( 'new/inc/assets/js/app.js', HT_CTC_PLUGIN_FILE ), array ( 'jquery' ), HT_CTC_VERSION, true );
32
 
33
-
34
  }
35
 
36
  }
26
  // style-8 - enqueue at style page
27
  wp_register_style('ht_ctc_mdstyle8_css', plugins_url( 'new/inc/assets/css/mdstyle8.css', HT_CTC_PLUGIN_FILE ) , '', HT_CTC_VERSION );
28
 
 
29
  // js
30
+ wp_enqueue_script( 'ht_ctc_app_js', plugins_url( 'new/inc/assets/js/app.js', HT_CTC_PLUGIN_FILE ), array ( 'jquery' ), HT_CTC_VERSION, false );
31
 
 
32
  }
33
 
34
  }
new/inc/commons/ht-ctc-variables.php DELETED
@@ -1,150 +0,0 @@
1
- <?php
2
- /**
3
- * Variables
4
- *
5
- * uses to call at javascript..
6
- *
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) exit;
10
-
11
- $main_options = get_option('ht_ctc_main_options');
12
- $other = get_option('ht_ctc_othersettings');
13
-
14
- $page_id = get_the_ID();
15
- $post_title = esc_html( get_the_title() );
16
-
17
-
18
- // Analytics - to have to add another var .. and pass main options
19
- $is_ga_enable = 'no';
20
- $is_fb_an_enable = 'no';
21
-
22
- if ( isset( $main_options['google_analytics'] ) ) {
23
- $is_ga_enable = 'yes';
24
- }
25
-
26
- if ( isset( $other['fb_analytics'] ) ) {
27
- $is_fb_an_enable = 'yes';
28
- }
29
-
30
- $ht_ctc_options = ht_ctc();
31
-
32
- // is_mobile
33
- $is_mobile = $ht_ctc_options->device_type->is_mobile;
34
-
35
-
36
- // variables ..
37
- $ht_ctc_var = array (
38
- 'is_mobile' => $is_mobile,
39
- 'post_title' => $post_title,
40
- 'is_ga_enable' => $is_ga_enable,
41
- 'is_fb_an_enable' => $is_fb_an_enable,
42
- );
43
-
44
- wp_localize_script( 'ht_ctc_app_js', 'ht_ctc_var', $ht_ctc_var );
45
-
46
-
47
- /**
48
- * if Chat enabled
49
- */
50
- if ( isset( $main_options['enable_chat'] ) ) {
51
-
52
- $ht_ctc_chat = get_option('ht_ctc_chat_options');
53
-
54
- // number
55
- $number = esc_attr( $ht_ctc_chat['number'] );
56
-
57
- // number - at page level
58
- $page_number = esc_attr( get_post_meta( $page_id, 'ht_ctc_page_number', true ) );
59
-
60
- if ( isset( $page_number ) && '' !== $page_number ){
61
- $number = $page_number;
62
- }
63
-
64
- $chat_show_or_hide = esc_attr( $ht_ctc_chat['show_or_hide'] );
65
-
66
-
67
- $page_url = get_permalink();
68
-
69
- // chat
70
- $pre_filled = esc_attr( $ht_ctc_chat['pre_filled'] );
71
- $pre_filled = str_replace( array('{{url}}', '{url}', '{{title}}', '{title}', '{{site}}', '{site}' ), array( $page_url, $page_url, $post_title, $post_title, HT_CTC_BLOG_NAME, HT_CTC_BLOG_NAME ), $pre_filled );
72
-
73
- $chat_webandapi = 'wa';
74
- if ( isset( $ht_ctc_chat['webandapi'] ) ) {
75
- $chat_webandapi = 'webapi';
76
- }
77
-
78
- // chat variables ..
79
- $ht_ctc_var_chat = array (
80
- 'number' => $number,
81
- 'pre_filled' => $pre_filled,
82
- 'show_or_hide' => $chat_show_or_hide,
83
- 'webandapi' => $chat_webandapi
84
- );
85
-
86
-
87
- wp_localize_script( 'ht_ctc_app_js', 'ht_ctc_var_chat', $ht_ctc_var_chat );
88
-
89
- }
90
-
91
-
92
- /**
93
- * if group enabled
94
- */
95
- if ( isset( $main_options['enable_group'] ) ) {
96
-
97
-
98
- $ht_ctc_group = get_option('ht_ctc_group');
99
-
100
- $group_id = esc_attr( $ht_ctc_group['group_id'] );
101
-
102
- // group_id - at page level
103
- $page_group_id = esc_attr( get_post_meta( $page_id, 'ht_ctc_page_group_id', true ) );
104
-
105
- if ( isset( $page_group_id ) && '' !== $page_group_id ){
106
- $group_id = $page_group_id;
107
- }
108
-
109
- $group_show_or_hide = esc_attr( $ht_ctc_group['show_or_hide'] );
110
-
111
- // Group variables
112
- $ht_ctc_var_group = array (
113
- 'group_id' => $group_id,
114
- 'show_or_hide' => $group_show_or_hide
115
- );
116
-
117
-
118
- wp_localize_script( 'ht_ctc_app_js', 'ht_ctc_var_group', $ht_ctc_var_group );
119
-
120
- }
121
-
122
- /**
123
- * if share enabled
124
- */
125
- if ( isset( $main_options['enable_share'] ) ) {
126
-
127
- $ht_ctc_share = get_option('ht_ctc_share');
128
-
129
- $share_text = esc_attr( $ht_ctc_share['share_text'] );
130
-
131
- // if ( is_home() || is_front_page() ) {
132
- if ( is_home() ) {
133
- $post_title = HT_CTC_BLOG_NAME;
134
- $page_url = get_bloginfo('url');
135
- }
136
-
137
- $share_text = str_replace( array('{{url}}', '{url}', '{{title}}', '{title}', '{{site}}', '{site}' ), array( $page_url, $page_url, $post_title, $post_title, HT_CTC_BLOG_NAME, HT_CTC_BLOG_NAME ), $share_text );
138
-
139
- $share_show_or_hide = $ht_ctc_share['show_or_hide'];
140
-
141
- // Share variables
142
- $ht_ctc_var_share = array (
143
- 'share_text' => $share_text,
144
- 'show_or_hide' => $share_show_or_hide
145
- );
146
-
147
-
148
- wp_localize_script( 'ht_ctc_app_js', 'ht_ctc_var_share', $ht_ctc_var_share );
149
-
150
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
new/inc/{share/share-show-hide.php → commons/show-hide.php} RENAMED
@@ -1,16 +1,18 @@
1
  <?php
2
  /**
3
  *
4
- * @included from - class-ht-ctc-share.php
5
  *
6
  * sets $display - yes to show styles or no to hide styles
7
  */
8
 
 
 
9
  $this_page_id = get_the_ID();
10
 
11
 
12
  // yes to display style and no to hide styles
13
- // @uses at 'class-ht-ctc-share.php'
14
  $display = 'yes';
15
 
16
 
@@ -126,16 +128,7 @@ if ( 'show' == $options['show_or_hide'] ) {
126
  }
127
  }
128
 
129
- // if ( is_home() && isset( $options['hideon_homepage'] ) ) {
130
- // $display = 'no';
131
- // return;
132
- // }
133
 
134
- // if ( is_front_page() && isset( $options['hideon_frontpage'] ) ) {
135
- // $display = 'no';
136
- // return;
137
- // }
138
-
139
  // is_home and is_front_page - combined.
140
  if ( ( is_home() || is_front_page() ) && ( isset( $options['hideon_homepage'] ) ) ) {
141
  $display = 'no';
@@ -194,18 +187,18 @@ if ( 'show' == $options['show_or_hide'] ) {
194
  }
195
 
196
 
197
- // Hide based on device
198
-
199
- if ( function_exists( 'wp_is_mobile' ) ) {
200
- if ( wp_is_mobile() ) {
201
- // mobile
202
- if ( isset( $options['hideon_mobile'] ) ) {
203
- $display = 'no';
204
- }
205
- } else {
206
- // desktop
207
- if ( isset( $options['hideon_desktop'] ) ) {
208
- $display = 'no';
209
- }
210
- }
211
- }
1
  <?php
2
  /**
3
  *
4
+ * @included from - class-ht-ctc-{chat/group/share}.php
5
  *
6
  * sets $display - yes to show styles or no to hide styles
7
  */
8
 
9
+ if ( ! defined( 'ABSPATH' ) ) exit;
10
+
11
  $this_page_id = get_the_ID();
12
 
13
 
14
  // yes to display style and no to hide styles
15
+ // @uses at 'class-ht-ctc-{chat/group/share}.php'
16
  $display = 'yes';
17
 
18
 
128
  }
129
  }
130
 
 
 
 
 
131
 
 
 
 
 
 
132
  // is_home and is_front_page - combined.
133
  if ( ( is_home() || is_front_page() ) && ( isset( $options['hideon_homepage'] ) ) ) {
134
  $display = 'no';
187
  }
188
 
189
 
190
+ // // Hide based on device
191
+
192
+ // if ( function_exists( 'wp_is_mobile' ) ) {
193
+ // if ( wp_is_mobile() ) {
194
+ // // mobile
195
+ // if ( isset( $options['hideon_mobile'] ) ) {
196
+ // $display = 'no';
197
+ // }
198
+ // } else {
199
+ // // desktop
200
+ // if ( isset( $options['hideon_desktop'] ) ) {
201
+ // $display = 'no';
202
+ // }
203
+ // }
204
+ // }
new/inc/group/class-ht-ctc-group-shortcode.php CHANGED
@@ -24,7 +24,6 @@ class HT_CTC_Group_Shortcode {
24
 
25
  $options = get_option('ht_ctc_group');
26
  $main_options = ht_ctc()->values->ctc_main_options;
27
- $other = get_option('ht_ctc_othersettings');
28
 
29
 
30
  $group_id = esc_attr( $options['group_id'] );
@@ -148,16 +147,9 @@ class HT_CTC_Group_Shortcode {
148
  $class_names = "ht-ctc-sc-group sc-style-$style";
149
 
150
  // analytics
151
- $is_ga_enable = 'no';
152
- $is_fb_an_enable = 'no';
153
-
154
- if ( isset( $main_options['google_analytics'] ) ) {
155
- $is_ga_enable = 'yes';
156
- }
157
-
158
- if ( isset( $other['fb_analytics'] ) ) {
159
- $is_fb_an_enable = 'yes';
160
- }
161
 
162
 
163
  $o = '';
@@ -166,13 +158,13 @@ class HT_CTC_Group_Shortcode {
166
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
167
 
168
  if ( is_file( $sc_path ) ) {
169
- $o .= '<div onclick="ht_ctc_shortcode_click(this);" data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$is_ga_enable.'" data-is_fb_an_enable="'.$is_fb_an_enable.'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
170
  include $sc_path;
171
  $o .= '</div>';
172
  } else {
173
  // if style is not in the list..
174
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CCW_PLUGIN_FILE );
175
- $o .= '<div onclick="ht_ctc_shortcode_click(this);" data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$is_ga_enable.'" data-is_fb_an_enable="'.$is_fb_an_enable.'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
176
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="WhatsApp chat" style="height: 50px; '.$css.' " >';
177
  $o .= '</div>';
178
  }
24
 
25
  $options = get_option('ht_ctc_group');
26
  $main_options = ht_ctc()->values->ctc_main_options;
 
27
 
28
 
29
  $group_id = esc_attr( $options['group_id'] );
147
  $class_names = "ht-ctc-sc-group sc-style-$style";
148
 
149
  // analytics
150
+ $is_ga_enable = apply_filters( 'ht_ctc_fh_is_ga_enable', 'no' );
151
+ $is_fb_pixel = apply_filters( 'ht_ctc_fh_is_fb_pixel', 'no' );
152
+ $is_fb_an_enable = apply_filters( 'ht_ctc_fh_is_fb_an_enable', 'no' );
 
 
 
 
 
 
 
153
 
154
 
155
  $o = '';
158
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
159
 
160
  if ( is_file( $sc_path ) ) {
161
+ $o .= '<div onclick="ht_ctc_shortcode_click(this);" data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$is_ga_enable.'" data-is_fb_pixel="'.$is_fb_pixel.'" data-is_fb_an_enable="'.$is_fb_an_enable.'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
162
  include $sc_path;
163
  $o .= '</div>';
164
  } else {
165
  // if style is not in the list..
166
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CCW_PLUGIN_FILE );
167
+ $o .= '<div onclick="ht_ctc_shortcode_click(this);" data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$is_ga_enable.'" data-is_fb_pixel="'.$is_fb_pixel.'" data-is_fb_an_enable="'.$is_fb_an_enable.'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
168
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="WhatsApp chat" style="height: 50px; '.$css.' " >';
169
  $o .= '</div>';
170
  }
new/inc/group/class-ht-ctc-group.php CHANGED
@@ -16,24 +16,27 @@ class HT_CTC_Group {
16
  // $this->group();
17
  }
18
 
19
-
20
- /**
21
- * Which features are enable - based on this call function ..
22
- */
23
  public function group() {
24
 
25
  $options = get_option('ht_ctc_group');
26
 
 
 
 
 
 
 
 
27
 
28
  // show/hide ..
29
- include_once HT_CTC_PLUGIN_DIR .'new/inc/group/group-show-hide.php';
 
30
 
31
  if ( 'no' == $display ) {
32
  return;
33
  }
34
 
35
  $main_options = ht_ctc()->values->ctc_main_options;
36
- $other = get_option('ht_ctc_othersettings');
37
 
38
  // position
39
  include_once HT_CTC_PLUGIN_DIR .'new/inc/group/group-position.php';
@@ -54,8 +57,6 @@ class HT_CTC_Group {
54
  // class names
55
  $class_names = "ht-ctc-group style-$style";
56
 
57
- // group id
58
- $group_id = esc_attr( $options['group_id'] );
59
 
60
  // group_id - at page level
61
  $page_id = get_the_ID();
@@ -66,27 +67,35 @@ class HT_CTC_Group {
66
  }
67
 
68
  // analytics
69
- $is_ga_enable = 'no';
70
- $is_fb_an_enable = 'no';
 
71
 
72
- if ( isset( $main_options['google_analytics'] ) ) {
73
- $is_ga_enable = 'yes';
74
- }
75
 
76
- if ( isset( $other['fb_analytics'] ) ) {
77
- $is_fb_an_enable = 'yes';
 
 
 
 
 
78
  }
79
 
80
  // call style
81
  $path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles/style-' . $style. '.php';
82
 
83
  if ( is_file( $path ) ) {
 
84
  ?>
85
- <div onclick="ht_ctc_click(this);" class="<?php echo $class_names ?>" style="position: fixed; <?php echo $position ?> cursor: pointer; z-index: 99999999;"
 
86
  data-return_type="group"
87
  data-group_id="<?php echo $group_id ?>"
88
  data-is_ga_enable="<?php echo $is_ga_enable ?>"
 
89
  data-is_fb_an_enable="<?php echo $is_fb_an_enable ?>"
 
 
90
  >
91
  <?php include $path; ?>
92
  </div>
16
  // $this->group();
17
  }
18
 
 
 
 
 
19
  public function group() {
20
 
21
  $options = get_option('ht_ctc_group');
22
 
23
+ // group id
24
+ $group_id = esc_attr( $options['group_id'] );
25
+
26
+ // return if group id is blank
27
+ if ( '' == $group_id ) {
28
+ return;
29
+ }
30
 
31
  // show/hide ..
32
+ // include_once HT_CTC_PLUGIN_DIR .'new/inc/group/group-show-hide.php';
33
+ include HT_CTC_PLUGIN_DIR .'new/inc/commons/show-hide.php';
34
 
35
  if ( 'no' == $display ) {
36
  return;
37
  }
38
 
39
  $main_options = ht_ctc()->values->ctc_main_options;
 
40
 
41
  // position
42
  include_once HT_CTC_PLUGIN_DIR .'new/inc/group/group-position.php';
57
  // class names
58
  $class_names = "ht-ctc-group style-$style";
59
 
 
 
60
 
61
  // group_id - at page level
62
  $page_id = get_the_ID();
67
  }
68
 
69
  // analytics
70
+ $is_ga_enable = apply_filters( 'ht_ctc_fh_is_ga_enable', 'no' );
71
+ $is_fb_pixel = apply_filters( 'ht_ctc_fh_is_fb_pixel', 'no' );
72
+ $is_fb_an_enable = apply_filters( 'ht_ctc_fh_is_fb_an_enable', 'no' );
73
 
 
 
 
74
 
75
+ $display_mobile = 'show';
76
+ if ( isset( $options['hideon_mobile'] ) ) {
77
+ $display_mobile = 'hide';
78
+ }
79
+ $display_desktop = 'show';
80
+ if ( isset( $options['hideon_desktop'] ) ) {
81
+ $display_desktop = 'hide';
82
  }
83
 
84
  // call style
85
  $path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles/style-' . $style. '.php';
86
 
87
  if ( is_file( $path ) ) {
88
+ do_action('ht_ctc_ah_before_fixed_position');
89
  ?>
90
+ <div onclick="ht_ctc_click(this);" class="<?php echo $class_names ?>"
91
+ style="display: none; position: fixed; <?php echo $position ?> cursor: pointer; z-index: 99999999;"
92
  data-return_type="group"
93
  data-group_id="<?php echo $group_id ?>"
94
  data-is_ga_enable="<?php echo $is_ga_enable ?>"
95
+ data-is_fb_pixel="<?php echo $is_fb_pixel ?>"
96
  data-is_fb_an_enable="<?php echo $is_fb_an_enable ?>"
97
+ data-display_mobile="<?php echo $display_mobile ?>"
98
+ data-display_desktop="<?php echo $display_desktop ?>"
99
  >
100
  <?php include $path; ?>
101
  </div>
new/inc/group/group-show-hide.php DELETED
@@ -1,212 +0,0 @@
1
- <?php
2
- /**
3
- *
4
- * @included from - class-ht-ctc-group.php
5
- *
6
- * sets $display - yes to show styles or no to hide styles
7
- */
8
-
9
- $this_page_id = get_the_ID();
10
-
11
-
12
- // yes to display style and no to hide styles
13
- // @uses at 'class-ht-ctc-group.php'
14
- $display = 'yes';
15
-
16
-
17
- // show / hide
18
- if ( 'show' == $options['show_or_hide'] ) {
19
- // show based no
20
-
21
- // in show - default display is no
22
- $display = 'no';
23
-
24
- $pages_list_toshow = esc_attr( $options['list_showon_pages'] );
25
- $pages_list_toshow_array = explode(',', $pages_list_toshow);
26
-
27
- if( ( is_single() || is_page() ) && in_array( $this_page_id, $pages_list_toshow_array ) ) {
28
- $display = 'yes';
29
- return;
30
- }
31
-
32
- if ( is_single() && isset( $options['showon_posts'] ) ) {
33
- $display = 'yes';
34
- return;
35
- }
36
-
37
- if ( is_page() && isset( $options['showon_page'] ) ) {
38
- if ( ( !is_home() ) && ( !is_front_page() ) ) {
39
- $display = 'yes';
40
- return;
41
- }
42
- }
43
-
44
- // is_home and is_front_page - combined.
45
- if ( ( is_home() || is_front_page() ) && ( isset( $options['showon_homepage'] ) ) ) {
46
- $display = 'yes';
47
- return;
48
- }
49
-
50
-
51
- if ( is_category() && isset( $options['showon_category'] ) ) {
52
- $display = 'yes';
53
- return;
54
- }
55
-
56
- if ( is_archive() && isset( $options['showon_archive'] ) ) {
57
- $display = 'yes';
58
- return;
59
- }
60
-
61
- if ( is_404() && isset( $options['showon_404'] ) ) {
62
- $display = 'yes';
63
- return;
64
- }
65
-
66
- // show on woocommerce single product pages.
67
- if ( isset( $options['showon_wooproduct'] ) ) {
68
- if ( function_exists( 'is_product' ) ) {
69
- if ( is_product() ) {
70
- $display = 'yes';
71
- return;
72
- }
73
- }
74
- }
75
-
76
-
77
- // Hide styles on this catergorys - list
78
- $list_showon_cat = esc_attr( $options['list_showon_cat'] );
79
-
80
- // avoid calling foreach, explode when hide on categorys list is empty
81
- if( $list_showon_cat ) {
82
-
83
- // Get current post Categorys list and create an array for that..
84
- $current_categorys_array = array();
85
- $current_categorys = get_the_category();
86
- foreach ( $current_categorys as $category ) {
87
- $current_categorys_array[] = strtolower($category->name);
88
- }
89
-
90
- $list_showon_cat_array = explode(',', $list_showon_cat);
91
-
92
- foreach ( $list_showon_cat_array as $category ) {
93
- $category_trim = trim($category);
94
- if ( in_array( strtolower($category_trim), $current_categorys_array ) ) {
95
- $display = 'yes';
96
- return;
97
- }
98
- }
99
- }
100
-
101
- } else {
102
-
103
- // hide based on
104
-
105
- // in hide - default display is yes
106
- $display = 'yes';
107
-
108
-
109
- $pages_list_tohide = $options['list_hideon_pages'];
110
- $pages_list_tohide_array = explode(',', $pages_list_tohide);
111
-
112
- if( ( is_single() || is_page() ) && in_array( $this_page_id, $pages_list_tohide_array ) ) {
113
- $display = 'no';
114
- return;
115
- }
116
-
117
- if ( is_single() && isset( $options['hideon_posts'] ) ) {
118
- $display = 'no';
119
- return;
120
- }
121
-
122
- if ( is_page() && isset( $options['hideon_page'] ) ) {
123
- if ( ( !is_home() ) && ( !is_front_page() ) ) {
124
- $display = 'no';
125
- return;
126
- }
127
- }
128
-
129
- // if ( is_home() && isset( $options['hideon_homepage'] ) ) {
130
- // $display = 'no';
131
- // return;
132
- // }
133
-
134
- // if ( is_front_page() && isset( $options['hideon_frontpage'] ) ) {
135
- // $display = 'no';
136
- // return;
137
- // }
138
-
139
- // is_home and is_front_page - combined.
140
- if ( ( is_home() || is_front_page() ) && ( isset( $options['hideon_homepage'] ) ) ) {
141
- $display = 'no';
142
- return;
143
- }
144
-
145
- if ( is_category() && isset( $options['hideon_category'] ) ) {
146
- $display = 'no';
147
- return;
148
- }
149
-
150
- if ( is_archive() && isset( $options['hideon_archive'] ) ) {
151
- $display = 'no';
152
- return;
153
- }
154
-
155
- if ( is_404() && isset( $options['hideon_404'] ) ) {
156
- $display = 'no';
157
- return;
158
- }
159
-
160
- // hide on woocommerce single product pages.
161
- if ( isset( $options['hideon_wooproduct'] ) ) {
162
- if ( function_exists( 'is_product' ) ) {
163
- if ( is_product() ) {
164
- $display = 'no';
165
- return;
166
- }
167
- }
168
- }
169
-
170
-
171
- // Hide styles on this catergorys - list
172
- $list_hideon_cat = $options['list_hideon_cat'];
173
-
174
- // avoid calling foreach, explode when hide on categorys list is empty
175
- if( $list_hideon_cat ) {
176
-
177
- // Get current post Categorys list and create an array for that..
178
- $current_categorys_array = array();
179
- $current_categorys = get_the_category();
180
- foreach ( $current_categorys as $category ) {
181
- $current_categorys_array[] = strtolower($category->name);
182
- }
183
-
184
- $list_hideon_cat_array = explode(',', $list_hideon_cat);
185
-
186
- foreach ( $list_hideon_cat_array as $category ) {
187
- $category_trim = trim($category);
188
- if ( in_array( strtolower($category_trim), $current_categorys_array ) ) {
189
- $display = 'no';
190
- return;
191
- }
192
- }
193
- }
194
-
195
- }
196
-
197
-
198
- // Hide based on device
199
-
200
- if ( function_exists( 'wp_is_mobile' ) ) {
201
- if ( wp_is_mobile() ) {
202
- // mobile
203
- if ( isset( $options['hideon_mobile'] ) ) {
204
- $display = 'no';
205
- }
206
- } else {
207
- // desktop
208
- if ( isset( $options['hideon_desktop'] ) ) {
209
- $display = 'no';
210
- }
211
- }
212
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
new/inc/share/class-ht-ctc-share-shortcode.php CHANGED
@@ -24,7 +24,6 @@ class HT_CTC_Share_Shortcode {
24
 
25
  $options = get_option('ht_ctc_share');
26
  $main_options = ht_ctc()->values->ctc_main_options;
27
- $other = get_option('ht_ctc_othersettings');
28
 
29
 
30
  $share_text_db = esc_attr( $options['share_text'] );
@@ -159,16 +158,9 @@ class HT_CTC_Share_Shortcode {
159
  $class_names = "ht-ctc-sc-share sc-style-$style";
160
 
161
  // analytics
162
- $is_ga_enable = 'no';
163
- $is_fb_an_enable = 'no';
164
-
165
- if ( isset( $main_options['google_analytics'] ) ) {
166
- $is_ga_enable = 'yes';
167
- }
168
-
169
- if ( isset( $other['fb_analytics'] ) ) {
170
- $is_fb_an_enable = 'yes';
171
- }
172
 
173
 
174
  $o = '';
@@ -177,13 +169,13 @@ class HT_CTC_Share_Shortcode {
177
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
178
 
179
  if ( is_file( $sc_path ) ) {
180
- $o .= '<div onclick="ht_ctc_shortcode_click(this);" data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$is_ga_enable.'" data-is_fb_an_enable="'.$is_fb_an_enable.'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
181
  include $sc_path;
182
  $o .= '</div>';
183
  } else {
184
  // if style is not in the list..
185
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CCW_PLUGIN_FILE );
186
- $o .= '<div onclick="ht_ctc_shortcode_click(this);" data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$is_ga_enable.'" data-is_fb_an_enable="'.$is_fb_an_enable.'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
187
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="WhatsApp chat" style="height: 50px; '.$css.' " >';
188
  $o .= '</div>';
189
  }
24
 
25
  $options = get_option('ht_ctc_share');
26
  $main_options = ht_ctc()->values->ctc_main_options;
 
27
 
28
 
29
  $share_text_db = esc_attr( $options['share_text'] );
158
  $class_names = "ht-ctc-sc-share sc-style-$style";
159
 
160
  // analytics
161
+ $is_ga_enable = apply_filters( 'ht_ctc_fh_is_ga_enable', 'no' );
162
+ $is_fb_pixel = apply_filters( 'ht_ctc_fh_is_fb_pixel', 'no' );
163
+ $is_fb_an_enable = apply_filters( 'ht_ctc_fh_is_fb_an_enable', 'no' );
 
 
 
 
 
 
 
164
 
165
 
166
  $o = '';
169
  $sc_path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles-shortcode/sc-style-' . $style. '.php';
170
 
171
  if ( is_file( $sc_path ) ) {
172
+ $o .= '<div onclick="ht_ctc_shortcode_click(this);" data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$is_ga_enable.'" data-is_fb_pixel="'.$is_fb_pixel.'" data-is_fb_an_enable="'.$is_fb_an_enable.'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
173
  include $sc_path;
174
  $o .= '</div>';
175
  } else {
176
  // if style is not in the list..
177
  $img_link = plugins_url("./new/inc/assets/img/whatsapp-logo.svg", HT_CCW_PLUGIN_FILE );
178
+ $o .= '<div onclick="ht_ctc_shortcode_click(this);" data-ctc-link="'.$link.'" data-return_type="'.$return_type.'" data-is_ga_enable="'.$is_ga_enable.'" data-is_fb_pixel="'.$is_fb_pixel.'" data-is_fb_an_enable="'.$is_fb_an_enable.'" style="display: inline; cursor: pointer; z-index: 99999999; '.$css.'" class="'.$class_names.' ht-ctc-inline">';
179
  $o .= '<img class="img-icon-sc sc_item pointer style-3-sc" src="'.$img_link.'" alt="WhatsApp chat" style="height: 50px; '.$css.' " >';
180
  $o .= '</div>';
181
  }
new/inc/share/class-ht-ctc-share.php CHANGED
@@ -16,24 +16,27 @@ class HT_CTC_Share {
16
  // $this->share();
17
  }
18
 
19
-
20
- /**
21
- * Which features are enable - based on this call function ..
22
- */
23
  public function share() {
24
 
25
  $options = get_option('ht_ctc_share');
26
 
 
 
 
 
 
 
 
27
 
28
  // show/hide ..
29
- include_once HT_CTC_PLUGIN_DIR .'new/inc/share/share-show-hide.php';
 
30
 
31
  if ( 'no' == $display ) {
32
  return;
33
  }
34
 
35
  $main_options = ht_ctc()->values->ctc_main_options;
36
- $other = get_option('ht_ctc_othersettings');
37
 
38
  // position
39
  include_once HT_CTC_PLUGIN_DIR .'new/inc/share/share-position.php';
@@ -57,9 +60,6 @@ class HT_CTC_Share {
57
  $page_url = get_permalink();
58
  $post_title = esc_html( get_the_title() );
59
 
60
- // share text
61
- $share_text = esc_attr( $options['share_text'] );
62
-
63
  // if ( is_home() || is_front_page() ) {
64
  if ( is_home() ) {
65
  $page_url = get_bloginfo('url');
@@ -69,16 +69,10 @@ class HT_CTC_Share {
69
  $share_text = str_replace( array('{{url}}', '{url}', '{{title}}', '{title}', '{{site}}', '{site}' ), array( $page_url, $page_url, $post_title, $post_title, HT_CTC_BLOG_NAME, HT_CTC_BLOG_NAME ), $share_text );
70
 
71
  // analytics
72
- $is_ga_enable = 'no';
73
- $is_fb_an_enable = 'no';
74
-
75
- if ( isset( $main_options['google_analytics'] ) ) {
76
- $is_ga_enable = 'yes';
77
- }
78
 
79
- if ( isset( $other['fb_analytics'] ) ) {
80
- $is_fb_an_enable = 'yes';
81
- }
82
 
83
  // webapi: web/api.whatsapp, api: api.whatsapp
84
  $webandapi = 'api';
@@ -86,17 +80,31 @@ class HT_CTC_Share {
86
  $webandapi = 'webapi';
87
  }
88
 
 
 
 
 
 
 
 
 
 
89
  // call style
90
  $path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles/style-' . $style. '.php';
91
 
92
  if ( is_file( $path ) ) {
 
93
  ?>
94
- <div onclick="ht_ctc_click(this);" class="<?php echo $class_names ?>" style="position: fixed; <?php echo $position ?> cursor: pointer; z-index: 99999999;"
 
95
  data-return_type="share"
96
  data-share_text="<?php echo $share_text ?>"
97
  data-is_ga_enable="<?php echo $is_ga_enable ?>"
 
98
  data-is_fb_an_enable="<?php echo $is_fb_an_enable ?>"
99
  data-webandapi="<?php echo $webandapi ?>"
 
 
100
  >
101
  <?php include $path; ?>
102
  </div>
16
  // $this->share();
17
  }
18
 
 
 
 
 
19
  public function share() {
20
 
21
  $options = get_option('ht_ctc_share');
22
 
23
+ // share text
24
+ $share_text = esc_attr( $options['share_text'] );
25
+
26
+ // return if share text is blank
27
+ if ( '' == $share_text ) {
28
+ return;
29
+ }
30
 
31
  // show/hide ..
32
+ // include_once HT_CTC_PLUGIN_DIR .'new/inc/share/share-show-hide.php';
33
+ include HT_CTC_PLUGIN_DIR .'new/inc/commons/show-hide.php';
34
 
35
  if ( 'no' == $display ) {
36
  return;
37
  }
38
 
39
  $main_options = ht_ctc()->values->ctc_main_options;
 
40
 
41
  // position
42
  include_once HT_CTC_PLUGIN_DIR .'new/inc/share/share-position.php';
60
  $page_url = get_permalink();
61
  $post_title = esc_html( get_the_title() );
62
 
 
 
 
63
  // if ( is_home() || is_front_page() ) {
64
  if ( is_home() ) {
65
  $page_url = get_bloginfo('url');
69
  $share_text = str_replace( array('{{url}}', '{url}', '{{title}}', '{title}', '{{site}}', '{site}' ), array( $page_url, $page_url, $post_title, $post_title, HT_CTC_BLOG_NAME, HT_CTC_BLOG_NAME ), $share_text );
70
 
71
  // analytics
72
+ $is_ga_enable = apply_filters( 'ht_ctc_fh_is_ga_enable', 'no' );
73
+ $is_fb_pixel = apply_filters( 'ht_ctc_fh_is_fb_pixel', 'no' );
74
+ $is_fb_an_enable = apply_filters( 'ht_ctc_fh_is_fb_an_enable', 'no' );
 
 
 
75
 
 
 
 
76
 
77
  // webapi: web/api.whatsapp, api: api.whatsapp
78
  $webandapi = 'api';
80
  $webandapi = 'webapi';
81
  }
82
 
83
+ $display_mobile = 'show';
84
+ if ( isset( $options['hideon_mobile'] ) ) {
85
+ $display_mobile = 'hide';
86
+ }
87
+ $display_desktop = 'show';
88
+ if ( isset( $options['hideon_desktop'] ) ) {
89
+ $display_desktop = 'hide';
90
+ }
91
+
92
  // call style
93
  $path = plugin_dir_path( HT_CTC_PLUGIN_FILE ) . 'new/inc/styles/style-' . $style. '.php';
94
 
95
  if ( is_file( $path ) ) {
96
+ do_action('ht_ctc_ah_before_fixed_position');
97
  ?>
98
+ <div onclick="ht_ctc_click(this);" class="<?php echo $class_names ?>"
99
+ style="display: none; position: fixed; <?php echo $position ?> cursor: pointer; z-index: 99999999;"
100
  data-return_type="share"
101
  data-share_text="<?php echo $share_text ?>"
102
  data-is_ga_enable="<?php echo $is_ga_enable ?>"
103
+ data-is_fb_pixel="<?php echo $is_fb_pixel ?>"
104
  data-is_fb_an_enable="<?php echo $is_fb_an_enable ?>"
105
  data-webandapi="<?php echo $webandapi ?>"
106
+ data-display_mobile="<?php echo $display_mobile ?>"
107
+ data-display_desktop="<?php echo $display_desktop ?>"
108
  >
109
  <?php include $path; ?>
110
  </div>
readme.txt CHANGED
@@ -28,28 +28,24 @@ Add your 'WhatsApp' or 'WhatsApp Business' Number. And let your website visitors
28
 
29
  **Desktop:** Navigates to Webpage(web.whatsapp.com) / WhatsApp Desktop App.
30
 
31
- = Styles =
32
 
33
- Select Style that mathes your Website design.
34
 
35
  > 8 predefined styles + Add your own Image/GIF.
36
 
37
- Can add different Styles for Mobile, Desktop.
38
 
39
- [list of Styles](https://holithemes.com/plugins/click-to-chat/list-of-styles/)
40
-
41
- [Styles are customizable](https://holithemes.com/plugins/click-to-chat/customize-styles/)
42
-
43
- = Add Own Image =
44
 
45
  Instead of selecting a pre-defined style, add any image/Animated image/GIF.
46
 
47
- = Position to Place =
48
 
49
- > Add styles at any position of the screen
50
  (not limited to fixed positions).
51
 
52
- = Pre-filled Message =
53
 
54
  Text that appears at the WhatsApp chat window when the user clicks on the Image/button.
55
 
@@ -66,23 +62,25 @@ With these variables we can understand from which page the user started WhatsApp
66
 
67
  [Pre-filled Message](https://holithemes.com/plugins/click-to-chat/pre-filled-message/)
68
 
69
- = Analytics =
70
 
71
  Creates an Event when the user clicks on WhatsApp Icon/button.
72
 
73
  [Google Analytics](https://holithemes.com/plugins/click-to-chat/google-analytics/)
74
 
75
- = Show/Hide =
 
 
76
 
77
- Show/Hide based on Post type, Post ID, Category, Device Type(Mobile, Dekstop).
78
 
79
- = Change Values at page level =
80
 
81
  > Change 'WhatsApp Number', 'Call to Action' at the page level
82
 
83
  [Page level settings](https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/)
84
 
85
- = Eight Styles + own Image =
86
 
87
  1. **Style-1:** Button, appears as the theme button.
88
  1. **Style-2:** Image
@@ -96,9 +94,9 @@ Show/Hide based on Post type, Post ID, Category, Device Type(Mobile, Dekstop).
96
 
97
  [list of Styles](https://holithemes.com/plugins/click-to-chat/list-of-styles/)
98
 
99
- [Customize Styles](https://holithemes.com/plugins/click-to-chat/customize-styles/)
100
 
101
- = Shortcodes =
102
 
103
  Use shortcodes to add the icon/button with inline the Posts content, widgets.
104
 
@@ -131,21 +129,21 @@ Let users share your website with their WhatsApp contacts and get more leads.
131
 
132
  == screenshots ==
133
 
134
- 1 1. 8 Styles, 1 Add own image / GIF Style
135
- 2 1. Chat Settings - Enter WhatsApp Number, prefilled message, call to action, style for dekstop, mobile
136
- 3 1. Chat Settings - position to place, web whatsapp on desktop
137
- 4 1. Change Values at page level: 'WhatsApp Number', 'Call to action', 'Group ID'
138
- 5 1. Add style at any position of the screen
139
- 6 1. Shortcodes - add style with inline the content
140
- 7 1. Style - 5 - Image with content box
141
- 8 1. Style - 8 - Materialize button
142
- 9 1. Style - 99 - Add your own Image / GIF(Animated Image)
143
- 10 1. Customize Styles
144
- 11 1. Enable Chat, Group, Share Settings
145
- 12 1. Group settings page
146
- 13 1. Share settings page
147
- 14 1. Hide on Selected pages
148
- 15 1. Show on Selected pages
149
 
150
 
151
  == Installation ==
@@ -164,13 +162,12 @@ Let users share your website with their WhatsApp contacts and get more leads.
164
 
165
  = WhatsApp Number =
166
 
167
- Enter the WhatsApp number with country code ( e.g. 916123456789 )
168
- here in e.g. 91 is country code 6123456789 is mobile number
169
 
170
  E.g.
171
  country code +1
172
  number: 6123456789
173
- WhatsApp number: 16123456789
174
 
175
  [https://holithemes.com/plugins/click-to-chat/whatsapp-number/](https://holithemes.com/plugins/click-to-chat/whatsapp-number/)
176
 
@@ -235,12 +232,6 @@ Plugin supports all CSS units as suffix. (px, %, rem,...)
235
 
236
  [position to place](https://holithemes.com/plugins/click-to-chat/position-to-place/)
237
 
238
- = In Mobile, If navigates to Web page =
239
-
240
- Plugin Navigates to WhatsApp App on mobile and "web.whatsapp.com" on desktop.
241
-
242
- In chat settings check/tick the "Web WhatsApp" option to naviagate directly to web.whatsapp.com on dekstops
243
-
244
  = Shortcodes Attributes =
245
 
246
  Shortcodes by default get values from settings page. Override this values using attributes.
@@ -285,7 +276,7 @@ Share Text - E.g.
285
 
286
  > Checkout this Awesome page {title}, {url}
287
 
288
- = Basic Troubleshooting =
289
 
290
  * Clear cache
291
  * Check WhatsApp number entered with country code
@@ -297,17 +288,17 @@ We are happy to setup the plugin by [screen share](https://remotedesktop.google.
297
 
298
  For any issues with the plugin / suggestions:
299
 
300
- please create a [new topic](https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/)
301
 
302
- e-mail: wp@holithemes.com
303
 
304
- [chat with us](http://api.whatsapp.com/send?phone=919494429789&text=Hi%20HoliThemes,%20I%20have%20a%20question:)
305
 
306
  = ⭐️ Give Support =
307
 
308
  If you like the plugin, please support the developers by giving [5 star rating](https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/reviews/#new-post)
309
 
310
- Thanks for showing interest on "Click to Chat" plugin.
311
 
312
  == Upgrade Notice ==
313
 
@@ -325,6 +316,18 @@ After Activate the plugin, add WhatsApp Number at plugin settings.
325
 
326
  == Changelog ==
327
 
 
 
 
 
 
 
 
 
 
 
 
 
328
  = 2.7 =
329
  * Fix: position to place suffix
330
  * Default image for style-99
28
 
29
  **Desktop:** Navigates to Webpage(web.whatsapp.com) / WhatsApp Desktop App.
30
 
31
+ = 💎 Styles =
32
 
33
+ Select Style that matches your Website design.
34
 
35
  > 8 predefined styles + Add your own Image/GIF.
36
 
37
+ Can Select different Styles for Mobile, Desktop.
38
 
39
+ = 🌼 Add Own Image =
 
 
 
 
40
 
41
  Instead of selecting a pre-defined style, add any image/Animated image/GIF.
42
 
43
+ = ✳️ Position to Place =
44
 
45
+ > Add styles at any position of the screen
46
  (not limited to fixed positions).
47
 
48
+ = Pre-filled Message =
49
 
50
  Text that appears at the WhatsApp chat window when the user clicks on the Image/button.
51
 
62
 
63
  [Pre-filled Message](https://holithemes.com/plugins/click-to-chat/pre-filled-message/)
64
 
65
+ = 📈 Analytics =
66
 
67
  Creates an Event when the user clicks on WhatsApp Icon/button.
68
 
69
  [Google Analytics](https://holithemes.com/plugins/click-to-chat/google-analytics/)
70
 
71
+ [Facebook Pixel](https://holithemes.com/plugins/click-to-chat/facebook-pixel/)
72
+
73
+ = 👓 Show/Hide =
74
 
75
+ Show or Hide styles based on Post type, Post ID, Category, Device Type(Mobile, Dekstop).
76
 
77
+ = 📒 Change Values at page level =
78
 
79
  > Change 'WhatsApp Number', 'Call to Action' at the page level
80
 
81
  [Page level settings](https://holithemes.com/plugins/click-to-chat/change-values-at-page-level/)
82
 
83
+ = 🌈 Eight Styles + own Image =
84
 
85
  1. **Style-1:** Button, appears as the theme button.
86
  1. **Style-2:** Image
94
 
95
  [list of Styles](https://holithemes.com/plugins/click-to-chat/list-of-styles/)
96
 
97
+ ✏️ [Styles are customizable](https://holithemes.com/plugins/click-to-chat/customize-styles/)
98
 
99
+ = Shortcodes =
100
 
101
  Use shortcodes to add the icon/button with inline the Posts content, widgets.
102
 
129
 
130
  == screenshots ==
131
 
132
+ 1. 8 Styles, 1 Add own image / GIF Style
133
+ 1. Chat Settings - Enter WhatsApp Number, prefilled message, call to action, style for dekstop, mobile
134
+ 1. Chat Settings - position to place, web whatsapp on desktop
135
+ 1. Change Values at page level: 'WhatsApp Number', 'Call to action', 'Group ID'
136
+ 1. Add style at any position of the screen
137
+ 1. Shortcodes - add style with inline the content
138
+ 1. Style - 5 - Image with content box
139
+ 1. Style - 8 - Materialize button
140
+ 1. Style - 99 - Add your own Image / GIF(Animated Image)
141
+ 1. Customize Styles
142
+ 1. Enable Chat, Group, Share Settings
143
+ 1. Group settings page
144
+ 1. Share settings page
145
+ 1. Hide on Selected pages
146
+ 1. Show on Selected pages
147
 
148
 
149
  == Installation ==
162
 
163
  = WhatsApp Number =
164
 
165
+ Enter the WhatsApp number with country code
 
166
 
167
  E.g.
168
  country code +1
169
  number: 6123456789
170
+ ** WhatsApp number: 16123456789 **
171
 
172
  [https://holithemes.com/plugins/click-to-chat/whatsapp-number/](https://holithemes.com/plugins/click-to-chat/whatsapp-number/)
173
 
232
 
233
  [position to place](https://holithemes.com/plugins/click-to-chat/position-to-place/)
234
 
 
 
 
 
 
 
235
  = Shortcodes Attributes =
236
 
237
  Shortcodes by default get values from settings page. Override this values using attributes.
276
 
277
  > Checkout this Awesome page {title}, {url}
278
 
279
+ = 🔧 Basic Troubleshooting =
280
 
281
  * Clear cache
282
  * Check WhatsApp number entered with country code
288
 
289
  For any issues with the plugin / suggestions:
290
 
291
+ * please create a [new topic](https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/)
292
 
293
+ * 📧 wp@holithemes.com
294
 
295
+ * [WhatsApp us](http://api.whatsapp.com/send?phone=919494429789&text=Hi%20HoliThemes,%20I%20have%20a%20question:)
296
 
297
  = ⭐️ Give Support =
298
 
299
  If you like the plugin, please support the developers by giving [5 star rating](https://wordpress.org/support/plugin/click-to-chat-for-whatsapp/reviews/#new-post)
300
 
301
+ Thank you so much from "Click to Chat" developers, HoliThemes.
302
 
303
  == Upgrade Notice ==
304
 
316
 
317
  == Changelog ==
318
 
319
+ = 2.8.2 =
320
+ * Display Styles after WhatsApp Number is added.
321
+ * Default sytles changed.
322
+
323
+ = 2.8.1 =
324
+ * Fix: Color picker conflict
325
+
326
+ = 2.8 =
327
+ * Hide based on device - now detects based on screen size
328
+ * Facebook Pixel
329
+ * Google Analytics values udpated
330
+
331
  = 2.7 =
332
  * Fix: position to place suffix
333
  * Default image for style-99