Version Description
Release date: 19 June 2019
Fixed two bugs in this version. If you find any bugs or errors in Buttonizer, report them here
Download this release
Release Info
Developer | buttonizer |
Plugin | Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer |
Version | 2.0.4 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 2.0.4
- app/Utils/Update.php +2 -2
- assets/dashboard.js +9 -0
- assets/dashboard.min.js +1 -1
- buttonizer.php +2 -2
- readme.txt +6 -1
app/Utils/Update.php
CHANGED
@@ -193,13 +193,13 @@ class Update
|
|
193 |
// Button background color
|
194 |
if($this->get15buttonValue($buttonId, 'colors_button', '#ba54ff') !== '#ba54ff' && $this->get15buttonValue($buttonId, 'colors_button', '#ba54ff') !== $defaultButtonColor) {
|
195 |
$hasStyleChanges = true;
|
196 |
-
$button['background_color'] = $this->get15buttonValue($buttonId, 'colors_button', '#ba54ff');
|
197 |
}
|
198 |
|
199 |
// Button background hover color
|
200 |
if($this->get15buttonValue($buttonId, 'colors_pushed', '#8d1acc') !== '#8d1acc' && $this->get15buttonValue($buttonId, 'colors_pushed', '#8d1acc') !== $defaultButtonColorHover) {
|
201 |
$hasStyleChanges = true;
|
202 |
-
$button['background_color_interaction'] = $this->get15buttonValue($buttonId, 'colors_pushed', '#8d1acc');
|
203 |
}
|
204 |
|
205 |
// Button icon color
|
193 |
// Button background color
|
194 |
if($this->get15buttonValue($buttonId, 'colors_button', '#ba54ff') !== '#ba54ff' && $this->get15buttonValue($buttonId, 'colors_button', '#ba54ff') !== $defaultButtonColor) {
|
195 |
$hasStyleChanges = true;
|
196 |
+
$button['background_color'] = $this->fixColor($this->get15buttonValue($buttonId, 'colors_button', '#ba54ff'));
|
197 |
}
|
198 |
|
199 |
// Button background hover color
|
200 |
if($this->get15buttonValue($buttonId, 'colors_pushed', '#8d1acc') !== '#8d1acc' && $this->get15buttonValue($buttonId, 'colors_pushed', '#8d1acc') !== $defaultButtonColorHover) {
|
201 |
$hasStyleChanges = true;
|
202 |
+
$button['background_color_interaction'] = $this->fixColor($this->get15buttonValue($buttonId, 'colors_pushed', '#8d1acc'));
|
203 |
}
|
204 |
|
205 |
// Button icon color
|
assets/dashboard.js
CHANGED
@@ -13023,6 +13023,11 @@ class Color_Color
|
|
13023 |
|
13024 |
this.colorView = HTMLElement;
|
13025 |
this.colorPicker = HTMLElement;
|
|
|
|
|
|
|
|
|
|
|
13026 |
}
|
13027 |
|
13028 |
/**
|
@@ -19486,6 +19491,10 @@ class Buttonizer_Buttonizer {
|
|
19486 |
show_desktop: true
|
19487 |
}
|
19488 |
]);
|
|
|
|
|
|
|
|
|
19489 |
return;
|
19490 |
}
|
19491 |
|
13023 |
|
13024 |
this.colorView = HTMLElement;
|
13025 |
this.colorPicker = HTMLElement;
|
13026 |
+
|
13027 |
+
// Fix any color mistakes of Buttonizer 1.0
|
13028 |
+
if(this.currentColor === '#fffff' || this.currentColor === '#FFFFF' || this.currentColor.length <= 6) {
|
13029 |
+
this.currentColor = '#FFFFFF';
|
13030 |
+
}
|
13031 |
}
|
13032 |
|
13033 |
/**
|
19491 |
show_desktop: true
|
19492 |
}
|
19493 |
]);
|
19494 |
+
|
19495 |
+
setTimeout(() => {
|
19496 |
+
this.buttonChanges = true;
|
19497 |
+
}, 1000);
|
19498 |
return;
|
19499 |
}
|
19500 |
|
assets/dashboard.min.js
CHANGED
@@ -63,4 +63,4 @@ function i(t,e){if(t===e)return 0;for(var n=t.length,i=e.length,o=0,r=Math.min(n
|
|
63 |
* tippy.js v4.3.0
|
64 |
* (c) 2017-2019 atomiks
|
65 |
* MIT License
|
66 |
-
*/function g(){return(g=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var y="undefined"!=typeof window&&"undefined"!=typeof document,w=y?navigator.userAgent:"",v=/MSIE |Trident\//.test(w),k=/UCBrowser\//.test(w),E=y&&/iPhone|iPad|iPod/.test(navigator.platform)&&!window.MSStream,C={a11y:!0,allowHTML:!0,animateFill:!0,animation:"shift-away",appendTo:function(){return document.body},aria:"describedby",arrow:!1,arrowType:"sharp",boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,followCursor:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnInit:!1,size:"regular",sticky:!1,target:"",theme:"dark",touch:!0,touchHold:!1,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,wait:null,zIndex:9999},x=["arrow","arrowType","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"],S=y?Element.prototype:{},j=S.matches||S.matchesSelector||S.webkitMatchesSelector||S.mozMatchesSelector||S.msMatchesSelector;function _(t){return[].slice.call(t)}function O(t,e){return L(t,function(t){return j.call(t,e)})}function L(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null}var T={passive:!0},B=4,z="x-placement",A="x-out-of-boundaries",I="tippy-iOS",N="tippy-active",M=".tippy-popper",H=".tippy-tooltip",q=".tippy-content",P=".tippy-backdrop",D=".tippy-arrow",R=".tippy-roundarrow",F=Object.keys(C);function W(t,e){return{}.hasOwnProperty.call(t,e)}function Y(t,e,n){if(Array.isArray(t)){var i=t[e];return null==i?n:i}return t}function U(t,e){var n;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout(function(){return t.apply(i,o)},e)}}function G(t,e){return t&&t.modifiers&&t.modifiers[e]}function Q(t,e){return t.indexOf(e)>-1}function V(t){return t instanceof Element}function X(t){return!(!t||!W(t,"isVirtual"))||V(t)}function $(t,e){return"function"==typeof t?t.apply(null,e):t}function J(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function K(){return document.createElement("div")}function Z(t,e){t.forEach(function(t){t&&(t.style.transitionDuration="".concat(e,"ms"))})}function tt(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function et(t,e){var n=g({},e,{content:$(e.content,[t])},e.ignoreAttributes?{}:function(t){return F.reduce(function(e,n){var i=(t.getAttribute("data-tippy-".concat(n))||"").trim();if(!i)return e;if("content"===n)e[n]=i;else try{e[n]=JSON.parse(i)}catch(t){e[n]=i}return e},{})}(t));return(n.arrow||k)&&(n.animateFill=!1),n}function nt(t,e){Object.keys(t).forEach(function(t){if(!W(e,t))throw new Error("[tippy]: `".concat(t,"` is not a valid option"))})}function it(t,e){t.innerHTML=e instanceof Element?e.innerHTML:e}function ot(t,e){if(e.content instanceof Element)it(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function rt(t){return{tooltip:t.querySelector(H),backdrop:t.querySelector(P),content:t.querySelector(q),arrow:t.querySelector(D)||t.querySelector(R)}}function st(t){t.setAttribute("data-inertia","")}function at(t){var e=K();return"round"===t?(e.className="tippy-roundarrow",it(e,'<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>')):e.className="tippy-arrow",e}function lt(){var t=K();return t.className="tippy-backdrop",t.setAttribute("data-state","hidden"),t}function ct(t,e){t.setAttribute("tabindex","-1"),e.setAttribute("data-interactive","")}function ut(t,e,n){var i=k&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](i,n)}function dt(t){var e=t.getAttribute(z);return e?e.split("-")[0]:""}function pt(t,e,n){n.split(" ").forEach(function(n){t.classList[e](n+"-theme")})}function ht(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.checkHideOnClick,n=t.exclude,i=t.duration;_(document.querySelectorAll(M)).forEach(function(t){var o,r=t._tippy;if(r){var s=!e||!0===r.props.hideOnClick,a=!1;n&&(a=(o=n)._tippy&&!j.call(o,M)?r.reference===n:t===n.popper),s&&!a&&r.hide(i)}})}var mt=!1;function bt(){mt||(mt=!0,E&&document.body.classList.add(I),window.performance&&document.addEventListener("mousemove",gt))}var ft=0;function gt(){var t=performance.now();t-ft<20&&(mt=!1,document.removeEventListener("mousemove",gt),E||document.body.classList.remove(I)),ft=t}function yt(t){if(!(t.target instanceof Element))return ht();var e=O(t.target,M);if(!(e&&e._tippy&&e._tippy.props.interactive)){var n=L(t.target,function(t){return t._tippy&&t._tippy.reference===t});if(n){var i=n._tippy;if(i){var o=Q(i.props.trigger||"","click");if(mt||o)return ht({exclude:n,checkHideOnClick:!0});if(!0!==i.props.hideOnClick||o)return;i.clearDelayTimeouts()}}ht({checkHideOnClick:!0})}}function wt(){var t=document.activeElement;t&&t.blur&&t._tippy&&t.blur()}var vt=1;function kt(t,e){var n,i,o,r,s,a=et(t,e);if(!a.multiple&&t._tippy)return null;var l,c,u,d,p,h,m=!1,b=!1,y=!1,w=[],k=a.interactiveDebounce>0?U(wt,a.interactiveDebounce):wt,E=vt++,S=function(t,e){var n=K();n.className="tippy-popper",n.id="tippy-".concat(t),n.style.zIndex=""+e.zIndex,e.role&&n.setAttribute("role",e.role);var i=K();i.className="tippy-tooltip",i.style.maxWidth=e.maxWidth+("number"==typeof e.maxWidth?"px":""),i.setAttribute("data-size",e.size),i.setAttribute("data-animation",e.animation),i.setAttribute("data-state","hidden"),pt(i,"add",e.theme);var o=K();return o.className="tippy-content",o.setAttribute("data-state","hidden"),e.interactive&&ct(n,i),e.arrow&&i.appendChild(at(e.arrowType)),e.animateFill&&(i.appendChild(lt()),i.setAttribute("data-animatefill","")),e.inertia&&st(i),ot(o,e),i.appendChild(o),n.appendChild(i),n}(E,a),I=rt(S),H={id:E,reference:t,popper:S,popperChildren:I,popperInstance:null,props:a,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},clearDelayTimeouts:Bt,set:zt,setContent:function(t){zt({content:t})},show:At,hide:It,enable:function(){H.state.isEnabled=!0},disable:function(){H.state.isEnabled=!1},destroy:function(e){if(H.state.isDestroyed)return;H.state.isMounted&&It(0);bt(),delete t._tippy,delete D()._tippy;var n=H.props.target;n&&e&&V(t)&&_(t.querySelectorAll(n)).forEach(function(t){t._tippy&&t._tippy.destroy()});H.popperInstance&&H.popperInstance.destroy();H.state.isDestroyed=!0}};return t._tippy=H,S._tippy=H,D()._tippy=H,ht(),a.lazy||Ot(),a.showOnInit&&Lt(),a.a11y&&!a.target&&((h=t)instanceof Element&&(!j.call(h,"a[href],area[href],button,details,input,textarea,select,iframe,[tabindex]")||h.hasAttribute("disabled")))&&D().setAttribute("tabindex","0"),S.addEventListener("mouseenter",function(t){H.props.interactive&&H.state.isVisible&&"mouseenter"===n&&Lt(t,!0)}),S.addEventListener("mouseleave",function(){H.props.interactive&&"mouseenter"===n&&document.addEventListener("mousemove",k)}),H;function q(){document.removeEventListener("mousemove",gt)}function P(){document.body.removeEventListener("mouseleave",Tt),document.removeEventListener("mousemove",k)}function D(){return H.props.triggerTarget||t}function R(){return[H.popperChildren.tooltip,H.popperChildren.backdrop,H.popperChildren.content]}function F(){return H.props.followCursor&&!mt&&"focus"!==n}function X(t,e){var n=H.popperChildren.tooltip;function i(t){t.target===n&&(ut(n,"remove",i),e())}if(0===t)return e();ut(n,"remove",d),ut(n,"add",i),d=i}function it(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];D().addEventListener(t,e,n),w.push({eventType:t,handler:e,options:n})}function ht(){H.props.touchHold&&!H.props.target&&(it("touchstart",yt,T),it("touchend",Et,T)),H.props.trigger.trim().split(" ").forEach(function(t){if("manual"!==t)if(H.props.target)switch(t){case"mouseenter":it("mouseover",xt),it("mouseout",St);break;case"focus":it("focusin",xt),it("focusout",St);break;case"click":it(t,xt)}else switch(it(t,yt),t){case"mouseenter":it("mouseleave",Et);break;case"focus":it(v?"focusout":"blur",Ct)}})}function bt(){w.forEach(function(t){var e=t.eventType,n=t.handler,i=t.options;D().removeEventListener(e,n,i)}),w=[]}function ft(t){return H.props.arrow?p[t]+("round"===H.props.arrowType?18:16):p[t]}function gt(e){var n=i=e,o=n.clientX,r=n.clientY;if(p){var s=t.getBoundingClientRect(),a=H.props.followCursor,l="horizontal"===a,c="vertical"===a,u=dt(S),d=Q(["top","bottom"],u),h=Q(["left","right"],u),m=g({},p);d&&(m.left=ft("left"),m.right=ft("right")),h&&(m.top=ft("top"),m.bottom=ft("bottom"));var b=d?Math.max(m.left,o):o,f=h?Math.max(m.top,r):r;d&&b>m.right&&(b=Math.min(o,window.innerWidth-m.right)),h&&f>m.bottom&&(f=Math.min(r,window.innerHeight-m.bottom)),!L(e.target,function(e){return e===t})&&H.props.interactive||(H.popperInstance.reference=g({},H.popperInstance.reference,{getBoundingClientRect:function(){return{width:0,height:0,top:l?s.top:f,bottom:l?s.bottom:f,left:c?s.left:b,right:c?s.right:b}},clientWidth:0,clientHeight:0}),H.popperInstance.scheduleUpdate()),"initial"===a&&H.state.isVisible&&q()}}function yt(t){H.state.isEnabled&&!jt(t)&&(H.state.isVisible||(n=t.type,t instanceof MouseEvent&&(i=t)),"click"===t.type&&!1!==H.props.hideOnClick&&H.state.isVisible?Tt():Lt(t))}function wt(e){var n=L(e.target,function(t){return t._tippy});O(e.target,M)===S||n===t||function(t,e,n,i){if(!t)return!0;var o=n.clientX,r=n.clientY,s=i.interactiveBorder,a=i.distance,l=e.top-r>("top"===t?s+a:s),c=r-e.bottom>("bottom"===t?s+a:s),u=e.left-o>("left"===t?s+a:s),d=o-e.right>("right"===t?s+a:s);return l||c||u||d}(dt(S),S.getBoundingClientRect(),e,H.props)&&(P(),Tt())}function Et(t){if(!jt(t))return H.props.interactive?(document.body.addEventListener("mouseleave",Tt),void document.addEventListener("mousemove",k)):void Tt()}function Ct(t){t.target===D()&&(H.props.interactive&&t.relatedTarget&&S.contains(t.relatedTarget)||Tt())}function xt(t){O(t.target,H.props.target)&&Lt(t)}function St(t){O(t.target,H.props.target)&&Tt()}function jt(t){var e="ontouchstart"in window,n=Q(t.type,"touch"),i=H.props.touchHold;return e&&mt&&i&&!n||mt&&!i&&n}function _t(){!y&&u&&(y=!0,function(t){t.offsetHeight}(S),u())}function Ot(){var e=H.props.popperOptions,n=H.popperChildren,i=n.tooltip,o=n.arrow,r=G(e,"preventOverflow");function s(t){H.props.flip&&!H.props.flipOnUpdate&&(t.flipped&&(H.popperInstance.options.placement=t.placement),J(H.popperInstance.modifiers,!1)),i.setAttribute(z,t.placement),!1!==t.attributes[A]?i.setAttribute(A,""):i.removeAttribute(A),c&&c!==t.placement&&b&&(i.style.transition="none",requestAnimationFrame(function(){i.style.transition=""})),c=t.placement,b=H.state.isVisible;var e=dt(S),n=i.style;n.top=n.bottom=n.left=n.right="",n[e]=-(H.props.distance-10)+"px";var o=r&&void 0!==r.padding?r.padding:B,s="number"==typeof o,a=g({top:s?o:o.top,bottom:s?o:o.bottom,left:s?o:o.left,right:s?o:o.right},!s&&o);a[e]=s?o+H.props.distance:(o[e]||0)+H.props.distance,H.popperInstance.modifiers.filter(function(t){return"preventOverflow"===t.name})[0].padding=a,p=a}var a=g({eventsEnabled:!1,placement:H.props.placement},e,{modifiers:g({},e?e.modifiers:{},{preventOverflow:g({boundariesElement:H.props.boundary,padding:B},r),arrow:g({element:o,enabled:!!o},G(e,"arrow")),flip:g({enabled:H.props.flip,padding:H.props.distance+B,behavior:H.props.flipBehavior},G(e,"flip")),offset:g({offset:H.props.offset},G(e,"offset"))}),onCreate:function(t){_t(),s(t),e&&e.onCreate&&e.onCreate(t)},onUpdate:function(t){_t(),s(t),e&&e.onUpdate&&e.onUpdate(t)}});H.popperInstance=new f.a(t,S,a)}function Lt(t,n){if(Bt(),!H.state.isVisible){if(H.props.target)return function(t){if(t){var n=O(t.target,H.props.target);n&&!n._tippy&&kt(n,g({},H.props,{content:$(e.content,[n]),appendTo:e.appendTo,target:"",showOnInit:!0}))}}(t);if(m=!0,t&&!n&&H.props.onTrigger(H,t),H.props.wait)return H.props.wait(H,t);F()&&!H.state.isMounted&&(H.popperInstance||Ot(),document.addEventListener("mousemove",gt));var i=Y(H.props.delay,0,C.delay);i?o=setTimeout(function(){At()},i):At()}}function Tt(){if(Bt(),!H.state.isVisible)return q();m=!1;var t=Y(H.props.delay,1,C.delay);t?r=setTimeout(function(){H.state.isVisible&&It()},t):s=requestAnimationFrame(function(){It()})}function Bt(){clearTimeout(o),clearTimeout(r),cancelAnimationFrame(s)}function zt(e){nt(e=e||{},C),bt(),H.props.triggerTarget&&delete H.props.triggerTarget._tippy;var n=H.props,o=et(t,g({},H.props,e,{ignoreAttributes:!0}));o.ignoreAttributes=W(e,"ignoreAttributes")?e.ignoreAttributes||!1:n.ignoreAttributes,H.props=o,D()._tippy=H,ht(),P(),k=U(wt,e.interactiveDebounce||0),function(t,e,n){var i=rt(t),o=i.tooltip,r=i.content,s=i.backdrop,a=i.arrow;t.style.zIndex=""+n.zIndex,o.setAttribute("data-size",n.size),o.setAttribute("data-animation",n.animation),o.style.maxWidth=n.maxWidth+("number"==typeof n.maxWidth?"px":""),n.role?t.setAttribute("role",n.role):t.removeAttribute("role"),e.content!==n.content&&ot(r,n),!e.animateFill&&n.animateFill?(o.appendChild(lt()),o.setAttribute("data-animatefill","")):e.animateFill&&!n.animateFill&&(o.removeChild(s),o.removeAttribute("data-animatefill")),!e.arrow&&n.arrow?o.appendChild(at(n.arrowType)):e.arrow&&!n.arrow&&o.removeChild(a),e.arrow&&n.arrow&&e.arrowType!==n.arrowType&&o.replaceChild(at(n.arrowType),a),!e.interactive&&n.interactive?ct(t,o):e.interactive&&!n.interactive&&function(t,e){t.removeAttribute("tabindex"),e.removeAttribute("data-interactive")}(t,o),!e.inertia&&n.inertia?st(o):e.inertia&&!n.inertia&&function(t){t.removeAttribute("data-inertia")}(o),e.theme!==n.theme&&(pt(o,"remove",e.theme),pt(o,"add",n.theme))}(S,n,o),H.popperChildren=rt(S),H.popperInstance&&(H.popperInstance.update(),x.some(function(t){return W(e,t)&&e[t]!==n[t]})&&(H.popperInstance.destroy(),Ot(),H.state.isVisible&&H.popperInstance.enableEventListeners(),H.props.followCursor&&i&>(i)))}function At(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y(H.props.duration,0,C.duration[1]);if(!H.state.isDestroyed&&H.state.isEnabled&&(!mt||H.props.touch)&&!D().hasAttribute("disabled")&&!1!==H.props.onShow(H)){S.style.visibility="visible",H.state.isVisible=!0,H.props.interactive&&D().classList.add(N);var n=R();Z(n.concat(S),0),u=function(){H.state.isVisible&&(F()||H.popperInstance.update(),H.popperChildren.backdrop&&(H.popperChildren.content.style.transitionDelay=Math.round(e/12)+"ms"),H.props.sticky&&(Z([S],v?0:H.props.updateDuration),function t(){H.popperInstance.scheduleUpdate(),H.state.isMounted?requestAnimationFrame(t):Z([S],0)}()),Z([S],H.props.updateDuration),Z(n,e),tt(n,"visible"),function(t,e){X(t,e)}(e,function(){H.props.aria&&D().setAttribute("aria-".concat(H.props.aria),S.id),H.props.onShown(H),H.state.isShown=!0}))},function(){y=!1;var e=!(F()||"initial"===H.props.followCursor&&mt);H.popperInstance?(F()||(H.popperInstance.scheduleUpdate(),e&&H.popperInstance.enableEventListeners()),J(H.popperInstance.modifiers,H.props.flip)):(Ot(),e&&H.popperInstance.enableEventListeners()),H.popperInstance.reference=t;var n=H.popperChildren.arrow;F()?(n&&(n.style.margin="0"),i&>(i)):n&&(n.style.margin=""),mt&&i&&"initial"===H.props.followCursor&&(gt(i),n&&(n.style.margin="0"));var o=H.props.appendTo;(l="parent"===o?t.parentNode:$(o,[t])).contains(S)||(l.appendChild(S),H.props.onMount(H),H.state.isMounted=!0)}()}}function It(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y(H.props.duration,1,C.duration[1]);if(!H.state.isDestroyed&&H.state.isEnabled&&!1!==H.props.onHide(H)){S.style.visibility="hidden",H.state.isVisible=!1,H.state.isShown=!1,b=!1,H.props.interactive&&D().classList.remove(N);var e=R();Z(e,t),tt(e,"hidden"),function(t,e){X(t,function(){!H.state.isVisible&&l&&l.contains(S)&&e()})}(t,function(){m||q(),H.props.aria&&D().removeAttribute("aria-".concat(H.props.aria)),H.popperInstance.disableEventListeners(),H.popperInstance.options.placement=H.props.placement,l.removeChild(S),H.props.onHidden(H),H.state.isMounted=!1})}}}var Et=!1;function Ct(t,e){nt(e||{},C),Et||(document.addEventListener("click",yt,!0),document.addEventListener("touchstart",bt,T),window.addEventListener("blur",wt),Et=!0);var n,i=g({},C,e);n=t,"[object Object]"!=={}.toString.call(n)||n.addEventListener||function(t){var e={isVirtual:!0,attributes:t.attributes||{},setAttribute:function(e,n){t.attributes[e]=n},getAttribute:function(e){return t.attributes[e]},removeAttribute:function(e){delete t.attributes[e]},hasAttribute:function(e){return e in t.attributes},addEventListener:function(){},removeEventListener:function(){},classList:{classNames:{},add:function(e){t.classList.classNames[e]=!0},remove:function(e){delete t.classList.classNames[e]},contains:function(e){return e in t.classList.classNames}}};for(var n in e)t[n]=e[n]}(t);var o=function(t){if(X(t))return[t];if(t instanceof NodeList)return _(t);if(Array.isArray(t))return t;try{return _(document.querySelectorAll(t))}catch(t){return[]}}(t).reduce(function(t,e){var n=e&&kt(e,i);return n&&t.push(n),t},[]);return X(t)?o[0]:o}Ct.version="4.3.0",Ct.defaults=C,Ct.setDefaults=function(t){Object.keys(t).forEach(function(e){C[e]=t[e]})},Ct.hideAll=ht,Ct.group=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.delay,i=void 0===n?t[0].props.delay:n,o=e.duration,r=void 0===o?0:o,s=!1;function a(t){s=t,d()}function l(e){e._originalProps.onShow(e),t.forEach(function(t){t.set({duration:r}),t.hide()}),a(!0)}function c(t){t._originalProps.onHide(t),a(!1)}function u(t){t._originalProps.onShown(t),t.set({duration:t._originalProps.duration})}function d(){t.forEach(function(t){t.set({onShow:l,onShown:u,onHide:c,delay:s?[0,Array.isArray(i)?i[1]:i]:i,duration:s?r:t._originalProps.duration})})}t.forEach(function(t){t._originalProps?t.set(t._originalProps):t._originalProps=g({},t.props)}),d()},y&&setTimeout(function(){_(document.querySelectorAll("[data-tippy]")).forEach(function(t){var e=t.getAttribute("data-tippy");e&&Ct(t,{content:e})})}),function(t){if(y){var e=document.createElement("style");e.type="text/css",e.textContent=t;var n=document.head,i=n.firstChild;i?n.insertBefore(e,i):n.appendChild(e)}}('.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{transition-timing-function:cubic-bezier(.165,.84,.44,1);max-width:calc(100% - 8px);pointer-events:none;outline:0}.tippy-popper[x-placement^=top] .tippy-backdrop{border-radius:40% 40% 0 0}.tippy-popper[x-placement^=top] .tippy-roundarrow{bottom:-7px;bottom:-6.5px;-webkit-transform-origin:50% 0;transform-origin:50% 0;margin:0 3px}.tippy-popper[x-placement^=top] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.tippy-popper[x-placement^=top] .tippy-arrow{border-top:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;bottom:-7px;margin:0 3px;-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=top] .tippy-backdrop{-webkit-transform-origin:0 25%;transform-origin:0 25%}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-55%);transform:scale(1) translate(-50%,-55%)}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%,-45%);transform:scale(.2) translate(-50%,-45%);opacity:0}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}.tippy-popper[x-placement^=top] [data-animation=perspective]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(-10px) rotateX(0);transform:perspective(700px) translateY(-10px) rotateX(0)}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(60deg);transform:perspective(700px) translateY(0) rotateX(60deg)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=top] [data-animation=scale]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(-10px) scale(1);transform:translateY(-10px) scale(1)}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px) scale(.5);transform:translateY(-10px) scale(.5)}.tippy-popper[x-placement^=bottom] .tippy-backdrop{border-radius:0 0 30% 30%}.tippy-popper[x-placement^=bottom] .tippy-roundarrow{top:-7px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%;margin:0 3px}.tippy-popper[x-placement^=bottom] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(0);transform:rotate(0)}.tippy-popper[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;top:-7px;margin:0 3px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.tippy-popper[x-placement^=bottom] .tippy-backdrop{-webkit-transform-origin:0 -50%;transform-origin:0 -50%}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-45%);transform:scale(1) translate(-50%,-45%)}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%);transform:scale(.2) translate(-50%);opacity:0}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}.tippy-popper[x-placement^=bottom] [data-animation=perspective]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(10px) rotateX(0);transform:perspective(700px) translateY(10px) rotateX(0)}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(-60deg);transform:perspective(700px) translateY(0) rotateX(-60deg)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=bottom] [data-animation=scale]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(10px) scale(1);transform:translateY(10px) scale(1)}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px) scale(.5);transform:translateY(10px) scale(.5)}.tippy-popper[x-placement^=left] .tippy-backdrop{border-radius:50% 0 0 50%}.tippy-popper[x-placement^=left] .tippy-roundarrow{right:-12px;-webkit-transform-origin:33.33333333% 50%;transform-origin:33.33333333% 50%;margin:3px 0}.tippy-popper[x-placement^=left] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.tippy-popper[x-placement^=left] .tippy-arrow{border-left:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;right:-7px;margin:3px 0;-webkit-transform-origin:0 50%;transform-origin:0 50%}.tippy-popper[x-placement^=left] .tippy-backdrop{-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-75%,-50%);transform:scale(.2) translate(-75%,-50%);opacity:0}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}.tippy-popper[x-placement^=left] [data-animation=perspective]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(-10px) rotateY(0);transform:perspective(700px) translateX(-10px) rotateY(0)}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(-60deg);transform:perspective(700px) translateX(0) rotateY(-60deg)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=left] [data-animation=scale]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(-10px) scale(1);transform:translateX(-10px) scale(1)}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px) scale(.5);transform:translateX(-10px) scale(.5)}.tippy-popper[x-placement^=right] .tippy-backdrop{border-radius:0 50% 50% 0}.tippy-popper[x-placement^=right] .tippy-roundarrow{left:-12px;-webkit-transform-origin:66.66666666% 50%;transform-origin:66.66666666% 50%;margin:3px 0}.tippy-popper[x-placement^=right] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.tippy-popper[x-placement^=right] .tippy-arrow{border-right:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;left:-7px;margin:3px 0;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.tippy-popper[x-placement^=right] .tippy-backdrop{-webkit-transform-origin:-50% 0;transform-origin:-50% 0}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-25%,-50%);transform:scale(.2) translate(-25%,-50%);opacity:0}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}.tippy-popper[x-placement^=right] [data-animation=perspective]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(10px) rotateY(0);transform:perspective(700px) translateX(10px) rotateY(0)}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(60deg);transform:perspective(700px) translateX(0) rotateY(60deg)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=right] [data-animation=scale]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(10px) scale(1);transform:translateX(10px) scale(1)}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px) scale(.5);transform:translateX(10px) scale(.5)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;padding:.3125rem .5625rem;line-height:1.4;text-align:center;background-color:#333}.tippy-tooltip[data-size=small]{padding:.1875rem .375rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.375rem .75rem;font-size:1rem}.tippy-tooltip[data-animatefill]{overflow:hidden;background-color:transparent}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow,.tippy-roundarrow{position:absolute;width:0;height:0}.tippy-roundarrow{width:18px;height:7px;fill:#333;pointer-events:none}.tippy-backdrop{position:absolute;background-color:#333;border-radius:50%;width:calc(110% + 2rem);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop:after{content:"";float:left;padding-top:100%}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=visible]{opacity:1}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}');var xt=Ct;var St=class{constructor(t){this.buttonObject=t,this.buttonObject.stylingObject=this,this.groupHolder=null,this.buttonTitle=null,this.manageButtonMenu=null}build(){let t=document.createElement("div");return t.className="button-group-holder",t.appendChild(this.createTitleField()),t.appendChild(this.createButtonMobileDesktop()),t.appendChild(this.createButtonHolderButton()),t.appendChild(this.createQuickMenu()),this.groupHolder=t,t}createButtonHolderButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button";let e=document.createElement("i");return e.className="fas fa-ellipsis-v",t.appendChild(e),t.addEventListener("click",()=>{let t=this.groupHolder.className.indexOf("holder-show-quick-menu");jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),-1===t&&this.groupHolder.classList.add("holder-show-quick-menu")}),t}createQuickMenu(){let t=document.createElement("div");return t.className="group-holder-quick-menu",t.addEventListener("click",()=>{this.groupHolder.classList.remove("holder-show-quick-menu")}),t.appendChild(this.createQuickMenuButton("fas fa-wrench","Button settings",()=>this.revealSettings(),"settings")),t.appendChild(this.createQuickMenuButton("fas fa-cog","Advanced settings",()=>this.buttonObject.windowObject.toggle(),window.Buttonizer.hasPremium()?"":"buttonizer-premium-gray-out")),t.appendChild(this.createQuickMenuButton("fas fa-pencil-alt","Rename button",()=>this.buttonRename(),"")),t.appendChild(this.createQuickMenuButton("far fa-copy","Duplicate button",()=>this.buttonDuplicate(),"")),t.appendChild(this.createQuickMenuButton("far fa-trash-alt","Delete button",()=>this.buttonDelete(),"delete")),this.manageButtonMenu=t,t}createQuickMenuButton(t,e,n,i=""){let o=document.createElement("a");o.href="javascript:void(0)",o.className=i;let r=document.createElement("i");return r.className=t,o.appendChild(r),o.innerHTML+=e,o.addEventListener("click",t=>n(t)),o}createTitleField(){let t=document.createElement("div");t.className+="button-title-holder";let e=document.createElement("input");e.type="text",e.className="group-title",e.value=this.buttonObject.data.name,e.setAttribute("readonly",""),e.id="buttonizer-button-title";let n=document.createElement("a");return n.href="javascript:void(0)",n.className="group-rename",n.innerHTML="<i class='fa fa-pencil-alt'></i>",e.addEventListener("change",()=>this.updateTitle()),e.addEventListener("keyup",t=>{13===t.keyCode?this.updateTitle():27===t.keyCode&&(e.value=this.buttonObject.data.name,e.setAttribute("readonly",""))}),e.addEventListener("click",t=>{jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),t.isTrusted&&e.hasAttribute("readonly")&&this.revealSettings()}),this.buttonTitle=e,t.appendChild(e),t.appendChild(n),e}updateTitle(){this.buttonObject.data.name=this.buttonTitle.value,window.Buttonizer.buttonChanges=!0,this.buttonTitle.setAttribute("readonly","")}buttonRename(){this.buttonTitle.hasAttribute("readonly")&&(this.buttonTitle.removeAttribute("readonly"),this.buttonTitle.focus())}buttonDelete(){1!==this.buttonObject.groupObject.getButtonsAlive()?new r({title:"Remove button",content:"<p>Are you very sure you want to remove this button called '"+this.buttonObject.data.name+"'?</p>",onConfirm:()=>{this.buttonObject.removeButton()},buttons:[{text:"Never mind",close:!0,focus:!0},{text:"Remove",confirm:!0}]}):new r({title:"Warning",content:"<p>You cannot remove this button because this the only button left in the group.</p><p>Please remove the group if you do not use it anymore.</p>",buttons:[{text:"Dismiss",close:!0,focus:!0,confirm:!0}]})}buttonDuplicate(){let t=new RegExp(this.buttonObject.data.name+" - Copy \\([0-9]+\\)"),e=this.buttonObject.data.name+" - Copy";for(let n=0;n<this.buttonObject.groupObject.buttons.length;n++)if(this.buttonObject.groupObject.buttons[n].data.name.match(t)){let i=this.buttonObject.groupObject.buttons[n].data.name.match(t).toString().match(/- Copy \([0-9]+\)/).toString(),o=parseInt(i.replace(/\D/g,""));e=this.buttonObject.data.name+` - Copy (${o+1})`}else this.buttonObject.groupObject.buttons[n].data.name!==e||this.buttonObject.groupObject.buttons[n].data.name.match(t)||(e+=" (2)");let n={};for(let t in this.buttonObject.data)n[t]=this.buttonObject.data[t];n.name=e,new be(this.buttonObject.groupObject,n),window.Buttonizer.buttonChanges=!0}createButtonMobileDesktop(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="mobile-desktop",t.innerHTML=" ";let e=document.createElement("i");e.className="mobile-preview",e.innerHTML='<i class="fa fa-mobile-alt"></i>';let n=document.createElement("i");n.className="desktop-preview",n.innerHTML='<i class="fa fa-desktop"></i>',"true"!==this.buttonObject.data.show_mobile&&void 0!==this.buttonObject.data.show_mobile||(e.className+=" selected"),"true"!==this.buttonObject.data.show_desktop&&void 0!==this.buttonObject.data.show_desktop||(n.className+=" selected");let i=document.createElement("div");return i.className="new-button-visibility",i.appendChild(this.createMobile(e)),i.appendChild(this.createDesktop(n)),t.appendChild(i),t.appendChild(e),t.appendChild(n),t}createMobile(t){let e=document.createElement("a");e.href="javascript:void(0)",e.className="visibility-deskmobi";let n=document.createElement("i");return n.className="fa fa-mobile-alt",e.appendChild(n),this.buttonObject.registerUI("show_mobile",{update:n=>{!0===n||"true"===n?(e.classList.add("selected"),t.classList.add("selected")):(e.classList.remove("selected"),t.classList.remove("selected"))}}),this.buttonObject.getUI("show_mobile").forEach(t=>t.update(this.buttonObject.get("show_mobile"))),e.addEventListener("click",()=>{let t=this.buttonObject.get("show_mobile",!0);this.buttonObject.set("show_mobile",!(!0===t||"true"===t))}),e}createDesktop(t){let e=document.createElement("a");e.href="javascript:void(0)",e.className="visibility-deskmobi";let n=document.createElement("i");return n.className="fa fa-desktop",e.appendChild(n),this.buttonObject.registerUI("show_desktop",{update:n=>{!0===n||"true"===n?(e.classList.add("selected"),t.classList.add("selected")):(e.classList.remove("selected"),t.classList.remove("selected"))}}),this.buttonObject.getUI("show_desktop").forEach(t=>t.update(this.buttonObject.get("show_desktop"))),e.addEventListener("click",()=>{let t=this.buttonObject.get("show_desktop",!0);this.buttonObject.set("show_desktop",!(!0===t||"true"===t))}),e}revealSettings(){this.buttonObject.revealSettings()}};class jt{constructor(t,e,n){this.title=t,this.settingHolderContent=e,this.className=void 0!==n&&n}build(){let t=document.createElement("div");t.className="buttonizer-setting-row "+(!1===this.className?"":this.className),t.style.marginTop="10px";let e=document.createElement("div");e.className="buttonizer-setting-row-c1",e.innerHTML=this.title;let n=document.createElement("div");return n.className="buttonizer-setting-row-c2",n.appendChild(this.settingHolderContent),t.appendChild(e),t.appendChild(n),t}}class _t{constructor(t){this.buttonAction=t}build(){let t=this.buttonAction.inputText();return t.placeholder="https://www.domain.ltd/page",t.addEventListener("keyup",()=>this.change(t.value)),""!==this.buttonAction.value&&(t.value=this.buttonAction.value),t}change(t){this.valid(t)&&this.buttonAction.removeError(),this.buttonAction.updateButtonActionValue(t)}valid(t){let e=!1;return/(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/.test(t)||"?"===t.substring(0,1)||"#"===t.substring(0,1)?-1===t.indexOf("https://")&&"#"!==t.substring(0,1)&&(e='<p><b>Insecure URL:</b> Sorry to interupt, but we advice you to choose HTTPS for your URLS as this is a safer way to transport data.</p><p><a href="https://community.buttonizer.pro/d/19" target="_blank" style="text-decoration: none;">More info »</a><br /><br /><a href="" style="text-decoration: none;"><small>Do not show this message again.</small></a></p>'):e="<p>This looks like an invalid URL. The button may not work as expected.</p><p>Do you miss <b>http://</b> or <b>https://</b>? A space somewhere on the wrong place?</p>",!1===e||(this.buttonAction.addError(e),!1)}}class Ot{constructor(t){this.buttonAction=t}build(){let t=this.buttonAction.inputText();return t.placeholder="(000) 123 456 78",t.addEventListener("keyup",()=>this.change(t.value)),""!==this.buttonAction.value&&(t.value=this.buttonAction.value),t}change(t){this.valid(t)&&this.buttonAction.removeError(),this.buttonAction.updateButtonActionValue(t)}valid(t){let e=!1;return t=(t=t.replace("+","")).replace(" ",""),/^(?=.*\d)[\d ]+$/.test(t)||(e="<p>Invalid phone number. Please use only the number format. Omit any zeroes, brackets or dashes when adding the phone number in international format.</p>"),!1===e||(this.buttonAction.addError(e),!1)}}class Lt{constructor(t){this.buttonAction=t}build(){let t=this.buttonAction.inputText();return t.placeholder="account@domain.tld",t.addEventListener("keyup",()=>this.change(t.value)),""!==this.buttonAction.value&&(t.value=this.buttonAction.value),t}change(t){this.valid(t)&&this.buttonAction.removeError(),this.buttonAction.updateButtonActionValue(t)}valid(t){let e=!1;return t=(t=t.replace("+","")).replace(" ",""),/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,10})+$/.test(t)||(e="<p>Invalid email address.</p>"),!1===e||(this.buttonAction.addError(e),!1)}}n(6);class Tt{constructor(t){this.buttonAction=t}build(){let t=document.createElement("select");return t.className="buttonizer-select-action",t.appendChild(this.add("facebook","Share on Facebook")),t.appendChild(this.add("twitter","Share on Twitter")),t.appendChild(this.add("whatsapp","Share on Whatsapp")),t.appendChild(this.add("linkedin","Share on LinkedIn")),t.appendChild(this.add("pinterest","Share on Pinterest")),t.appendChild(this.add("mail","Share via email")),t.addEventListener("change",()=>{this.buttonAction.updateButtonActionValue(t.value)}),t}add(t,e){let n=document.createElement("option");return n.text=e,t===this.buttonAction.value&&(n.selected=!0),n.value=t,n}}class Bt{constructor(t){this.element=document.createElement("div"),this.errorElement=document.createElement("div"),this.buttonSettingsObject=t,this.dropdown=null,this.value=void 0!==this.buttonSettingsObject.buttonObject.data.action?this.buttonSettingsObject.buttonObject.data.action:""}build(){this.element.style.marginTop="10px",this.dropdown=document.createElement("select"),this.dropdown.style.width="199px",this.dropdown.className="buttonizer-select-action",this.dropdown.appendChild(this.add("url","Website URL")),this.dropdown.appendChild(this.add("phone","Phone number")),this.dropdown.appendChild(this.add("mail","Mail")),this.dropdown.appendChild(this.add("backtotop","Back to top")),this.dropdown.appendChild(this.add("gobackpage","Go back one page")),this.dropdown.appendChild(this.add("socialsharing","Social Sharing")),this.dropdown.appendChild(this.add("whatsapp","Open whatsapp (phone number)")),this.dropdown.appendChild(this.add("javascript_pro","Javascript function")),this.dropdown.addEventListener("change",()=>this.update(this.dropdown.value));let t=document.createElement("div");return xt(t.appendChild(new jt("<label for='label-always-open'>Button Action</label>",this.dropdown).build()).firstChild.firstChild,{content:"Choose the click action that you want this button to make",animation:"shift-away",arrow:!0,hideOnClick:!1}),t.appendChild(this.element),t.appendChild(this.errorElement),this.changeForm(this.buttonSettingsObject.buttonObject.data.type),t}add(t,e){let n=document.createElement("option");return n.text=e,t===this.buttonSettingsObject.buttonObject.data.type&&(n.selected=!0),-1===t.indexOf("pro")||window.Buttonizer.hasPremium()?n.value=t:(n.disabled=!0,n.text+=" (PRO ONLY)"),n}update(t,e=!1){if("javascript_pro"===this.buttonSettingsObject.buttonObject.data.type&&"javascript_pro"!==t){if(!e)return void new r({title:"<i class='fas fa-exclamation window-icon'></i> Warning! Hold on!",content:"<p>You are changing this button action from custom javascript to another action. Your javascript changes will be lost.</p><p>Are you sure you want to proceed?</p>",class:"warning-red",buttons:[{text:"Yes, I am sure",close:!0,confirm:!0},{text:"Cancel",close:!0,focus:!0,cancel:!0}],onConfirm:()=>{this.value="",this.update(t,!0)},onCancel:()=>{this.buttonSettingsObject.buttonObject.data.type="javascript_pro",jQuery(this.dropdown).val("javascript_pro")}})}else"socialsharing"===t?this.buttonSettingsObject.buttonObject.data.action="facebook":"socialsharing"===this.buttonSettingsObject.buttonObject.data.type&&(this.value="");this.buttonSettingsObject.buttonObject.data.type=t,window.Buttonizer.buttonChanges=!0,this.removeError(),this.changeForm(t)}updateButtonActionValue(t){this.buttonSettingsObject.buttonObject.data.action=t,window.Buttonizer.buttonChanges=!0,this.value=t}changeForm(t){this.element.innerHTML="";let e=new u({state:void 0===typeof this.buttonSettingsObject.buttonObject.data.action_new_tab?"false":this.buttonSettingsObject.buttonObject.data.action_new_tab});if(e.onToggle(t=>{this.buttonSettingsObject.buttonObject.data.action_new_tab=t,window.Buttonizer.buttonChanges=!0}),"phone"===t)this.element.appendChild(new Ot(this).build());else if("mail"===t)this.element.appendChild(new Lt(this).build());else if("whatsapp_pro"===t||"whatsapp"===t){this.element.appendChild(new Ot(this).build());let t=document.createElement("div");t.innerHTML="",this.element.appendChild(t)}else if("socialsharing"===t)this.element.appendChild(new Tt(this).build());else{if("backtotop"===t||"gobackpage"===t)return;this.element.appendChild(new _t(this).build()),xt(this.element.appendChild(new jt("<label for='label-always-open'>Open new tab:</label>",e.build(),"is-boolean-only").build()).firstChild.firstChild,{content:"When the button is clicked, open in new tab",animation:"shift-away",arrow:!0,hideOnClick:!1})}}inputText(){let t=document.createElement("input");return t.type="text",t.style.display="block",t.style.width="100%",t.className="buttonizer-input-action",t}addError(t){this.errorElement.innerHTML="";let e=document.createElement("div");e.innerHTML=t,e.style.border="1px solid rgb(170, 44, 44)",e.style.background="rgb(255, 238, 236)",e.style.color="#ff0000",e.style.marginTop="10px",e.style.padding="9px 15px",this.errorElement.appendChild(e)}removeError(){this.errorElement.innerHTML=""}}class zt{constructor(t){this.parentObject=void 0!==t.parentObject?t.parentObject:null,this.rowName=void 0!==t.rowName?t.rowName:null,this.title=void 0!==t.title?t.title:"",this.description=void 0!==t.description?t.description:null,this.wrap=void 0!==t.wrap&&t.wrap,this.content=void 0!==t.content?t.content:[],this.className=void 0!==t.class?t.class:[],this.customBuild=void 0!==t.useCustomBuild&&t.useCustomBuild,this.hidden=void 0!==t.hidden&&t.hidden,this.element=document.createElement("div"),null!==this.parentObject?null!==this.rowName&&this.parentObject.registerUI(this.rowName+"-container",this):null!==this.rowName&&null===this.parentObject&&console.error("Row name '"+this.rowName+"' is set, but no parent has been set")}build(){this.element.className="buttonizer-setting-row "+(!1===this.className?"":this.className),this.element.style.marginTop="10px",this.hidden&&(this.element.style.display="none");let t=document.createElement("div");t.className="buttonizer-setting-row-c1";let e=document.createElement("label");e.innerHTML=this.title,null!==this.description&&xt(e,{content:this.description,animation:"shift-away",arrow:!0,hideOnClick:!1}),t.appendChild(e);let n=document.createElement("div");n.className="buttonizer-setting-row-c2";for(const t in this.content)n.appendChild(this.customBuild?this.content[t]():this.content[t].build());return this.wrap&&(n.style["flex-wrap"]="wrap"),this.element.appendChild(t),this.element.appendChild(n),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display=""}}class At{constructor(t){this.parent=t.parentObject,this.element=document.createElement("div"),this.dataEntry=t.dataEntry,this.default=void 0===t.default?"":t.default,this.callback=void 0===t.callback?()=>{}:t.callback,this.onClick=void 0===t.onClick?null:t.onClick,this.input=HTMLElement,this.onlyNumbers=void 0!==t.onlyNumbers&&t.onlyNumbers,this.parent.registerUI(this.dataEntry,this),this.placeholder=void 0===t.placeholder?"":t.placeholder,this.title=void 0===t.title?"":t.title,this.fieldWidth=void 0===t.width?"default":t.width,this.hidden=void 0!==t.hidden&&t.hidden}build(){this.element=document.createElement("div"),this.element.className="buttonizer-input-container is-textfield input-field-width-"+this.fieldWidth,this.element.style.marginRight="7px";let t=document.createElement("div");t.className="buttonizer-input-item";let e=document.createElement("input");e.type="text",e.value=this.parent.get(this.dataEntry,this.default),this.onlyNumbers&&e.addEventListener("keyup",t=>{(isNaN(e.value)||e.value<0)&&(e.value=this.default,new r({title:"Only numbers",content:"<p>For this input, only positive numbers are allowed.</p>",buttons:[{text:"Close",close:!0}]}))}),null!==this.onClick&&e.addEventListener("click",t=>this.onClick(t,e)),e.addEventListener("change",()=>{this.onlyNumbers&&(isNaN(e.value)||e.value<0)&&(e.value=this.default),this.parent.set(this.dataEntry,e.value)}),""!==this.placeholder&&e.setAttribute("placeholder",this.placeholder),t.appendChild(e),this.element.appendChild(t);let n=document.createElement("div");return n.className="buttonizer-input-info",n.innerHTML=this.title,this.element.appendChild(n),this.input=e,this.hidden&&this.hide(),""!==this.title?this.element:(this.input.className="buttonizer-input-only",this.input)}hide(){this.element.style.display="none",this.input.style.display="none"}show(){this.element.style.display="",this.input.style.display=""}update(t){this.input.value=t,this.callback(t)}}class It{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("a"),this.dataEntry=t.dataEntry,this.state=this.parentObject.get(this.dataEntry,t.default),this.parentObject.registerUI(this.dataEntry,this),this.disabled=void 0!==t.disabled&&t.disabled,this.visible=void 0===t.visible||t.visible,this.callback=void 0!==t.callback?t.callback:t=>{}}build(){this.element.href="javascript:void(0)",this.element.className="buttonizer-boolean "+(!0===this.state||"true"===this.state?"boolean-selected":""),this.element.addEventListener("click",()=>this.toggle());let t=document.createElement("div");return t.className="buttonizer-boolean-circle",this.element.appendChild(t),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}toggle(){this.disabled?console.log("Sorry, you're not able to edit this"):(!0===this.state||"true"===this.state?this.state=!1:this.state=!0,this.parentObject.set(this.dataEntry,this.state),void 0!==this.callback&&this.callback(this.state))}update(t){this.state=t,!0===t||"true"===t?this.element.classList.contains("boolean-selected")||this.element.classList.add("boolean-selected"):this.element.classList.contains("boolean-selected")&&this.element.classList.remove("boolean-selected"),this.callback(t)}}class Nt extends zt{constructor(t){super({title:"Label",description:"Change the label of this button",wrap:!0,class:"form-has-extra-fields",content:[new At({parentObject:t,dataEntry:"label",default:t.get("label"),placeholder:"Label text"})]})}}var Mt=n(5),Ht=n(2);const qt="url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\")",Pt=360,Dt="keydown",Rt="mousedown",Ft="focusin";function Wt(t,e){return(e||document).querySelector(t)}function Yt(t,e,n){t.addEventListener(e,n,!1)}function Ut(t){t.preventDefault(),t.stopPropagation()}function Gt(t,e,n,i){Yt(t,Dt,function(t){e.indexOf(t.key)>=0&&(i&&Ut(t),n(t))})}const Qt=document.createElement("style");Qt.textContent=".picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.layout_default.picker_wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:'';display:block;width:100%;height:0;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.layout_default .picker_sl::before{content:'';display:block;padding-bottom:100%}.layout_default .picker_editor{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;width:6rem}.layout_default .picker_editor input{width:calc(100% + 2px);height:calc(100% + 2px)}.layout_default .picker_sample{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.layout_default .picker_done{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.picker_wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;background:#f2f2f2;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{margin:-1px}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid white;border-radius:100%;-webkit-box-shadow:0 0 3px 1px #67b9ff;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:-webkit-gradient(linear, left top, right top, from(red), color-stop(yellow), color-stop(lime), color-stop(cyan), color-stop(blue), color-stop(magenta), to(red));background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver}.picker_sl{position:relative;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver;background-image:-webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, rgba(255,255,255,0))),-webkit-gradient(linear, left bottom, left top, from(black), color-stop(50%, rgba(0,0,0,0))),-webkit-gradient(linear, left top, right top, from(gray), to(rgba(128,128,128,0)));background-image:linear-gradient(180deg, white, rgba(255,255,255,0) 50%),linear-gradient(0deg, black, rgba(0,0,0,0) 50%),linear-gradient(90deg, gray, rgba(128,128,128,0))}.picker_alpha,.picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:monospace;padding:.1em .2em}.picker_sample::before{content:'';position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_done button{-webkit-box-sizing:border-box;box-sizing:border-box;padding:.2em .5em;cursor:pointer}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;-webkit-box-shadow:0 0 10px 1px rgba(0,0,0,0.4);box-shadow:0 0 10px 1px rgba(0,0,0,0.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:\"\";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;-webkit-box-shadow:none;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}",document.documentElement.firstElementChild.appendChild(Qt);var Vt=class{constructor(t){this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex"},this._openProxy=(t=>this.openHandler(t)),this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}setOptions(t){if(!t)return;const e=this.settings;if(t instanceof HTMLElement)e.parent=t;else{e.parent&&t.parent&&e.parent!==t.parent&&(e.parent.removeEventListener("click",this._openProxy,!1),this._popupInited=!1),function(t,e,n){for(const i in t)n&&n.indexOf(i)>=0||(e[i]=t[i])}(t,e),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);const n=t.color||t.colour;n&&this._setColor(n)}const n=e.parent;n&&e.popup&&!this._popupInited?(Yt(n,"click",this._openProxy),Gt(n,[" ","Spacebar","Enter"],this._openProxy),this._popupInited=!0):t.parent&&!e.popup&&this.show()}openHandler(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";const e=t&&t.type===Dt?this._domEdit:this.domElement;setTimeout(()=>e.focus(),100),this.onOpen&&this.onOpen(this.colour)}}closeHandler(t){const e=t&&t.type;let n=!1;t?("click"!==e&&e!==Dt||Ut(t),n=!0):n=!0,n&&this.hide()&&(this.settings.parent.style.pointerEvents="",e!==Rt&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}movePopup(t,e){this.closeHandler(),this.setOptions(t),e&&this.openHandler()}setColor(t,e){this._setColor(t,{silent:e})}_setColor(t,e){if("string"==typeof t&&(t=t.trim()),!t)return;let n;e=e||{};try{n=new Mt(t)}catch(t){if(e.failSilently)return;throw t}if(!this.settings.alpha){const t=n.hsla;t[3]=1,n.hsla=t}this.colour=this.color=n,this._setHSLA(null,null,null,null,e)}setColour(t,e){this.setColor(t,e)}show(){if(!this.settings.parent)return!1;if(this.domElement){const t=this._toggleDOM(!0);return this._setPosition(),t}const t=function(t){const e=document.createElement("div");return e.innerHTML=t,e.firstElementChild}(this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div></div>');return this.domElement=t,this._domH=Wt(".picker_hue",t),this._domSL=Wt(".picker_sl",t),this._domA=Wt(".picker_alpha",t),this._domEdit=Wt(".picker_editor input",t),this._domSample=Wt(".picker_sample",t),this._domOkay=Wt(".picker_done button",t),t.classList.add("layout_"+this.settings.layout),this.settings.alpha||t.classList.add("no_alpha"),this.settings.editor||t.classList.add("no_editor"),this._ifPopup(()=>t.classList.add("popup")),this._setPosition(),this.colour?this._updateUI():this._setColor("#0cf"),this._bindEvents(),!0}hide(){return this._toggleDOM(!1)}_bindEvents(){const t=this,e=this.domElement;function n(t,e){function n(n,i){const o=i[0]/t.clientWidth,r=i[1]/t.clientHeight;e(o,r)}return{container:t,dragOutside:!1,callback:n,callbackDragStart:n,propagateEvents:!0}}Yt(e,"click",t=>t.preventDefault()),Ht(n(this._domH,(e,n)=>t._setHSLA(e))),Ht(n(this._domSL,(e,n)=>t._setHSLA(null,e,1-n))),this.settings.alpha&&Ht(n(this._domA,(e,n)=>t._setHSLA(null,null,null,1-n)));const i=this._domEdit;Yt(i,"input",function(e){t._setColor(this.value,{fromEditor:!0,failSilently:!0})}),Yt(i,"focus",function(t){const e=this;e.selectionStart===e.selectionEnd&&e.select()});const o=t=>{this._ifPopup(()=>this.closeHandler(t)),this.onDone&&this.onDone(this.colour)};this._ifPopup(()=>{const t=t=>this.closeHandler(t);Yt(window,Rt,t),Yt(window,Ft,t),Gt(e,["Esc","Escape"],t),Yt(e,Rt,Ut),Yt(e,Ft,Ut),Yt(this._domEdit,Rt,t=>this._domEdit.focus())}),Yt(this._domOkay,"click",o),Gt(e,["Enter"],o)}_setPosition(){const t=this.settings.parent,e=this.domElement;t!==e.parentNode&&t.appendChild(e),this._ifPopup(n=>{"static"===getComputedStyle(t).position&&(t.style.position="relative");const i=!0===n?"popup_right":"popup_"+n;["popup_top","popup_bottom","popup_left","popup_right"].forEach(t=>{t===i?e.classList.add(t):e.classList.remove(t)}),e.classList.add(i)})}_setHSLA(t,e,n,i,o){o=o||{};const r=this.colour,s=r.hsla;[t,e,n,i].forEach((t,e)=>{(t||0===t)&&(s[e]=t)}),r.hsla=s,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(r)}_updateUI(t){if(!this.domElement)return;t=t||{};const e=this.colour,n=e.hsla,i=`hsl(${n[0]*Pt}, 100%, 50%)`,o=e.hslString,r=e.hslaString,s=this._domH,a=this._domSL,l=this._domA,c=Wt(".picker_selector",s),u=Wt(".picker_selector",a),d=Wt(".picker_selector",l);function p(t,e,n){e.style.left=100*n+"%"}function h(t,e,n){e.style.top=100*n+"%"}p(0,c,n[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,p(0,u,n[1]),h(0,u,1-n[2]),a.style.color=o,h(0,d,1-n[3]);const m=o,b=m.replace("hsl","hsla").replace(")",", 0)"),f=`linear-gradient(${[m,b]})`;if(this._domA.style.backgroundImage=f+", "+qt,!t.fromEditor){const t=this.settings.editorFormat,n=this.settings.alpha;let i;switch(t){case"rgb":i=e.printRGB(n);break;case"hsl":i=e.printHSL(n);break;default:i=e.printHex(n)}this._domEdit.value=i}this._domSample.style.color=r}_ifPopup(t,e){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):e&&e()}_toggleDOM(t){const e=this.domElement;if(!e)return!1;const n=t?"":"none",i=e.style.display!==n;return i&&(e.style.display=n),i}static get StyleElement(){return Qt}};class Xt{constructor(t){this.parent=t.parentObject,this.element=document.createElement("div"),this.dataEntry=t.dataEntry,this.default=void 0===t.default?"":t.default,this.callback=void 0===t.callback?()=>{}:t.callback,this.style=void 0===t.style?{}:t.style,this.parent.registerUI(this.dataEntry,this),this.currentColor=this.parent.get(this.dataEntry,this.default),this.title=void 0===t.title?"Color":t.title,this.timer=setTimeout(()=>{},0),this.opened=!1,this.element=HTMLElement,this.colorView=HTMLElement,this.colorPicker=HTMLElement}build(){this.buildVisiblePicker();let t=new Vt({parent:this.element,popup:"bottom",alpha:!0,color:this.currentColor,onChange:t=>{this.currentColor!==t.rgbaString&&(this.currentColor=t.rgbaString,this.parent.set(this.dataEntry,t.rgbaString))}});return this.element.addEventListener("click",()=>{t.show()}),this.colorPicker=t,this.element}buildVisiblePicker(){this.element=document.createElement("div"),this.element.className="buttonizer-input-container is-color-picker",this.element.style.marginRight="7px";let t=document.createElement("div");t.className="buttonizer-input-item",this.colorView=document.createElement("div"),this.colorView.style.background=this.currentColor,this.colorView.className="colored-background",t.appendChild(this.colorView),this.element.appendChild(t);let e=document.createElement("div");e.className="buttonizer-input-info",e.innerHTML=this.title,this.element.appendChild(e)}onSelect(t){this.callback=t}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}update(t){clearTimeout(this.timer),this.colorView.style.background=t,this.colorPicker.color=t,this.timer=setTimeout(()=>this.callback(t),1500)}}class $t extends zt{constructor(t){super({title:"Icon color",description:"Change the icon color of this button",rowName:"icon-color",parentObject:t,hidden:window.Buttonizer.hasPremium()&&"true"==t.get("icon_is_image"),content:[new Xt({parentObject:t,dataEntry:"icon_color",title:"Base",default:"#FFFFFF",width:"space"}),new Xt({parentObject:t,dataEntry:"icon_color_interaction",title:"Interaction",default:"#FFFFFF",width:"space"})]})}}class Jt extends zt{constructor(t){super({title:"Icon size",description:"Change the icon size of this button",rowName:"icon-size",parentObject:t,hidden:window.Buttonizer.hasPremium()&&"true"==t.get("icon_is_image"),content:[new At({title:"px",placeholder:"button"===t.type?16:25,width:"space",dataEntry:"icon_size",parentObject:t,onlyNumbers:!0,default:"button"===t.type?16:25})]})}}class Kt extends zt{constructor(t){super({title:"Border radius",description:"Change the roundness of this button group",hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"border-radius",parentObject:t,content:[new At({parentObject:t,dataEntry:"border_radius",default:"",placeholder:50,title:"%",width:"space",onlyNumbers:!0})]})}}class Zt extends zt{constructor(t){super({title:"Font size &<br>border radius",description:"Change the font size and border radius of the label for this button group",content:[new At({title:"px",placeholder:12,width:"space",dataEntry:"label_font_size",parentObject:t,onlyNumbers:!0}),new At({title:"px",placeholder:12,width:"space",dataEntry:"label_border_radius",parentObject:t,onlyNumbers:!0})]})}}class te{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("a"),this.dataEntry=t.dataEntry,this.default=t.default,this.callback=t.callback,this.type=t.type,this.data=t,this.title=t.title,this.state=this.parentObject.get(this.dataEntry,this.default),this.parentObject.registerUI(this.dataEntry,this),this.disabled=void 0!==t.disabled&&t.disabled,this.visible=void 0===t.visible||t.visible}build(){this.element.href="javascript:void(0)",this.element.className=`buttonizer-checkbox ${"Mobile"===this.title?"mobile-checkbox":"desktop-checkbox"}`;let t=document.createElement("div");t.className="buttonizer-checkbox-box",t.innerHTML="✓",this.element.appendChild(t),this.element.addEventListener("click",()=>this.toggle());let e=document.createElement("div");return e.className="buttonizer-checkbox-text",e.innerHTML=this.title,this.element.appendChild(e),this.update(this.state),this.eventListener(this.type),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}toggle(){this.disabled?console.log("Sorry, you're not able to edit this"):(!0===this.state||"true"===this.state?this.parentObject.set(this.dataEntry,!1):this.parentObject.set(this.dataEntry,!0),"undefined"!=typeof callback&&this.callback(this.state))}update(t){this.state=t,!0===t||"true"===t?this.element.classList.contains("checkbox-selected")||this.element.classList.add("checkbox-selected"):this.element.classList.contains("checkbox-selected")&&this.element.classList.remove("checkbox-selected")}eventListener(t){"button"===t&&this.element.addEventListener("click",()=>{let t=this.parentObject.buttonHTMLObject.querySelector(".mobile-preview"),e=this.parentObject.buttonHTMLObject.querySelector(".fa-mobile-alt").parentElement,n=this.parentObject.buttonHTMLObject.querySelector(".desktop-preview"),i=this.parentObject.buttonHTMLObject.querySelector(".fa-desktop").parentElement;"Mobile"===this.title?t.classList.contains("selected")&&!1===this.state?(t.classList.remove("selected"),e.classList.remove("selected")):t.classList.contains("selected")||!0!==this.state||(t.classList+=" selected",e.classList+=" selected"):"Desktop"===this.title&&(n.classList.contains("selected")&&!1===this.state?(n.classList.remove("selected"),i.classList.remove("selected")):n.classList.contains("selected")||!0!==this.state||(n.classList+=" selected",i.classList+=" selected"))})}}class ee extends zt{constructor(t){super({title:"Show on:",description:"Choose if you want to make this button group visible on desktop and mobile devices",content:[new te({parentObject:t,dataEntry:"show_mobile",title:"Mobile",default:!0,type:"button"===t.type?"button":"group"}),new te({parentObject:t,dataEntry:"show_desktop",title:"Desktop",default:!0,type:"button"===t.type?"button":"group"})]})}}class ne extends zt{constructor(t){super({title:"Button color",description:"This is the color of your button group and also the default color for your buttons within this group.",hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"background-color",parentObject:t,content:[new Xt({parentObject:t,dataEntry:"background_color",title:"Base",default:"#f08419"}),new Xt({parentObject:t,dataEntry:"background_color_interaction",title:"Interaction",default:"#ff9d3c"})]})}}class ie{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("select"),this.dataEntry=t.dataEntry,this.default=t.default,this.callback=t.callback,this.style=t.style,this.list=t.list,this.width=void 0===t.width?"199px":t.width,this.class=void 0===t.class?"buttonizer-select-drawer":t.class,this.parentObject.registerUI(this.dataEntry,this)}build(){this.element.style.width=this.width,this.element.className=this.class,this.element.addEventListener("change",t=>{this.parentObject.set(this.dataEntry,this.element.value)});for(let t in this.list){let e=this.list[t],n=document.createElement("option");n.text=e.text,n.value=e.value,n.selected=void 0!==typeof this.selected&&this.selected===e.value,this.element.appendChild(n)}return this.element.value=this.parentObject.get(this.dataEntry,this.default),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}update(t){this.element.value=t,void 0!==this.callback&&this.callback(t,this)}}class oe extends zt{constructor(t){super({title:'<span class="setting-icon"><i class="fa fa-desktop"></i></span> Visibility',description:"Always show the label, show the label on hover or hide the label on <u>desktop devices</u>",content:[new ie({parentObject:t,dataEntry:"show_label_desktop",default:"always",list:[{value:"always",text:"Always show label"},{value:"hover",text:"Show label on hover"},{value:"hide",text:"Hide label"}]})]})}}class re extends zt{constructor(t){super({title:'<span class="setting-icon"><i class="fa fa-mobile-alt"></i></span> Visibility',description:"Always show the label, show the label on hover or hide the label on <u>mobile devices</u>",content:[new ie({parentObject:t,dataEntry:"show_label_mobile",default:"always",list:[{value:"always",text:"Always show label"},{value:"hide",text:"Hide label"}]})]})}}class se extends zt{constructor(t){super({title:"Label color",description:"Change the text and background color of the label for this button or group.",hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"label-color",parentObject:t,content:[new Xt({parentObject:t,dataEntry:"label_color",title:"Text",default:"#FFFFFF"}),new Xt({parentObject:t,dataEntry:"label_background_color",title:"Background",default:"#4E4C4C"})]})}}class ae extends zt{constructor(t){super({title:"Icon",description:"Choose an icon from an icon library",rowName:"icon",parentObject:t,hidden:window.Buttonizer.hasPremium()&&"true"==t.get("icon_is_image"),content:[new At({parentObject:t,dataEntry:"icon",default:"fa fa-user",onClick:(t,e)=>{window.Buttonizer.iconSelector.open(e)}})]})}}class le{constructor(t){this.parentObject=t.parentObject,this.button=null,this.selectedImage=null,this.dataEntry=void 0===t.dataEntry?null:t.dataEntry,this.default=void 0===t.default?"":t.default,this.value=t.parentObject.get(t.dataEntry,""),this.callback=t.callback,this.parentObject.registerUI(this.dataEntry,this)}build(){return this.buildFree()}buildFree(){let t=document.createElement("a");return t.className="button",t.href="javascript:void(0)",t.innerHTML='<i class="fa fa-image"></i> Select image <small>(premium)</small>',t.addEventListener("click",()=>{window.Buttonizer.showPremiumPopup("You can select images and set them as icon or as button background image.")}),t}}class ce extends zt{constructor(t){super({title:"Background image",description:"Upload an image if you want an image as background instead of a color. Recommended aspect ratio: square (1:1)",hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"background-image",parentObject:t,content:[new le({parentObject:t,dataEntry:"background_image"})]})}}class ue extends zt{constructor(t){super({parentObject:t,title:"Use the same style of main button",description:"This option makes this button use the group's button style",class:"is-boolean-only",rowName:"use_main_button_style",content:[new It({parentObject:t,dataEntry:"use_main_button_style",default:"true",callback:t=>this.update(t)})]}),this.parent=t}update(t){!0===t||"true"===t?(this.parent.getUI("background-color-container").forEach(t=>{t.hide()}),this.parent.getUI("label-color-container").forEach(t=>{t.hide()}),this.parent.getUI("border-radius-container").forEach(t=>{t.hide()}),this.parent.getUI("background-image-container").forEach(t=>{t.hide()})):(this.parent.getUI("background-color-container").forEach(t=>{t.show()}),this.parent.getUI("label-color-container").forEach(t=>{t.show()}),this.parent.getUI("border-radius-container").forEach(t=>{t.show()}),this.parent.getUI("background-image-container").forEach(t=>{t.show()}))}}class de{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("div"),this.dataEntry=void 0===t.dataEntry?null:t.dataEntry,this.default=void 0!==t.default&&t.default,this.state=void 0!==t.state&&"true"==t.state,this.first=void 0===t.first?"First":t.first,this.second=void 0===t.second?"Second":t.second,this.callback=t.callback,null!==this.dataEntry&&this.parentObject.registerUI(this.dataEntry,this)}build(){this.element.className="buttonizer-toggle"+(!0===this.state?" right-selected":" left-selected");let t=document.createElement("a");t.href="javascript:void(0)",t.innerHTML=this.first,t.addEventListener("click",()=>this.toggle()),this.element.appendChild(t);let e=document.createElement("a");return e.href="javascript:void(0)",e.innerHTML=this.second,e.addEventListener("click",()=>this.toggle()),this.element.appendChild(e),this.element}toggle(){null!==this.dataEntry?this.parentObject.set(this.dataEntry,!this.state):this.callback(!1)}update(t){this.state=t,!1===t?(this.element.classList.add("left-selected"),this.element.classList.remove("right-selected")):(this.element.classList.remove("left-selected"),this.element.classList.add("right-selected")),this.callback(t)}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}}class pe extends zt{constructor(t){super({title:"Graphic",description:"Choose whether to use an Icon or an Image as this button's icon",useCustomBuild:!0,content:[()=>this.buildBoolean()]}),this.parent=t}buildBoolean(){return new de({parentObject:this.parent,state:!1,first:"Icon",second:"Image <small>(premium)</small>",callback:()=>{window.Buttonizer.showPremiumPopup("You can select an custom image as icon for your buttons and groups.")}}).build()}}class he extends zt{constructor(t){super({parentObject:t,title:"Position",description:"Change the position of this button group",wrap:!0,class:"form-has-extra-fields",rowName:"position",content:[new ie({parentObject:t,dataEntry:"position",default:"bottomright",callback:t=>this.changePosition(t),list:[{value:"bottomright",text:"Bottom Right"},{value:"bottomleft",text:"Bottom Left"},{value:"topright",text:"Top Right"},{value:"topleft",text:"Top Left"},{value:"advanced",text:"Custom"}]}),new At({parentObject:t,dataEntry:"horizontal",title:"X (%)",width:"space",hidden:"advanced"!==t.get("position"),onlyNumbers:!0}),new At({parentObject:t,dataEntry:"vertical",title:"Y (%)",width:"space",hidden:"advanced"!==t.get("position"),onlyNumbers:!0})]}),this.translatedPositions={topleft:{x:95,y:95},topright:{x:5,y:95},bottomleft:{x:95,y:5},bottomright:{x:5,y:5}},this.parentObject=t}changePosition(t){"advanced"===t?(this.parentObject.getUI("horizontal").forEach(t=>t.show()),this.parentObject.getUI("vertical").forEach(t=>t.show())):(this.parentObject.getUI("horizontal").forEach(t=>t.hide()),this.parentObject.getUI("vertical").forEach(t=>t.hide()),this.parentObject.set("horizontal",this.translatedPositions[t].x),this.parentObject.set("vertical",this.translatedPositions[t].y))}}class me{constructor(t){this.buttonObject=t,this.groupSetting=HTMLElement,this.formElements={useMainButtonStyle:void 0,buttonColor:void 0,borderColor:void 0,borderRadius:void 0,backgroundImage:void 0,buttonIconSelect:void 0,buttonIconColor:void 0,buttonIconSize:void 0,buttonImageSelect:void 0,buttonImageIcon:void 0,buttonImageIconSelect:void 0,imageBorderRadius:void 0,imageSize:void 0,label:void 0,labelColor:void 0,labelFontSizeBorderRadius:void 0,show_label:void 0,showOnOpeningTimes:void 0,buttonCustomClass:void 0}}build(){let t=document.createElement("div");return t.className="button-group-styling",t.style.display="none",this.element=t,this.buildForm(),this.buttonObject.stylingObject=t,this.element}buildForm(){this.element.appendChild(this.generalSetting()),this.element.appendChild(this.buttonStyle()),this.element.appendChild(this.iconStyle()),this.element.appendChild(this.labelStyle()),this.element.appendChild(this.advancedSettings())}advancedSettings(){let t=document.createElement("a");return t.href="javascript:void(0)",t.className="advanced-settings"+(window.Buttonizer.hasPremium()?"":" buttonizer-premium-gray-out"),t.innerHTML="<i></i> Advanced settings"+(window.Buttonizer.hasPremium()?"":" <span class='buttonizer-premium'>PRO</span>"),t.addEventListener("click",()=>{this.buttonObject.windowObject.toggle()}),t}generalSetting(){let t=document.createElement("div");return t.className="style-top",this.groupSetting=document.createElement("div"),this.groupSetting.className="style-group",this.formElements.menuPosition=new he(this.buttonObject.groupObject),this.groupSetting.appendChild(this.formElements.menuPosition.build()),this.formElements.menuPosition.element.style.display="none",t.appendChild(this.groupSetting),this.formElements.buttonAction=new Bt(this),t.appendChild(this.formElements.buttonAction.build()),this.formElements.isMobile=new ee(this.buttonObject),t.appendChild(this.formElements.isMobile.build()),t}buttonStyle(){let t=document.createElement("div");t.className="style-button";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Button style</span>",t.appendChild(e),this.formElements.useMainButtonStyle=new ue(this.buttonObject),t.appendChild(this.formElements.useMainButtonStyle.build()),this.formElements.buttonColor=new ne(this.buttonObject),t.appendChild(this.formElements.buttonColor.build()),this.formElements.labelColor=new se(this.buttonObject),t.appendChild(this.formElements.labelColor.build()),this.formElements.borderRadius=new Kt(this.buttonObject),t.appendChild(this.formElements.borderRadius.build()),this.formElements.backgroundImage=new ce(this.buttonObject),t.appendChild(this.formElements.backgroundImage.build()),t}iconStyle(){let t=document.createElement("div");t.className="style-icon";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Button Icon</span>",t.appendChild(e),this.formElements.buttonIconOrImage=new pe(this.buttonObject),t.appendChild(this.formElements.buttonIconOrImage.build()),this.formElements.buttonIconSelect=new ae(this.buttonObject),t.appendChild(this.formElements.buttonIconSelect.build()),this.formElements.buttonIconColor=new $t(this.buttonObject),t.appendChild(this.formElements.buttonIconColor.build()),this.formElements.buttonIconSize=new Jt(this.buttonObject),t.appendChild(this.formElements.buttonIconSize.build()),t}labelStyle(){let t=document.createElement("div");t.className="style-label";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Label</span>",t.appendChild(e),this.formElements.buttonLabel=new Nt(this.buttonObject),t.appendChild(this.formElements.buttonLabel.build()),this.formElements.show_label=new oe(this.buttonObject),t.appendChild(this.formElements.show_label.build()),this.formElements.show_label_mobile=new re(this.buttonObject),t.appendChild(this.formElements.show_label_mobile.build()),this.formElements.buttonLabelFontSizeBorderRadius=new Zt(this.buttonObject),t.appendChild(this.formElements.buttonLabelFontSizeBorderRadius.build()),t}}var be=class{constructor(t,e){this.type="button",this.groupObject=t,this.alive=!0,this.data=e,this.ui=[],this.buttonName=e.name,this.id=-1,this.settingsOpened=!1,this.buttonHTMLObject=HTMLElement,this.buttonIconObject=HTMLElement,this.buttonTitleObject=HTMLElement,this.windowObject=HTMLElement,this.stylingObject=void 0,this.stylingObject=HTMLElement,this.settingsObject={},this.buildButton(),this.windowObject=new b(this),this.groupObject.registerButton(this)}buildButton(){let t=document.createElement("div");t.className="buttonizer-button-group group-button",t.appendChild(new St(this).build()),this.settingsObject=new me(this),Buttonizer.bar.settingContent.appendChild(this.settingsObject.build());var e=!1,n=!1;const i=xt(t,{content:"You can't drag the only button left in a group!",animation:"shift-away",arrow:!0,hideOnClick:!1,trigger:"manual",onShow:()=>{n=!0,setTimeout(()=>{n=!1,i.hide()},5e3)}});t.addEventListener("mousedown",()=>{n||(e=!0)}),t.addEventListener("mouseout",()=>{e&&null!==jQuery(this.groupObject.groupBody).sortable("option","cancel")&&(e=!1,i.show())}),t.addEventListener("mouseup",()=>{e=!1}),this.buttonHTMLObject=t,this.groupObject.groupBody.appendChild(this.buttonHTMLObject)}removeButton(){this.alive=!1,this.buttonHTMLObject.remove(),window.Buttonizer.buttonChanges=!0,this.groupObject.buttonsAmount<=1&&jQuery(this.groupObject.groupBody).sortable("option","cancel",".group-button"),1===this.groupObject.getButtonsAlive()!==this.groupObject.singleButtonMode&&(this.groupObject.singleButtonMode=1===this.groupObject.getButtonsAlive(),this.groupObject.getButtons()[0].set("icon_size","25"),this.groupObject.groupHolder.setSingleButtonMode())}set(t,e){this.data[t]=e,this.ui[t].forEach(t=>t.update(e)),window.Buttonizer.buttonChanges=!0}get(t,e){return void 0!==this.data[t]?this.data[t]:(this.data[t]=e,window.Buttonizer.buttonChanges=!0,e)}registerUI(t,e){void 0!==this.ui[t]?this.ui[t].push(e):this.ui[t]=[e]}getUI(t){return void 0!==this.ui[t]&&this.ui[t]}revealSettings(){this.buttonHTMLObject.classList.add("opened"),this.stylingObject.style.display="block",Buttonizer.bar.showSettings(this.get("name"),()=>this.closeSettings())}closeSettings(){this.stylingObject.style.display="none",this.buttonHTMLObject.classList.remove("opened")}};var fe=class{constructor(t){this.groupObject=t,this.groupObject.stylingObject=this,this.groupHolder=null,this.titleElement=null,this.arrow=HTMLElement}build(){let t=document.createElement("div");return t.className="button-group-holder",t.appendChild(this.groupArrow()),t.appendChild(this.createTitle()),t.appendChild(this.groupSettingsButton()),t.appendChild(this.createButtonHolderButton()),t.appendChild(this.createQuickMenu()),this.groupHolder=t,t}createButtonHolderButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button";let e=document.createElement("i");return e.className="fas fa-ellipsis-v",t.appendChild(e),t.addEventListener("click",()=>{let t=this.groupHolder.className.indexOf("holder-show-quick-menu");jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),-1===t&&this.groupHolder.classList.add("holder-show-quick-menu")}),t}createQuickMenu(){let t=document.createElement("div");return t.className="group-holder-quick-menu",t.addEventListener("click",()=>{this.groupHolder.classList.remove("holder-show-quick-menu")}),t.appendChild(this.createQuickMenuButton("fas fa-plus","Convert to group",()=>{new be(this.groupObject,{name:"Button 2",show_mobile:"true",show_desktop:"true"}),this.groupObject.getButtons()[0].set("icon_size","16"),jQuery(this.groupObject.groupBody).sortable("option","cancel",null)},"convert-button")),t.appendChild(this.createQuickMenuButton("fas fa-wrench","Settings",()=>this.toggleStyling(),"")),t.appendChild(this.createQuickMenuButton("fas fa-cog","Advanced settings",()=>{this.groupObject.singleButtonMode?this.groupObject.getButtons()[0].windowObject.toggle():this.groupObject.windowObject.toggle()},window.Buttonizer.hasPremium()?"":"buttonizer-premium-gray-out")),t.appendChild(this.createQuickMenuButton("fas fa-pencil-alt","Rename",()=>this.groupRename(),"")),t.appendChild(this.createQuickMenuButton("far fa-trash-alt","Delete",()=>this.groupDelete(),"delete")),t.firstChild.style.display="none",this.quickMenu=t,t}createQuickMenuButton(t,e,n,i=""){let o=document.createElement("a");o.href="javascript:void(0)",o.className=i;let r=document.createElement("i");return r.className=t,o.appendChild(r),o.innerHTML+=e,o.addEventListener("click",t=>n(t)),o}groupArrow(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button pull-left has-background group-arrow";let e=document.createElement("i");e.className="fa fa-angle-down buttonizer-arrow-down",t.appendChild(e);let n=document.createElement("i");return n.className="fa fa-angle-up buttonizer-arrow-up",t.appendChild(n),t.addEventListener("click",()=>this.revealButtons()),this.arrow=t,t}createTitle(){let t=document.createElement("input");return t.type="text",t.className="group-title",t.value=this.groupObject.get("name"),t.setAttribute("readonly",""),t.id="buttonizer-group-title",this.titleElement=t,t.addEventListener("blur",()=>this.updateTitle()),t.addEventListener("keyup",e=>{e.preventDefault(),13===e.keyCode?this.updateTitle():27===e.keyCode&&(t.value=this.groupObject.singleButtonMode?this.groupObject.getButtons()[0].data.name:this.groupObject.data.name,t.setAttribute("readonly",""))}),t.addEventListener("click",e=>{jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),e.isTrusted&&t.hasAttribute("readonly")&&(this.groupObject.singleButtonMode?this.toggleStyling():this.revealButtons())}),t}updateTitle(){(this.groupObject.singleButtonMode?this.groupObject.getButtons()[0]:this.groupObject).data.name=this.titleElement.value,window.Buttonizer.buttonChanges=!0,this.titleElement.setAttribute("readonly","")}groupRename(){this.titleElement.hasAttribute("readonly")&&(this.titleElement.removeAttribute("readonly"),this.titleElement.focus())}groupSettingsButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button group-style";let e=document.createElement("i");return e.className="fas fa-wrench",t.appendChild(e),t.addEventListener("click",t=>{jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),this.toggleStyling()}),t}toggleStyling(){this.groupObject.singleButtonMode?this.groupObject.getButtons()[0].revealSettings():this.groupObject.groupSettings.show()}groupDelete(){if(this.groupObject.singleButtonMode)return window.Buttonizer.buttonGroups.length<=1?void new r({title:"Warning",content:"<p>You cannot remove this button because this the only group/button left.</p>",buttons:[{text:"Dismiss",close:!0,focus:!0,confirm:!0}]}):void new r({title:"Remove button",content:"<p>Are you very sure you want to remove this button?</p>",onConfirm:()=>{this.groupObject.removeGroup(),window.Buttonizer.buttonChanges=!0},buttons:[{text:"Never mind",close:!0,focus:!0},{text:"Remove",confirm:!0}]});window.Buttonizer.buttonGroups.length<=1?new r({title:"Warning",content:"<p>You cannot remove this group because this the only group left.</p>",buttons:[{text:"Dismiss",close:!0,focus:!0,confirm:!0}]}):new r({title:"Remove group",content:"<p>Are you very sure you want to remove this full group? It contains "+this.groupObject.getButtonsAlive()+" buttons.</p>",onConfirm:()=>{this.groupObject.removeGroup(),window.Buttonizer.buttonChanges=!0},buttons:[{text:"Never mind",close:!0,focus:!0},{text:"Remove",confirm:!0}]})}revealButtons(){this.groupObject.groupOpened=!this.groupObject.groupOpened,this.groupObject.groupOpened?(this.groupObject.groupObject.classList.add("opened"),jQuery(this.groupObject.groupBody).sortable("enable")):(this.groupObject.groupObject.classList.remove("opened"),jQuery(this.groupObject.groupBody).sortable("disable")),this.groupObject.groupBody.style.display=this.groupObject.groupOpened?"block":"none"}setSingleButtonMode(){this.groupObject.singleButtonMode?(this.quickMenu.firstChild.style.display="",this.titleElement.value=void 0===this.groupObject.getButtons()[0]?this.groupObject.firstButtonName:this.groupObject.getButtons()[0].data.name,this.groupHolder.classList.add("single-button"),this.groupObject.groupOpened&&this.revealButtons(),this.groupObject.getButtons()[0].set("use_main_button_style","false"),this.groupObject.getButtons()[0].getUI("use_main_button_style-container")[0].element.style.display="none",this.groupObject.getUI("position-container")[1].element.style.display="",this.groupObject.set("single_button_mode","true")):(this.quickMenu.firstChild.style.display="none",this.groupObject.getUI("position-container")[1].element.style.display="none",this.groupObject.getButtons()[0].set("use_main_button_style","true"),this.groupObject.getButtons()[0].getUI("use_main_button_style-container")[0].element.style.display="",this.titleElement.value=this.groupObject.data.name,this.groupHolder.classList.remove("single-button"),this.groupObject.set("single_button_mode","false"))}};class ge extends zt{constructor(t){super({title:"Start opened",description:"This button group starts opened when this setting is active",class:"is-boolean-only",content:[new It({parentObject:t,dataEntry:"start_opened",default:"false"})]})}}class ye extends zt{constructor(t){super({title:"Menu Style",description:"Change the opening animation of this button group",content:[new ie({parentObject:t,dataEntry:"menu_style",default:"default",list:[{value:"default",text:"Default"},{value:"faded",text:"Faded"},{value:"corner-circle",text:"Corner Circle"},{value:"building-up",text:"Build Up"},{value:"pop",text:"Pop"},{value:"square",text:"Square"}]})]})}}class we extends zt{constructor(t){super({title:"Animation",description:"This will animate this button group to get the attention of the visitor. The animation repeats every 10 seconds",content:[new ie({parentObject:t,dataEntry:"menu_animation",default:"none",list:[{value:"none",text:"No Animation"},{value:"hello",text:"Buttonizer Hello"},{value:"bounce",text:"Bounce"}]})]})}}var ve=class{constructor(t){this.groupObject=t,this.open=!1,this.formElements={alwaysOpen:void 0,menuStyle:void 0,isMobile:void 0,isDesktop:void 0,attentionAnimation:void 0,buttonColor:void 0,borderRadius:void 0,backgroundImage:void 0,groupPosition:void 0,buttonIconSelect:void 0,buttonIconColor:void 0,buttonIconSize:void 0,buttonImageSelect:void 0,buttonImageBackground:void 0,buttonImageIconSelect:void 0,imageSize:void 0,imageBorderRadius:void 0,buttonLabel:void 0,buttonLabelColor:void 0,buttonLabelSize:void 0,show_label:void 0},this.element=HTMLElement}build(){let t=document.createElement("div");return t.className="button-group-styling hidden",this.element=t,this.hide(),this.buildTop(),this.buildForm(),this.groupObject.stylingObject=t,this.element}buildForm(){this.element.appendChild(this.top()),this.element.appendChild(this.menuStyle()),this.element.appendChild(this.buttonStyle()),this.element.appendChild(this.iconStyle()),this.element.appendChild(this.labelStyle());let t=document.createElement("a");t.href="javascript:void(0)",t.className="advanced-settings"+(window.Buttonizer.hasPremium()?"":" buttonizer-premium-gray-out"),t.innerHTML="<i></i> Advanced settings"+(window.Buttonizer.hasPremium()?"":" <span class='buttonizer-premium'>PRO</span>"),t.addEventListener("click",()=>{this.groupObject.windowObject.toggle()}),this.element.appendChild(t)}addError(){let t=document.createElement("div");t.innerHTML="";let e=document.createElement("div");return e.innerHTML="<p><b><u>THESE SETTINGS ARE FOR THE GROUP BUTTON.</u></b></br> The group button will not be visible until </br><b><u>2 or more buttons</u></b> are visible.</p>",e.style.border="1px solid rgb(170, 44, 44)",e.style.background="rgb(255, 238, 236)",e.style.color="#ff0000",e.style.marginTop="10px",e.style.padding="9px 15px",e.style.display="none",this.groupObject.buttonsAmount<=1&&(e.style.display="block"),t.appendChild(e),t}top(){let t=document.createElement("div");return t.className="style-top",this.formElements.menuPosition=new he(this.groupObject),t.appendChild(this.formElements.menuPosition.build()),this.formElements.isMobile=new ee(this.groupObject),t.appendChild(this.formElements.isMobile.build()),t}menuStyle(){let t=document.createElement("div");t.className="style-menu";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Menu style</span>",t.appendChild(e),this.formElements.alwaysOpen=new ge(this.groupObject),t.appendChild(this.formElements.alwaysOpen.build()),this.formElements.menuStyle=new ye(this.groupObject),t.appendChild(this.formElements.menuStyle.build()),this.formElements.attentionAnimation=new we(this.groupObject),t.appendChild(this.formElements.attentionAnimation.build()),t}buttonStyle(){let t=document.createElement("div");t.className="style-button";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Group button style</span>",t.appendChild(e),this.formElements.buttonColor=new ne(this.groupObject),t.appendChild(this.formElements.buttonColor.build()),this.formElements.borderRadius=new Kt(this.groupObject),t.appendChild(this.formElements.borderRadius.build()),this.formElements.backgroundImage=new ce(this.groupObject),t.appendChild(this.formElements.backgroundImage.build()),t}iconStyle(){let t=document.createElement("div");t.className="style-icon";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Group icon</span>",t.appendChild(e),this.formElements.buttonIcon=new pe(this.groupObject),t.appendChild(this.formElements.buttonIcon.build()),this.formElements.buttonIconSelect=new ae(this.groupObject),t.appendChild(this.formElements.buttonIconSelect.build()),this.formElements.buttonIconColor=new $t(this.groupObject),t.appendChild(this.formElements.buttonIconColor.build()),this.formElements.buttonIconSize=new Jt(this.groupObject),t.appendChild(this.formElements.buttonIconSize.build()),t}labelStyle(){let t=document.createElement("div");t.className="style-label";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Label</span>",t.appendChild(e),this.formElements.buttonLabel=new Nt(this.groupObject),t.appendChild(this.formElements.buttonLabel.build()),this.formElements.show_label=new oe(this.groupObject),t.appendChild(this.formElements.show_label.build()),this.formElements.show_label_mobile=new re(this.groupObject),t.appendChild(this.formElements.show_label_mobile.build()),this.formElements.buttonLabelColor=new se(this.groupObject),t.appendChild(this.formElements.buttonLabelColor.build()),this.formElements.buttonLabelFontSizeBorderRadius=new Zt(this.groupObject),t.appendChild(this.formElements.buttonLabelFontSizeBorderRadius.build()),t}buildTop(){}toggle(){(this.open=!0)?(this.open=!1,this.hide()):(this.open=!0,this.show())}show(){this.element.className="button-group-styling",Buttonizer.bar.showSettings(this.groupObject.get("name"),()=>this.hide())}hide(){this.element.className="button-group-styling hidden"}};class ke{constructor(t){this.windowObject=t,this.onTriggerContainer=null,this.dropdown=document.createElement("select"),this.dropdown.className="window-select"}build(){let t=document.createElement("div");t.appendChild(this.dropdown),this.onChange();let e=new s("table-relative");return e.addColumnHTML("<h2>Page rule"+(window.Buttonizer.hasPremium()?"":' <span class="buttonizer-premium premium-right">PRO</span>')+"</h2>","table-align-top",""),e.addColumn(t,"","370"),e.newRow(),e.build()}onChange(){this.dropdown.innerHTML="<option>Show on all pages</option>",this.dropdown.readonly=!0,this.dropdown.addEventListener("click",()=>window.Buttonizer.showPremiumPopup("You can setup page rules that will get triggered on specific pages or user roles. You can create unlimited page rules with multiple rules to trigger."))}}class Ee{constructor(t){this.windowObject=t,this.onTriggerContainer=null,this.dropdown=document.createElement("select"),this.dropdown.className="window-select"}build(){let t=document.createElement("div");t.appendChild(this.dropdown),this.onChange();let e=new s("table-relative");return e.addColumnHTML("<h2>Time schedule"+(window.Buttonizer.hasPremium()?"":' <span class="buttonizer-premium premium-right">PRO</span>')+"</h2>","table-align-top",""),e.addColumn(t,"","370"),e.newRow(),e.build()}onChange(){this.dropdown.innerHTML="<option>Show on all times</option>",this.dropdown.readonly=!0,this.dropdown.addEventListener("click",()=>window.Buttonizer.showPremiumPopup("You can setup time schedules that will get triggered on specific times of a day you setup, it is even possible to change the schedule actions for specific days. You can create unlimited amount of schedules."))}}class Ce{constructor(t){this.windowObject=t}build(){let t=document.createElement("input");t.className="window-select",t.placeholder="Add class";let e=new s("table-relative");return e.addColumnHTML("<h2>Custom class <span class='buttonizer-premium premium-right'>PRO</span></h2>","table-align-top",""),t.addEventListener("mousedown",()=>window.Buttonizer.showPremiumPopup("You can add a custom class to each button for styling purposes.")),e.addColumn(t,"","370"),e.build()}}class xe{constructor(t){this.windowObject=t}build(){let t=document.createElement("input");t.className="window-select",t.placeholder="Add ID";let e=new s("table-relative");return e.addColumnHTML("<h2>Custom ID <span class='buttonizer-premium premium-right'>PRO</span></h2>"),t.addEventListener("mousedown",()=>window.Buttonizer.showPremiumPopup("You can add a custom ID to each button for styling purposes.")),e.addColumn(t,"","370"),e.build()}}class Se extends m{constructor(t){super(t,"Advanced settings - Group "+t.data.name+(window.Buttonizer.hasPremium()?"":" (premium)"))}render(){this.filter(),this.delay(),this.styling()}filter(){let t=document.createElement("div");t.appendChild(new Ee(this).build()),t.appendChild(new ke(this).build()),super.addItem("Filter",t)}position(){let t=document.createElement("div");t.innerHTML="Testinhoud van <b>POSITIE</b>!!!",super.addItem("Position",t)}delay(){let t=document.createElement("div");t.appendChild(new p(this).build()),t.appendChild(new h(this).build()),super.addItem("Timeout & Scroll",t)}styling(){let t=document.createElement("div");t.appendChild(new Ce(this).build()),t.appendChild(new xe(this).build()),super.addItem("Styling",t)}}class je{constructor(t,e){e||(e=[]),this.type="group",this.groupOpened=!1,this.data=t,this.ui={},this.groupObject=HTMLElement,this.groupID=window.Buttonizer.buttonGroups.length,this.stylingOpened=!1,this.stylingObject=HTMLElement,this.groupBody=HTMLElement,this.windowObject=HTMLElement,this.buttons=[],this.buttonsLength=e.length,this.singleButtonMode=!1,this.buildGroup(),this.windowObject=new Se(this);for(let t in e)new be(this,e[t]);this.appendAddButton(),window.Buttonizer.buttonGroups.push(this)}get buttonsAmount(){return this.getButtonsAlive()}buildGroup(){let t=document.createElement("div");t.className="buttonizer-button-group is-group",this.groupObject=t,this.groupHolder=new fe(this),t.appendChild(this.groupHolder.build()),this.groupSettings=new ve(this),Buttonizer.bar.settingContent.appendChild(this.groupSettings.build()),this.appendAddButton(),this.groupBody=document.createElement("div"),this.groupBody.style.display="none",this.groupBody.className="button-group-body",t.appendChild(this.groupBody),jQuery(this.groupBody).sortable({items:"> div",axis:"y",cursor:"move",delay:150,handle:"#buttonizer-button-title",helper:"clone",cancel:this.buttonsLength<=1?".group-button":null,connectWith:".button-group-body",disabled:!0,start:(t,e)=>{jQuery(e.item).attr("previndex",e.item.index()),jQuery(e.item).attr("prevgroup",jQuery(this.groupBody).parent().index())},stop:(t,e)=>{jQuery(e.item).removeAttr("previndex"),jQuery(e.item).removeAttr("prevgroup")},update:function(t,e){if(this===e.item.parent()[0]){let t=e.item.index(),n=jQuery(e.item).attr("previndex"),i=jQuery(this).parent().index(),o=jQuery(e.item).attr("prevgroup");e.sender&&jQuery(this).sortable("option","cancel",null),window.Buttonizer.updateButtonList(t,n,i,o),jQuery(e.item).removeAttr("previndex"),jQuery(e.item).removeAttr("prevgroup")}}}),jQuery(this.groupBody).disableSelection(),jQuery(".group-title").disableSelection(),Buttonizer.bar.groupHolder.appendChild(this.groupObject)}duplicate(){new je(this.data,this.buttons)}appendAddButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="create-new-button",t.innerHTML="Add button +",t.addEventListener("click",()=>{new be(this,{name:"Button "+(this.getButtonsAlive()+1),show_mobile:"true",show_desktop:"true"}),jQuery(this.groupBody).sortable("option","cancel",null)}),this.groupObject.appendChild(t)}registerButton(t){this.buttons.push(t),1===this.getButtonsAlive()!==this.singleButtonMode&&(this.singleButtonMode=1===this.getButtonsAlive(),this.groupHolder.setSingleButtonMode())}removeGroup(){let t=window.Buttonizer.buttonGroups.indexOf(this);window.Buttonizer.buttonGroups.splice(t,1),this.groupObject.remove()}set(t,e){this.data[t]=e,void 0!==this.ui[t]&&this.ui[t].forEach(t=>t.update(e)),window.Buttonizer.buttonChanges=!0}get(t,e){return void 0!==this.data[t]?this.data[t]:(this.data[t]=e,window.Buttonizer.buttonChanges=!0,e)}getButtonsAlive(){let t=0;return this.buttons.forEach(e=>{e.alive&&t++}),t}getButtons(){return this.buttons.filter(t=>t.alive)}registerUI(t,e){void 0!==this.ui[t]?this.ui[t].push(e):this.ui[t]=[e]}getUI(t){return void 0!==this.ui[t]&&this.ui[t]}}var _e=je;var Oe=class{constructor(t){this.buttonizerObject=t,this.topBarElement=HTMLElement,this.optionsWindow=HTMLElement,this.publishButton=HTMLElement,this.revertChangesText=HTMLElement,this.alertText=HTMLElement,this.eventListCache=[],this.eventTrackerMenuItem=null,this.eventTracker=null,this.windowOptions=[{buttons:[{title:"Buttonizer",description:`Version ${window.Buttonizer.buttonizerInitData.version}`,callback:()=>{window.open("https://www.buttonizer.pro/")}},{title:"Knowledgebase",description:"A deep dive in all the Buttonizer possibilities",callback:()=>{window.open("https://community.buttonizer.pro/t/knowledgebase")}}]},{title:"Support",buttons:[{title:"I need support",description:"Direct support with Buttonizer developers",callback:()=>{window.open("https://community.buttonizer.pro/t/support")}},{title:"Community",description:"Interact with other Buttonizers",callback:()=>{window.open("https://community.buttonizer.pro/")}},{title:"Buttonizer tour (recommended!)",description:"Start the 2 minute tour",callback:()=>{window.Buttonizer.startTour()}}]},{title:"Buttonizer account",buttons:[{title:"My Account",callback:()=>{window.open(buttonizer_admin.admin+"?page=Buttonizer-account")}},{title:"Upgrade or pricing",callback:()=>{window.open(buttonizer_admin.admin+"?page=Buttonizer-pricing")}},{title:"Affiliation",description:"Earn $ by promoting Buttonizer",callback:()=>{window.open(buttonizer_admin.admin+"?page=Buttonizer-affiliation")}}]},{buttons:[{title:"Options",icon:"fa fa-cogs",class:"single-button",callback:()=>{this.buttonizerObject.settingsWindow.toggle()}}]}],document.body.appendChild(this.buildTopBar())}buildTopBar(){let t=document.createElement("div");t.className="buttonizer-topbar";let e=document.createElement("div");return e.className="revert-save",e.style.display="inline-block",e.appendChild(this.createRevertChangesButton()),e.appendChild(this.createPublishButton()),t.appendChild(this.createBackButton()),t.appendChild(this.createLogo()),t.appendChild(e),t.appendChild(this.createOptionsButton()),t.appendChild(this.createAlertText()),t.appendChild(this.createOptionsWindow()),t.appendChild(this.createEventMenuItem()),t.appendChild(this.createEventWindow()),this.topBarElement=t,t}createOptionsButton(){let t=document.createElement("a");return t.className="options-button button right fas fa-cog",t.addEventListener("click",()=>{this.optionsWindow.toggle()}),t}createEventMenuItem(){let t=document.createElement("a");return t.href="javascript:void(0)",t.className="event-tracker-button",t.style.display="none",t.innerHTML="",t.addEventListener("click",()=>{"block"===this.eventTracker.container.style.display?this.eventTracker.container.style.display="none":this.eventTracker.container.style.display="block"}),this.eventTrackerMenuItem=t,t}createEventWindow(){let t=document.createElement("div");t.className="event-track-window",t.style.display="none",t.innerHTML='<div class="track-window-title">Event tracker (experimental)</div>';let e=document.createElement("a");e.href="javascript:void(0)",e.className="close",e.innerHTML='<i class="fas fa-times"></i>',e.addEventListener("click",()=>{t.style.display="none"}),t.appendChild(e);let n=document.createElement("div");return n.className="list-container",n.innerHTML="",t.appendChild(n),this.eventTracker={container:t,list:n},t}updateEventLogs(t){if(0!==t.length){if(this.eventListCache!==t){this.eventTrackerMenuItem.style.display="block",this.eventTrackerMenuItem.innerHTML='<i class="fas fa-info"></i> ('+t.length+") Event tracker",this.eventTracker.list.innerHTML="";for(let e=0;e<t.length;e++){let n=document.createElement("div");n.className="event-element event-"+t[e].type,n.innerHTML=t[e].message,this.eventTracker.list.appendChild(n)}}}else this.eventTrackerMenuItem.style.display="none"}createOptionsWindow(){this.optionsWindow=document.createElement("div"),this.optionsWindow.className="options-window",this.optionsWindow.hidden=!0,this.optionsWindow.toggle=(()=>{this.optionsWindow.hidden=!this.optionsWindow.hidden});let t=document.createElement("ul");for(let e=0;e<this.windowOptions.length;e++){let n=document.createElement("li");if(n.className="group-container","string"==typeof this.windowOptions[e].title){let t=document.createElement("div");t.className="group-title",t.innerHTML=this.windowOptions[e].title,n.appendChild(t)}for(let t=0;t<this.windowOptions[e].buttons.length;t++)n.appendChild(this.barMenuItem(this.windowOptions[e].buttons[t]));t.appendChild(n)}return this.optionsWindow.appendChild(t),this.optionsWindow}barMenuItem(t){let e=document.createElement("a");e.href="javascript:void(0)",e.className=t.class?"option "+t.class:"option";let n=document.createElement("span");if(n.className="button-title",n.innerHTML=t.title?t.title:"Default title",e.appendChild(n),t.hasOwnProperty("description")){let n=document.createElement("span");n.className="button-description",n.innerHTML=t.description?t.description:"",e.appendChild(n)}if(t.hasOwnProperty("icon")){let n=document.createElement("i");n.className=t.icon,e.appendChild(n)}return t.hasOwnProperty("callback")&&e.addEventListener("click",()=>{this.optionsWindow.toggle(),t.callback()}),e}createBackButton(){let t=document.createElement("a");return t.className="close-button fa fa-times",t.addEventListener("click",()=>{document.location.href=window.Buttonizer.buttonizerInitData.wordpress.admin_base}),t}createLogo(){let t=document.createElement("img");return t.className="buttonizer-logo",t.src=buttonizer_admin.assets+"/images/logo.png",t}createPublishButton(){return this.publishButton=document.createElement("a"),this.publishButton.className="publish-button button-primary right",this.publishButton.innerText="Save & Publish",this.publishButton.enabled=!0,this.publishButton.addEventListener("click",()=>{this.publishButton.enabled&&this.buttonizerObject.savingMechanism.publish()}),this.publishButton.enable=(()=>{this.publishButton.enabled=!0,this.revertChangesText.hidden=!1,this.publishButton.innerText="Save & Publish",this.publishButton.className=this.publishButton.className.replace(" disabled","")}),this.publishButton.disable=(t=>{this.publishButton.enabled=!1,this.revertChangesText.hidden=!0,this.publishButton.innerText=t,this.publishButton.className.includes(" disabled")||(this.publishButton.className+=" disabled")}),this.publishButton}createRevertChangesButton(){return this.revertChangesText=document.createElement("a"),this.revertChangesText.className="revert-button right",this.revertChangesText.innerText="Revert changes",this.revertChangesText.href="javascript:void(0)",this.revertChangesText.addEventListener("click",()=>{new r({title:"Revert changes",content:"<p>Are you sure you want to revert your changes?</p><p>The current changes will be overwritten by the current published buttons and settings.</p>",onConfirm:()=>{this.buttonizerObject.savingMechanism.revert()},buttons:[{text:"Never mind",close:!0,focus:!0},{text:"Revert changes",confirm:!0}]})}),this.revertChangesText}createAlertText(){return this.alertText=document.createElement("a"),this.alertText.className="alert-text",this.alertText.showSaving=(()=>{this.alertText.innerHTML='<i class="fas fa-mug-hot"></i> Saving changes...',this.alertText.hidden=!1}),this.alertText.showSaved=(()=>{this.alertText.innerHTML='<i class="fas fa-check"></i> Saving complete.',setTimeout(()=>{this.alertText.hidden=!0},2e3)}),this.alertText.alert=(t=>{this.alertText.innerText=t,this.alertText.hidden=!1,setTimeout(()=>{this.alertText.hidden=!0},2e3)}),this.alertText.hidden=!0,this.alertText}set changes(t){t?this.publishButton.enable():this.publishButton.disable("Published")}};var Le=class{constructor(t){this.buttonizerObject=t,this.barElement=HTMLElement,this.groupContainer=HTMLElement,this.settingBar=HTMLElement,this.settingContainer=HTMLElement,this.settingContent=HTMLElement,this.settingTitle=HTMLElement,this.settingCallback=(()=>console.log("huh?")),document.body.appendChild(this.buildBar()),jQuery(this.groupContainer).scrollbar(),jQuery(this.settingContent).scrollbar()}buildBar(){let t=document.createElement("div");t.className="buttonizer-bar";let e=document.createElement("div");e.className="group-container container",e.appendChild(this.createButtonHolder()),e.appendChild(this.addButtonGroup()),t.appendChild(e),t.appendChild(this.createBarFooter()),this.barElement=t,this.groupContainer=e;let n=document.createElement("div"),i=document.createElement("div");i.className="settings-content";let o=document.createElement("div");return o.className="settings-container container hidden",o.appendChild(this.createSettingBar()),i.appendChild(n),o.appendChild(i),t.appendChild(o),this.settingContent=n,this.settingContainer=o,t}createSettingBar(){let t=document.createElement("div");t.className="top";let e=document.createElement("a");e.className="back-button fa fa-angle-left",e.addEventListener("click",()=>{jQuery(".settings-container").addClass("hidden"),jQuery(".group-container").removeClass("hidden"),setTimeout(()=>this.settingCallback(),250)}),t.appendChild(e);let n=document.createElement("div");n.className="title-wrapper";let i=document.createElement("h4");i.innerHTML="Now editing:";let o=document.createElement("h2");return o.innerHTML="nothing!",n.appendChild(i),n.appendChild(o),t.appendChild(n),this.settingBar=t,this.settingTitle=o,t}createButtonHolder(){return this.groupHolder=document.createElement("div"),this.groupHolder.className="buttonizer-group-holder",jQuery(this.groupHolder).sortable({items:"> div",axis:"y",cursor:"move",delay:150,handle:"#buttonizer-group-title",helper:"clone",start:function(t,e){jQuery(this).attr("data-previndex",e.item.index())},stop:function(t,e){jQuery(this).removeAttr("data-previndex")},update:function(t,e){var n=e.item.index(),i=jQuery(this).attr("data-previndex");window.Buttonizer.updateButtonGroupList(n,i),jQuery(this).removeAttr("data-previndex")},cancel:null}),jQuery(this.groupHolder).disableSelection(),jQuery(".group-title").disableSelection(),this.groupHolder}addButtonGroup(){let t=document.createElement("a");return t.href="javascript:void(0)",t.className="create-new-button is-create-group buttonizer-premium-gray-out",t.innerHTML="Add group + <span class='buttonizer-premium'>PRO</span>",t.addEventListener("click",()=>window.Buttonizer.showPremiumPopup("You are able to add multiple groups on different positions.")),t}generateLink(t,e,n,i){i||(i="");let o=document.createElement("a");return o.href="javascript:void(0)",o.className=i,o.innerHTML='<i class="'+t+'"></i> '+e,o.addEventListener("click",n),o}showSettings(t,e){jQuery(".buttonizer-bar .settings-container").removeClass("hidden"),jQuery(".buttonizer-bar .group-container").addClass("hidden"),this.settingTitle.innerHTML=t,this.settingCallback=e}createBarFooter(){let t=document.createElement("div");t.className="bar-footer";let e=document.createElement("div");e.className="footer-device-selector";let n=document.createElement("a");n.href="javascript:void(0)",n.className="active",n.innerHTML='<span class="dashicons-before dashicons-desktop"></span>',n.addEventListener("click",()=>{n.classList.add("active"),i.classList.remove("active"),o.classList.remove("active"),document.querySelector(".buttonizer-frame").className="buttonizer-frame"}),e.appendChild(n);let i=document.createElement("a");i.href="javascript:void(0)",i.innerHTML='<span class="dashicons-before dashicons-tablet"></span>',i.addEventListener("click",()=>{n.classList.remove("active"),i.classList.add("active"),o.classList.remove("active"),document.querySelector(".buttonizer-frame").className="buttonizer-frame frame-size-tablet"}),e.appendChild(i);let o=document.createElement("a");return o.href="javascript:void(0)",o.innerHTML='<span class="dashicons-before dashicons-smartphone"></span>',o.addEventListener("click",()=>{n.classList.remove("active"),i.classList.remove("active"),o.classList.add("active"),document.querySelector(".buttonizer-frame").className="buttonizer-frame frame-size-mobile"}),e.appendChild(o),t.appendChild(e),t}};var Te=class{constructor(){this.element=document.createElement("div"),this.element.className="buttonizer-loading";let t=document.createElement("div");t.className="middle";let e=document.createElement("img");e.src=buttonizer_admin.assets+"/images/buttonizer-loading.png",t.innerHTML=this.svg(),t.appendChild(e),this.textElement=document.createElement("div"),this.textElement.className="loader-text",t.appendChild(this.textElement),this.element.appendChild(t),document.body.appendChild(this.element)}svg(){return'<svg width="165" height="165" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-rolling"><circle cx="50" cy="50" fill="none" stroke="#2f788a" stroke-width="7" r="35" stroke-dasharray="164.93361431346415 56.97787143782138" transform="rotate(300 50 50)">\x3c!--animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"--\x3e</animateTransform></circle></svg>'}show(t,e=""){t||(t=""),this.textElement.innerHTML=t,this.element.className="buttonizer-loading "+e,this.element.style.display="block"}hide(){this.element.style.display="none"}};var Be=class{constructor(){this.updateTimer=setTimeout(()=>{},0),this.isUpdating=!1,this.tempButtons={},this.savingObject=HTMLElement,this.savedObject=HTMLElement,setInterval(()=>this.checkUpdates(),500)}checkUpdates(){window.Buttonizer.buttonChanges&&!this.isUpdating&&(window.Buttonizer.buttonChanges=!1,clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>this.save(),1e3))}save(){window.Buttonizer.buttonChanges||(this.isUpdating=!0,window.Buttonizer.buttonChanges=!1,window.Buttonizer.topBar.alertText.showSaving(),console.log("[BUG DEBUG SAVING AND RELOADING] button changes!"),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=buttons",dataType:"json",method:"post",data:{security:buttonizer_admin.security,buttons:this.generateJSONObject()},success:t=>{this.isUpdating=!1,"success"===t.status?(console.log("[BUG DEBUG SAVING AND RELOADING] saved!"),window.Buttonizer.topBar.alertText.showSaved(),this.reloadPreview(),window.Buttonizer.changes=!0):window.Buttonizer.savingError(t.message)},error:t=>{this.isUpdating=!1,window.Buttonizer.savingError(t)}}))}publish(){window.Buttonizer.buttonChanges||this.isUpdating||(this.isUpdating=!0,window.Buttonizer.buttonChanges=!1,window.Buttonizer.topBar.publishButton.disable("Publishing..."),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=publish",dataType:"json",data:{security:buttonizer_admin.security},method:"post",success:t=>{this.isUpdating=!1,"success"===t.status?window.Buttonizer.topBar.publishButton.disable("Published"):new r({title:"Could not save settings",content:`<p>Something went wrong while saving your settings.</p><p>${t.message}</p>`,buttons:[{text:"Close",close:!0}]})},error:(t,e,n)=>{this.isUpdating=!1,window.Buttonizer.topBar.publishButton.enable(),window.bdebug.error("Couldn't complete saving: "+t)}}))}revert(){window.Buttonizer.buttonChanges||(window.Buttonizer.loader.show("Reverting..."),this.isUpdating=!0,window.Buttonizer.buttonChanges=!1,jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=revert",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{if(this.isUpdating=!1,"success"!==t.status)return window.Buttonizer.loader.hide(),void new r({title:"Could not revert settings",content:`<p>Something went wrong while reverting your settings.</p><p>${t.message}</p>`,buttons:[{text:"Close",close:!0}]});document.location.reload()},error:(t,e,n)=>{this.isUpdating=!1,window.bdebug.error("Couldn't complete saving: "+t)}}))}reloadPreview(){console.log("[BUG DEBUG SAVING AND RELOADING] requested!");try{document.getElementById("buttonizer-iframe").contentWindow.postMessage({eventType:"buttonizer",messageType:"preview-reload"},document.location.origin)}catch(t){console.log("Buttonizer tried to auto update the Buttonizer Buttons. But the message didn't came through. Well. Doesn't matter, it's just an extra function. It's nice to have."),console.log(t),document.getElementById("buttonizer-iframe").contentWindow.location.reload()}}generateJSONObject(){let t=window.Buttonizer.buttonGroups,e=[];for(let n=0;n<t.length;n++){let i=t[n].buttons,o=[];for(let t=0;t<i.length;t++)i[t].alive&&o.push(i[t].data);e.push({data:t[n].data,buttons:o})}return e}},ze=class{constructor(){this.versionDropdown={},this.libraryPremiumCode={},this.currentSelected=window.Buttonizer.getSetting("icon_library","fontawesome"),this.currentSelectedIndex=null,this.currentSelectedVersion=window.Buttonizer.getSetting("icon_library_version","5.free"),this.currentSelectedVersionIndex=null,this.currentSelectedPremiumCode=window.Buttonizer.getSetting("icon_library_code",""),this.cachedPremium=[],this.libraries=[{name:"Font Awesome",id:"fontawesome",versions:[{id:"5.free",name:"Font Awesome 5 - Free - Latest (automatic)",free:!0},{id:"5.paid",name:"Font Awesome 5 - Pro - Latest (automatic)",free:!1},{id:"4.7.0",name:"Font Awesome 4.7",free:!0}]}]}build(){let t=document.createElement("div");return t.appendChild(this.iconLibrary()),t.appendChild(this.versionSelector()),t.appendChild(this.importIconLibrary()),t}showPremiumIcons(){return!0}iconLibrary(){let t=document.createElement("select");t.className="window-select";for(let e=0;e<this.libraries.length;e++){let n=document.createElement("option");n.value=e,n.text=this.libraries[e].name,n.setAttribute("data-index",e.toString()),this.currentSelected===this.libraries[e].id&&(n.selected=!0,this.currentSelectedIndex=e),t.appendChild(n)}t.addEventListener("change",()=>{this.currentSelected=t.value,this.currentSelectedIndex=Number(t.getAttribute("data-index")),this.currentSelectedVersion=0,window.Buttonizer.saveSettings({icon_library:t.value,icon_library_version:this.libraries[this.currentSelectedIndex].versions[0]},!1),this.buildVersionSelector(),this.reloadIframe()});let e=document.createElement("div");e.innerHTML="If your theme automatically loads in a library you just have to select the correct icon library.";let n=new s;return n.addColumnHTML("<h2>Icon library</h2>"),n.addColumn(t,"","370"),n.newRow(),n.addColumnText(""),n.addColumn(e),n.build()}versionSelector(){this.versionDropdown=document.createElement("select"),this.versionDropdown.className="window-select",this.versionDropdown.addEventListener("change",()=>{this.currentSelectedVersion=this.versionDropdown.value,window.Buttonizer.saveSettings({icon_library_version:this.currentSelectedVersion},!1),this.currentSelectedVersion.indexOf("paid")>=0?(this.libraryPremiumCode.style.display="block",""!==this.currentSelectedPremiumCode&&this.reloadIcons()):(this.libraryPremiumCode.style.display="none",this.reloadIcons())});let t=document.createElement("div");t.innerHTML="Select the correct version of the library. So Buttonizer can help you choosing icons.";let e=new s;e.addColumnHTML("<h2>Select version</h2>"),e.addColumn(this.versionDropdown,"","370"),e.newRow(),e.addColumnText(""),e.addColumn(t);let n=document.createElement("div");return n.appendChild(e.build()),n.appendChild(this.libraryLicenseKey()),this.buildVersionSelector(),n}reloadIcons(){window.Buttonizer.iconSelector.iconListener.onReady(()=>{window.Buttonizer.iconSelector.rebuild(),window.Buttonizer.addIconLibrary(),this.reloadIframe()}),window.Buttonizer.iconSelector.iconListener.loadIcons()}libraryLicenseKey(){let t=document.createElement("div");t.innerHTML='You have selected an icon library that has premium icons, enter the library license to show them. <a href="" target="_blank" class="link-add-more" style="display: inline">How does this work?</a>';let e=document.createElement("input");e.placeholder="Enter integrity code",e.className="window-select",e.value=this.currentSelectedPremiumCode,e.addEventListener("change",()=>{window.Buttonizer.saveSettings({icon_library_code:e.value},!1),this.reloadIcons()});let n=new s;return n.addColumnHTML(" "),n.addColumn(e,"","370"),n.newRow(),n.addColumnText(""),n.addColumn(t),this.libraryPremiumCode=n.build(),this.libraryPremiumCode}buildVersionSelector(){this.versionDropdown.innerHTML="";let t=!1;for(let e=0;e<this.libraries[this.currentSelectedIndex].versions.length;e++){let n=document.createElement("option");n.value=this.libraries[this.currentSelectedIndex].versions[e].id,n.text=this.libraries[this.currentSelectedIndex].versions[e].name,this.currentSelectedVersion===n.value&&(n.selected=!0,this.libraries[this.currentSelectedIndex].versions[e].free||(t=!0)),this.versionDropdown.appendChild(n)}this.libraryPremiumCode.style.display=t?"block":"none"}importIconLibrary(){let t=new u({state:window.Buttonizer.getSetting("import_icon_library",!0)});t.onToggle(t=>{window.Buttonizer.saveSettings({import_icon_library:t},!1),this.reloadIframe()});let e=document.createElement("div");e.innerHTML="Should Buttonizer import the icon library into your theme? When your theme already imports the library you can disable this.";let n=new s;return n.addColumnHTML("<h2>Import icon library</h2>"),n.addColumn(t.build(),"","370"),n.newRow(),n.addColumnText(""),n.addColumn(e),this.buildVersionSelector(),n.build()}reloadIframe(){setTimeout(()=>{document.getElementById("buttonizer-iframe").contentWindow.location.reload()},1500)}};class Ae{constructor(){this.versionDropdown={},this.currentSelected=window.Buttonizer.getSetting("google_analytics","")}build(){let t=document.createElement("div");t.appendChild(this.input());let e=document.createElement("div");e.className="window-splitter",e.innerHTML="Where can I see my click data of my buttons in Google Analytics?",e.style.marginBottom="20px",t.appendChild(e);let n=document.createElement("div");return n.className="settings-window-information",n.innerHTML='\n<p>All the click data of each button is displayed in the Google Analytics account you have set for your website. When you go to the <b>Behavior section</b> (left side of your screen in Google Analytics) and then click on <b>events overview</b> you will see that there is an <b>Event category</b> called <b>Buttonizer</b>.</p>\n\n<p><b>Event Category</b>: Each button you have set on Buttonizer will get the event category \'Buttonizer\'<br />\n<b>Event Label</b>: This will be the name that you have given your button in the back-end in WordPress <i class="fa fa-caret-right"></i> This way you will recognize which buttons perform better<br />\n<b>Event Action</b>: This will be the page on which the button is clicked</p>\n\n<p>If you want to test if the Google Analytics tracking is working. You go to <b>Real Time <i class="fa fa-caret-right"></i> Events</b>, open another tab, go to your website and click on the button. You should see hits coming in :)</p>\n',t.appendChild(n),t}input(){let t=document.createElement("input");t.value=this.currentSelected,t.className="window-select",t.placeholder="UA-XXXXXX-Y",t.addEventListener("change",()=>{window.Buttonizer.saveSettings({google_analytics:t.value},!1)});let e=document.createElement("div");e.innerHTML="Insert here the Google Analytics tracking code. Like UA-000000-2";let n=new s;return n.addColumnHTML("<h2>Google Analytics</h2>"),n.addColumn(t,"","375"),n.newRow(),n.addColumnText(""),n.addColumn(e),n.build()}}class Ie{constructor(){}build(){let t=document.createElement("div"),e=document.createElement("div");return e.className="settings-window-information",e.innerHTML="<p>Nothing really special here, just a way to reset the buttonizer to the default settings</p>",t.appendChild(e),t.appendChild(this.whatWillHappen()),t.appendChild(this.why()),t.appendChild(this.myLicense()),t.appendChild(this.andThen()),t.appendChild(this.ready()),t}whatWillHappen(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="What happens when I click the red button below?",e.style.marginBottom="20px",t.appendChild(e);let n=document.createElement("div");return n.className="settings-window-information",n.innerHTML="<p>What will happen is that the plugin will get a 'factory reset'. All settings to Buttonizer will get removed as you just installed and activated Buttonizer. From then you can start all-over again.</p>",t.appendChild(n),t}why(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Why would I do that?",e.style.marginBottom="20px",t.appendChild(e);let n=document.createElement("div");return n.className="settings-window-information",n.innerHTML="<p>There are many reasons to reset Buttonizer. One could be, you ruined your Buttonizer buttons, the settings, categories. Or maybe you just want to try this reset button?</p>",t.appendChild(n),t}myLicense(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="I have a license, what about that?",e.style.marginBottom="20px",t.appendChild(e);let n=document.createElement("div");return n.className="settings-window-information",n.innerHTML="\n<p>No worries! Nothing will happen with your license! It only wipe out the following:</p>\n<p>\n<ul>\n <li>Your buttons</li>\n <li>Your button groups</li>\n <li>All time schedules</li>\n <li>All page rules</li>\n <li>All other settings of Buttonizer</li>\n <li>All publishes settings</li>\n</ul>\n</p>\n",t.appendChild(n),t}andThen(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Okay, sounds good. What then?",e.style.marginBottom="20px",t.appendChild(e);let n=document.createElement("div");return n.className="settings-window-information",n.innerHTML="<p>Buttonizer will go back to the default settings and will behave like a fresh installation. That's all.</p>",t.appendChild(n),t}ready(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Okay, I'm ready!",e.style.marginBottom="20px",t.appendChild(e);let n=document.createElement("div");n.className="settings-window-information",n.innerHTML="<p>Press the red button below to reset buttonizer. There will be no more warnings.</p>",t.appendChild(n);let i=document.createElement("a");return i.className="button button-red button-centered-reset",i.innerHTML='<i class="fas fa-sync"></i> Reset Buttonizer!',i.href="javascript:void(0)",i.addEventListener("click",()=>this.countdown()),t.appendChild(i),t}countdown(){window.Buttonizer.loader.show("Initializing..."),setTimeout(()=>{window.Buttonizer.loader.show("Resetting..."),this.reset()},1500)}reset(){jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=reset-buttonizer",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{"success"===t.status?(window.Buttonizer.loader.show("Finishing..."),setTimeout(()=>{document.location.reload()},500)):(window.Buttonizer.loader.hide(),window.Buttonizer.savingError(t.message))},error:(t,e,n)=>{window.Buttonizer.loader.hide(),window.Buttonizer.savingError(e)}})}error(){}}class Ne{build(){let t=document.createElement("div");return t.appendChild(this.showWPAdminTopBarButton()),t.appendChild(this.showTooltips()),t.appendChild(this.allowRequestsFromSubdomains()),t}showWPAdminTopBarButton(){let t=new u({state:window.Buttonizer.getSetting("admin_top_bar_show_button","true")});t.onToggle(t=>{window.Buttonizer.saveSettings({admin_top_bar_show_button:t},!1)});let e=new s;return e.addColumnHTML("<h2>Admin topbar button</h2>"),e.addColumn(t.build(),"","370"),e.newRow(),e.addColumnText(""),e.addColumnText("You can hide the button in the admin top bar by using this toggle"),e.build()}showTooltips(){let t=new u({state:window.Buttonizer.getSetting("show_tooltips")});t.onToggle(t=>{window.Buttonizer.saveSettings({show_tooltips:t},!1)});let e=new s;return e.addColumnHTML("<h2>Show tooltips</h2>"),e.addColumn(t.build(),"","370"),e.newRow(),e.addColumnText(""),e.addColumnText("You can hide or show all the tooltips by changing this setting"),e.build()}allowRequestsFromSubdomains(){let t=new u({state:window.Buttonizer.getSetting("allow_subdomains","false")});t.onToggle(t=>{window.Buttonizer.saveSettings({allow_subdomains:t},!1)});let e=new s;return e.addColumnHTML("<h2>Subdomain support</h2>"),e.addColumn(t.build(),"","370"),e.newRow(),e.addColumnText(""),e.addColumnText("Some WordPress websites use subdomains to serve content on their website. To allow Buttonizer to load on your subdomains, you can enable this here. Only enable this when you need it."),e.build()}}var Me=class extends m{constructor(){super({},"Buttonizer settings")}render(){this.fontAwesome(),this.analytics(),this.mainSettings(),this.reset()}fontAwesome(){super.addItem("Icon library",(new ze).build())}analytics(){super.addItem("Google Analytics",(new Ae).build())}mainSettings(){super.addItem("Other settings",(new Ne).build())}reset(){super.addItem("Reset",(new Ie).build())}},He=class{constructor(){this.element=null,this.itemList=null,this.searchList=null,this.searchInput=null,this.fontAwesomeStylesheet=null,this.iframeContent=null,this.mayClose(),this.build(),this.iconListener=new class{constructor(){this.icons=[],this.callback=(()=>{}),this.searchResultCache=[],this.loadIcons()}onReady(t){this.callback=t}getIcons(){return this.icons}search(t){if(void 0!==this.searchResultCache[t])return this.searchResultCache[t];let e=[];for(let n=0;n<this.icons.length;n++){let i=this.icons[n];(i.searchTerms.indexOf(t)>=0||i.name.indexOf(t)>=0)&&e.push(i)}return this.searchResultCache[t]=e,e}loadIcons(){this.searchResultCache=[],this.icons=[];let t=window.Buttonizer.settings.icon_library,e=window.Buttonizer.settings.icon_library_version;jQuery.ajax({url:buttonizer_admin.assets+"/icon_definitions/"+t+"."+e+".json?buttonizer-icon-cache="+window.Buttonizer.version,dataType:"json",method:"get",success:n=>{this.icons=n,console.log("Finished loading icon library '"+t+"' version "+e),this.callback()},error:()=>{console.error("Could not load icon library '"+t+"' version "+e)}})}},this.iconLibrary=new ze,this.currentInput=null,this.currentInputJ=null,this.searchTimeout=setTimeout(()=>{},1),setInterval(()=>this.stayOnPlace(),100),this.firstBuild=!0,this.opened=!1}build(){let t=document.createElement("div");t.className="buttonizer-icon-selector";let e=document.createElement("div");e.className="icon-selector-searchbar";let n=document.createElement("input");n.className="icon-selector-searchbar",n.placeholder="Search to icons...",n.addEventListener("keyup",()=>{clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.search(n.value)},200)}),this.searchInput=n,e.appendChild(this.searchInput),t.appendChild(e);let i=document.createElement("iframe");i.height="350px",i.width="100%",i.src="about:blank",i.frameborder=0,i.addEventListener("load",()=>{i.contentDocument.querySelector("head").appendChild(window.Buttonizer.iconLibraryStylesheet);let t=document.createElement("style");t.innerText='\nbody, html {\n background-color: #f5f5f5;\n margin: 0;\n padding: 0;\n font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;\n font-size: 14px;\n}\n\n.icon-selector-list {\n border-top: 1px solid #e7e7e7;\n overflow: auto;\n text-align: center;\n}\n\n.icon-selector-list a {\n background-color: #f5f5f5;\n color: #464646;\n font-size: 19px;\n width: 16%;\n height: 50px;\n line-height: 50px;\n text-decoration: none;\n display: inline-block;\n text-align: center;\n outline: none;\n}\n\n.icon-selector-list a:hover {\n background-color: #e7e7e7;\n}\n\n.icon-selector-list a:focus {\n box-shadow: none !important;\n}\n\n.fa, .fal, .far, .fas, .fab {\n line-height: 50px !important;\n}',i.contentDocument.querySelector("head").appendChild(t),this.itemList=document.createElement("div"),this.itemList.className="icon-selector-list",i.contentDocument.body.appendChild(this.itemList),this.searchList=document.createElement("div"),this.searchList.className="icon-selector-list search-list",this.searchList.style.display="none",i.contentDocument.body.appendChild(this.searchList)}),this.iframeContent=i,t.appendChild(this.iframeContent),this.element=t,document.body.appendChild(this.element)}search(t){if(""===t)return this.searchList.style.display="none",this.itemList.style.display="block",void(this.iframeContent.height="350px");this.searchList.style.display="block",this.itemList.style.display="none";let e=this.iconListener.search(t);e.length>0?(this.searchList.innerHTML="",this.showIcons(this.searchList,e),jQuery(this.searchList).height()>350?this.iframeContent.height="350px":this.iframeContent.height=jQuery(this.searchList).height()+5+"px"):(this.iframeContent.height="50px",this.searchList.innerHTML=`<p>Sorry, no results found for <b>${t}</b></p>`)}rebuild(){this.itemList.innerHTML="",this.searchList.innerHTML="",this.showIcons(this.itemList,this.iconListener.getIcons())}showIcons(t,e){for(let n=0;n<e.length;n++){let i=e[n];for(let e=0;e<i.icons.length;e++){let n=document.createElement("a");n.innerHTML=`<i class="${i.icons[e].icon}"></i>`,n.href="javascript:void(0)",n.title=i.name+" ("+i.icons[e].type+")",n.addEventListener("click",()=>{if(null!==this.currentInput){if(this.currentInput.value=i.icons[e].icon,"createEvent"in document){let t=document.createEvent("HTMLEvents");t.initEvent("change",!1,!0),this.currentInput.dispatchEvent(t)}else this.currentInput.fireEvent("onchange");this.close()}}),t.appendChild(n)}}}open(t){this.currentInput=t,this.currentInputJ=jQuery(this.currentInput),this.searchInput.value="",this.searchList.style.display="none",this.itemList.style.display="block",this.element.style.display="block",setTimeout(()=>{this.searchInput.focus(),this.opened=!0,this.stayOnPlace(),setTimeout(()=>{this.element.className="buttonizer-icon-selector selector-animated",this.firstBuild&&(this.firstBuild=!1,this.rebuild())},250)},50)}mayClose(){document.querySelector("body").addEventListener("click",t=>{this.opened&&"icon-selector-searchbar"!==t.target.className&&(this.element.style.display="none",this.element.className="buttonizer-icon-selector",this.opened=!1)})}close(){this.element.style.display="none",this.opened=!1}stayOnPlace(){if(this.opened){let t=this.currentInputJ.offset().top+this.currentInputJ.height()+10+"px";t!==this.element.style.top&&(this.element.style.top=t,this.element.style.left=this.currentInputJ.offset().left+"px")}}},qe=(n(7),n(0));const Pe=n(12);class De{constructor(){this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.single="",this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1}build(){let t=this.intro();t.onchange(e=>this.conditions(t._currentStep,e,1)),t.start(),t.onbeforeexit(()=>this.onExit(t._currentStep,1)),t.onexit(()=>{this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1,20===t._currentStep&&window.Buttonizer.bar.groupHolder.querySelector(".create-new-button").click()})}getAmount(){return this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.amount}conditions(t,e,n){if(this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,1===n)if(0===t)window.Buttonizer.bar.settingContainer.classList.contains("hidden")||window.Buttonizer.bar.settingContainer.querySelector(".back-button").click();else if(4===t){if(!this.setupStep5){this.setupStep5=!0,document.querySelector(".options-button").addEventListener("click",()=>{null!==this.tour&&this.tour.goToStep(6)})}"backward"===this.tour._direction&&(document.querySelector(".options-window").hasAttribute("hidden")||document.querySelector(".options-window").setAttribute("hidden",""))}else if(5===t)document.querySelector(".options-window").hasAttribute("hidden")&&document.querySelector(".options-window").removeAttribute("hidden"),"backward"===this.tour._direction&&document.querySelector(".options-window").classList.remove("disabled");else if(6===t){document.querySelector(".options-window").hasAttribute("hidden")&&document.querySelector(".options-window").removeAttribute("hidden"),document.querySelector(".options-window").setAttribute("style","z-index:9999999 !important"),document.querySelector(".options-window").classList+=" disabled";let t=window.Buttonizer.topBar.optionsWindow.querySelector(".single-button");t.style.pointerEvents="all",t.style.cursor="pointer",this.setupStep7||(this.setupStep7=!0,t.addEventListener("click",()=>{null!==this.tour&&this.tour.nextStep()})),"backward"===this.tour._direction&&(window.Buttonizer.settingsWindow.title.parentElement.parentElement.style.display="none")}else if(7===t)document.querySelector(".options-window").removeAttribute("style","z-index:9999999 !important"),document.querySelector(".options-window").classList.remove("disabled"),window.Buttonizer.settingsWindow.title.parentElement.parentElement.style.display="block",window.Buttonizer.settingsWindow.title.parentElement.parentElement.setAttribute("style","z-index:9999999 !important;pointer-events: none;"),document.querySelector(".options-window").hasAttribute("hidden")||document.querySelector(".options-window").setAttribute("hidden","");else if(8===t)window.Buttonizer.settingsWindow.title.parentElement.parentElement.removeAttribute("style","z-index:9999999 !important"),window.Buttonizer.settingsWindow.title.parentElement.parentElement.style.display="none";else if(9===t){if(!this.setupStep10){this.setupStep10=!0,window.Buttonizer.bar.groupHolder.querySelector(".button-group-holder").querySelector(".group-style").addEventListener("click",()=>{null!==this.tour&&!1===this.setupStep11&&this.tour.nextStep()})}"backward"===this.tour._direction&&(this.setupStep11=!1,Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 50px; height: 60px; top: 67px; left: 276px;"),document.querySelector(".introjs-helperLayer").setAttribute("style","width: 50px; height: 60px; top: 67px; left: 276px;")},100),window.Buttonizer.bar.settingContainer.querySelector(".back-button").click())}else if(10===t)"forward"===this.tour._direction&&(0==this.setupStep11&&(this.setupStep11=!0,window.Buttonizer.buttonGroups[0].groupHolder.toggleStyling()),this.tour._introItems[11].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-top"),this.tour._introItems[13].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-button"),this.tour._introItems[14].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-icon"),this.tour._introItems[15].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-label"),console.log(this.tour._introItems[11]),Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 385px; height: 966px; top: 46px; left: -5px;")},100),window.Buttonizer.bar.settingContainer.querySelector(".back-button").style.pointerEvents="none");else if(12===t)1===this.amount&&("forward"===this.tour._direction?Object(qe.setTimeout)(()=>{this.tour.nextStep()},100):"backward"===this.tour._direction&&Object(qe.setTimeout)(()=>{this.tour.previousStep()},100));else if(15===t)"backward"===this.tour._direction&&(window.Buttonizer.buttonGroups[0].groupHolder.toggleStyling(),Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 371px; height: 263px; top: 688px; left: 2px;")},100));else if(16===t||17===t||18===t||19===t){window.Buttonizer.bar.settingContainer.querySelector(".back-button").click(),window.Buttonizer.bar.groupHolder.querySelector(".create-new-button").addEventListener("click",()=>{null!==this.tour&&this.tour.goToStep(21)}),16===t&&(this.tour._direction="forward")&&(1===this.getAmount()&&window.Buttonizer.buttonGroups[0].groupHolder.quickMenu.querySelector(".convert-button").click(),window.Buttonizer.buttonGroups[0].groupObject.classList.contains("opened")||window.Buttonizer.buttonGroups[0].groupHolder.revealButtons(),Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"width: 333px !important; height: 48px !important; left: 36px !important;"),document.querySelector(".introjs-helperLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"width: 333px !important; height: 48px !important; left: 36px !important;")},100))}else 20===t&&Object(qe.setTimeout)(()=>{this.tour.exit()},100);else if(2===n){let e=window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group")[window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group").length-1];if(0===t);else if(2===t)Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"left: 276px !important;")},100);else if(2===t)"backward"===this.tour._direction&&(e.querySelector(".group-title").style.pointerEvents="all",e.querySelector(".mobile-desktop").style.pointerEvents="all");else if(3===t)(e.querySelector(".group-holder-quick-menu").style.visibility="visible")&&(e.querySelector(".group-holder-quick-menu").style.visibility="hidden",e.querySelector(".group-holder-quick-menu").style.top="45px",e.querySelector(".group-holder-quick-menu").style.opacity="0"),Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style"))},100),e.querySelector(".group-title").style.pointerEvents="none",e.querySelector(".mobile-desktop").style.pointerEvents="none",this.setup2Step4||(this.setup2Step4=!0,e.querySelector(".holder-button").addEventListener("click",()=>{null!==this.tour&&this.tour.nextStep()})),e.querySelector(".holder-button").style.backgroundColor="rgb(255, 255, 255)";else if(4===t){if((e.querySelector(".group-holder-quick-menu").style.visibility="hidden")&&(e.querySelector(".group-holder-quick-menu").style.visibility="visible",e.querySelector(".group-holder-quick-menu").style.top="50px",e.querySelector(".group-holder-quick-menu").style.opacity="1"),"backward"===this.tour._direction){e.querySelector(".fa-wrench").parentElement.style.pointerEvents="none",e.querySelector(".group-holder-quick-menu").style.pointerEvents="none"}else"forward"===this.tour._direction&&(e.querySelector(".group-holder-quick-menu").style.pointerEvents="none");this.amount>=8&&Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"top: 684px !important;")},100)}else if(5===t){"backward"===this.tour._direction&&(this.setup2Step7=!1,e.querySelector(".group-holder-quick-menu").style.visibility="visible",e.querySelector(".group-holder-quick-menu").style.top="50px",e.querySelector(".group-holder-quick-menu").style.opacity="1",window.Buttonizer.bar.settingContainer.querySelector(".back-button").click(),Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"left: 36px !important;")},100)),this.amount>=8&&Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"top: 692px !important;")},100),e.querySelector(".group-holder-quick-menu").setAttribute("style",e.querySelector(".group-holder-quick-menu").getAttribute("style")+"z-index: 99999999 !important;");let t=e.querySelector(".fa-wrench").parentElement;t.style.pointerEvents="all",t.style.cursor="pointer",this.setup2Step6||(this.setup2Step6=!0,e.querySelector(".fa-wrench").parentElement.addEventListener("click",()=>{null!==this.tour&&!1===this.setup2Step7&&this.tour.nextStep()}))}else 6===t?("forward"===this.tour._direction&&(0==this.setup2Step7&&(this.setup2Step7=!0,e.querySelector(".settings").click()),Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 385px; height: 966px; top: 46px; left: -5px;")},100)),e.querySelector(".group-holder-quick-menu").style.visibility="hidden",e.querySelector(".group-holder-quick-menu").style.top="45px",e.querySelector(".group-holder-quick-menu").style.opacity="0"):10===t?(e.querySelector(".settings").click(),"backward"===this.tour._direction&&Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 371px; height: 224px; top: 630px; left: 2px;")},100)):11===t&&(window.Buttonizer.bar.settingContainer.querySelector(".back-button").click(),this.setup2Step12||(this.setup2Step12=!0,window.Buttonizer.topBar.topBarElement.querySelector(".revert-save").addEventListener("click",()=>{null!==this.tour&&this.tour.nextStep()})))}}onExit(t,e){if(this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1,1===e)(window.Buttonizer.bar.settingContainer.querySelector(".back-button").style.pointerEvents="none")&&(window.Buttonizer.bar.settingContainer.querySelector(".back-button").style.pointerEvents="all"),5===t?document.querySelector(".options-window").setAttribute("hidden",""):6===t?document.querySelector(".options-window").classList.remove("disabled"):7===t?window.Buttonizer.settingsWindow.title.parentElement.parentElement.removeAttribute("style","z-index:9999999 !important;pointer-events: none;"):20===t&&Object(qe.setTimeout)(()=>{let t=this.intro2();t.onchange(e=>this.conditions(t._currentStep,e,2)),t.start(),t.onbeforeexit(()=>this.onExit(t._currentStep,2)),t.onexit(()=>{this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1,20===t._currentStep&&window.Buttonizer.bar.groupHolder.querySelector(".create-new-button").click()})},300);else if(2===e){let e=window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group")[window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group").length-1];3===t&&(e.querySelector(".group-title").style.pointerEvents="all",e.querySelector(".mobile-desktop").style.pointerEvents="all"),e.querySelector(".group-holder-quick-menu").hasAttribute("style")&&e.querySelector(".group-holder-quick-menu").setAttribute("style",""),e.querySelector(".group-holder-quick-menu").classList.contains("disabled")&&e.querySelector(".group-holder-quick-menu").classList.remove("disabled"),(e.querySelector(".group-holder-quick-menu").style.pointerEvents="none")&&(e.querySelector(".group-holder-quick-menu").style.pointerEvents="all"),(e.querySelector(".group-title").style.pointerEvents="none")&&(e.querySelector(".group-title").style.pointerEvents="all"),(e.querySelector(".mobile-desktop").style.pointerEvents="none")&&(e.querySelector(".mobile-desktop").style.pointerEvents="all"),(e.querySelector(".fa-wrench").parentElement.style.pointerEvents="none")&&(e.querySelector(".fa-wrench").parentElement.style.pointerEvents="all")}}intro(){return this.tour=Pe(),this.tour.setOptions({showBullets:!1,exitOnOverlayClick:!1,skipLabel:"Exit tour",doneLabel:"Exit tour",scrollToElement:!0,showStepNumbers:!1,disableInteraction:!0,keyboardNavigation:!1}),this.tour.setOptions({steps:[{intro:"<b><h2>Welcome to the Buttonizer tour!</h2></b> \n Start the tour and save time. Master the Buttonizer skills in only two minutes",position:"left",tooltipClass:"max-width"},{element:document.querySelector(".buttonizer-bar"),intro:"<b><h2>Buttonizer bar</h2></b> Manage all your Floating Action Button and Floating menu's in the Buttonizer bar.",position:"left"},{element:document.querySelector(".buttonizer-frame"),intro:"<b><h2>Preview</h2></b> Watch the impact of your changes in the preview pane. Your buttons will only be visible to your website visitor after you click on 'Publish'.",position:"left"},{element:document.querySelector(".buttonizer-topbar"),intro:"<b><h2>Top bar</h2></b> In the top bar, you can:</br>\n\n <h4 style=\"font-weight:400;text-align:left;padding:0 15px\">\n 1. Click the <b>'X'</b> to go back to WordPress</br>\n 2. <b>Revert</b> changes you have made</br>\n 3. <b>Publish</b> all your changes</br>\n 4. Access the <b>general settings</b>.\n </h4>",position:"left",tooltipClass:"middle"},{element:document.querySelector(".buttonizer-topbar .options-button"),intro:"Click here <b>→</b> </br> to go to Buttonizer's general settings.",position:"left",disableInteraction:!1},{element:document.querySelector(".options-window"),intro:"<b><h2>Menu</h2></b>\n <b>Knowledgebase: </b>Want to know what you can do with Buttonizer? Take a look at our Knowledgebase!</br>\n <b>I need support: </b>Visit our support page and ask for help from us or other users.</br>\n <b>Community: </b>Visit our community page and interact with other Buttonizer users!</br>\n <b>My account: </b>View your account details and license.</br>\n <b>Upgrade or pricing: </b>Upgrade or extend your license.</br>\n <b>Affiliation: </b>Like the plugin? Become our ambassador and earn cash ;-)</br>\n <b>Options: </b>Change general settings like icon libraries and Google Analytics.</br>\n ",position:"left",tooltipClass:"wider"},{element:window.Buttonizer.topBar.optionsWindow.querySelector(".single-button"),intro:"Click on <b>Options</b> to open Buttonizer's general settings →",position:"left",disableInteraction:!1,highlightClass:"introjs-custom-hidden"},{element:window.Buttonizer.settingsWindow.title.parentElement.parentElement.querySelector(".window-menu"),intro:"<b><h2>Buttonizer settings</h2></b>\n <b>Icon library:</b> In this section, you will be able to choose other icon libraries, the icon library version and whether Buttonizer should import the icon library.</br>\n <b>Google Analytics:</b> Want to track your button events? Place your Google Analytics code here!</br>\n <b>Reset:</b> Comletely reset Buttonizer's data.</br>\n ",position:"left",highlightClass:"introjs-custom-hidden",tooltipClass:"wider"},{element:window.Buttonizer.bar.groupHolder.querySelector(".button-group-holder"),intro:"<b><h2>Button group</h2></b>\n A button group contains buttons.</br>\n Button groups are only visible when there are <u><b>2 or more buttons</b></u> within the group.</br></br>\n The buttons in a button group are dedicated to one position. Add multiple button groups if you want to create more floating action buttons dedicated to different positions.\n ",position:"right",tooltipClass:"max-width"},{element:window.Buttonizer.bar.groupHolder.querySelector(".button-group-holder").querySelector(".group-style"),intro:"<b>←</b> Click here</br>\n to show group settings.",position:"right",disableInteraction:!1},{element:window.Buttonizer.bar.settingContainer,intro:"<b><h2>Group settings</h2></b>\n You can change the style of the button group here.</br>\n Click on the left arrow to go back.\n ",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",scrollTo:!1,tooltipClass:"intojs-foff-height"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-top"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-top"),intro:"<b><h2>Position & device visibility</h2></b>\n <b>Postion:</b> When you change the position of the button group it will move the whole group, including the buttons.</br> \n <b>Device visibilty:</b> You can choose whether you want the <b><u>whole group</u></b> to be visible on desktop or mobile devices.\n ",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-menu"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-menu"),intro:"<b><h2>Menu style</h2></b>\n <b>Start opened:</b> You can now set Buttonizer to automatically open! </br>\n <b>Menu style:</b> Change how your floating menu is shown.</br>\n <b>Animation:</b> Buttonizer will animate every 10 seconds to grab the attention of the user.</br>\n ",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-button"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-button"),intro:"<b><h2>Group button style</h2></b>\n <b>Button color:</b> Change the color of the button group.</br>\n <b>Border radius:</b> You can now change the border radius of the button group!</br>\n <b>Background image:</b> Choose an image to use as a background of the button group.</br>\n ",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-icon"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-icon"),intro:'<b><h2>Group icon</h2></b>\n <b>Graphic:</b> Choose whether to use an <u><b>icon</b></u> or an <u><b>image</b></u> as an icon.</br>\n <b><h2 style="margin: 1em 0 0 0;">Icon</h2></b>\n <b>Icon:</b> Choose you favorite icon from your selected icon library.</br>\n <b>Icon color:</b> Change the color of the icon.</br>\n <b>Icon size:</b> Change the size of the icon.</br>\n <b><h2 style="margin: 1em 0 0 0;">Image</h2></b>\n <b>Icon image:</b> Choose an image to use as an icon for the button group.</br>\n <b>Border radius:</b> You can change the border radius of the image.</br>\n <b>Image size:</b> Change the size of the image icon.</br>\n ',position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-label"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-label"),intro:"<b><h2>Label style</h2></b>\n <b>Label:</b> Change the label of the button group.</br>\n <b>Visibility:</b> Always show, show on hover or hide the label. Choose for desktop and mobile devices!</br>\n <b>Label color:</b> Change the text and label color of the label.</br>\n <b>Font size & border radius:</b> Change the font size and border radius of the label.</br>\n ",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:"<b><h2>Add new button</h2></b>\n ← Click here </br>\n to add a new button.\n ",position:"right",disableInteraction:!1},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:"Don't click on next but click on 'Add button +'",position:"right",disableInteraction:!1},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:"If you don't want to click add button I can do you the honor :)",position:"right",disableInteraction:!1},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:"Here, on the left... If you won't click it, I will click it >:-)",position:"right",disableInteraction:!1},{position:"bottom",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"introjs-custom-gone"},{position:"bottom",intro:"Hello? Please click that button...",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"introjs-custom-gone"},{position:"bottom",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"introjs-custom-gone"}]}),this.tour}intro2(){this.tour=Pe(),this.tour.setOptions({showBullets:!1,exitOnOverlayClick:!1,skipLabel:"Exit tour",doneLabel:"Exit tour",scrollToElement:!0,showStepNumbers:!1,disableInteraction:!0,keyboardNavigation:!1});let t=window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group")[window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group").length-1],e=window.Buttonizer.bar.settingContainer;return this.tour.setOptions({steps:[{element:t,intro:"<b><h2>Button</h2></b> You have created a new button! This is a button. Buttons are contained within a group.",position:"right"},{element:this.amount<=7?t.querySelector(".group-title"):t,intro:"<b><h2>Button name</h2></b> This is the name of the button.",position:"bottom",scrollToElement:!1,highlightClass:"introjs-custom-gone"},{element:this.amount<=7?t.querySelector(".mobile-desktop"):t,intro:"<b><h2>Visibility</h2></b> You can quickly change the visibility of a button! Show or hide the button on desktop or mobile.",position:"bottom",highlightClass:"introjs-custom-gone"},{element:this.amount<=7?t.querySelector(".holder-button"):t,intro:"← Click here <br> to show the menu",position:"right",highlightClass:"introjs-custom-gone",disableInteraction:!1},{element:this.amount<=7?t.querySelector(".group-holder-quick-menu"):t,intro:'<b><h2>Menu</h2></b>\n <p style="text-align: left;">\n <b>Button settings:</b> Edit the style of the button.</br>\n <b>Advanced settings:</b> Make the button appear/hide on certain pages and time! (only for our premium users).</br>\n <b>Rename button:</b> Rename the button.</br>\n <b>Duplicate button:</b> Make a copy of the button.</br>\n <b>Delete button:</b> Delete the button.</br></p>\n ',position:"right",highlightClass:"introjs-custom-gone"},{element:this.amount<=7?t.querySelector(".group-holder-quick-menu").querySelector(".settings"):t,intro:"← Click here </br> to show the button settings",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-hidden"},{element:window.Buttonizer.bar.settingContainer,intro:"<b><h2>Button settings</h2></b> These are the button settings. Pretty similar to the group settings.",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone"},{element:e.querySelectorAll(".style-top")[e.querySelectorAll(".style-top").length-1],intro:"<b><h2>Position & device visibility</h2></b>\n <b>Button action:</b> Choose the action of the button.</br>\n <b>Device visibility:</b> You can choose whether you want the button to be visible on desktop or mobile devices.</br>\n ",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:e.querySelectorAll(".style-button")[e.querySelectorAll(".style-button").length-1],intro:"<b><h2>Button style</h2></b>\n When enabled, the button will copy the button and label style of the group. </br>\n Turn it off to change the style of the button!\n ",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:e.querySelectorAll(".style-icon")[e.querySelectorAll(".style-icon").length-1],intro:"<b><h2>Icon style</h2></b>\n <b>Graphic:</b> Choose whether to use an <u><b>icon</b></u> or an <u><b>image</b></u> as an icon.</br>\n <b><h2>Icon</h2></b>\n <b>Icon:</b> Choose an icon from your selected icon library.</br>\n <b>Icon color:</b> Change the color of the icon.</br>\n <b>Icon size:</b> Change the size of the icon.</br>\n <b><h2>Image</h2></b>\n <b>Icon image:</b> Choose an image to use as an icon for the button.</br>\n <b>Border radius:</b> You can change the border radius of the image.</br>\n <b>Image size:</b> Change the size of the image icon.</br>\n ",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:e.querySelectorAll(".style-label")[e.querySelectorAll(".style-label").length-1],intro:"<b><h2>Label style</h2></b>\n <b>Label:</b> Change the label of the button.<br>\n <b>Visibility:</b> Always show, show on hover or hide the label. Choose for desktop and mobile devices!</br>\n <b>Label color:</b> Change the label color.</br>\n <b>Font size & border radius:</b> Change the font size and border radius of the label.</br>\n ",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:window.Buttonizer.topBar.topBarElement.querySelector(".revert-save"),intro:"<b><h2>Revert or Save</h2></b>\n <b>Revert changes:</b> Delete all the changes you've made this session.</br>\n <b>Save & publish:</b> Save and publish the changes you've made this session.\n ",position:"right",disableInteraction:!0,tooltipClass:"right"},{intro:'<b><h2>That was it!</h2></b> \n Thank you for taking the tour, that\'s all folks! We hope that you now know how to use Buttonizer! If you have any questions left, ask them on the <a href="https://community.buttonizer.pro" target="_blank">Buttonizer Community</a> forums!<br />\n <br />\n If you have feedback regarding the Buttonizer Tour, let us know!\n ',position:"left",tooltipClass:"max-width"}]}),this.tour}}window.bdebug=new i;window.Buttonizer=new class{constructor(){this.loader={},this.topBar={},this.bar={},this.assetsLink=".",this.tour=null,this.version="-",this.settings={},this.buttonGroups=[],this.savingMechanism={},this.buttonizerInitData=[],this.timeSchedule={},this.pageRule={},this.windowsZindex=9999,this.bc,this.loading=!0,this.settingsWindow={},this.iframe=null,this.iframeLoaded=!1,this.iconLibraryLoaded=!1,this.ButtonizerStartedLoading=0,this.iconSelector=null,this.iconLibraryStylesheet=null,this.previewWarning=null,this.premium=!1,this.init(!0)}set buttonChanges(t){this.loading||(this.bc=t)}get buttonChanges(){return this.bc}init(t){document.body.className+=" buttonizer-initialized",bdebug.welcomeToTheConsole(),!0===t&&bdebug.startDebugging(),bdebug.warning("Buttonizer 2.0");let e=document.createElement("link");e.rel="shortcut icon",e.href=buttonizer_admin.dir+"/favicon.ico",document.head.appendChild(e),this.loader=new Te,this.loader.show("Loading settings..."),this.savingMechanism=new Be,bdebug.warning("Buttonizer settings loading"),this.ButtonizerStartedLoading=(new Date).getTime(),this.loadSettings()}loadSettings(){jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=ButtonizerInitializer",dataType:"json",method:"get",success:t=>{bdebug.warning("Buttonizer settings loaded: "+((new Date).getTime()-this.ButtonizerStartedLoading)/1e3+"s"),"success"===t.status?this.defineSettings(t):this.fatalErrorLoading("<b>"+t.message+"</b>","Buttonizer.loadSettings().success")},error:(t,e,n)=>{this.loader.hide(),this.fatalErrorLoading("<b>"+e.toUpperCase()+":</b><br />"+n,"Buttonizer.loadSettings().error")}})}fatalErrorLoading(t,e){new r({title:"Error!",content:`\n <p>Oh, that was not what I was expecting! Something went wrong while we tried to load all Buttonizer settings.</p>\n <p>Try to reload the webpage. If that did not work, send us a <a href="https://community.buttonizer.pro/" target="_blank">support request</a>.</p>\n <p>Report the following information:</p>\n <p style='color: #FF0000; display: block; border: 1px solid #FF0000; padding: 10px;'>${t}<br /><br />Function place: ${e}</p>`,onConfirm:()=>{document.location.reload()},buttons:[{text:"Reload webpage",confirm:!0}]})}fatalError(t){console.error(t);let e=document.createElement("div");e.innerHTML='<p>Oh, that was not what we were expecting! Something went wrong.</p>\n <p>Try to reload the webpage. If that did not work, send us a <a href="https://community.buttonizer.pro/" target="_blank">support request</a>.</p>';let n=document.createElement("p");n.innerHTML="Do you want to see technical details? <a href='javascript:void(0)'>Click here!</a>",e.appendChild(n);let i=document.createElement("code");i.style.overflowX="auto",i.style.whiteSpace="nowrap",i.innerText=`Error type: ${t.name}\n \n Stack trace:\n \n ${t.stack}`,i.style.display="none",e.appendChild(i),n.addEventListener("click",()=>{n.style.display="none",i.style.display="block"}),new r({title:"Error!?!?1?!1?!",content:e,buttons:[{text:"Close",confirm:!0}]})}defineSettings(t){this.settings=t.settings,this.version=t.version,this.buttonizerInitData=t,this.premium=t.premium,xt.setDefaults({onShow:()=>"true"===this.getSetting("show_tooltips","true")||!0===this.getSetting("show_tooltips")}),this.loader.show("Building bar..."),this.topBar=new Oe(this),this.bar=new Le(this),this.previewWarning=this.leftButtonizerWarning(),this.changes=t.changes,t.changes&&this.topBar.alertText.alert("Loaded changes from previous session"),this.initializeSettings(t.settings),this.initializeTimeSchedules(),this.initializePageRules(),this.loadButtonGroups(),this.loading=!1,this.settingsWindow=new Me,document.location.href.indexOf("open-settings")>=0&&this.settingsWindow.show(),this.iconSelector=new He,1!==this.buttonGroups.length||this.buttonGroups[0].singleButtonMode||this.buttonGroups[0].groupHolder.revealButtons(),this.createIframe();let e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href="https://use.fontawesome.com/releases/v5.8.2/css/all.css",e.integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay",e.setAttribute("crossorigin","anonymous"),document.getElementsByTagName("head")[0].appendChild(e),window.addEventListener("message",t=>{t.isTrusted&&void 0!==t.data&&void 0!==t.data.eventType&&"buttonizer"===t.data.eventType&&("warning"===t.data.messageType?this.topBar.updateEventLogs(t.data.message):"javascript_error"===t.data.messageType?new r({title:"Custom javascript error",content:`\n <p>Your custom javascript ran into an error. Read the error below:</p> <p><code style="display: block; padding: 15px;">${t.data.message}</code></p>\n `,buttons:[{text:"OK, I'll fix this",confirm:!0}]}):"(re)loaded"===t.data.messageType&&console.log("[Buttonizer ADMIN] Buttonizer is (re)loaded! So last changes can be seen in the preview window."))},!1),document.location.href.indexOf("tour")>=0&&this.startTour()}startTour(){null===this.tour&&(this.tour=new De),this.tour.build()}createIframe(){let t=""===document.location.hash||"#open-settings"===document.location.hash?this.buttonizerInitData.wordpress.base:decodeURIComponent(document.location.hash.substr(1)),e=document.createElement("div");e.className="buttonizer-frame";let n=document.createElement("iframe");n.src=t+"?buttonizer-preview=1",n.id="buttonizer-iframe",n.setAttribute("frameborder","0"),n.setAttribute("width","100%"),n.setAttribute("height","100%"),n.addEventListener("load",t=>{this.iframeLoaded=!0,-1===t.target.contentWindow.location.href.indexOf("buttonizer-preview")&&-1===document.body.className.indexOf("warning-left-preview-window")&&(document.body.className+=" warning-left-preview-window",this.previewWarning.style.display="block")}),e.appendChild(n),document.body.appendChild(e),this.loader.show("Waiting for your website...","site-loading"),setTimeout(()=>{this.iframeLoaded||this.loader.show("Waiting for your website...<br /><br /><small>It's taking longer than usual, slow website?<br /><br /><a href='javascript:void(0)' onclick='window.Buttonizer.loader.hide()'>Skip this step</a></small>")},5e3);let i=setInterval(()=>{this.iframeLoaded&&this.iconLibraryLoaded&&(this.loader.hide(),document.body.className+=" buttonizer-loaded",clearInterval(i))})}welcome(){this.loader.hide(),new r({title:"Welcome to Buttonizer "+this.version,content:`\n <img src="${buttonizer_admin.assets}/images/plugin-icon.png" width="100" align="left" style="margin-right: 20px; margin-bottom: 10px;" />\n <p>We are pleased to welcome you to <b>Buttonizer 2.0</b>!</p>\n <p>We've created a tour for our new users, would you like to take the tour?</p>\n `,onClose:()=>{this.saveSettings({welcome:"false"},!0)},onConfirm:()=>{this.startTour()},buttons:[{text:'No thanks, I know how it works <i class="fa fa-chevron-right" style="margin-left: 10px; vertical-align: middle;" aria-hidden="true"></i>',close:!0},{text:'Yes please <i class="fa fa-chevron-right" style="margin-left: 10px; vertical-align: middle;" aria-hidden="true"></i>',confirm:!0}]})}updateButtonsTo2Point0(){new r({title:"Hi Buttonizer!",content:"\n <p>It seems like you've installed Buttonizer 2.0 before, but, you installed version 1.5 later again and then updated back to 2.0!</p>\n <p>The migration progress did not run, as it already ran back then. So, to convert your buttons, press the button below!</p>\n \n <p>If this window keeps popping up, even when you've tried to convert the buttons, try to reset Buttonizer. Go to the 'cog' icon (<i class=\"fas fa-cog\"></i>) on the bar on the top, then go to 'Options <i class=\"fas fa-cogs\"></i>' and go to the tab 'Reset' and follow the steps.</p> \n ",onConfirm:()=>{window.Buttonizer.loader.show("Running migration..."),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=migrate-buttonizer",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{"success"===t.status?(window.Buttonizer.loader.show("Finishing..."),setTimeout(()=>{document.location.reload()},500)):(window.Buttonizer.loader.hide(),window.Buttonizer.savingError(t.message))},error:(t,e,n)=>{window.Buttonizer.loader.hide(),window.Buttonizer.savingError(e)}})},buttons:[{text:"I am OK",close:!0},{text:'Convert my buttons! <i class="fa fa-chevron-right" style="margin-left: 10px; vertical-align: middle;" aria-hidden="true"></i>',confirm:!0}]})}leftButtonizerWarning(){let t=document.createElement("div");t.className="buttonizer-warning warning-red",t.innerHTML="You left the Buttonizer preview window. You will not see changes you make..";let e=document.createElement("a");return e.href="javascript:void(0)",e.className="buttonizer-warning-button",e.innerText="Return to preview",e.addEventListener("click",()=>{document.body.className=document.body.className.replace("warning-left-preview-window",""),this.previewWarning.style.display="none",document.getElementById("buttonizer-iframe").setAttribute("src",window.Buttonizer.buttonizerInitData.wordpress.base+"?buttonizer-preview=true")}),t.appendChild(e),document.body.appendChild(t),t}saveSettings(t,e){e&&this.loader.show("Saving settings..."),Object.assign(this.settings,t),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=settings",dataType:"json",method:"post",data:{data:this.settings,security:buttonizer_admin.security},success:t=>{this.loader.hide(),"success"!==t.status&&window.Buttonizer.savingError(t.message)},error:t=>{this.loader.hide(),window.Buttonizer.savingError(t)}})}registerButton(t){}saveButtons(){console.log(this.buttons)}initializeSettings(t){"true"===t.welcome.toString()&&this.welcome(),this.settings=t,this.addIconLibrary()}addIconLibrary(){let t=!1;null===this.iconLibraryStylesheet&&(this.iconLibraryStylesheet=document.createElement("link"),this.iconLibraryStylesheet.rel="stylesheet",this.iconLibraryStylesheet.type="text/css",t=!0),"fontawesome"!==this.settings.icon_library||"5.free"!==this.settings.icon_library_version&&"5.paid"!==this.settings.icon_library_version?"fontawesome"===this.settings.icon_library&&"4.7.0"===this.settings.icon_library_version&&(this.iconLibraryStylesheet.setAttribute("integrity",""),this.iconLibraryStylesheet.href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"):("5.paid"===this.settings.icon_library_version&&""!==this.settings.icon_library_code?this.iconLibraryStylesheet.setAttribute("integrity",this.settings.icon_library_code):this.iconLibraryStylesheet.setAttribute("integrity","sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay"),this.iconLibraryStylesheet.setAttribute("crossorigin","anonymous"),this.iconLibraryStylesheet.href="https://"+("5.paid"===this.settings.icon_library_version?"pro":"use")+".fontawesome.com/releases/"+this.buttonizerInitData.fontawesome_current_version+"/css/all.css"),this.iconLibraryLoaded=!0}hasPremium(){return this.premium}showPremiumPopup(t){new r({title:'<i class="far fa-gem window-icon"></i> Premium feature',content:`\n <p>Hi there, this function is a premium feature. We will describe what this feature will do:</p>\n <code style="display: block; margin-bottom: 5px; padding: 10px;">${t}</code>\n <p><b>What do I get as a premium user?</b></p>\n \n <ul class="buttonizer-pro-checklist">\n <li><i class="fas fa-check"></i> Show button(groups) using the advanced time schedules</li>\n <li><i class="fas fa-check"></i> Show button(groups) on specific pages using advanced page rules</li>\n <li><i class="fas fa-check"></i> Create multiple button groups</li>\n <li><i class="fas fa-check"></i> Add custom button-icon and button background images</li>\n <li><i class="fas fa-check"></i> Exit intent</li>\n <li><i class="fas fa-check"></i> Show or hide on scroll</li>\n <li><i class="fas fa-check"></i> Show on timeout</li>\n <li><i class="fas fa-check"></i> Be able to set CSS class names and button IDs</li>\n <li><i class="fas fa-check"></i> Custom button background & icon image</li>\n <li><i class="fas fa-check"></i> Execute javascript on button clicks</li>\n </ul>`,onConfirm:()=>{document.location.href=buttonizer_admin.admin+"?page=Buttonizer-pricing"},buttons:[{text:"Close",close:!0},{text:'Go pro <i class="fas fa-chevron-right" style="margin-left: 5px;vertical-align: middle;"></i>',confirm:!0,close:!0,focus:!0}]})}getSetting(t,e){return void 0!==this.settings[t]?this.settings[t]:e}set changes(t){this.topBar.changes=t}updateButtonGroupList(t,e){this.buttonGroups.splice(t,0,this.buttonGroups.splice(e,1)[0]),this.buttonChanges=!0}updateButtonList(t,e,n,i){this.buttonGroups[n].buttons.splice(t,0,this.buttonGroups[i].buttons.splice(e,1)[0]),this.buttonGroups[n].buttons[t].groupObject=this.buttonGroups[n],this.buttonChanges=!0,this.buttonGroups[i].buttons.length<=1&&jQuery(this.buttonGroups[i].groupBody).sortable("option","cancel",".group-button")}savingError(t){new r({title:"Could not save settings",content:`<p>Something went wrong while saving your settings.</p><p>${t}</p>`,buttons:[{text:"Close",close:!0}]})}initializeTimeSchedules(){}initializePageRules(){}loadButtonGroups(){void 0!==this.buttonizerInitData.groups.buttonorder&&this.updateButtonsTo2Point0(),0!==this.buttonizerInitData.groups.length?new _e(this.buttonizerInitData.groups[0].data,this.buttonizerInitData.groups[0].buttons):new _e({name:"Buttonizer",position:"bottomright",icon:"fa fa-plus",horizontal:5,vertical:5},[{name:"First button",show_mobile:!0,show_desktop:!0},{name:"Second button",show_mobile:!0,show_desktop:!0}])}}},,function(t,e){}]);
|
63 |
* tippy.js v4.3.0
|
64 |
* (c) 2017-2019 atomiks
|
65 |
* MIT License
|
66 |
+
*/function g(){return(g=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var y="undefined"!=typeof window&&"undefined"!=typeof document,w=y?navigator.userAgent:"",v=/MSIE |Trident\//.test(w),k=/UCBrowser\//.test(w),E=y&&/iPhone|iPad|iPod/.test(navigator.platform)&&!window.MSStream,C={a11y:!0,allowHTML:!0,animateFill:!0,animation:"shift-away",appendTo:function(){return document.body},aria:"describedby",arrow:!1,arrowType:"sharp",boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,followCursor:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnInit:!1,size:"regular",sticky:!1,target:"",theme:"dark",touch:!0,touchHold:!1,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,wait:null,zIndex:9999},x=["arrow","arrowType","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"],S=y?Element.prototype:{},j=S.matches||S.matchesSelector||S.webkitMatchesSelector||S.mozMatchesSelector||S.msMatchesSelector;function _(t){return[].slice.call(t)}function O(t,e){return L(t,function(t){return j.call(t,e)})}function L(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null}var T={passive:!0},B=4,z="x-placement",A="x-out-of-boundaries",I="tippy-iOS",N="tippy-active",M=".tippy-popper",H=".tippy-tooltip",q=".tippy-content",P=".tippy-backdrop",D=".tippy-arrow",R=".tippy-roundarrow",F=Object.keys(C);function W(t,e){return{}.hasOwnProperty.call(t,e)}function Y(t,e,n){if(Array.isArray(t)){var i=t[e];return null==i?n:i}return t}function U(t,e){var n;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout(function(){return t.apply(i,o)},e)}}function G(t,e){return t&&t.modifiers&&t.modifiers[e]}function Q(t,e){return t.indexOf(e)>-1}function V(t){return t instanceof Element}function X(t){return!(!t||!W(t,"isVirtual"))||V(t)}function $(t,e){return"function"==typeof t?t.apply(null,e):t}function J(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function K(){return document.createElement("div")}function Z(t,e){t.forEach(function(t){t&&(t.style.transitionDuration="".concat(e,"ms"))})}function tt(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function et(t,e){var n=g({},e,{content:$(e.content,[t])},e.ignoreAttributes?{}:function(t){return F.reduce(function(e,n){var i=(t.getAttribute("data-tippy-".concat(n))||"").trim();if(!i)return e;if("content"===n)e[n]=i;else try{e[n]=JSON.parse(i)}catch(t){e[n]=i}return e},{})}(t));return(n.arrow||k)&&(n.animateFill=!1),n}function nt(t,e){Object.keys(t).forEach(function(t){if(!W(e,t))throw new Error("[tippy]: `".concat(t,"` is not a valid option"))})}function it(t,e){t.innerHTML=e instanceof Element?e.innerHTML:e}function ot(t,e){if(e.content instanceof Element)it(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function rt(t){return{tooltip:t.querySelector(H),backdrop:t.querySelector(P),content:t.querySelector(q),arrow:t.querySelector(D)||t.querySelector(R)}}function st(t){t.setAttribute("data-inertia","")}function at(t){var e=K();return"round"===t?(e.className="tippy-roundarrow",it(e,'<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>')):e.className="tippy-arrow",e}function lt(){var t=K();return t.className="tippy-backdrop",t.setAttribute("data-state","hidden"),t}function ct(t,e){t.setAttribute("tabindex","-1"),e.setAttribute("data-interactive","")}function ut(t,e,n){var i=k&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](i,n)}function dt(t){var e=t.getAttribute(z);return e?e.split("-")[0]:""}function pt(t,e,n){n.split(" ").forEach(function(n){t.classList[e](n+"-theme")})}function ht(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.checkHideOnClick,n=t.exclude,i=t.duration;_(document.querySelectorAll(M)).forEach(function(t){var o,r=t._tippy;if(r){var s=!e||!0===r.props.hideOnClick,a=!1;n&&(a=(o=n)._tippy&&!j.call(o,M)?r.reference===n:t===n.popper),s&&!a&&r.hide(i)}})}var mt=!1;function bt(){mt||(mt=!0,E&&document.body.classList.add(I),window.performance&&document.addEventListener("mousemove",gt))}var ft=0;function gt(){var t=performance.now();t-ft<20&&(mt=!1,document.removeEventListener("mousemove",gt),E||document.body.classList.remove(I)),ft=t}function yt(t){if(!(t.target instanceof Element))return ht();var e=O(t.target,M);if(!(e&&e._tippy&&e._tippy.props.interactive)){var n=L(t.target,function(t){return t._tippy&&t._tippy.reference===t});if(n){var i=n._tippy;if(i){var o=Q(i.props.trigger||"","click");if(mt||o)return ht({exclude:n,checkHideOnClick:!0});if(!0!==i.props.hideOnClick||o)return;i.clearDelayTimeouts()}}ht({checkHideOnClick:!0})}}function wt(){var t=document.activeElement;t&&t.blur&&t._tippy&&t.blur()}var vt=1;function kt(t,e){var n,i,o,r,s,a=et(t,e);if(!a.multiple&&t._tippy)return null;var l,c,u,d,p,h,m=!1,b=!1,y=!1,w=[],k=a.interactiveDebounce>0?U(wt,a.interactiveDebounce):wt,E=vt++,S=function(t,e){var n=K();n.className="tippy-popper",n.id="tippy-".concat(t),n.style.zIndex=""+e.zIndex,e.role&&n.setAttribute("role",e.role);var i=K();i.className="tippy-tooltip",i.style.maxWidth=e.maxWidth+("number"==typeof e.maxWidth?"px":""),i.setAttribute("data-size",e.size),i.setAttribute("data-animation",e.animation),i.setAttribute("data-state","hidden"),pt(i,"add",e.theme);var o=K();return o.className="tippy-content",o.setAttribute("data-state","hidden"),e.interactive&&ct(n,i),e.arrow&&i.appendChild(at(e.arrowType)),e.animateFill&&(i.appendChild(lt()),i.setAttribute("data-animatefill","")),e.inertia&&st(i),ot(o,e),i.appendChild(o),n.appendChild(i),n}(E,a),I=rt(S),H={id:E,reference:t,popper:S,popperChildren:I,popperInstance:null,props:a,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},clearDelayTimeouts:Bt,set:zt,setContent:function(t){zt({content:t})},show:At,hide:It,enable:function(){H.state.isEnabled=!0},disable:function(){H.state.isEnabled=!1},destroy:function(e){if(H.state.isDestroyed)return;H.state.isMounted&&It(0);bt(),delete t._tippy,delete D()._tippy;var n=H.props.target;n&&e&&V(t)&&_(t.querySelectorAll(n)).forEach(function(t){t._tippy&&t._tippy.destroy()});H.popperInstance&&H.popperInstance.destroy();H.state.isDestroyed=!0}};return t._tippy=H,S._tippy=H,D()._tippy=H,ht(),a.lazy||Ot(),a.showOnInit&&Lt(),a.a11y&&!a.target&&((h=t)instanceof Element&&(!j.call(h,"a[href],area[href],button,details,input,textarea,select,iframe,[tabindex]")||h.hasAttribute("disabled")))&&D().setAttribute("tabindex","0"),S.addEventListener("mouseenter",function(t){H.props.interactive&&H.state.isVisible&&"mouseenter"===n&&Lt(t,!0)}),S.addEventListener("mouseleave",function(){H.props.interactive&&"mouseenter"===n&&document.addEventListener("mousemove",k)}),H;function q(){document.removeEventListener("mousemove",gt)}function P(){document.body.removeEventListener("mouseleave",Tt),document.removeEventListener("mousemove",k)}function D(){return H.props.triggerTarget||t}function R(){return[H.popperChildren.tooltip,H.popperChildren.backdrop,H.popperChildren.content]}function F(){return H.props.followCursor&&!mt&&"focus"!==n}function X(t,e){var n=H.popperChildren.tooltip;function i(t){t.target===n&&(ut(n,"remove",i),e())}if(0===t)return e();ut(n,"remove",d),ut(n,"add",i),d=i}function it(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];D().addEventListener(t,e,n),w.push({eventType:t,handler:e,options:n})}function ht(){H.props.touchHold&&!H.props.target&&(it("touchstart",yt,T),it("touchend",Et,T)),H.props.trigger.trim().split(" ").forEach(function(t){if("manual"!==t)if(H.props.target)switch(t){case"mouseenter":it("mouseover",xt),it("mouseout",St);break;case"focus":it("focusin",xt),it("focusout",St);break;case"click":it(t,xt)}else switch(it(t,yt),t){case"mouseenter":it("mouseleave",Et);break;case"focus":it(v?"focusout":"blur",Ct)}})}function bt(){w.forEach(function(t){var e=t.eventType,n=t.handler,i=t.options;D().removeEventListener(e,n,i)}),w=[]}function ft(t){return H.props.arrow?p[t]+("round"===H.props.arrowType?18:16):p[t]}function gt(e){var n=i=e,o=n.clientX,r=n.clientY;if(p){var s=t.getBoundingClientRect(),a=H.props.followCursor,l="horizontal"===a,c="vertical"===a,u=dt(S),d=Q(["top","bottom"],u),h=Q(["left","right"],u),m=g({},p);d&&(m.left=ft("left"),m.right=ft("right")),h&&(m.top=ft("top"),m.bottom=ft("bottom"));var b=d?Math.max(m.left,o):o,f=h?Math.max(m.top,r):r;d&&b>m.right&&(b=Math.min(o,window.innerWidth-m.right)),h&&f>m.bottom&&(f=Math.min(r,window.innerHeight-m.bottom)),!L(e.target,function(e){return e===t})&&H.props.interactive||(H.popperInstance.reference=g({},H.popperInstance.reference,{getBoundingClientRect:function(){return{width:0,height:0,top:l?s.top:f,bottom:l?s.bottom:f,left:c?s.left:b,right:c?s.right:b}},clientWidth:0,clientHeight:0}),H.popperInstance.scheduleUpdate()),"initial"===a&&H.state.isVisible&&q()}}function yt(t){H.state.isEnabled&&!jt(t)&&(H.state.isVisible||(n=t.type,t instanceof MouseEvent&&(i=t)),"click"===t.type&&!1!==H.props.hideOnClick&&H.state.isVisible?Tt():Lt(t))}function wt(e){var n=L(e.target,function(t){return t._tippy});O(e.target,M)===S||n===t||function(t,e,n,i){if(!t)return!0;var o=n.clientX,r=n.clientY,s=i.interactiveBorder,a=i.distance,l=e.top-r>("top"===t?s+a:s),c=r-e.bottom>("bottom"===t?s+a:s),u=e.left-o>("left"===t?s+a:s),d=o-e.right>("right"===t?s+a:s);return l||c||u||d}(dt(S),S.getBoundingClientRect(),e,H.props)&&(P(),Tt())}function Et(t){if(!jt(t))return H.props.interactive?(document.body.addEventListener("mouseleave",Tt),void document.addEventListener("mousemove",k)):void Tt()}function Ct(t){t.target===D()&&(H.props.interactive&&t.relatedTarget&&S.contains(t.relatedTarget)||Tt())}function xt(t){O(t.target,H.props.target)&&Lt(t)}function St(t){O(t.target,H.props.target)&&Tt()}function jt(t){var e="ontouchstart"in window,n=Q(t.type,"touch"),i=H.props.touchHold;return e&&mt&&i&&!n||mt&&!i&&n}function _t(){!y&&u&&(y=!0,function(t){t.offsetHeight}(S),u())}function Ot(){var e=H.props.popperOptions,n=H.popperChildren,i=n.tooltip,o=n.arrow,r=G(e,"preventOverflow");function s(t){H.props.flip&&!H.props.flipOnUpdate&&(t.flipped&&(H.popperInstance.options.placement=t.placement),J(H.popperInstance.modifiers,!1)),i.setAttribute(z,t.placement),!1!==t.attributes[A]?i.setAttribute(A,""):i.removeAttribute(A),c&&c!==t.placement&&b&&(i.style.transition="none",requestAnimationFrame(function(){i.style.transition=""})),c=t.placement,b=H.state.isVisible;var e=dt(S),n=i.style;n.top=n.bottom=n.left=n.right="",n[e]=-(H.props.distance-10)+"px";var o=r&&void 0!==r.padding?r.padding:B,s="number"==typeof o,a=g({top:s?o:o.top,bottom:s?o:o.bottom,left:s?o:o.left,right:s?o:o.right},!s&&o);a[e]=s?o+H.props.distance:(o[e]||0)+H.props.distance,H.popperInstance.modifiers.filter(function(t){return"preventOverflow"===t.name})[0].padding=a,p=a}var a=g({eventsEnabled:!1,placement:H.props.placement},e,{modifiers:g({},e?e.modifiers:{},{preventOverflow:g({boundariesElement:H.props.boundary,padding:B},r),arrow:g({element:o,enabled:!!o},G(e,"arrow")),flip:g({enabled:H.props.flip,padding:H.props.distance+B,behavior:H.props.flipBehavior},G(e,"flip")),offset:g({offset:H.props.offset},G(e,"offset"))}),onCreate:function(t){_t(),s(t),e&&e.onCreate&&e.onCreate(t)},onUpdate:function(t){_t(),s(t),e&&e.onUpdate&&e.onUpdate(t)}});H.popperInstance=new f.a(t,S,a)}function Lt(t,n){if(Bt(),!H.state.isVisible){if(H.props.target)return function(t){if(t){var n=O(t.target,H.props.target);n&&!n._tippy&&kt(n,g({},H.props,{content:$(e.content,[n]),appendTo:e.appendTo,target:"",showOnInit:!0}))}}(t);if(m=!0,t&&!n&&H.props.onTrigger(H,t),H.props.wait)return H.props.wait(H,t);F()&&!H.state.isMounted&&(H.popperInstance||Ot(),document.addEventListener("mousemove",gt));var i=Y(H.props.delay,0,C.delay);i?o=setTimeout(function(){At()},i):At()}}function Tt(){if(Bt(),!H.state.isVisible)return q();m=!1;var t=Y(H.props.delay,1,C.delay);t?r=setTimeout(function(){H.state.isVisible&&It()},t):s=requestAnimationFrame(function(){It()})}function Bt(){clearTimeout(o),clearTimeout(r),cancelAnimationFrame(s)}function zt(e){nt(e=e||{},C),bt(),H.props.triggerTarget&&delete H.props.triggerTarget._tippy;var n=H.props,o=et(t,g({},H.props,e,{ignoreAttributes:!0}));o.ignoreAttributes=W(e,"ignoreAttributes")?e.ignoreAttributes||!1:n.ignoreAttributes,H.props=o,D()._tippy=H,ht(),P(),k=U(wt,e.interactiveDebounce||0),function(t,e,n){var i=rt(t),o=i.tooltip,r=i.content,s=i.backdrop,a=i.arrow;t.style.zIndex=""+n.zIndex,o.setAttribute("data-size",n.size),o.setAttribute("data-animation",n.animation),o.style.maxWidth=n.maxWidth+("number"==typeof n.maxWidth?"px":""),n.role?t.setAttribute("role",n.role):t.removeAttribute("role"),e.content!==n.content&&ot(r,n),!e.animateFill&&n.animateFill?(o.appendChild(lt()),o.setAttribute("data-animatefill","")):e.animateFill&&!n.animateFill&&(o.removeChild(s),o.removeAttribute("data-animatefill")),!e.arrow&&n.arrow?o.appendChild(at(n.arrowType)):e.arrow&&!n.arrow&&o.removeChild(a),e.arrow&&n.arrow&&e.arrowType!==n.arrowType&&o.replaceChild(at(n.arrowType),a),!e.interactive&&n.interactive?ct(t,o):e.interactive&&!n.interactive&&function(t,e){t.removeAttribute("tabindex"),e.removeAttribute("data-interactive")}(t,o),!e.inertia&&n.inertia?st(o):e.inertia&&!n.inertia&&function(t){t.removeAttribute("data-inertia")}(o),e.theme!==n.theme&&(pt(o,"remove",e.theme),pt(o,"add",n.theme))}(S,n,o),H.popperChildren=rt(S),H.popperInstance&&(H.popperInstance.update(),x.some(function(t){return W(e,t)&&e[t]!==n[t]})&&(H.popperInstance.destroy(),Ot(),H.state.isVisible&&H.popperInstance.enableEventListeners(),H.props.followCursor&&i&>(i)))}function At(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y(H.props.duration,0,C.duration[1]);if(!H.state.isDestroyed&&H.state.isEnabled&&(!mt||H.props.touch)&&!D().hasAttribute("disabled")&&!1!==H.props.onShow(H)){S.style.visibility="visible",H.state.isVisible=!0,H.props.interactive&&D().classList.add(N);var n=R();Z(n.concat(S),0),u=function(){H.state.isVisible&&(F()||H.popperInstance.update(),H.popperChildren.backdrop&&(H.popperChildren.content.style.transitionDelay=Math.round(e/12)+"ms"),H.props.sticky&&(Z([S],v?0:H.props.updateDuration),function t(){H.popperInstance.scheduleUpdate(),H.state.isMounted?requestAnimationFrame(t):Z([S],0)}()),Z([S],H.props.updateDuration),Z(n,e),tt(n,"visible"),function(t,e){X(t,e)}(e,function(){H.props.aria&&D().setAttribute("aria-".concat(H.props.aria),S.id),H.props.onShown(H),H.state.isShown=!0}))},function(){y=!1;var e=!(F()||"initial"===H.props.followCursor&&mt);H.popperInstance?(F()||(H.popperInstance.scheduleUpdate(),e&&H.popperInstance.enableEventListeners()),J(H.popperInstance.modifiers,H.props.flip)):(Ot(),e&&H.popperInstance.enableEventListeners()),H.popperInstance.reference=t;var n=H.popperChildren.arrow;F()?(n&&(n.style.margin="0"),i&>(i)):n&&(n.style.margin=""),mt&&i&&"initial"===H.props.followCursor&&(gt(i),n&&(n.style.margin="0"));var o=H.props.appendTo;(l="parent"===o?t.parentNode:$(o,[t])).contains(S)||(l.appendChild(S),H.props.onMount(H),H.state.isMounted=!0)}()}}function It(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y(H.props.duration,1,C.duration[1]);if(!H.state.isDestroyed&&H.state.isEnabled&&!1!==H.props.onHide(H)){S.style.visibility="hidden",H.state.isVisible=!1,H.state.isShown=!1,b=!1,H.props.interactive&&D().classList.remove(N);var e=R();Z(e,t),tt(e,"hidden"),function(t,e){X(t,function(){!H.state.isVisible&&l&&l.contains(S)&&e()})}(t,function(){m||q(),H.props.aria&&D().removeAttribute("aria-".concat(H.props.aria)),H.popperInstance.disableEventListeners(),H.popperInstance.options.placement=H.props.placement,l.removeChild(S),H.props.onHidden(H),H.state.isMounted=!1})}}}var Et=!1;function Ct(t,e){nt(e||{},C),Et||(document.addEventListener("click",yt,!0),document.addEventListener("touchstart",bt,T),window.addEventListener("blur",wt),Et=!0);var n,i=g({},C,e);n=t,"[object Object]"!=={}.toString.call(n)||n.addEventListener||function(t){var e={isVirtual:!0,attributes:t.attributes||{},setAttribute:function(e,n){t.attributes[e]=n},getAttribute:function(e){return t.attributes[e]},removeAttribute:function(e){delete t.attributes[e]},hasAttribute:function(e){return e in t.attributes},addEventListener:function(){},removeEventListener:function(){},classList:{classNames:{},add:function(e){t.classList.classNames[e]=!0},remove:function(e){delete t.classList.classNames[e]},contains:function(e){return e in t.classList.classNames}}};for(var n in e)t[n]=e[n]}(t);var o=function(t){if(X(t))return[t];if(t instanceof NodeList)return _(t);if(Array.isArray(t))return t;try{return _(document.querySelectorAll(t))}catch(t){return[]}}(t).reduce(function(t,e){var n=e&&kt(e,i);return n&&t.push(n),t},[]);return X(t)?o[0]:o}Ct.version="4.3.0",Ct.defaults=C,Ct.setDefaults=function(t){Object.keys(t).forEach(function(e){C[e]=t[e]})},Ct.hideAll=ht,Ct.group=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.delay,i=void 0===n?t[0].props.delay:n,o=e.duration,r=void 0===o?0:o,s=!1;function a(t){s=t,d()}function l(e){e._originalProps.onShow(e),t.forEach(function(t){t.set({duration:r}),t.hide()}),a(!0)}function c(t){t._originalProps.onHide(t),a(!1)}function u(t){t._originalProps.onShown(t),t.set({duration:t._originalProps.duration})}function d(){t.forEach(function(t){t.set({onShow:l,onShown:u,onHide:c,delay:s?[0,Array.isArray(i)?i[1]:i]:i,duration:s?r:t._originalProps.duration})})}t.forEach(function(t){t._originalProps?t.set(t._originalProps):t._originalProps=g({},t.props)}),d()},y&&setTimeout(function(){_(document.querySelectorAll("[data-tippy]")).forEach(function(t){var e=t.getAttribute("data-tippy");e&&Ct(t,{content:e})})}),function(t){if(y){var e=document.createElement("style");e.type="text/css",e.textContent=t;var n=document.head,i=n.firstChild;i?n.insertBefore(e,i):n.appendChild(e)}}('.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{transition-timing-function:cubic-bezier(.165,.84,.44,1);max-width:calc(100% - 8px);pointer-events:none;outline:0}.tippy-popper[x-placement^=top] .tippy-backdrop{border-radius:40% 40% 0 0}.tippy-popper[x-placement^=top] .tippy-roundarrow{bottom:-7px;bottom:-6.5px;-webkit-transform-origin:50% 0;transform-origin:50% 0;margin:0 3px}.tippy-popper[x-placement^=top] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.tippy-popper[x-placement^=top] .tippy-arrow{border-top:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;bottom:-7px;margin:0 3px;-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=top] .tippy-backdrop{-webkit-transform-origin:0 25%;transform-origin:0 25%}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-55%);transform:scale(1) translate(-50%,-55%)}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%,-45%);transform:scale(.2) translate(-50%,-45%);opacity:0}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}.tippy-popper[x-placement^=top] [data-animation=perspective]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(-10px) rotateX(0);transform:perspective(700px) translateY(-10px) rotateX(0)}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(60deg);transform:perspective(700px) translateY(0) rotateX(60deg)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=top] [data-animation=scale]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(-10px) scale(1);transform:translateY(-10px) scale(1)}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px) scale(.5);transform:translateY(-10px) scale(.5)}.tippy-popper[x-placement^=bottom] .tippy-backdrop{border-radius:0 0 30% 30%}.tippy-popper[x-placement^=bottom] .tippy-roundarrow{top:-7px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%;margin:0 3px}.tippy-popper[x-placement^=bottom] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(0);transform:rotate(0)}.tippy-popper[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;top:-7px;margin:0 3px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.tippy-popper[x-placement^=bottom] .tippy-backdrop{-webkit-transform-origin:0 -50%;transform-origin:0 -50%}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-45%);transform:scale(1) translate(-50%,-45%)}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%);transform:scale(.2) translate(-50%);opacity:0}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}.tippy-popper[x-placement^=bottom] [data-animation=perspective]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(10px) rotateX(0);transform:perspective(700px) translateY(10px) rotateX(0)}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(-60deg);transform:perspective(700px) translateY(0) rotateX(-60deg)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=bottom] [data-animation=scale]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(10px) scale(1);transform:translateY(10px) scale(1)}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px) scale(.5);transform:translateY(10px) scale(.5)}.tippy-popper[x-placement^=left] .tippy-backdrop{border-radius:50% 0 0 50%}.tippy-popper[x-placement^=left] .tippy-roundarrow{right:-12px;-webkit-transform-origin:33.33333333% 50%;transform-origin:33.33333333% 50%;margin:3px 0}.tippy-popper[x-placement^=left] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.tippy-popper[x-placement^=left] .tippy-arrow{border-left:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;right:-7px;margin:3px 0;-webkit-transform-origin:0 50%;transform-origin:0 50%}.tippy-popper[x-placement^=left] .tippy-backdrop{-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-75%,-50%);transform:scale(.2) translate(-75%,-50%);opacity:0}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}.tippy-popper[x-placement^=left] [data-animation=perspective]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(-10px) rotateY(0);transform:perspective(700px) translateX(-10px) rotateY(0)}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(-60deg);transform:perspective(700px) translateX(0) rotateY(-60deg)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=left] [data-animation=scale]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(-10px) scale(1);transform:translateX(-10px) scale(1)}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px) scale(.5);transform:translateX(-10px) scale(.5)}.tippy-popper[x-placement^=right] .tippy-backdrop{border-radius:0 50% 50% 0}.tippy-popper[x-placement^=right] .tippy-roundarrow{left:-12px;-webkit-transform-origin:66.66666666% 50%;transform-origin:66.66666666% 50%;margin:3px 0}.tippy-popper[x-placement^=right] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.tippy-popper[x-placement^=right] .tippy-arrow{border-right:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;left:-7px;margin:3px 0;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.tippy-popper[x-placement^=right] .tippy-backdrop{-webkit-transform-origin:-50% 0;transform-origin:-50% 0}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-25%,-50%);transform:scale(.2) translate(-25%,-50%);opacity:0}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}.tippy-popper[x-placement^=right] [data-animation=perspective]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(10px) rotateY(0);transform:perspective(700px) translateX(10px) rotateY(0)}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(60deg);transform:perspective(700px) translateX(0) rotateY(60deg)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=right] [data-animation=scale]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(10px) scale(1);transform:translateX(10px) scale(1)}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px) scale(.5);transform:translateX(10px) scale(.5)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;padding:.3125rem .5625rem;line-height:1.4;text-align:center;background-color:#333}.tippy-tooltip[data-size=small]{padding:.1875rem .375rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.375rem .75rem;font-size:1rem}.tippy-tooltip[data-animatefill]{overflow:hidden;background-color:transparent}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow,.tippy-roundarrow{position:absolute;width:0;height:0}.tippy-roundarrow{width:18px;height:7px;fill:#333;pointer-events:none}.tippy-backdrop{position:absolute;background-color:#333;border-radius:50%;width:calc(110% + 2rem);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop:after{content:"";float:left;padding-top:100%}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=visible]{opacity:1}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}');var xt=Ct;var St=class{constructor(t){this.buttonObject=t,this.buttonObject.stylingObject=this,this.groupHolder=null,this.buttonTitle=null,this.manageButtonMenu=null}build(){let t=document.createElement("div");return t.className="button-group-holder",t.appendChild(this.createTitleField()),t.appendChild(this.createButtonMobileDesktop()),t.appendChild(this.createButtonHolderButton()),t.appendChild(this.createQuickMenu()),this.groupHolder=t,t}createButtonHolderButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button";let e=document.createElement("i");return e.className="fas fa-ellipsis-v",t.appendChild(e),t.addEventListener("click",()=>{let t=this.groupHolder.className.indexOf("holder-show-quick-menu");jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),-1===t&&this.groupHolder.classList.add("holder-show-quick-menu")}),t}createQuickMenu(){let t=document.createElement("div");return t.className="group-holder-quick-menu",t.addEventListener("click",()=>{this.groupHolder.classList.remove("holder-show-quick-menu")}),t.appendChild(this.createQuickMenuButton("fas fa-wrench","Button settings",()=>this.revealSettings(),"settings")),t.appendChild(this.createQuickMenuButton("fas fa-cog","Advanced settings",()=>this.buttonObject.windowObject.toggle(),window.Buttonizer.hasPremium()?"":"buttonizer-premium-gray-out")),t.appendChild(this.createQuickMenuButton("fas fa-pencil-alt","Rename button",()=>this.buttonRename(),"")),t.appendChild(this.createQuickMenuButton("far fa-copy","Duplicate button",()=>this.buttonDuplicate(),"")),t.appendChild(this.createQuickMenuButton("far fa-trash-alt","Delete button",()=>this.buttonDelete(),"delete")),this.manageButtonMenu=t,t}createQuickMenuButton(t,e,n,i=""){let o=document.createElement("a");o.href="javascript:void(0)",o.className=i;let r=document.createElement("i");return r.className=t,o.appendChild(r),o.innerHTML+=e,o.addEventListener("click",t=>n(t)),o}createTitleField(){let t=document.createElement("div");t.className+="button-title-holder";let e=document.createElement("input");e.type="text",e.className="group-title",e.value=this.buttonObject.data.name,e.setAttribute("readonly",""),e.id="buttonizer-button-title";let n=document.createElement("a");return n.href="javascript:void(0)",n.className="group-rename",n.innerHTML="<i class='fa fa-pencil-alt'></i>",e.addEventListener("change",()=>this.updateTitle()),e.addEventListener("keyup",t=>{13===t.keyCode?this.updateTitle():27===t.keyCode&&(e.value=this.buttonObject.data.name,e.setAttribute("readonly",""))}),e.addEventListener("click",t=>{jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),t.isTrusted&&e.hasAttribute("readonly")&&this.revealSettings()}),this.buttonTitle=e,t.appendChild(e),t.appendChild(n),e}updateTitle(){this.buttonObject.data.name=this.buttonTitle.value,window.Buttonizer.buttonChanges=!0,this.buttonTitle.setAttribute("readonly","")}buttonRename(){this.buttonTitle.hasAttribute("readonly")&&(this.buttonTitle.removeAttribute("readonly"),this.buttonTitle.focus())}buttonDelete(){1!==this.buttonObject.groupObject.getButtonsAlive()?new r({title:"Remove button",content:"<p>Are you very sure you want to remove this button called '"+this.buttonObject.data.name+"'?</p>",onConfirm:()=>{this.buttonObject.removeButton()},buttons:[{text:"Never mind",close:!0,focus:!0},{text:"Remove",confirm:!0}]}):new r({title:"Warning",content:"<p>You cannot remove this button because this the only button left in the group.</p><p>Please remove the group if you do not use it anymore.</p>",buttons:[{text:"Dismiss",close:!0,focus:!0,confirm:!0}]})}buttonDuplicate(){let t=new RegExp(this.buttonObject.data.name+" - Copy \\([0-9]+\\)"),e=this.buttonObject.data.name+" - Copy";for(let n=0;n<this.buttonObject.groupObject.buttons.length;n++)if(this.buttonObject.groupObject.buttons[n].data.name.match(t)){let i=this.buttonObject.groupObject.buttons[n].data.name.match(t).toString().match(/- Copy \([0-9]+\)/).toString(),o=parseInt(i.replace(/\D/g,""));e=this.buttonObject.data.name+` - Copy (${o+1})`}else this.buttonObject.groupObject.buttons[n].data.name!==e||this.buttonObject.groupObject.buttons[n].data.name.match(t)||(e+=" (2)");let n={};for(let t in this.buttonObject.data)n[t]=this.buttonObject.data[t];n.name=e,new be(this.buttonObject.groupObject,n),window.Buttonizer.buttonChanges=!0}createButtonMobileDesktop(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="mobile-desktop",t.innerHTML=" ";let e=document.createElement("i");e.className="mobile-preview",e.innerHTML='<i class="fa fa-mobile-alt"></i>';let n=document.createElement("i");n.className="desktop-preview",n.innerHTML='<i class="fa fa-desktop"></i>',"true"!==this.buttonObject.data.show_mobile&&void 0!==this.buttonObject.data.show_mobile||(e.className+=" selected"),"true"!==this.buttonObject.data.show_desktop&&void 0!==this.buttonObject.data.show_desktop||(n.className+=" selected");let i=document.createElement("div");return i.className="new-button-visibility",i.appendChild(this.createMobile(e)),i.appendChild(this.createDesktop(n)),t.appendChild(i),t.appendChild(e),t.appendChild(n),t}createMobile(t){let e=document.createElement("a");e.href="javascript:void(0)",e.className="visibility-deskmobi";let n=document.createElement("i");return n.className="fa fa-mobile-alt",e.appendChild(n),this.buttonObject.registerUI("show_mobile",{update:n=>{!0===n||"true"===n?(e.classList.add("selected"),t.classList.add("selected")):(e.classList.remove("selected"),t.classList.remove("selected"))}}),this.buttonObject.getUI("show_mobile").forEach(t=>t.update(this.buttonObject.get("show_mobile"))),e.addEventListener("click",()=>{let t=this.buttonObject.get("show_mobile",!0);this.buttonObject.set("show_mobile",!(!0===t||"true"===t))}),e}createDesktop(t){let e=document.createElement("a");e.href="javascript:void(0)",e.className="visibility-deskmobi";let n=document.createElement("i");return n.className="fa fa-desktop",e.appendChild(n),this.buttonObject.registerUI("show_desktop",{update:n=>{!0===n||"true"===n?(e.classList.add("selected"),t.classList.add("selected")):(e.classList.remove("selected"),t.classList.remove("selected"))}}),this.buttonObject.getUI("show_desktop").forEach(t=>t.update(this.buttonObject.get("show_desktop"))),e.addEventListener("click",()=>{let t=this.buttonObject.get("show_desktop",!0);this.buttonObject.set("show_desktop",!(!0===t||"true"===t))}),e}revealSettings(){this.buttonObject.revealSettings()}};class jt{constructor(t,e,n){this.title=t,this.settingHolderContent=e,this.className=void 0!==n&&n}build(){let t=document.createElement("div");t.className="buttonizer-setting-row "+(!1===this.className?"":this.className),t.style.marginTop="10px";let e=document.createElement("div");e.className="buttonizer-setting-row-c1",e.innerHTML=this.title;let n=document.createElement("div");return n.className="buttonizer-setting-row-c2",n.appendChild(this.settingHolderContent),t.appendChild(e),t.appendChild(n),t}}class _t{constructor(t){this.buttonAction=t}build(){let t=this.buttonAction.inputText();return t.placeholder="https://www.domain.ltd/page",t.addEventListener("keyup",()=>this.change(t.value)),""!==this.buttonAction.value&&(t.value=this.buttonAction.value),t}change(t){this.valid(t)&&this.buttonAction.removeError(),this.buttonAction.updateButtonActionValue(t)}valid(t){let e=!1;return/(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/.test(t)||"?"===t.substring(0,1)||"#"===t.substring(0,1)?-1===t.indexOf("https://")&&"#"!==t.substring(0,1)&&(e='<p><b>Insecure URL:</b> Sorry to interupt, but we advice you to choose HTTPS for your URLS as this is a safer way to transport data.</p><p><a href="https://community.buttonizer.pro/d/19" target="_blank" style="text-decoration: none;">More info »</a><br /><br /><a href="" style="text-decoration: none;"><small>Do not show this message again.</small></a></p>'):e="<p>This looks like an invalid URL. The button may not work as expected.</p><p>Do you miss <b>http://</b> or <b>https://</b>? A space somewhere on the wrong place?</p>",!1===e||(this.buttonAction.addError(e),!1)}}class Ot{constructor(t){this.buttonAction=t}build(){let t=this.buttonAction.inputText();return t.placeholder="(000) 123 456 78",t.addEventListener("keyup",()=>this.change(t.value)),""!==this.buttonAction.value&&(t.value=this.buttonAction.value),t}change(t){this.valid(t)&&this.buttonAction.removeError(),this.buttonAction.updateButtonActionValue(t)}valid(t){let e=!1;return t=(t=t.replace("+","")).replace(" ",""),/^(?=.*\d)[\d ]+$/.test(t)||(e="<p>Invalid phone number. Please use only the number format. Omit any zeroes, brackets or dashes when adding the phone number in international format.</p>"),!1===e||(this.buttonAction.addError(e),!1)}}class Lt{constructor(t){this.buttonAction=t}build(){let t=this.buttonAction.inputText();return t.placeholder="account@domain.tld",t.addEventListener("keyup",()=>this.change(t.value)),""!==this.buttonAction.value&&(t.value=this.buttonAction.value),t}change(t){this.valid(t)&&this.buttonAction.removeError(),this.buttonAction.updateButtonActionValue(t)}valid(t){let e=!1;return t=(t=t.replace("+","")).replace(" ",""),/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,10})+$/.test(t)||(e="<p>Invalid email address.</p>"),!1===e||(this.buttonAction.addError(e),!1)}}n(6);class Tt{constructor(t){this.buttonAction=t}build(){let t=document.createElement("select");return t.className="buttonizer-select-action",t.appendChild(this.add("facebook","Share on Facebook")),t.appendChild(this.add("twitter","Share on Twitter")),t.appendChild(this.add("whatsapp","Share on Whatsapp")),t.appendChild(this.add("linkedin","Share on LinkedIn")),t.appendChild(this.add("pinterest","Share on Pinterest")),t.appendChild(this.add("mail","Share via email")),t.addEventListener("change",()=>{this.buttonAction.updateButtonActionValue(t.value)}),t}add(t,e){let n=document.createElement("option");return n.text=e,t===this.buttonAction.value&&(n.selected=!0),n.value=t,n}}class Bt{constructor(t){this.element=document.createElement("div"),this.errorElement=document.createElement("div"),this.buttonSettingsObject=t,this.dropdown=null,this.value=void 0!==this.buttonSettingsObject.buttonObject.data.action?this.buttonSettingsObject.buttonObject.data.action:""}build(){this.element.style.marginTop="10px",this.dropdown=document.createElement("select"),this.dropdown.style.width="199px",this.dropdown.className="buttonizer-select-action",this.dropdown.appendChild(this.add("url","Website URL")),this.dropdown.appendChild(this.add("phone","Phone number")),this.dropdown.appendChild(this.add("mail","Mail")),this.dropdown.appendChild(this.add("backtotop","Back to top")),this.dropdown.appendChild(this.add("gobackpage","Go back one page")),this.dropdown.appendChild(this.add("socialsharing","Social Sharing")),this.dropdown.appendChild(this.add("whatsapp","Open whatsapp (phone number)")),this.dropdown.appendChild(this.add("javascript_pro","Javascript function")),this.dropdown.addEventListener("change",()=>this.update(this.dropdown.value));let t=document.createElement("div");return xt(t.appendChild(new jt("<label for='label-always-open'>Button Action</label>",this.dropdown).build()).firstChild.firstChild,{content:"Choose the click action that you want this button to make",animation:"shift-away",arrow:!0,hideOnClick:!1}),t.appendChild(this.element),t.appendChild(this.errorElement),this.changeForm(this.buttonSettingsObject.buttonObject.data.type),t}add(t,e){let n=document.createElement("option");return n.text=e,t===this.buttonSettingsObject.buttonObject.data.type&&(n.selected=!0),-1===t.indexOf("pro")||window.Buttonizer.hasPremium()?n.value=t:(n.disabled=!0,n.text+=" (PRO ONLY)"),n}update(t,e=!1){if("javascript_pro"===this.buttonSettingsObject.buttonObject.data.type&&"javascript_pro"!==t){if(!e)return void new r({title:"<i class='fas fa-exclamation window-icon'></i> Warning! Hold on!",content:"<p>You are changing this button action from custom javascript to another action. Your javascript changes will be lost.</p><p>Are you sure you want to proceed?</p>",class:"warning-red",buttons:[{text:"Yes, I am sure",close:!0,confirm:!0},{text:"Cancel",close:!0,focus:!0,cancel:!0}],onConfirm:()=>{this.value="",this.update(t,!0)},onCancel:()=>{this.buttonSettingsObject.buttonObject.data.type="javascript_pro",jQuery(this.dropdown).val("javascript_pro")}})}else"socialsharing"===t?this.buttonSettingsObject.buttonObject.data.action="facebook":"socialsharing"===this.buttonSettingsObject.buttonObject.data.type&&(this.value="");this.buttonSettingsObject.buttonObject.data.type=t,window.Buttonizer.buttonChanges=!0,this.removeError(),this.changeForm(t)}updateButtonActionValue(t){this.buttonSettingsObject.buttonObject.data.action=t,window.Buttonizer.buttonChanges=!0,this.value=t}changeForm(t){this.element.innerHTML="";let e=new u({state:void 0===typeof this.buttonSettingsObject.buttonObject.data.action_new_tab?"false":this.buttonSettingsObject.buttonObject.data.action_new_tab});if(e.onToggle(t=>{this.buttonSettingsObject.buttonObject.data.action_new_tab=t,window.Buttonizer.buttonChanges=!0}),"phone"===t)this.element.appendChild(new Ot(this).build());else if("mail"===t)this.element.appendChild(new Lt(this).build());else if("whatsapp_pro"===t||"whatsapp"===t){this.element.appendChild(new Ot(this).build());let t=document.createElement("div");t.innerHTML="",this.element.appendChild(t)}else if("socialsharing"===t)this.element.appendChild(new Tt(this).build());else{if("backtotop"===t||"gobackpage"===t)return;this.element.appendChild(new _t(this).build()),xt(this.element.appendChild(new jt("<label for='label-always-open'>Open new tab:</label>",e.build(),"is-boolean-only").build()).firstChild.firstChild,{content:"When the button is clicked, open in new tab",animation:"shift-away",arrow:!0,hideOnClick:!1})}}inputText(){let t=document.createElement("input");return t.type="text",t.style.display="block",t.style.width="100%",t.className="buttonizer-input-action",t}addError(t){this.errorElement.innerHTML="";let e=document.createElement("div");e.innerHTML=t,e.style.border="1px solid rgb(170, 44, 44)",e.style.background="rgb(255, 238, 236)",e.style.color="#ff0000",e.style.marginTop="10px",e.style.padding="9px 15px",this.errorElement.appendChild(e)}removeError(){this.errorElement.innerHTML=""}}class zt{constructor(t){this.parentObject=void 0!==t.parentObject?t.parentObject:null,this.rowName=void 0!==t.rowName?t.rowName:null,this.title=void 0!==t.title?t.title:"",this.description=void 0!==t.description?t.description:null,this.wrap=void 0!==t.wrap&&t.wrap,this.content=void 0!==t.content?t.content:[],this.className=void 0!==t.class?t.class:[],this.customBuild=void 0!==t.useCustomBuild&&t.useCustomBuild,this.hidden=void 0!==t.hidden&&t.hidden,this.element=document.createElement("div"),null!==this.parentObject?null!==this.rowName&&this.parentObject.registerUI(this.rowName+"-container",this):null!==this.rowName&&null===this.parentObject&&console.error("Row name '"+this.rowName+"' is set, but no parent has been set")}build(){this.element.className="buttonizer-setting-row "+(!1===this.className?"":this.className),this.element.style.marginTop="10px",this.hidden&&(this.element.style.display="none");let t=document.createElement("div");t.className="buttonizer-setting-row-c1";let e=document.createElement("label");e.innerHTML=this.title,null!==this.description&&xt(e,{content:this.description,animation:"shift-away",arrow:!0,hideOnClick:!1}),t.appendChild(e);let n=document.createElement("div");n.className="buttonizer-setting-row-c2";for(const t in this.content)n.appendChild(this.customBuild?this.content[t]():this.content[t].build());return this.wrap&&(n.style["flex-wrap"]="wrap"),this.element.appendChild(t),this.element.appendChild(n),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display=""}}class At{constructor(t){this.parent=t.parentObject,this.element=document.createElement("div"),this.dataEntry=t.dataEntry,this.default=void 0===t.default?"":t.default,this.callback=void 0===t.callback?()=>{}:t.callback,this.onClick=void 0===t.onClick?null:t.onClick,this.input=HTMLElement,this.onlyNumbers=void 0!==t.onlyNumbers&&t.onlyNumbers,this.parent.registerUI(this.dataEntry,this),this.placeholder=void 0===t.placeholder?"":t.placeholder,this.title=void 0===t.title?"":t.title,this.fieldWidth=void 0===t.width?"default":t.width,this.hidden=void 0!==t.hidden&&t.hidden}build(){this.element=document.createElement("div"),this.element.className="buttonizer-input-container is-textfield input-field-width-"+this.fieldWidth,this.element.style.marginRight="7px";let t=document.createElement("div");t.className="buttonizer-input-item";let e=document.createElement("input");e.type="text",e.value=this.parent.get(this.dataEntry,this.default),this.onlyNumbers&&e.addEventListener("keyup",t=>{(isNaN(e.value)||e.value<0)&&(e.value=this.default,new r({title:"Only numbers",content:"<p>For this input, only positive numbers are allowed.</p>",buttons:[{text:"Close",close:!0}]}))}),null!==this.onClick&&e.addEventListener("click",t=>this.onClick(t,e)),e.addEventListener("change",()=>{this.onlyNumbers&&(isNaN(e.value)||e.value<0)&&(e.value=this.default),this.parent.set(this.dataEntry,e.value)}),""!==this.placeholder&&e.setAttribute("placeholder",this.placeholder),t.appendChild(e),this.element.appendChild(t);let n=document.createElement("div");return n.className="buttonizer-input-info",n.innerHTML=this.title,this.element.appendChild(n),this.input=e,this.hidden&&this.hide(),""!==this.title?this.element:(this.input.className="buttonizer-input-only",this.input)}hide(){this.element.style.display="none",this.input.style.display="none"}show(){this.element.style.display="",this.input.style.display=""}update(t){this.input.value=t,this.callback(t)}}class It{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("a"),this.dataEntry=t.dataEntry,this.state=this.parentObject.get(this.dataEntry,t.default),this.parentObject.registerUI(this.dataEntry,this),this.disabled=void 0!==t.disabled&&t.disabled,this.visible=void 0===t.visible||t.visible,this.callback=void 0!==t.callback?t.callback:t=>{}}build(){this.element.href="javascript:void(0)",this.element.className="buttonizer-boolean "+(!0===this.state||"true"===this.state?"boolean-selected":""),this.element.addEventListener("click",()=>this.toggle());let t=document.createElement("div");return t.className="buttonizer-boolean-circle",this.element.appendChild(t),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}toggle(){this.disabled?console.log("Sorry, you're not able to edit this"):(!0===this.state||"true"===this.state?this.state=!1:this.state=!0,this.parentObject.set(this.dataEntry,this.state),void 0!==this.callback&&this.callback(this.state))}update(t){this.state=t,!0===t||"true"===t?this.element.classList.contains("boolean-selected")||this.element.classList.add("boolean-selected"):this.element.classList.contains("boolean-selected")&&this.element.classList.remove("boolean-selected"),this.callback(t)}}class Nt extends zt{constructor(t){super({title:"Label",description:"Change the label of this button",wrap:!0,class:"form-has-extra-fields",content:[new At({parentObject:t,dataEntry:"label",default:t.get("label"),placeholder:"Label text"})]})}}var Mt=n(5),Ht=n(2);const qt="url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\")",Pt=360,Dt="keydown",Rt="mousedown",Ft="focusin";function Wt(t,e){return(e||document).querySelector(t)}function Yt(t,e,n){t.addEventListener(e,n,!1)}function Ut(t){t.preventDefault(),t.stopPropagation()}function Gt(t,e,n,i){Yt(t,Dt,function(t){e.indexOf(t.key)>=0&&(i&&Ut(t),n(t))})}const Qt=document.createElement("style");Qt.textContent=".picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.layout_default.picker_wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:'';display:block;width:100%;height:0;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.layout_default .picker_sl::before{content:'';display:block;padding-bottom:100%}.layout_default .picker_editor{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;width:6rem}.layout_default .picker_editor input{width:calc(100% + 2px);height:calc(100% + 2px)}.layout_default .picker_sample{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.layout_default .picker_done{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.picker_wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;background:#f2f2f2;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{margin:-1px}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid white;border-radius:100%;-webkit-box-shadow:0 0 3px 1px #67b9ff;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:-webkit-gradient(linear, left top, right top, from(red), color-stop(yellow), color-stop(lime), color-stop(cyan), color-stop(blue), color-stop(magenta), to(red));background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver}.picker_sl{position:relative;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver;background-image:-webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, rgba(255,255,255,0))),-webkit-gradient(linear, left bottom, left top, from(black), color-stop(50%, rgba(0,0,0,0))),-webkit-gradient(linear, left top, right top, from(gray), to(rgba(128,128,128,0)));background-image:linear-gradient(180deg, white, rgba(255,255,255,0) 50%),linear-gradient(0deg, black, rgba(0,0,0,0) 50%),linear-gradient(90deg, gray, rgba(128,128,128,0))}.picker_alpha,.picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:monospace;padding:.1em .2em}.picker_sample::before{content:'';position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_done button{-webkit-box-sizing:border-box;box-sizing:border-box;padding:.2em .5em;cursor:pointer}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;-webkit-box-shadow:0 0 10px 1px rgba(0,0,0,0.4);box-shadow:0 0 10px 1px rgba(0,0,0,0.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:\"\";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;-webkit-box-shadow:none;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}",document.documentElement.firstElementChild.appendChild(Qt);var Vt=class{constructor(t){this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex"},this._openProxy=(t=>this.openHandler(t)),this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}setOptions(t){if(!t)return;const e=this.settings;if(t instanceof HTMLElement)e.parent=t;else{e.parent&&t.parent&&e.parent!==t.parent&&(e.parent.removeEventListener("click",this._openProxy,!1),this._popupInited=!1),function(t,e,n){for(const i in t)n&&n.indexOf(i)>=0||(e[i]=t[i])}(t,e),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);const n=t.color||t.colour;n&&this._setColor(n)}const n=e.parent;n&&e.popup&&!this._popupInited?(Yt(n,"click",this._openProxy),Gt(n,[" ","Spacebar","Enter"],this._openProxy),this._popupInited=!0):t.parent&&!e.popup&&this.show()}openHandler(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";const e=t&&t.type===Dt?this._domEdit:this.domElement;setTimeout(()=>e.focus(),100),this.onOpen&&this.onOpen(this.colour)}}closeHandler(t){const e=t&&t.type;let n=!1;t?("click"!==e&&e!==Dt||Ut(t),n=!0):n=!0,n&&this.hide()&&(this.settings.parent.style.pointerEvents="",e!==Rt&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}movePopup(t,e){this.closeHandler(),this.setOptions(t),e&&this.openHandler()}setColor(t,e){this._setColor(t,{silent:e})}_setColor(t,e){if("string"==typeof t&&(t=t.trim()),!t)return;let n;e=e||{};try{n=new Mt(t)}catch(t){if(e.failSilently)return;throw t}if(!this.settings.alpha){const t=n.hsla;t[3]=1,n.hsla=t}this.colour=this.color=n,this._setHSLA(null,null,null,null,e)}setColour(t,e){this.setColor(t,e)}show(){if(!this.settings.parent)return!1;if(this.domElement){const t=this._toggleDOM(!0);return this._setPosition(),t}const t=function(t){const e=document.createElement("div");return e.innerHTML=t,e.firstElementChild}(this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div></div>');return this.domElement=t,this._domH=Wt(".picker_hue",t),this._domSL=Wt(".picker_sl",t),this._domA=Wt(".picker_alpha",t),this._domEdit=Wt(".picker_editor input",t),this._domSample=Wt(".picker_sample",t),this._domOkay=Wt(".picker_done button",t),t.classList.add("layout_"+this.settings.layout),this.settings.alpha||t.classList.add("no_alpha"),this.settings.editor||t.classList.add("no_editor"),this._ifPopup(()=>t.classList.add("popup")),this._setPosition(),this.colour?this._updateUI():this._setColor("#0cf"),this._bindEvents(),!0}hide(){return this._toggleDOM(!1)}_bindEvents(){const t=this,e=this.domElement;function n(t,e){function n(n,i){const o=i[0]/t.clientWidth,r=i[1]/t.clientHeight;e(o,r)}return{container:t,dragOutside:!1,callback:n,callbackDragStart:n,propagateEvents:!0}}Yt(e,"click",t=>t.preventDefault()),Ht(n(this._domH,(e,n)=>t._setHSLA(e))),Ht(n(this._domSL,(e,n)=>t._setHSLA(null,e,1-n))),this.settings.alpha&&Ht(n(this._domA,(e,n)=>t._setHSLA(null,null,null,1-n)));const i=this._domEdit;Yt(i,"input",function(e){t._setColor(this.value,{fromEditor:!0,failSilently:!0})}),Yt(i,"focus",function(t){const e=this;e.selectionStart===e.selectionEnd&&e.select()});const o=t=>{this._ifPopup(()=>this.closeHandler(t)),this.onDone&&this.onDone(this.colour)};this._ifPopup(()=>{const t=t=>this.closeHandler(t);Yt(window,Rt,t),Yt(window,Ft,t),Gt(e,["Esc","Escape"],t),Yt(e,Rt,Ut),Yt(e,Ft,Ut),Yt(this._domEdit,Rt,t=>this._domEdit.focus())}),Yt(this._domOkay,"click",o),Gt(e,["Enter"],o)}_setPosition(){const t=this.settings.parent,e=this.domElement;t!==e.parentNode&&t.appendChild(e),this._ifPopup(n=>{"static"===getComputedStyle(t).position&&(t.style.position="relative");const i=!0===n?"popup_right":"popup_"+n;["popup_top","popup_bottom","popup_left","popup_right"].forEach(t=>{t===i?e.classList.add(t):e.classList.remove(t)}),e.classList.add(i)})}_setHSLA(t,e,n,i,o){o=o||{};const r=this.colour,s=r.hsla;[t,e,n,i].forEach((t,e)=>{(t||0===t)&&(s[e]=t)}),r.hsla=s,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(r)}_updateUI(t){if(!this.domElement)return;t=t||{};const e=this.colour,n=e.hsla,i=`hsl(${n[0]*Pt}, 100%, 50%)`,o=e.hslString,r=e.hslaString,s=this._domH,a=this._domSL,l=this._domA,c=Wt(".picker_selector",s),u=Wt(".picker_selector",a),d=Wt(".picker_selector",l);function p(t,e,n){e.style.left=100*n+"%"}function h(t,e,n){e.style.top=100*n+"%"}p(0,c,n[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,p(0,u,n[1]),h(0,u,1-n[2]),a.style.color=o,h(0,d,1-n[3]);const m=o,b=m.replace("hsl","hsla").replace(")",", 0)"),f=`linear-gradient(${[m,b]})`;if(this._domA.style.backgroundImage=f+", "+qt,!t.fromEditor){const t=this.settings.editorFormat,n=this.settings.alpha;let i;switch(t){case"rgb":i=e.printRGB(n);break;case"hsl":i=e.printHSL(n);break;default:i=e.printHex(n)}this._domEdit.value=i}this._domSample.style.color=r}_ifPopup(t,e){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):e&&e()}_toggleDOM(t){const e=this.domElement;if(!e)return!1;const n=t?"":"none",i=e.style.display!==n;return i&&(e.style.display=n),i}static get StyleElement(){return Qt}};class Xt{constructor(t){this.parent=t.parentObject,this.element=document.createElement("div"),this.dataEntry=t.dataEntry,this.default=void 0===t.default?"":t.default,this.callback=void 0===t.callback?()=>{}:t.callback,this.style=void 0===t.style?{}:t.style,this.parent.registerUI(this.dataEntry,this),this.currentColor=this.parent.get(this.dataEntry,this.default),this.title=void 0===t.title?"Color":t.title,this.timer=setTimeout(()=>{},0),this.opened=!1,this.element=HTMLElement,this.colorView=HTMLElement,this.colorPicker=HTMLElement,("#fffff"===this.currentColor||"#FFFFF"===this.currentColor||this.currentColor.length<=6)&&(this.currentColor="#FFFFFF")}build(){this.buildVisiblePicker();let t=new Vt({parent:this.element,popup:"bottom",alpha:!0,color:this.currentColor,onChange:t=>{this.currentColor!==t.rgbaString&&(this.currentColor=t.rgbaString,this.parent.set(this.dataEntry,t.rgbaString))}});return this.element.addEventListener("click",()=>{t.show()}),this.colorPicker=t,this.element}buildVisiblePicker(){this.element=document.createElement("div"),this.element.className="buttonizer-input-container is-color-picker",this.element.style.marginRight="7px";let t=document.createElement("div");t.className="buttonizer-input-item",this.colorView=document.createElement("div"),this.colorView.style.background=this.currentColor,this.colorView.className="colored-background",t.appendChild(this.colorView),this.element.appendChild(t);let e=document.createElement("div");e.className="buttonizer-input-info",e.innerHTML=this.title,this.element.appendChild(e)}onSelect(t){this.callback=t}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}update(t){clearTimeout(this.timer),this.colorView.style.background=t,this.colorPicker.color=t,this.timer=setTimeout(()=>this.callback(t),1500)}}class $t extends zt{constructor(t){super({title:"Icon color",description:"Change the icon color of this button",rowName:"icon-color",parentObject:t,hidden:window.Buttonizer.hasPremium()&&"true"==t.get("icon_is_image"),content:[new Xt({parentObject:t,dataEntry:"icon_color",title:"Base",default:"#FFFFFF",width:"space"}),new Xt({parentObject:t,dataEntry:"icon_color_interaction",title:"Interaction",default:"#FFFFFF",width:"space"})]})}}class Jt extends zt{constructor(t){super({title:"Icon size",description:"Change the icon size of this button",rowName:"icon-size",parentObject:t,hidden:window.Buttonizer.hasPremium()&&"true"==t.get("icon_is_image"),content:[new At({title:"px",placeholder:"button"===t.type?16:25,width:"space",dataEntry:"icon_size",parentObject:t,onlyNumbers:!0,default:"button"===t.type?16:25})]})}}class Kt extends zt{constructor(t){super({title:"Border radius",description:"Change the roundness of this button group",hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"border-radius",parentObject:t,content:[new At({parentObject:t,dataEntry:"border_radius",default:"",placeholder:50,title:"%",width:"space",onlyNumbers:!0})]})}}class Zt extends zt{constructor(t){super({title:"Font size &<br>border radius",description:"Change the font size and border radius of the label for this button group",content:[new At({title:"px",placeholder:12,width:"space",dataEntry:"label_font_size",parentObject:t,onlyNumbers:!0}),new At({title:"px",placeholder:12,width:"space",dataEntry:"label_border_radius",parentObject:t,onlyNumbers:!0})]})}}class te{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("a"),this.dataEntry=t.dataEntry,this.default=t.default,this.callback=t.callback,this.type=t.type,this.data=t,this.title=t.title,this.state=this.parentObject.get(this.dataEntry,this.default),this.parentObject.registerUI(this.dataEntry,this),this.disabled=void 0!==t.disabled&&t.disabled,this.visible=void 0===t.visible||t.visible}build(){this.element.href="javascript:void(0)",this.element.className=`buttonizer-checkbox ${"Mobile"===this.title?"mobile-checkbox":"desktop-checkbox"}`;let t=document.createElement("div");t.className="buttonizer-checkbox-box",t.innerHTML="✓",this.element.appendChild(t),this.element.addEventListener("click",()=>this.toggle());let e=document.createElement("div");return e.className="buttonizer-checkbox-text",e.innerHTML=this.title,this.element.appendChild(e),this.update(this.state),this.eventListener(this.type),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}toggle(){this.disabled?console.log("Sorry, you're not able to edit this"):(!0===this.state||"true"===this.state?this.parentObject.set(this.dataEntry,!1):this.parentObject.set(this.dataEntry,!0),"undefined"!=typeof callback&&this.callback(this.state))}update(t){this.state=t,!0===t||"true"===t?this.element.classList.contains("checkbox-selected")||this.element.classList.add("checkbox-selected"):this.element.classList.contains("checkbox-selected")&&this.element.classList.remove("checkbox-selected")}eventListener(t){"button"===t&&this.element.addEventListener("click",()=>{let t=this.parentObject.buttonHTMLObject.querySelector(".mobile-preview"),e=this.parentObject.buttonHTMLObject.querySelector(".fa-mobile-alt").parentElement,n=this.parentObject.buttonHTMLObject.querySelector(".desktop-preview"),i=this.parentObject.buttonHTMLObject.querySelector(".fa-desktop").parentElement;"Mobile"===this.title?t.classList.contains("selected")&&!1===this.state?(t.classList.remove("selected"),e.classList.remove("selected")):t.classList.contains("selected")||!0!==this.state||(t.classList+=" selected",e.classList+=" selected"):"Desktop"===this.title&&(n.classList.contains("selected")&&!1===this.state?(n.classList.remove("selected"),i.classList.remove("selected")):n.classList.contains("selected")||!0!==this.state||(n.classList+=" selected",i.classList+=" selected"))})}}class ee extends zt{constructor(t){super({title:"Show on:",description:"Choose if you want to make this button group visible on desktop and mobile devices",content:[new te({parentObject:t,dataEntry:"show_mobile",title:"Mobile",default:!0,type:"button"===t.type?"button":"group"}),new te({parentObject:t,dataEntry:"show_desktop",title:"Desktop",default:!0,type:"button"===t.type?"button":"group"})]})}}class ne extends zt{constructor(t){super({title:"Button color",description:"This is the color of your button group and also the default color for your buttons within this group.",hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"background-color",parentObject:t,content:[new Xt({parentObject:t,dataEntry:"background_color",title:"Base",default:"#f08419"}),new Xt({parentObject:t,dataEntry:"background_color_interaction",title:"Interaction",default:"#ff9d3c"})]})}}class ie{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("select"),this.dataEntry=t.dataEntry,this.default=t.default,this.callback=t.callback,this.style=t.style,this.list=t.list,this.width=void 0===t.width?"199px":t.width,this.class=void 0===t.class?"buttonizer-select-drawer":t.class,this.parentObject.registerUI(this.dataEntry,this)}build(){this.element.style.width=this.width,this.element.className=this.class,this.element.addEventListener("change",t=>{this.parentObject.set(this.dataEntry,this.element.value)});for(let t in this.list){let e=this.list[t],n=document.createElement("option");n.text=e.text,n.value=e.value,n.selected=void 0!==typeof this.selected&&this.selected===e.value,this.element.appendChild(n)}return this.element.value=this.parentObject.get(this.dataEntry,this.default),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}update(t){this.element.value=t,void 0!==this.callback&&this.callback(t,this)}}class oe extends zt{constructor(t){super({title:'<span class="setting-icon"><i class="fa fa-desktop"></i></span> Visibility',description:"Always show the label, show the label on hover or hide the label on <u>desktop devices</u>",content:[new ie({parentObject:t,dataEntry:"show_label_desktop",default:"always",list:[{value:"always",text:"Always show label"},{value:"hover",text:"Show label on hover"},{value:"hide",text:"Hide label"}]})]})}}class re extends zt{constructor(t){super({title:'<span class="setting-icon"><i class="fa fa-mobile-alt"></i></span> Visibility',description:"Always show the label, show the label on hover or hide the label on <u>mobile devices</u>",content:[new ie({parentObject:t,dataEntry:"show_label_mobile",default:"always",list:[{value:"always",text:"Always show label"},{value:"hide",text:"Hide label"}]})]})}}class se extends zt{constructor(t){super({title:"Label color",description:"Change the text and background color of the label for this button or group.",hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"label-color",parentObject:t,content:[new Xt({parentObject:t,dataEntry:"label_color",title:"Text",default:"#FFFFFF"}),new Xt({parentObject:t,dataEntry:"label_background_color",title:"Background",default:"#4E4C4C"})]})}}class ae extends zt{constructor(t){super({title:"Icon",description:"Choose an icon from an icon library",rowName:"icon",parentObject:t,hidden:window.Buttonizer.hasPremium()&&"true"==t.get("icon_is_image"),content:[new At({parentObject:t,dataEntry:"icon",default:"fa fa-user",onClick:(t,e)=>{window.Buttonizer.iconSelector.open(e)}})]})}}class le{constructor(t){this.parentObject=t.parentObject,this.button=null,this.selectedImage=null,this.dataEntry=void 0===t.dataEntry?null:t.dataEntry,this.default=void 0===t.default?"":t.default,this.value=t.parentObject.get(t.dataEntry,""),this.callback=t.callback,this.parentObject.registerUI(this.dataEntry,this)}build(){return this.buildFree()}buildFree(){let t=document.createElement("a");return t.className="button",t.href="javascript:void(0)",t.innerHTML='<i class="fa fa-image"></i> Select image <small>(premium)</small>',t.addEventListener("click",()=>{window.Buttonizer.showPremiumPopup("You can select images and set them as icon or as button background image.")}),t}}class ce extends zt{constructor(t){super({title:"Background image",description:"Upload an image if you want an image as background instead of a color. Recommended aspect ratio: square (1:1)",hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"background-image",parentObject:t,content:[new le({parentObject:t,dataEntry:"background_image"})]})}}class ue extends zt{constructor(t){super({parentObject:t,title:"Use the same style of main button",description:"This option makes this button use the group's button style",class:"is-boolean-only",rowName:"use_main_button_style",content:[new It({parentObject:t,dataEntry:"use_main_button_style",default:"true",callback:t=>this.update(t)})]}),this.parent=t}update(t){!0===t||"true"===t?(this.parent.getUI("background-color-container").forEach(t=>{t.hide()}),this.parent.getUI("label-color-container").forEach(t=>{t.hide()}),this.parent.getUI("border-radius-container").forEach(t=>{t.hide()}),this.parent.getUI("background-image-container").forEach(t=>{t.hide()})):(this.parent.getUI("background-color-container").forEach(t=>{t.show()}),this.parent.getUI("label-color-container").forEach(t=>{t.show()}),this.parent.getUI("border-radius-container").forEach(t=>{t.show()}),this.parent.getUI("background-image-container").forEach(t=>{t.show()}))}}class de{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("div"),this.dataEntry=void 0===t.dataEntry?null:t.dataEntry,this.default=void 0!==t.default&&t.default,this.state=void 0!==t.state&&"true"==t.state,this.first=void 0===t.first?"First":t.first,this.second=void 0===t.second?"Second":t.second,this.callback=t.callback,null!==this.dataEntry&&this.parentObject.registerUI(this.dataEntry,this)}build(){this.element.className="buttonizer-toggle"+(!0===this.state?" right-selected":" left-selected");let t=document.createElement("a");t.href="javascript:void(0)",t.innerHTML=this.first,t.addEventListener("click",()=>this.toggle()),this.element.appendChild(t);let e=document.createElement("a");return e.href="javascript:void(0)",e.innerHTML=this.second,e.addEventListener("click",()=>this.toggle()),this.element.appendChild(e),this.element}toggle(){null!==this.dataEntry?this.parentObject.set(this.dataEntry,!this.state):this.callback(!1)}update(t){this.state=t,!1===t?(this.element.classList.add("left-selected"),this.element.classList.remove("right-selected")):(this.element.classList.remove("left-selected"),this.element.classList.add("right-selected")),this.callback(t)}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}}class pe extends zt{constructor(t){super({title:"Graphic",description:"Choose whether to use an Icon or an Image as this button's icon",useCustomBuild:!0,content:[()=>this.buildBoolean()]}),this.parent=t}buildBoolean(){return new de({parentObject:this.parent,state:!1,first:"Icon",second:"Image <small>(premium)</small>",callback:()=>{window.Buttonizer.showPremiumPopup("You can select an custom image as icon for your buttons and groups.")}}).build()}}class he extends zt{constructor(t){super({parentObject:t,title:"Position",description:"Change the position of this button group",wrap:!0,class:"form-has-extra-fields",rowName:"position",content:[new ie({parentObject:t,dataEntry:"position",default:"bottomright",callback:t=>this.changePosition(t),list:[{value:"bottomright",text:"Bottom Right"},{value:"bottomleft",text:"Bottom Left"},{value:"topright",text:"Top Right"},{value:"topleft",text:"Top Left"},{value:"advanced",text:"Custom"}]}),new At({parentObject:t,dataEntry:"horizontal",title:"X (%)",width:"space",hidden:"advanced"!==t.get("position"),onlyNumbers:!0}),new At({parentObject:t,dataEntry:"vertical",title:"Y (%)",width:"space",hidden:"advanced"!==t.get("position"),onlyNumbers:!0})]}),this.translatedPositions={topleft:{x:95,y:95},topright:{x:5,y:95},bottomleft:{x:95,y:5},bottomright:{x:5,y:5}},this.parentObject=t}changePosition(t){"advanced"===t?(this.parentObject.getUI("horizontal").forEach(t=>t.show()),this.parentObject.getUI("vertical").forEach(t=>t.show())):(this.parentObject.getUI("horizontal").forEach(t=>t.hide()),this.parentObject.getUI("vertical").forEach(t=>t.hide()),this.parentObject.set("horizontal",this.translatedPositions[t].x),this.parentObject.set("vertical",this.translatedPositions[t].y))}}class me{constructor(t){this.buttonObject=t,this.groupSetting=HTMLElement,this.formElements={useMainButtonStyle:void 0,buttonColor:void 0,borderColor:void 0,borderRadius:void 0,backgroundImage:void 0,buttonIconSelect:void 0,buttonIconColor:void 0,buttonIconSize:void 0,buttonImageSelect:void 0,buttonImageIcon:void 0,buttonImageIconSelect:void 0,imageBorderRadius:void 0,imageSize:void 0,label:void 0,labelColor:void 0,labelFontSizeBorderRadius:void 0,show_label:void 0,showOnOpeningTimes:void 0,buttonCustomClass:void 0}}build(){let t=document.createElement("div");return t.className="button-group-styling",t.style.display="none",this.element=t,this.buildForm(),this.buttonObject.stylingObject=t,this.element}buildForm(){this.element.appendChild(this.generalSetting()),this.element.appendChild(this.buttonStyle()),this.element.appendChild(this.iconStyle()),this.element.appendChild(this.labelStyle()),this.element.appendChild(this.advancedSettings())}advancedSettings(){let t=document.createElement("a");return t.href="javascript:void(0)",t.className="advanced-settings"+(window.Buttonizer.hasPremium()?"":" buttonizer-premium-gray-out"),t.innerHTML="<i></i> Advanced settings"+(window.Buttonizer.hasPremium()?"":" <span class='buttonizer-premium'>PRO</span>"),t.addEventListener("click",()=>{this.buttonObject.windowObject.toggle()}),t}generalSetting(){let t=document.createElement("div");return t.className="style-top",this.groupSetting=document.createElement("div"),this.groupSetting.className="style-group",this.formElements.menuPosition=new he(this.buttonObject.groupObject),this.groupSetting.appendChild(this.formElements.menuPosition.build()),this.formElements.menuPosition.element.style.display="none",t.appendChild(this.groupSetting),this.formElements.buttonAction=new Bt(this),t.appendChild(this.formElements.buttonAction.build()),this.formElements.isMobile=new ee(this.buttonObject),t.appendChild(this.formElements.isMobile.build()),t}buttonStyle(){let t=document.createElement("div");t.className="style-button";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Button style</span>",t.appendChild(e),this.formElements.useMainButtonStyle=new ue(this.buttonObject),t.appendChild(this.formElements.useMainButtonStyle.build()),this.formElements.buttonColor=new ne(this.buttonObject),t.appendChild(this.formElements.buttonColor.build()),this.formElements.labelColor=new se(this.buttonObject),t.appendChild(this.formElements.labelColor.build()),this.formElements.borderRadius=new Kt(this.buttonObject),t.appendChild(this.formElements.borderRadius.build()),this.formElements.backgroundImage=new ce(this.buttonObject),t.appendChild(this.formElements.backgroundImage.build()),t}iconStyle(){let t=document.createElement("div");t.className="style-icon";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Button Icon</span>",t.appendChild(e),this.formElements.buttonIconOrImage=new pe(this.buttonObject),t.appendChild(this.formElements.buttonIconOrImage.build()),this.formElements.buttonIconSelect=new ae(this.buttonObject),t.appendChild(this.formElements.buttonIconSelect.build()),this.formElements.buttonIconColor=new $t(this.buttonObject),t.appendChild(this.formElements.buttonIconColor.build()),this.formElements.buttonIconSize=new Jt(this.buttonObject),t.appendChild(this.formElements.buttonIconSize.build()),t}labelStyle(){let t=document.createElement("div");t.className="style-label";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Label</span>",t.appendChild(e),this.formElements.buttonLabel=new Nt(this.buttonObject),t.appendChild(this.formElements.buttonLabel.build()),this.formElements.show_label=new oe(this.buttonObject),t.appendChild(this.formElements.show_label.build()),this.formElements.show_label_mobile=new re(this.buttonObject),t.appendChild(this.formElements.show_label_mobile.build()),this.formElements.buttonLabelFontSizeBorderRadius=new Zt(this.buttonObject),t.appendChild(this.formElements.buttonLabelFontSizeBorderRadius.build()),t}}var be=class{constructor(t,e){this.type="button",this.groupObject=t,this.alive=!0,this.data=e,this.ui=[],this.buttonName=e.name,this.id=-1,this.settingsOpened=!1,this.buttonHTMLObject=HTMLElement,this.buttonIconObject=HTMLElement,this.buttonTitleObject=HTMLElement,this.windowObject=HTMLElement,this.stylingObject=void 0,this.stylingObject=HTMLElement,this.settingsObject={},this.buildButton(),this.windowObject=new b(this),this.groupObject.registerButton(this)}buildButton(){let t=document.createElement("div");t.className="buttonizer-button-group group-button",t.appendChild(new St(this).build()),this.settingsObject=new me(this),Buttonizer.bar.settingContent.appendChild(this.settingsObject.build());var e=!1,n=!1;const i=xt(t,{content:"You can't drag the only button left in a group!",animation:"shift-away",arrow:!0,hideOnClick:!1,trigger:"manual",onShow:()=>{n=!0,setTimeout(()=>{n=!1,i.hide()},5e3)}});t.addEventListener("mousedown",()=>{n||(e=!0)}),t.addEventListener("mouseout",()=>{e&&null!==jQuery(this.groupObject.groupBody).sortable("option","cancel")&&(e=!1,i.show())}),t.addEventListener("mouseup",()=>{e=!1}),this.buttonHTMLObject=t,this.groupObject.groupBody.appendChild(this.buttonHTMLObject)}removeButton(){this.alive=!1,this.buttonHTMLObject.remove(),window.Buttonizer.buttonChanges=!0,this.groupObject.buttonsAmount<=1&&jQuery(this.groupObject.groupBody).sortable("option","cancel",".group-button"),1===this.groupObject.getButtonsAlive()!==this.groupObject.singleButtonMode&&(this.groupObject.singleButtonMode=1===this.groupObject.getButtonsAlive(),this.groupObject.getButtons()[0].set("icon_size","25"),this.groupObject.groupHolder.setSingleButtonMode())}set(t,e){this.data[t]=e,this.ui[t].forEach(t=>t.update(e)),window.Buttonizer.buttonChanges=!0}get(t,e){return void 0!==this.data[t]?this.data[t]:(this.data[t]=e,window.Buttonizer.buttonChanges=!0,e)}registerUI(t,e){void 0!==this.ui[t]?this.ui[t].push(e):this.ui[t]=[e]}getUI(t){return void 0!==this.ui[t]&&this.ui[t]}revealSettings(){this.buttonHTMLObject.classList.add("opened"),this.stylingObject.style.display="block",Buttonizer.bar.showSettings(this.get("name"),()=>this.closeSettings())}closeSettings(){this.stylingObject.style.display="none",this.buttonHTMLObject.classList.remove("opened")}};var fe=class{constructor(t){this.groupObject=t,this.groupObject.stylingObject=this,this.groupHolder=null,this.titleElement=null,this.arrow=HTMLElement}build(){let t=document.createElement("div");return t.className="button-group-holder",t.appendChild(this.groupArrow()),t.appendChild(this.createTitle()),t.appendChild(this.groupSettingsButton()),t.appendChild(this.createButtonHolderButton()),t.appendChild(this.createQuickMenu()),this.groupHolder=t,t}createButtonHolderButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button";let e=document.createElement("i");return e.className="fas fa-ellipsis-v",t.appendChild(e),t.addEventListener("click",()=>{let t=this.groupHolder.className.indexOf("holder-show-quick-menu");jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),-1===t&&this.groupHolder.classList.add("holder-show-quick-menu")}),t}createQuickMenu(){let t=document.createElement("div");return t.className="group-holder-quick-menu",t.addEventListener("click",()=>{this.groupHolder.classList.remove("holder-show-quick-menu")}),t.appendChild(this.createQuickMenuButton("fas fa-plus","Convert to group",()=>{new be(this.groupObject,{name:"Button 2",show_mobile:"true",show_desktop:"true"}),this.groupObject.getButtons()[0].set("icon_size","16"),jQuery(this.groupObject.groupBody).sortable("option","cancel",null)},"convert-button")),t.appendChild(this.createQuickMenuButton("fas fa-wrench","Settings",()=>this.toggleStyling(),"")),t.appendChild(this.createQuickMenuButton("fas fa-cog","Advanced settings",()=>{this.groupObject.singleButtonMode?this.groupObject.getButtons()[0].windowObject.toggle():this.groupObject.windowObject.toggle()},window.Buttonizer.hasPremium()?"":"buttonizer-premium-gray-out")),t.appendChild(this.createQuickMenuButton("fas fa-pencil-alt","Rename",()=>this.groupRename(),"")),t.appendChild(this.createQuickMenuButton("far fa-trash-alt","Delete",()=>this.groupDelete(),"delete")),t.firstChild.style.display="none",this.quickMenu=t,t}createQuickMenuButton(t,e,n,i=""){let o=document.createElement("a");o.href="javascript:void(0)",o.className=i;let r=document.createElement("i");return r.className=t,o.appendChild(r),o.innerHTML+=e,o.addEventListener("click",t=>n(t)),o}groupArrow(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button pull-left has-background group-arrow";let e=document.createElement("i");e.className="fa fa-angle-down buttonizer-arrow-down",t.appendChild(e);let n=document.createElement("i");return n.className="fa fa-angle-up buttonizer-arrow-up",t.appendChild(n),t.addEventListener("click",()=>this.revealButtons()),this.arrow=t,t}createTitle(){let t=document.createElement("input");return t.type="text",t.className="group-title",t.value=this.groupObject.get("name"),t.setAttribute("readonly",""),t.id="buttonizer-group-title",this.titleElement=t,t.addEventListener("blur",()=>this.updateTitle()),t.addEventListener("keyup",e=>{e.preventDefault(),13===e.keyCode?this.updateTitle():27===e.keyCode&&(t.value=this.groupObject.singleButtonMode?this.groupObject.getButtons()[0].data.name:this.groupObject.data.name,t.setAttribute("readonly",""))}),t.addEventListener("click",e=>{jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),e.isTrusted&&t.hasAttribute("readonly")&&(this.groupObject.singleButtonMode?this.toggleStyling():this.revealButtons())}),t}updateTitle(){(this.groupObject.singleButtonMode?this.groupObject.getButtons()[0]:this.groupObject).data.name=this.titleElement.value,window.Buttonizer.buttonChanges=!0,this.titleElement.setAttribute("readonly","")}groupRename(){this.titleElement.hasAttribute("readonly")&&(this.titleElement.removeAttribute("readonly"),this.titleElement.focus())}groupSettingsButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button group-style";let e=document.createElement("i");return e.className="fas fa-wrench",t.appendChild(e),t.addEventListener("click",t=>{jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),this.toggleStyling()}),t}toggleStyling(){this.groupObject.singleButtonMode?this.groupObject.getButtons()[0].revealSettings():this.groupObject.groupSettings.show()}groupDelete(){if(this.groupObject.singleButtonMode)return window.Buttonizer.buttonGroups.length<=1?void new r({title:"Warning",content:"<p>You cannot remove this button because this the only group/button left.</p>",buttons:[{text:"Dismiss",close:!0,focus:!0,confirm:!0}]}):void new r({title:"Remove button",content:"<p>Are you very sure you want to remove this button?</p>",onConfirm:()=>{this.groupObject.removeGroup(),window.Buttonizer.buttonChanges=!0},buttons:[{text:"Never mind",close:!0,focus:!0},{text:"Remove",confirm:!0}]});window.Buttonizer.buttonGroups.length<=1?new r({title:"Warning",content:"<p>You cannot remove this group because this the only group left.</p>",buttons:[{text:"Dismiss",close:!0,focus:!0,confirm:!0}]}):new r({title:"Remove group",content:"<p>Are you very sure you want to remove this full group? It contains "+this.groupObject.getButtonsAlive()+" buttons.</p>",onConfirm:()=>{this.groupObject.removeGroup(),window.Buttonizer.buttonChanges=!0},buttons:[{text:"Never mind",close:!0,focus:!0},{text:"Remove",confirm:!0}]})}revealButtons(){this.groupObject.groupOpened=!this.groupObject.groupOpened,this.groupObject.groupOpened?(this.groupObject.groupObject.classList.add("opened"),jQuery(this.groupObject.groupBody).sortable("enable")):(this.groupObject.groupObject.classList.remove("opened"),jQuery(this.groupObject.groupBody).sortable("disable")),this.groupObject.groupBody.style.display=this.groupObject.groupOpened?"block":"none"}setSingleButtonMode(){this.groupObject.singleButtonMode?(this.quickMenu.firstChild.style.display="",this.titleElement.value=void 0===this.groupObject.getButtons()[0]?this.groupObject.firstButtonName:this.groupObject.getButtons()[0].data.name,this.groupHolder.classList.add("single-button"),this.groupObject.groupOpened&&this.revealButtons(),this.groupObject.getButtons()[0].set("use_main_button_style","false"),this.groupObject.getButtons()[0].getUI("use_main_button_style-container")[0].element.style.display="none",this.groupObject.getUI("position-container")[1].element.style.display="",this.groupObject.set("single_button_mode","true")):(this.quickMenu.firstChild.style.display="none",this.groupObject.getUI("position-container")[1].element.style.display="none",this.groupObject.getButtons()[0].set("use_main_button_style","true"),this.groupObject.getButtons()[0].getUI("use_main_button_style-container")[0].element.style.display="",this.titleElement.value=this.groupObject.data.name,this.groupHolder.classList.remove("single-button"),this.groupObject.set("single_button_mode","false"))}};class ge extends zt{constructor(t){super({title:"Start opened",description:"This button group starts opened when this setting is active",class:"is-boolean-only",content:[new It({parentObject:t,dataEntry:"start_opened",default:"false"})]})}}class ye extends zt{constructor(t){super({title:"Menu Style",description:"Change the opening animation of this button group",content:[new ie({parentObject:t,dataEntry:"menu_style",default:"default",list:[{value:"default",text:"Default"},{value:"faded",text:"Faded"},{value:"corner-circle",text:"Corner Circle"},{value:"building-up",text:"Build Up"},{value:"pop",text:"Pop"},{value:"square",text:"Square"}]})]})}}class we extends zt{constructor(t){super({title:"Animation",description:"This will animate this button group to get the attention of the visitor. The animation repeats every 10 seconds",content:[new ie({parentObject:t,dataEntry:"menu_animation",default:"none",list:[{value:"none",text:"No Animation"},{value:"hello",text:"Buttonizer Hello"},{value:"bounce",text:"Bounce"}]})]})}}var ve=class{constructor(t){this.groupObject=t,this.open=!1,this.formElements={alwaysOpen:void 0,menuStyle:void 0,isMobile:void 0,isDesktop:void 0,attentionAnimation:void 0,buttonColor:void 0,borderRadius:void 0,backgroundImage:void 0,groupPosition:void 0,buttonIconSelect:void 0,buttonIconColor:void 0,buttonIconSize:void 0,buttonImageSelect:void 0,buttonImageBackground:void 0,buttonImageIconSelect:void 0,imageSize:void 0,imageBorderRadius:void 0,buttonLabel:void 0,buttonLabelColor:void 0,buttonLabelSize:void 0,show_label:void 0},this.element=HTMLElement}build(){let t=document.createElement("div");return t.className="button-group-styling hidden",this.element=t,this.hide(),this.buildTop(),this.buildForm(),this.groupObject.stylingObject=t,this.element}buildForm(){this.element.appendChild(this.top()),this.element.appendChild(this.menuStyle()),this.element.appendChild(this.buttonStyle()),this.element.appendChild(this.iconStyle()),this.element.appendChild(this.labelStyle());let t=document.createElement("a");t.href="javascript:void(0)",t.className="advanced-settings"+(window.Buttonizer.hasPremium()?"":" buttonizer-premium-gray-out"),t.innerHTML="<i></i> Advanced settings"+(window.Buttonizer.hasPremium()?"":" <span class='buttonizer-premium'>PRO</span>"),t.addEventListener("click",()=>{this.groupObject.windowObject.toggle()}),this.element.appendChild(t)}addError(){let t=document.createElement("div");t.innerHTML="";let e=document.createElement("div");return e.innerHTML="<p><b><u>THESE SETTINGS ARE FOR THE GROUP BUTTON.</u></b></br> The group button will not be visible until </br><b><u>2 or more buttons</u></b> are visible.</p>",e.style.border="1px solid rgb(170, 44, 44)",e.style.background="rgb(255, 238, 236)",e.style.color="#ff0000",e.style.marginTop="10px",e.style.padding="9px 15px",e.style.display="none",this.groupObject.buttonsAmount<=1&&(e.style.display="block"),t.appendChild(e),t}top(){let t=document.createElement("div");return t.className="style-top",this.formElements.menuPosition=new he(this.groupObject),t.appendChild(this.formElements.menuPosition.build()),this.formElements.isMobile=new ee(this.groupObject),t.appendChild(this.formElements.isMobile.build()),t}menuStyle(){let t=document.createElement("div");t.className="style-menu";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Menu style</span>",t.appendChild(e),this.formElements.alwaysOpen=new ge(this.groupObject),t.appendChild(this.formElements.alwaysOpen.build()),this.formElements.menuStyle=new ye(this.groupObject),t.appendChild(this.formElements.menuStyle.build()),this.formElements.attentionAnimation=new we(this.groupObject),t.appendChild(this.formElements.attentionAnimation.build()),t}buttonStyle(){let t=document.createElement("div");t.className="style-button";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Group button style</span>",t.appendChild(e),this.formElements.buttonColor=new ne(this.groupObject),t.appendChild(this.formElements.buttonColor.build()),this.formElements.borderRadius=new Kt(this.groupObject),t.appendChild(this.formElements.borderRadius.build()),this.formElements.backgroundImage=new ce(this.groupObject),t.appendChild(this.formElements.backgroundImage.build()),t}iconStyle(){let t=document.createElement("div");t.className="style-icon";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Group icon</span>",t.appendChild(e),this.formElements.buttonIcon=new pe(this.groupObject),t.appendChild(this.formElements.buttonIcon.build()),this.formElements.buttonIconSelect=new ae(this.groupObject),t.appendChild(this.formElements.buttonIconSelect.build()),this.formElements.buttonIconColor=new $t(this.groupObject),t.appendChild(this.formElements.buttonIconColor.build()),this.formElements.buttonIconSize=new Jt(this.groupObject),t.appendChild(this.formElements.buttonIconSize.build()),t}labelStyle(){let t=document.createElement("div");t.className="style-label";let e=document.createElement("h2");return e.innerHTML="<i></i><span>Label</span>",t.appendChild(e),this.formElements.buttonLabel=new Nt(this.groupObject),t.appendChild(this.formElements.buttonLabel.build()),this.formElements.show_label=new oe(this.groupObject),t.appendChild(this.formElements.show_label.build()),this.formElements.show_label_mobile=new re(this.groupObject),t.appendChild(this.formElements.show_label_mobile.build()),this.formElements.buttonLabelColor=new se(this.groupObject),t.appendChild(this.formElements.buttonLabelColor.build()),this.formElements.buttonLabelFontSizeBorderRadius=new Zt(this.groupObject),t.appendChild(this.formElements.buttonLabelFontSizeBorderRadius.build()),t}buildTop(){}toggle(){(this.open=!0)?(this.open=!1,this.hide()):(this.open=!0,this.show())}show(){this.element.className="button-group-styling",Buttonizer.bar.showSettings(this.groupObject.get("name"),()=>this.hide())}hide(){this.element.className="button-group-styling hidden"}};class ke{constructor(t){this.windowObject=t,this.onTriggerContainer=null,this.dropdown=document.createElement("select"),this.dropdown.className="window-select"}build(){let t=document.createElement("div");t.appendChild(this.dropdown),this.onChange();let e=new s("table-relative");return e.addColumnHTML("<h2>Page rule"+(window.Buttonizer.hasPremium()?"":' <span class="buttonizer-premium premium-right">PRO</span>')+"</h2>","table-align-top",""),e.addColumn(t,"","370"),e.newRow(),e.build()}onChange(){this.dropdown.innerHTML="<option>Show on all pages</option>",this.dropdown.readonly=!0,this.dropdown.addEventListener("click",()=>window.Buttonizer.showPremiumPopup("You can setup page rules that will get triggered on specific pages or user roles. You can create unlimited page rules with multiple rules to trigger."))}}class Ee{constructor(t){this.windowObject=t,this.onTriggerContainer=null,this.dropdown=document.createElement("select"),this.dropdown.className="window-select"}build(){let t=document.createElement("div");t.appendChild(this.dropdown),this.onChange();let e=new s("table-relative");return e.addColumnHTML("<h2>Time schedule"+(window.Buttonizer.hasPremium()?"":' <span class="buttonizer-premium premium-right">PRO</span>')+"</h2>","table-align-top",""),e.addColumn(t,"","370"),e.newRow(),e.build()}onChange(){this.dropdown.innerHTML="<option>Show on all times</option>",this.dropdown.readonly=!0,this.dropdown.addEventListener("click",()=>window.Buttonizer.showPremiumPopup("You can setup time schedules that will get triggered on specific times of a day you setup, it is even possible to change the schedule actions for specific days. You can create unlimited amount of schedules."))}}class Ce{constructor(t){this.windowObject=t}build(){let t=document.createElement("input");t.className="window-select",t.placeholder="Add class";let e=new s("table-relative");return e.addColumnHTML("<h2>Custom class <span class='buttonizer-premium premium-right'>PRO</span></h2>","table-align-top",""),t.addEventListener("mousedown",()=>window.Buttonizer.showPremiumPopup("You can add a custom class to each button for styling purposes.")),e.addColumn(t,"","370"),e.build()}}class xe{constructor(t){this.windowObject=t}build(){let t=document.createElement("input");t.className="window-select",t.placeholder="Add ID";let e=new s("table-relative");return e.addColumnHTML("<h2>Custom ID <span class='buttonizer-premium premium-right'>PRO</span></h2>"),t.addEventListener("mousedown",()=>window.Buttonizer.showPremiumPopup("You can add a custom ID to each button for styling purposes.")),e.addColumn(t,"","370"),e.build()}}class Se extends m{constructor(t){super(t,"Advanced settings - Group "+t.data.name+(window.Buttonizer.hasPremium()?"":" (premium)"))}render(){this.filter(),this.delay(),this.styling()}filter(){let t=document.createElement("div");t.appendChild(new Ee(this).build()),t.appendChild(new ke(this).build()),super.addItem("Filter",t)}position(){let t=document.createElement("div");t.innerHTML="Testinhoud van <b>POSITIE</b>!!!",super.addItem("Position",t)}delay(){let t=document.createElement("div");t.appendChild(new p(this).build()),t.appendChild(new h(this).build()),super.addItem("Timeout & Scroll",t)}styling(){let t=document.createElement("div");t.appendChild(new Ce(this).build()),t.appendChild(new xe(this).build()),super.addItem("Styling",t)}}class je{constructor(t,e){e||(e=[]),this.type="group",this.groupOpened=!1,this.data=t,this.ui={},this.groupObject=HTMLElement,this.groupID=window.Buttonizer.buttonGroups.length,this.stylingOpened=!1,this.stylingObject=HTMLElement,this.groupBody=HTMLElement,this.windowObject=HTMLElement,this.buttons=[],this.buttonsLength=e.length,this.singleButtonMode=!1,this.buildGroup(),this.windowObject=new Se(this);for(let t in e)new be(this,e[t]);this.appendAddButton(),window.Buttonizer.buttonGroups.push(this)}get buttonsAmount(){return this.getButtonsAlive()}buildGroup(){let t=document.createElement("div");t.className="buttonizer-button-group is-group",this.groupObject=t,this.groupHolder=new fe(this),t.appendChild(this.groupHolder.build()),this.groupSettings=new ve(this),Buttonizer.bar.settingContent.appendChild(this.groupSettings.build()),this.appendAddButton(),this.groupBody=document.createElement("div"),this.groupBody.style.display="none",this.groupBody.className="button-group-body",t.appendChild(this.groupBody),jQuery(this.groupBody).sortable({items:"> div",axis:"y",cursor:"move",delay:150,handle:"#buttonizer-button-title",helper:"clone",cancel:this.buttonsLength<=1?".group-button":null,connectWith:".button-group-body",disabled:!0,start:(t,e)=>{jQuery(e.item).attr("previndex",e.item.index()),jQuery(e.item).attr("prevgroup",jQuery(this.groupBody).parent().index())},stop:(t,e)=>{jQuery(e.item).removeAttr("previndex"),jQuery(e.item).removeAttr("prevgroup")},update:function(t,e){if(this===e.item.parent()[0]){let t=e.item.index(),n=jQuery(e.item).attr("previndex"),i=jQuery(this).parent().index(),o=jQuery(e.item).attr("prevgroup");e.sender&&jQuery(this).sortable("option","cancel",null),window.Buttonizer.updateButtonList(t,n,i,o),jQuery(e.item).removeAttr("previndex"),jQuery(e.item).removeAttr("prevgroup")}}}),jQuery(this.groupBody).disableSelection(),jQuery(".group-title").disableSelection(),Buttonizer.bar.groupHolder.appendChild(this.groupObject)}duplicate(){new je(this.data,this.buttons)}appendAddButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="create-new-button",t.innerHTML="Add button +",t.addEventListener("click",()=>{new be(this,{name:"Button "+(this.getButtonsAlive()+1),show_mobile:"true",show_desktop:"true"}),jQuery(this.groupBody).sortable("option","cancel",null)}),this.groupObject.appendChild(t)}registerButton(t){this.buttons.push(t),1===this.getButtonsAlive()!==this.singleButtonMode&&(this.singleButtonMode=1===this.getButtonsAlive(),this.groupHolder.setSingleButtonMode())}removeGroup(){let t=window.Buttonizer.buttonGroups.indexOf(this);window.Buttonizer.buttonGroups.splice(t,1),this.groupObject.remove()}set(t,e){this.data[t]=e,void 0!==this.ui[t]&&this.ui[t].forEach(t=>t.update(e)),window.Buttonizer.buttonChanges=!0}get(t,e){return void 0!==this.data[t]?this.data[t]:(this.data[t]=e,window.Buttonizer.buttonChanges=!0,e)}getButtonsAlive(){let t=0;return this.buttons.forEach(e=>{e.alive&&t++}),t}getButtons(){return this.buttons.filter(t=>t.alive)}registerUI(t,e){void 0!==this.ui[t]?this.ui[t].push(e):this.ui[t]=[e]}getUI(t){return void 0!==this.ui[t]&&this.ui[t]}}var _e=je;var Oe=class{constructor(t){this.buttonizerObject=t,this.topBarElement=HTMLElement,this.optionsWindow=HTMLElement,this.publishButton=HTMLElement,this.revertChangesText=HTMLElement,this.alertText=HTMLElement,this.eventListCache=[],this.eventTrackerMenuItem=null,this.eventTracker=null,this.windowOptions=[{buttons:[{title:"Buttonizer",description:`Version ${window.Buttonizer.buttonizerInitData.version}`,callback:()=>{window.open("https://www.buttonizer.pro/")}},{title:"Knowledgebase",description:"A deep dive in all the Buttonizer possibilities",callback:()=>{window.open("https://community.buttonizer.pro/t/knowledgebase")}}]},{title:"Support",buttons:[{title:"I need support",description:"Direct support with Buttonizer developers",callback:()=>{window.open("https://community.buttonizer.pro/t/support")}},{title:"Community",description:"Interact with other Buttonizers",callback:()=>{window.open("https://community.buttonizer.pro/")}},{title:"Buttonizer tour (recommended!)",description:"Start the 2 minute tour",callback:()=>{window.Buttonizer.startTour()}}]},{title:"Buttonizer account",buttons:[{title:"My Account",callback:()=>{window.open(buttonizer_admin.admin+"?page=Buttonizer-account")}},{title:"Upgrade or pricing",callback:()=>{window.open(buttonizer_admin.admin+"?page=Buttonizer-pricing")}},{title:"Affiliation",description:"Earn $ by promoting Buttonizer",callback:()=>{window.open(buttonizer_admin.admin+"?page=Buttonizer-affiliation")}}]},{buttons:[{title:"Options",icon:"fa fa-cogs",class:"single-button",callback:()=>{this.buttonizerObject.settingsWindow.toggle()}}]}],document.body.appendChild(this.buildTopBar())}buildTopBar(){let t=document.createElement("div");t.className="buttonizer-topbar";let e=document.createElement("div");return e.className="revert-save",e.style.display="inline-block",e.appendChild(this.createRevertChangesButton()),e.appendChild(this.createPublishButton()),t.appendChild(this.createBackButton()),t.appendChild(this.createLogo()),t.appendChild(e),t.appendChild(this.createOptionsButton()),t.appendChild(this.createAlertText()),t.appendChild(this.createOptionsWindow()),t.appendChild(this.createEventMenuItem()),t.appendChild(this.createEventWindow()),this.topBarElement=t,t}createOptionsButton(){let t=document.createElement("a");return t.className="options-button button right fas fa-cog",t.addEventListener("click",()=>{this.optionsWindow.toggle()}),t}createEventMenuItem(){let t=document.createElement("a");return t.href="javascript:void(0)",t.className="event-tracker-button",t.style.display="none",t.innerHTML="",t.addEventListener("click",()=>{"block"===this.eventTracker.container.style.display?this.eventTracker.container.style.display="none":this.eventTracker.container.style.display="block"}),this.eventTrackerMenuItem=t,t}createEventWindow(){let t=document.createElement("div");t.className="event-track-window",t.style.display="none",t.innerHTML='<div class="track-window-title">Event tracker (experimental)</div>';let e=document.createElement("a");e.href="javascript:void(0)",e.className="close",e.innerHTML='<i class="fas fa-times"></i>',e.addEventListener("click",()=>{t.style.display="none"}),t.appendChild(e);let n=document.createElement("div");return n.className="list-container",n.innerHTML="",t.appendChild(n),this.eventTracker={container:t,list:n},t}updateEventLogs(t){if(0!==t.length){if(this.eventListCache!==t){this.eventTrackerMenuItem.style.display="block",this.eventTrackerMenuItem.innerHTML='<i class="fas fa-info"></i> ('+t.length+") Event tracker",this.eventTracker.list.innerHTML="";for(let e=0;e<t.length;e++){let n=document.createElement("div");n.className="event-element event-"+t[e].type,n.innerHTML=t[e].message,this.eventTracker.list.appendChild(n)}}}else this.eventTrackerMenuItem.style.display="none"}createOptionsWindow(){this.optionsWindow=document.createElement("div"),this.optionsWindow.className="options-window",this.optionsWindow.hidden=!0,this.optionsWindow.toggle=(()=>{this.optionsWindow.hidden=!this.optionsWindow.hidden});let t=document.createElement("ul");for(let e=0;e<this.windowOptions.length;e++){let n=document.createElement("li");if(n.className="group-container","string"==typeof this.windowOptions[e].title){let t=document.createElement("div");t.className="group-title",t.innerHTML=this.windowOptions[e].title,n.appendChild(t)}for(let t=0;t<this.windowOptions[e].buttons.length;t++)n.appendChild(this.barMenuItem(this.windowOptions[e].buttons[t]));t.appendChild(n)}return this.optionsWindow.appendChild(t),this.optionsWindow}barMenuItem(t){let e=document.createElement("a");e.href="javascript:void(0)",e.className=t.class?"option "+t.class:"option";let n=document.createElement("span");if(n.className="button-title",n.innerHTML=t.title?t.title:"Default title",e.appendChild(n),t.hasOwnProperty("description")){let n=document.createElement("span");n.className="button-description",n.innerHTML=t.description?t.description:"",e.appendChild(n)}if(t.hasOwnProperty("icon")){let n=document.createElement("i");n.className=t.icon,e.appendChild(n)}return t.hasOwnProperty("callback")&&e.addEventListener("click",()=>{this.optionsWindow.toggle(),t.callback()}),e}createBackButton(){let t=document.createElement("a");return t.className="close-button fa fa-times",t.addEventListener("click",()=>{document.location.href=window.Buttonizer.buttonizerInitData.wordpress.admin_base}),t}createLogo(){let t=document.createElement("img");return t.className="buttonizer-logo",t.src=buttonizer_admin.assets+"/images/logo.png",t}createPublishButton(){return this.publishButton=document.createElement("a"),this.publishButton.className="publish-button button-primary right",this.publishButton.innerText="Save & Publish",this.publishButton.enabled=!0,this.publishButton.addEventListener("click",()=>{this.publishButton.enabled&&this.buttonizerObject.savingMechanism.publish()}),this.publishButton.enable=(()=>{this.publishButton.enabled=!0,this.revertChangesText.hidden=!1,this.publishButton.innerText="Save & Publish",this.publishButton.className=this.publishButton.className.replace(" disabled","")}),this.publishButton.disable=(t=>{this.publishButton.enabled=!1,this.revertChangesText.hidden=!0,this.publishButton.innerText=t,this.publishButton.className.includes(" disabled")||(this.publishButton.className+=" disabled")}),this.publishButton}createRevertChangesButton(){return this.revertChangesText=document.createElement("a"),this.revertChangesText.className="revert-button right",this.revertChangesText.innerText="Revert changes",this.revertChangesText.href="javascript:void(0)",this.revertChangesText.addEventListener("click",()=>{new r({title:"Revert changes",content:"<p>Are you sure you want to revert your changes?</p><p>The current changes will be overwritten by the current published buttons and settings.</p>",onConfirm:()=>{this.buttonizerObject.savingMechanism.revert()},buttons:[{text:"Never mind",close:!0,focus:!0},{text:"Revert changes",confirm:!0}]})}),this.revertChangesText}createAlertText(){return this.alertText=document.createElement("a"),this.alertText.className="alert-text",this.alertText.showSaving=(()=>{this.alertText.innerHTML='<i class="fas fa-mug-hot"></i> Saving changes...',this.alertText.hidden=!1}),this.alertText.showSaved=(()=>{this.alertText.innerHTML='<i class="fas fa-check"></i> Saving complete.',setTimeout(()=>{this.alertText.hidden=!0},2e3)}),this.alertText.alert=(t=>{this.alertText.innerText=t,this.alertText.hidden=!1,setTimeout(()=>{this.alertText.hidden=!0},2e3)}),this.alertText.hidden=!0,this.alertText}set changes(t){t?this.publishButton.enable():this.publishButton.disable("Published")}};var Le=class{constructor(t){this.buttonizerObject=t,this.barElement=HTMLElement,this.groupContainer=HTMLElement,this.settingBar=HTMLElement,this.settingContainer=HTMLElement,this.settingContent=HTMLElement,this.settingTitle=HTMLElement,this.settingCallback=(()=>console.log("huh?")),document.body.appendChild(this.buildBar()),jQuery(this.groupContainer).scrollbar(),jQuery(this.settingContent).scrollbar()}buildBar(){let t=document.createElement("div");t.className="buttonizer-bar";let e=document.createElement("div");e.className="group-container container",e.appendChild(this.createButtonHolder()),e.appendChild(this.addButtonGroup()),t.appendChild(e),t.appendChild(this.createBarFooter()),this.barElement=t,this.groupContainer=e;let n=document.createElement("div"),i=document.createElement("div");i.className="settings-content";let o=document.createElement("div");return o.className="settings-container container hidden",o.appendChild(this.createSettingBar()),i.appendChild(n),o.appendChild(i),t.appendChild(o),this.settingContent=n,this.settingContainer=o,t}createSettingBar(){let t=document.createElement("div");t.className="top";let e=document.createElement("a");e.className="back-button fa fa-angle-left",e.addEventListener("click",()=>{jQuery(".settings-container").addClass("hidden"),jQuery(".group-container").removeClass("hidden"),setTimeout(()=>this.settingCallback(),250)}),t.appendChild(e);let n=document.createElement("div");n.className="title-wrapper";let i=document.createElement("h4");i.innerHTML="Now editing:";let o=document.createElement("h2");return o.innerHTML="nothing!",n.appendChild(i),n.appendChild(o),t.appendChild(n),this.settingBar=t,this.settingTitle=o,t}createButtonHolder(){return this.groupHolder=document.createElement("div"),this.groupHolder.className="buttonizer-group-holder",jQuery(this.groupHolder).sortable({items:"> div",axis:"y",cursor:"move",delay:150,handle:"#buttonizer-group-title",helper:"clone",start:function(t,e){jQuery(this).attr("data-previndex",e.item.index())},stop:function(t,e){jQuery(this).removeAttr("data-previndex")},update:function(t,e){var n=e.item.index(),i=jQuery(this).attr("data-previndex");window.Buttonizer.updateButtonGroupList(n,i),jQuery(this).removeAttr("data-previndex")},cancel:null}),jQuery(this.groupHolder).disableSelection(),jQuery(".group-title").disableSelection(),this.groupHolder}addButtonGroup(){let t=document.createElement("a");return t.href="javascript:void(0)",t.className="create-new-button is-create-group buttonizer-premium-gray-out",t.innerHTML="Add group + <span class='buttonizer-premium'>PRO</span>",t.addEventListener("click",()=>window.Buttonizer.showPremiumPopup("You are able to add multiple groups on different positions.")),t}generateLink(t,e,n,i){i||(i="");let o=document.createElement("a");return o.href="javascript:void(0)",o.className=i,o.innerHTML='<i class="'+t+'"></i> '+e,o.addEventListener("click",n),o}showSettings(t,e){jQuery(".buttonizer-bar .settings-container").removeClass("hidden"),jQuery(".buttonizer-bar .group-container").addClass("hidden"),this.settingTitle.innerHTML=t,this.settingCallback=e}createBarFooter(){let t=document.createElement("div");t.className="bar-footer";let e=document.createElement("div");e.className="footer-device-selector";let n=document.createElement("a");n.href="javascript:void(0)",n.className="active",n.innerHTML='<span class="dashicons-before dashicons-desktop"></span>',n.addEventListener("click",()=>{n.classList.add("active"),i.classList.remove("active"),o.classList.remove("active"),document.querySelector(".buttonizer-frame").className="buttonizer-frame"}),e.appendChild(n);let i=document.createElement("a");i.href="javascript:void(0)",i.innerHTML='<span class="dashicons-before dashicons-tablet"></span>',i.addEventListener("click",()=>{n.classList.remove("active"),i.classList.add("active"),o.classList.remove("active"),document.querySelector(".buttonizer-frame").className="buttonizer-frame frame-size-tablet"}),e.appendChild(i);let o=document.createElement("a");return o.href="javascript:void(0)",o.innerHTML='<span class="dashicons-before dashicons-smartphone"></span>',o.addEventListener("click",()=>{n.classList.remove("active"),i.classList.remove("active"),o.classList.add("active"),document.querySelector(".buttonizer-frame").className="buttonizer-frame frame-size-mobile"}),e.appendChild(o),t.appendChild(e),t}};var Te=class{constructor(){this.element=document.createElement("div"),this.element.className="buttonizer-loading";let t=document.createElement("div");t.className="middle";let e=document.createElement("img");e.src=buttonizer_admin.assets+"/images/buttonizer-loading.png",t.innerHTML=this.svg(),t.appendChild(e),this.textElement=document.createElement("div"),this.textElement.className="loader-text",t.appendChild(this.textElement),this.element.appendChild(t),document.body.appendChild(this.element)}svg(){return'<svg width="165" height="165" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-rolling"><circle cx="50" cy="50" fill="none" stroke="#2f788a" stroke-width="7" r="35" stroke-dasharray="164.93361431346415 56.97787143782138" transform="rotate(300 50 50)">\x3c!--animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"--\x3e</animateTransform></circle></svg>'}show(t,e=""){t||(t=""),this.textElement.innerHTML=t,this.element.className="buttonizer-loading "+e,this.element.style.display="block"}hide(){this.element.style.display="none"}};var Be=class{constructor(){this.updateTimer=setTimeout(()=>{},0),this.isUpdating=!1,this.tempButtons={},this.savingObject=HTMLElement,this.savedObject=HTMLElement,setInterval(()=>this.checkUpdates(),500)}checkUpdates(){window.Buttonizer.buttonChanges&&!this.isUpdating&&(window.Buttonizer.buttonChanges=!1,clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>this.save(),1e3))}save(){window.Buttonizer.buttonChanges||(this.isUpdating=!0,window.Buttonizer.buttonChanges=!1,window.Buttonizer.topBar.alertText.showSaving(),console.log("[BUG DEBUG SAVING AND RELOADING] button changes!"),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=buttons",dataType:"json",method:"post",data:{security:buttonizer_admin.security,buttons:this.generateJSONObject()},success:t=>{this.isUpdating=!1,"success"===t.status?(console.log("[BUG DEBUG SAVING AND RELOADING] saved!"),window.Buttonizer.topBar.alertText.showSaved(),this.reloadPreview(),window.Buttonizer.changes=!0):window.Buttonizer.savingError(t.message)},error:t=>{this.isUpdating=!1,window.Buttonizer.savingError(t)}}))}publish(){window.Buttonizer.buttonChanges||this.isUpdating||(this.isUpdating=!0,window.Buttonizer.buttonChanges=!1,window.Buttonizer.topBar.publishButton.disable("Publishing..."),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=publish",dataType:"json",data:{security:buttonizer_admin.security},method:"post",success:t=>{this.isUpdating=!1,"success"===t.status?window.Buttonizer.topBar.publishButton.disable("Published"):new r({title:"Could not save settings",content:`<p>Something went wrong while saving your settings.</p><p>${t.message}</p>`,buttons:[{text:"Close",close:!0}]})},error:(t,e,n)=>{this.isUpdating=!1,window.Buttonizer.topBar.publishButton.enable(),window.bdebug.error("Couldn't complete saving: "+t)}}))}revert(){window.Buttonizer.buttonChanges||(window.Buttonizer.loader.show("Reverting..."),this.isUpdating=!0,window.Buttonizer.buttonChanges=!1,jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=revert",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{if(this.isUpdating=!1,"success"!==t.status)return window.Buttonizer.loader.hide(),void new r({title:"Could not revert settings",content:`<p>Something went wrong while reverting your settings.</p><p>${t.message}</p>`,buttons:[{text:"Close",close:!0}]});document.location.reload()},error:(t,e,n)=>{this.isUpdating=!1,window.bdebug.error("Couldn't complete saving: "+t)}}))}reloadPreview(){console.log("[BUG DEBUG SAVING AND RELOADING] requested!");try{document.getElementById("buttonizer-iframe").contentWindow.postMessage({eventType:"buttonizer",messageType:"preview-reload"},document.location.origin)}catch(t){console.log("Buttonizer tried to auto update the Buttonizer Buttons. But the message didn't came through. Well. Doesn't matter, it's just an extra function. It's nice to have."),console.log(t),document.getElementById("buttonizer-iframe").contentWindow.location.reload()}}generateJSONObject(){let t=window.Buttonizer.buttonGroups,e=[];for(let n=0;n<t.length;n++){let i=t[n].buttons,o=[];for(let t=0;t<i.length;t++)i[t].alive&&o.push(i[t].data);e.push({data:t[n].data,buttons:o})}return e}},ze=class{constructor(){this.versionDropdown={},this.libraryPremiumCode={},this.currentSelected=window.Buttonizer.getSetting("icon_library","fontawesome"),this.currentSelectedIndex=null,this.currentSelectedVersion=window.Buttonizer.getSetting("icon_library_version","5.free"),this.currentSelectedVersionIndex=null,this.currentSelectedPremiumCode=window.Buttonizer.getSetting("icon_library_code",""),this.cachedPremium=[],this.libraries=[{name:"Font Awesome",id:"fontawesome",versions:[{id:"5.free",name:"Font Awesome 5 - Free - Latest (automatic)",free:!0},{id:"5.paid",name:"Font Awesome 5 - Pro - Latest (automatic)",free:!1},{id:"4.7.0",name:"Font Awesome 4.7",free:!0}]}]}build(){let t=document.createElement("div");return t.appendChild(this.iconLibrary()),t.appendChild(this.versionSelector()),t.appendChild(this.importIconLibrary()),t}showPremiumIcons(){return!0}iconLibrary(){let t=document.createElement("select");t.className="window-select";for(let e=0;e<this.libraries.length;e++){let n=document.createElement("option");n.value=e,n.text=this.libraries[e].name,n.setAttribute("data-index",e.toString()),this.currentSelected===this.libraries[e].id&&(n.selected=!0,this.currentSelectedIndex=e),t.appendChild(n)}t.addEventListener("change",()=>{this.currentSelected=t.value,this.currentSelectedIndex=Number(t.getAttribute("data-index")),this.currentSelectedVersion=0,window.Buttonizer.saveSettings({icon_library:t.value,icon_library_version:this.libraries[this.currentSelectedIndex].versions[0]},!1),this.buildVersionSelector(),this.reloadIframe()});let e=document.createElement("div");e.innerHTML="If your theme automatically loads in a library you just have to select the correct icon library.";let n=new s;return n.addColumnHTML("<h2>Icon library</h2>"),n.addColumn(t,"","370"),n.newRow(),n.addColumnText(""),n.addColumn(e),n.build()}versionSelector(){this.versionDropdown=document.createElement("select"),this.versionDropdown.className="window-select",this.versionDropdown.addEventListener("change",()=>{this.currentSelectedVersion=this.versionDropdown.value,window.Buttonizer.saveSettings({icon_library_version:this.currentSelectedVersion},!1),this.currentSelectedVersion.indexOf("paid")>=0?(this.libraryPremiumCode.style.display="block",""!==this.currentSelectedPremiumCode&&this.reloadIcons()):(this.libraryPremiumCode.style.display="none",this.reloadIcons())});let t=document.createElement("div");t.innerHTML="Select the correct version of the library. So Buttonizer can help you choosing icons.";let e=new s;e.addColumnHTML("<h2>Select version</h2>"),e.addColumn(this.versionDropdown,"","370"),e.newRow(),e.addColumnText(""),e.addColumn(t);let n=document.createElement("div");return n.appendChild(e.build()),n.appendChild(this.libraryLicenseKey()),this.buildVersionSelector(),n}reloadIcons(){window.Buttonizer.iconSelector.iconListener.onReady(()=>{window.Buttonizer.iconSelector.rebuild(),window.Buttonizer.addIconLibrary(),this.reloadIframe()}),window.Buttonizer.iconSelector.iconListener.loadIcons()}libraryLicenseKey(){let t=document.createElement("div");t.innerHTML='You have selected an icon library that has premium icons, enter the library license to show them. <a href="" target="_blank" class="link-add-more" style="display: inline">How does this work?</a>';let e=document.createElement("input");e.placeholder="Enter integrity code",e.className="window-select",e.value=this.currentSelectedPremiumCode,e.addEventListener("change",()=>{window.Buttonizer.saveSettings({icon_library_code:e.value},!1),this.reloadIcons()});let n=new s;return n.addColumnHTML(" "),n.addColumn(e,"","370"),n.newRow(),n.addColumnText(""),n.addColumn(t),this.libraryPremiumCode=n.build(),this.libraryPremiumCode}buildVersionSelector(){this.versionDropdown.innerHTML="";let t=!1;for(let e=0;e<this.libraries[this.currentSelectedIndex].versions.length;e++){let n=document.createElement("option");n.value=this.libraries[this.currentSelectedIndex].versions[e].id,n.text=this.libraries[this.currentSelectedIndex].versions[e].name,this.currentSelectedVersion===n.value&&(n.selected=!0,this.libraries[this.currentSelectedIndex].versions[e].free||(t=!0)),this.versionDropdown.appendChild(n)}this.libraryPremiumCode.style.display=t?"block":"none"}importIconLibrary(){let t=new u({state:window.Buttonizer.getSetting("import_icon_library",!0)});t.onToggle(t=>{window.Buttonizer.saveSettings({import_icon_library:t},!1),this.reloadIframe()});let e=document.createElement("div");e.innerHTML="Should Buttonizer import the icon library into your theme? When your theme already imports the library you can disable this.";let n=new s;return n.addColumnHTML("<h2>Import icon library</h2>"),n.addColumn(t.build(),"","370"),n.newRow(),n.addColumnText(""),n.addColumn(e),this.buildVersionSelector(),n.build()}reloadIframe(){setTimeout(()=>{document.getElementById("buttonizer-iframe").contentWindow.location.reload()},1500)}};class Ae{constructor(){this.versionDropdown={},this.currentSelected=window.Buttonizer.getSetting("google_analytics","")}build(){let t=document.createElement("div");t.appendChild(this.input());let e=document.createElement("div");e.className="window-splitter",e.innerHTML="Where can I see my click data of my buttons in Google Analytics?",e.style.marginBottom="20px",t.appendChild(e);let n=document.createElement("div");return n.className="settings-window-information",n.innerHTML='\n<p>All the click data of each button is displayed in the Google Analytics account you have set for your website. When you go to the <b>Behavior section</b> (left side of your screen in Google Analytics) and then click on <b>events overview</b> you will see that there is an <b>Event category</b> called <b>Buttonizer</b>.</p>\n\n<p><b>Event Category</b>: Each button you have set on Buttonizer will get the event category \'Buttonizer\'<br />\n<b>Event Label</b>: This will be the name that you have given your button in the back-end in WordPress <i class="fa fa-caret-right"></i> This way you will recognize which buttons perform better<br />\n<b>Event Action</b>: This will be the page on which the button is clicked</p>\n\n<p>If you want to test if the Google Analytics tracking is working. You go to <b>Real Time <i class="fa fa-caret-right"></i> Events</b>, open another tab, go to your website and click on the button. You should see hits coming in :)</p>\n',t.appendChild(n),t}input(){let t=document.createElement("input");t.value=this.currentSelected,t.className="window-select",t.placeholder="UA-XXXXXX-Y",t.addEventListener("change",()=>{window.Buttonizer.saveSettings({google_analytics:t.value},!1)});let e=document.createElement("div");e.innerHTML="Insert here the Google Analytics tracking code. Like UA-000000-2";let n=new s;return n.addColumnHTML("<h2>Google Analytics</h2>"),n.addColumn(t,"","375"),n.newRow(),n.addColumnText(""),n.addColumn(e),n.build()}}class Ie{constructor(){}build(){let t=document.createElement("div"),e=document.createElement("div");return e.className="settings-window-information",e.innerHTML="<p>Nothing really special here, just a way to reset the buttonizer to the default settings</p>",t.appendChild(e),t.appendChild(this.whatWillHappen()),t.appendChild(this.why()),t.appendChild(this.myLicense()),t.appendChild(this.andThen()),t.appendChild(this.ready()),t}whatWillHappen(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="What happens when I click the red button below?",e.style.marginBottom="20px",t.appendChild(e);let n=document.createElement("div");return n.className="settings-window-information",n.innerHTML="<p>What will happen is that the plugin will get a 'factory reset'. All settings to Buttonizer will get removed as you just installed and activated Buttonizer. From then you can start all-over again.</p>",t.appendChild(n),t}why(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Why would I do that?",e.style.marginBottom="20px",t.appendChild(e);let n=document.createElement("div");return n.className="settings-window-information",n.innerHTML="<p>There are many reasons to reset Buttonizer. One could be, you ruined your Buttonizer buttons, the settings, categories. Or maybe you just want to try this reset button?</p>",t.appendChild(n),t}myLicense(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="I have a license, what about that?",e.style.marginBottom="20px",t.appendChild(e);let n=document.createElement("div");return n.className="settings-window-information",n.innerHTML="\n<p>No worries! Nothing will happen with your license! It only wipe out the following:</p>\n<p>\n<ul>\n <li>Your buttons</li>\n <li>Your button groups</li>\n <li>All time schedules</li>\n <li>All page rules</li>\n <li>All other settings of Buttonizer</li>\n <li>All publishes settings</li>\n</ul>\n</p>\n",t.appendChild(n),t}andThen(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Okay, sounds good. What then?",e.style.marginBottom="20px",t.appendChild(e);let n=document.createElement("div");return n.className="settings-window-information",n.innerHTML="<p>Buttonizer will go back to the default settings and will behave like a fresh installation. That's all.</p>",t.appendChild(n),t}ready(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Okay, I'm ready!",e.style.marginBottom="20px",t.appendChild(e);let n=document.createElement("div");n.className="settings-window-information",n.innerHTML="<p>Press the red button below to reset buttonizer. There will be no more warnings.</p>",t.appendChild(n);let i=document.createElement("a");return i.className="button button-red button-centered-reset",i.innerHTML='<i class="fas fa-sync"></i> Reset Buttonizer!',i.href="javascript:void(0)",i.addEventListener("click",()=>this.countdown()),t.appendChild(i),t}countdown(){window.Buttonizer.loader.show("Initializing..."),setTimeout(()=>{window.Buttonizer.loader.show("Resetting..."),this.reset()},1500)}reset(){jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=reset-buttonizer",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{"success"===t.status?(window.Buttonizer.loader.show("Finishing..."),setTimeout(()=>{document.location.reload()},500)):(window.Buttonizer.loader.hide(),window.Buttonizer.savingError(t.message))},error:(t,e,n)=>{window.Buttonizer.loader.hide(),window.Buttonizer.savingError(e)}})}error(){}}class Ne{build(){let t=document.createElement("div");return t.appendChild(this.showWPAdminTopBarButton()),t.appendChild(this.showTooltips()),t.appendChild(this.allowRequestsFromSubdomains()),t}showWPAdminTopBarButton(){let t=new u({state:window.Buttonizer.getSetting("admin_top_bar_show_button","true")});t.onToggle(t=>{window.Buttonizer.saveSettings({admin_top_bar_show_button:t},!1)});let e=new s;return e.addColumnHTML("<h2>Admin topbar button</h2>"),e.addColumn(t.build(),"","370"),e.newRow(),e.addColumnText(""),e.addColumnText("You can hide the button in the admin top bar by using this toggle"),e.build()}showTooltips(){let t=new u({state:window.Buttonizer.getSetting("show_tooltips")});t.onToggle(t=>{window.Buttonizer.saveSettings({show_tooltips:t},!1)});let e=new s;return e.addColumnHTML("<h2>Show tooltips</h2>"),e.addColumn(t.build(),"","370"),e.newRow(),e.addColumnText(""),e.addColumnText("You can hide or show all the tooltips by changing this setting"),e.build()}allowRequestsFromSubdomains(){let t=new u({state:window.Buttonizer.getSetting("allow_subdomains","false")});t.onToggle(t=>{window.Buttonizer.saveSettings({allow_subdomains:t},!1)});let e=new s;return e.addColumnHTML("<h2>Subdomain support</h2>"),e.addColumn(t.build(),"","370"),e.newRow(),e.addColumnText(""),e.addColumnText("Some WordPress websites use subdomains to serve content on their website. To allow Buttonizer to load on your subdomains, you can enable this here. Only enable this when you need it."),e.build()}}var Me=class extends m{constructor(){super({},"Buttonizer settings")}render(){this.fontAwesome(),this.analytics(),this.mainSettings(),this.reset()}fontAwesome(){super.addItem("Icon library",(new ze).build())}analytics(){super.addItem("Google Analytics",(new Ae).build())}mainSettings(){super.addItem("Other settings",(new Ne).build())}reset(){super.addItem("Reset",(new Ie).build())}},He=class{constructor(){this.element=null,this.itemList=null,this.searchList=null,this.searchInput=null,this.fontAwesomeStylesheet=null,this.iframeContent=null,this.mayClose(),this.build(),this.iconListener=new class{constructor(){this.icons=[],this.callback=(()=>{}),this.searchResultCache=[],this.loadIcons()}onReady(t){this.callback=t}getIcons(){return this.icons}search(t){if(void 0!==this.searchResultCache[t])return this.searchResultCache[t];let e=[];for(let n=0;n<this.icons.length;n++){let i=this.icons[n];(i.searchTerms.indexOf(t)>=0||i.name.indexOf(t)>=0)&&e.push(i)}return this.searchResultCache[t]=e,e}loadIcons(){this.searchResultCache=[],this.icons=[];let t=window.Buttonizer.settings.icon_library,e=window.Buttonizer.settings.icon_library_version;jQuery.ajax({url:buttonizer_admin.assets+"/icon_definitions/"+t+"."+e+".json?buttonizer-icon-cache="+window.Buttonizer.version,dataType:"json",method:"get",success:n=>{this.icons=n,console.log("Finished loading icon library '"+t+"' version "+e),this.callback()},error:()=>{console.error("Could not load icon library '"+t+"' version "+e)}})}},this.iconLibrary=new ze,this.currentInput=null,this.currentInputJ=null,this.searchTimeout=setTimeout(()=>{},1),setInterval(()=>this.stayOnPlace(),100),this.firstBuild=!0,this.opened=!1}build(){let t=document.createElement("div");t.className="buttonizer-icon-selector";let e=document.createElement("div");e.className="icon-selector-searchbar";let n=document.createElement("input");n.className="icon-selector-searchbar",n.placeholder="Search to icons...",n.addEventListener("keyup",()=>{clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.search(n.value)},200)}),this.searchInput=n,e.appendChild(this.searchInput),t.appendChild(e);let i=document.createElement("iframe");i.height="350px",i.width="100%",i.src="about:blank",i.frameborder=0,i.addEventListener("load",()=>{i.contentDocument.querySelector("head").appendChild(window.Buttonizer.iconLibraryStylesheet);let t=document.createElement("style");t.innerText='\nbody, html {\n background-color: #f5f5f5;\n margin: 0;\n padding: 0;\n font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;\n font-size: 14px;\n}\n\n.icon-selector-list {\n border-top: 1px solid #e7e7e7;\n overflow: auto;\n text-align: center;\n}\n\n.icon-selector-list a {\n background-color: #f5f5f5;\n color: #464646;\n font-size: 19px;\n width: 16%;\n height: 50px;\n line-height: 50px;\n text-decoration: none;\n display: inline-block;\n text-align: center;\n outline: none;\n}\n\n.icon-selector-list a:hover {\n background-color: #e7e7e7;\n}\n\n.icon-selector-list a:focus {\n box-shadow: none !important;\n}\n\n.fa, .fal, .far, .fas, .fab {\n line-height: 50px !important;\n}',i.contentDocument.querySelector("head").appendChild(t),this.itemList=document.createElement("div"),this.itemList.className="icon-selector-list",i.contentDocument.body.appendChild(this.itemList),this.searchList=document.createElement("div"),this.searchList.className="icon-selector-list search-list",this.searchList.style.display="none",i.contentDocument.body.appendChild(this.searchList)}),this.iframeContent=i,t.appendChild(this.iframeContent),this.element=t,document.body.appendChild(this.element)}search(t){if(""===t)return this.searchList.style.display="none",this.itemList.style.display="block",void(this.iframeContent.height="350px");this.searchList.style.display="block",this.itemList.style.display="none";let e=this.iconListener.search(t);e.length>0?(this.searchList.innerHTML="",this.showIcons(this.searchList,e),jQuery(this.searchList).height()>350?this.iframeContent.height="350px":this.iframeContent.height=jQuery(this.searchList).height()+5+"px"):(this.iframeContent.height="50px",this.searchList.innerHTML=`<p>Sorry, no results found for <b>${t}</b></p>`)}rebuild(){this.itemList.innerHTML="",this.searchList.innerHTML="",this.showIcons(this.itemList,this.iconListener.getIcons())}showIcons(t,e){for(let n=0;n<e.length;n++){let i=e[n];for(let e=0;e<i.icons.length;e++){let n=document.createElement("a");n.innerHTML=`<i class="${i.icons[e].icon}"></i>`,n.href="javascript:void(0)",n.title=i.name+" ("+i.icons[e].type+")",n.addEventListener("click",()=>{if(null!==this.currentInput){if(this.currentInput.value=i.icons[e].icon,"createEvent"in document){let t=document.createEvent("HTMLEvents");t.initEvent("change",!1,!0),this.currentInput.dispatchEvent(t)}else this.currentInput.fireEvent("onchange");this.close()}}),t.appendChild(n)}}}open(t){this.currentInput=t,this.currentInputJ=jQuery(this.currentInput),this.searchInput.value="",this.searchList.style.display="none",this.itemList.style.display="block",this.element.style.display="block",setTimeout(()=>{this.searchInput.focus(),this.opened=!0,this.stayOnPlace(),setTimeout(()=>{this.element.className="buttonizer-icon-selector selector-animated",this.firstBuild&&(this.firstBuild=!1,this.rebuild())},250)},50)}mayClose(){document.querySelector("body").addEventListener("click",t=>{this.opened&&"icon-selector-searchbar"!==t.target.className&&(this.element.style.display="none",this.element.className="buttonizer-icon-selector",this.opened=!1)})}close(){this.element.style.display="none",this.opened=!1}stayOnPlace(){if(this.opened){let t=this.currentInputJ.offset().top+this.currentInputJ.height()+10+"px";t!==this.element.style.top&&(this.element.style.top=t,this.element.style.left=this.currentInputJ.offset().left+"px")}}},qe=(n(7),n(0));const Pe=n(12);class De{constructor(){this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.single="",this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1}build(){let t=this.intro();t.onchange(e=>this.conditions(t._currentStep,e,1)),t.start(),t.onbeforeexit(()=>this.onExit(t._currentStep,1)),t.onexit(()=>{this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1,20===t._currentStep&&window.Buttonizer.bar.groupHolder.querySelector(".create-new-button").click()})}getAmount(){return this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.amount}conditions(t,e,n){if(this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,1===n)if(0===t)window.Buttonizer.bar.settingContainer.classList.contains("hidden")||window.Buttonizer.bar.settingContainer.querySelector(".back-button").click();else if(4===t){if(!this.setupStep5){this.setupStep5=!0,document.querySelector(".options-button").addEventListener("click",()=>{null!==this.tour&&this.tour.goToStep(6)})}"backward"===this.tour._direction&&(document.querySelector(".options-window").hasAttribute("hidden")||document.querySelector(".options-window").setAttribute("hidden",""))}else if(5===t)document.querySelector(".options-window").hasAttribute("hidden")&&document.querySelector(".options-window").removeAttribute("hidden"),"backward"===this.tour._direction&&document.querySelector(".options-window").classList.remove("disabled");else if(6===t){document.querySelector(".options-window").hasAttribute("hidden")&&document.querySelector(".options-window").removeAttribute("hidden"),document.querySelector(".options-window").setAttribute("style","z-index:9999999 !important"),document.querySelector(".options-window").classList+=" disabled";let t=window.Buttonizer.topBar.optionsWindow.querySelector(".single-button");t.style.pointerEvents="all",t.style.cursor="pointer",this.setupStep7||(this.setupStep7=!0,t.addEventListener("click",()=>{null!==this.tour&&this.tour.nextStep()})),"backward"===this.tour._direction&&(window.Buttonizer.settingsWindow.title.parentElement.parentElement.style.display="none")}else if(7===t)document.querySelector(".options-window").removeAttribute("style","z-index:9999999 !important"),document.querySelector(".options-window").classList.remove("disabled"),window.Buttonizer.settingsWindow.title.parentElement.parentElement.style.display="block",window.Buttonizer.settingsWindow.title.parentElement.parentElement.setAttribute("style","z-index:9999999 !important;pointer-events: none;"),document.querySelector(".options-window").hasAttribute("hidden")||document.querySelector(".options-window").setAttribute("hidden","");else if(8===t)window.Buttonizer.settingsWindow.title.parentElement.parentElement.removeAttribute("style","z-index:9999999 !important"),window.Buttonizer.settingsWindow.title.parentElement.parentElement.style.display="none";else if(9===t){if(!this.setupStep10){this.setupStep10=!0,window.Buttonizer.bar.groupHolder.querySelector(".button-group-holder").querySelector(".group-style").addEventListener("click",()=>{null!==this.tour&&!1===this.setupStep11&&this.tour.nextStep()})}"backward"===this.tour._direction&&(this.setupStep11=!1,Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 50px; height: 60px; top: 67px; left: 276px;"),document.querySelector(".introjs-helperLayer").setAttribute("style","width: 50px; height: 60px; top: 67px; left: 276px;")},100),window.Buttonizer.bar.settingContainer.querySelector(".back-button").click())}else if(10===t)"forward"===this.tour._direction&&(0==this.setupStep11&&(this.setupStep11=!0,window.Buttonizer.buttonGroups[0].groupHolder.toggleStyling()),this.tour._introItems[11].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-top"),this.tour._introItems[13].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-button"),this.tour._introItems[14].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-icon"),this.tour._introItems[15].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-label"),console.log(this.tour._introItems[11]),Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 385px; height: 966px; top: 46px; left: -5px;")},100),window.Buttonizer.bar.settingContainer.querySelector(".back-button").style.pointerEvents="none");else if(12===t)1===this.amount&&("forward"===this.tour._direction?Object(qe.setTimeout)(()=>{this.tour.nextStep()},100):"backward"===this.tour._direction&&Object(qe.setTimeout)(()=>{this.tour.previousStep()},100));else if(15===t)"backward"===this.tour._direction&&(window.Buttonizer.buttonGroups[0].groupHolder.toggleStyling(),Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 371px; height: 263px; top: 688px; left: 2px;")},100));else if(16===t||17===t||18===t||19===t){window.Buttonizer.bar.settingContainer.querySelector(".back-button").click(),window.Buttonizer.bar.groupHolder.querySelector(".create-new-button").addEventListener("click",()=>{null!==this.tour&&this.tour.goToStep(21)}),16===t&&(this.tour._direction="forward")&&(1===this.getAmount()&&window.Buttonizer.buttonGroups[0].groupHolder.quickMenu.querySelector(".convert-button").click(),window.Buttonizer.buttonGroups[0].groupObject.classList.contains("opened")||window.Buttonizer.buttonGroups[0].groupHolder.revealButtons(),Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"width: 333px !important; height: 48px !important; left: 36px !important;"),document.querySelector(".introjs-helperLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"width: 333px !important; height: 48px !important; left: 36px !important;")},100))}else 20===t&&Object(qe.setTimeout)(()=>{this.tour.exit()},100);else if(2===n){let e=window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group")[window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group").length-1];if(0===t);else if(2===t)Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"left: 276px !important;")},100);else if(2===t)"backward"===this.tour._direction&&(e.querySelector(".group-title").style.pointerEvents="all",e.querySelector(".mobile-desktop").style.pointerEvents="all");else if(3===t)(e.querySelector(".group-holder-quick-menu").style.visibility="visible")&&(e.querySelector(".group-holder-quick-menu").style.visibility="hidden",e.querySelector(".group-holder-quick-menu").style.top="45px",e.querySelector(".group-holder-quick-menu").style.opacity="0"),Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style"))},100),e.querySelector(".group-title").style.pointerEvents="none",e.querySelector(".mobile-desktop").style.pointerEvents="none",this.setup2Step4||(this.setup2Step4=!0,e.querySelector(".holder-button").addEventListener("click",()=>{null!==this.tour&&this.tour.nextStep()})),e.querySelector(".holder-button").style.backgroundColor="rgb(255, 255, 255)";else if(4===t){if((e.querySelector(".group-holder-quick-menu").style.visibility="hidden")&&(e.querySelector(".group-holder-quick-menu").style.visibility="visible",e.querySelector(".group-holder-quick-menu").style.top="50px",e.querySelector(".group-holder-quick-menu").style.opacity="1"),"backward"===this.tour._direction){e.querySelector(".fa-wrench").parentElement.style.pointerEvents="none",e.querySelector(".group-holder-quick-menu").style.pointerEvents="none"}else"forward"===this.tour._direction&&(e.querySelector(".group-holder-quick-menu").style.pointerEvents="none");this.amount>=8&&Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"top: 684px !important;")},100)}else if(5===t){"backward"===this.tour._direction&&(this.setup2Step7=!1,e.querySelector(".group-holder-quick-menu").style.visibility="visible",e.querySelector(".group-holder-quick-menu").style.top="50px",e.querySelector(".group-holder-quick-menu").style.opacity="1",window.Buttonizer.bar.settingContainer.querySelector(".back-button").click(),Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"left: 36px !important;")},100)),this.amount>=8&&Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"top: 692px !important;")},100),e.querySelector(".group-holder-quick-menu").setAttribute("style",e.querySelector(".group-holder-quick-menu").getAttribute("style")+"z-index: 99999999 !important;");let t=e.querySelector(".fa-wrench").parentElement;t.style.pointerEvents="all",t.style.cursor="pointer",this.setup2Step6||(this.setup2Step6=!0,e.querySelector(".fa-wrench").parentElement.addEventListener("click",()=>{null!==this.tour&&!1===this.setup2Step7&&this.tour.nextStep()}))}else 6===t?("forward"===this.tour._direction&&(0==this.setup2Step7&&(this.setup2Step7=!0,e.querySelector(".settings").click()),Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 385px; height: 966px; top: 46px; left: -5px;")},100)),e.querySelector(".group-holder-quick-menu").style.visibility="hidden",e.querySelector(".group-holder-quick-menu").style.top="45px",e.querySelector(".group-holder-quick-menu").style.opacity="0"):10===t?(e.querySelector(".settings").click(),"backward"===this.tour._direction&&Object(qe.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 371px; height: 224px; top: 630px; left: 2px;")},100)):11===t&&(window.Buttonizer.bar.settingContainer.querySelector(".back-button").click(),this.setup2Step12||(this.setup2Step12=!0,window.Buttonizer.topBar.topBarElement.querySelector(".revert-save").addEventListener("click",()=>{null!==this.tour&&this.tour.nextStep()})))}}onExit(t,e){if(this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1,1===e)(window.Buttonizer.bar.settingContainer.querySelector(".back-button").style.pointerEvents="none")&&(window.Buttonizer.bar.settingContainer.querySelector(".back-button").style.pointerEvents="all"),5===t?document.querySelector(".options-window").setAttribute("hidden",""):6===t?document.querySelector(".options-window").classList.remove("disabled"):7===t?window.Buttonizer.settingsWindow.title.parentElement.parentElement.removeAttribute("style","z-index:9999999 !important;pointer-events: none;"):20===t&&Object(qe.setTimeout)(()=>{let t=this.intro2();t.onchange(e=>this.conditions(t._currentStep,e,2)),t.start(),t.onbeforeexit(()=>this.onExit(t._currentStep,2)),t.onexit(()=>{this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1,20===t._currentStep&&window.Buttonizer.bar.groupHolder.querySelector(".create-new-button").click()})},300);else if(2===e){let e=window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group")[window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group").length-1];3===t&&(e.querySelector(".group-title").style.pointerEvents="all",e.querySelector(".mobile-desktop").style.pointerEvents="all"),e.querySelector(".group-holder-quick-menu").hasAttribute("style")&&e.querySelector(".group-holder-quick-menu").setAttribute("style",""),e.querySelector(".group-holder-quick-menu").classList.contains("disabled")&&e.querySelector(".group-holder-quick-menu").classList.remove("disabled"),(e.querySelector(".group-holder-quick-menu").style.pointerEvents="none")&&(e.querySelector(".group-holder-quick-menu").style.pointerEvents="all"),(e.querySelector(".group-title").style.pointerEvents="none")&&(e.querySelector(".group-title").style.pointerEvents="all"),(e.querySelector(".mobile-desktop").style.pointerEvents="none")&&(e.querySelector(".mobile-desktop").style.pointerEvents="all"),(e.querySelector(".fa-wrench").parentElement.style.pointerEvents="none")&&(e.querySelector(".fa-wrench").parentElement.style.pointerEvents="all")}}intro(){return this.tour=Pe(),this.tour.setOptions({showBullets:!1,exitOnOverlayClick:!1,skipLabel:"Exit tour",doneLabel:"Exit tour",scrollToElement:!0,showStepNumbers:!1,disableInteraction:!0,keyboardNavigation:!1}),this.tour.setOptions({steps:[{intro:"<b><h2>Welcome to the Buttonizer tour!</h2></b> \n Start the tour and save time. Master the Buttonizer skills in only two minutes",position:"left",tooltipClass:"max-width"},{element:document.querySelector(".buttonizer-bar"),intro:"<b><h2>Buttonizer bar</h2></b> Manage all your Floating Action Button and Floating menu's in the Buttonizer bar.",position:"left"},{element:document.querySelector(".buttonizer-frame"),intro:"<b><h2>Preview</h2></b> Watch the impact of your changes in the preview pane. Your buttons will only be visible to your website visitor after you click on 'Publish'.",position:"left"},{element:document.querySelector(".buttonizer-topbar"),intro:"<b><h2>Top bar</h2></b> In the top bar, you can:</br>\n\n <h4 style=\"font-weight:400;text-align:left;padding:0 15px\">\n 1. Click the <b>'X'</b> to go back to WordPress</br>\n 2. <b>Revert</b> changes you have made</br>\n 3. <b>Publish</b> all your changes</br>\n 4. Access the <b>general settings</b>.\n </h4>",position:"left",tooltipClass:"middle"},{element:document.querySelector(".buttonizer-topbar .options-button"),intro:"Click here <b>→</b> </br> to go to Buttonizer's general settings.",position:"left",disableInteraction:!1},{element:document.querySelector(".options-window"),intro:"<b><h2>Menu</h2></b>\n <b>Knowledgebase: </b>Want to know what you can do with Buttonizer? Take a look at our Knowledgebase!</br>\n <b>I need support: </b>Visit our support page and ask for help from us or other users.</br>\n <b>Community: </b>Visit our community page and interact with other Buttonizer users!</br>\n <b>My account: </b>View your account details and license.</br>\n <b>Upgrade or pricing: </b>Upgrade or extend your license.</br>\n <b>Affiliation: </b>Like the plugin? Become our ambassador and earn cash ;-)</br>\n <b>Options: </b>Change general settings like icon libraries and Google Analytics.</br>\n ",position:"left",tooltipClass:"wider"},{element:window.Buttonizer.topBar.optionsWindow.querySelector(".single-button"),intro:"Click on <b>Options</b> to open Buttonizer's general settings →",position:"left",disableInteraction:!1,highlightClass:"introjs-custom-hidden"},{element:window.Buttonizer.settingsWindow.title.parentElement.parentElement.querySelector(".window-menu"),intro:"<b><h2>Buttonizer settings</h2></b>\n <b>Icon library:</b> In this section, you will be able to choose other icon libraries, the icon library version and whether Buttonizer should import the icon library.</br>\n <b>Google Analytics:</b> Want to track your button events? Place your Google Analytics code here!</br>\n <b>Reset:</b> Comletely reset Buttonizer's data.</br>\n ",position:"left",highlightClass:"introjs-custom-hidden",tooltipClass:"wider"},{element:window.Buttonizer.bar.groupHolder.querySelector(".button-group-holder"),intro:"<b><h2>Button group</h2></b>\n A button group contains buttons.</br>\n Button groups are only visible when there are <u><b>2 or more buttons</b></u> within the group.</br></br>\n The buttons in a button group are dedicated to one position. Add multiple button groups if you want to create more floating action buttons dedicated to different positions.\n ",position:"right",tooltipClass:"max-width"},{element:window.Buttonizer.bar.groupHolder.querySelector(".button-group-holder").querySelector(".group-style"),intro:"<b>←</b> Click here</br>\n to show group settings.",position:"right",disableInteraction:!1},{element:window.Buttonizer.bar.settingContainer,intro:"<b><h2>Group settings</h2></b>\n You can change the style of the button group here.</br>\n Click on the left arrow to go back.\n ",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",scrollTo:!1,tooltipClass:"intojs-foff-height"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-top"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-top"),intro:"<b><h2>Position & device visibility</h2></b>\n <b>Postion:</b> When you change the position of the button group it will move the whole group, including the buttons.</br> \n <b>Device visibilty:</b> You can choose whether you want the <b><u>whole group</u></b> to be visible on desktop or mobile devices.\n ",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-menu"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-menu"),intro:"<b><h2>Menu style</h2></b>\n <b>Start opened:</b> You can now set Buttonizer to automatically open! </br>\n <b>Menu style:</b> Change how your floating menu is shown.</br>\n <b>Animation:</b> Buttonizer will animate every 10 seconds to grab the attention of the user.</br>\n ",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-button"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-button"),intro:"<b><h2>Group button style</h2></b>\n <b>Button color:</b> Change the color of the button group.</br>\n <b>Border radius:</b> You can now change the border radius of the button group!</br>\n <b>Background image:</b> Choose an image to use as a background of the button group.</br>\n ",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-icon"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-icon"),intro:'<b><h2>Group icon</h2></b>\n <b>Graphic:</b> Choose whether to use an <u><b>icon</b></u> or an <u><b>image</b></u> as an icon.</br>\n <b><h2 style="margin: 1em 0 0 0;">Icon</h2></b>\n <b>Icon:</b> Choose you favorite icon from your selected icon library.</br>\n <b>Icon color:</b> Change the color of the icon.</br>\n <b>Icon size:</b> Change the size of the icon.</br>\n <b><h2 style="margin: 1em 0 0 0;">Image</h2></b>\n <b>Icon image:</b> Choose an image to use as an icon for the button group.</br>\n <b>Border radius:</b> You can change the border radius of the image.</br>\n <b>Image size:</b> Change the size of the image icon.</br>\n ',position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-label"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-label"),intro:"<b><h2>Label style</h2></b>\n <b>Label:</b> Change the label of the button group.</br>\n <b>Visibility:</b> Always show, show on hover or hide the label. Choose for desktop and mobile devices!</br>\n <b>Label color:</b> Change the text and label color of the label.</br>\n <b>Font size & border radius:</b> Change the font size and border radius of the label.</br>\n ",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:"<b><h2>Add new button</h2></b>\n ← Click here </br>\n to add a new button.\n ",position:"right",disableInteraction:!1},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:"Don't click on next but click on 'Add button +'",position:"right",disableInteraction:!1},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:"If you don't want to click add button I can do you the honor :)",position:"right",disableInteraction:!1},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:"Here, on the left... If you won't click it, I will click it >:-)",position:"right",disableInteraction:!1},{position:"bottom",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"introjs-custom-gone"},{position:"bottom",intro:"Hello? Please click that button...",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"introjs-custom-gone"},{position:"bottom",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"introjs-custom-gone"}]}),this.tour}intro2(){this.tour=Pe(),this.tour.setOptions({showBullets:!1,exitOnOverlayClick:!1,skipLabel:"Exit tour",doneLabel:"Exit tour",scrollToElement:!0,showStepNumbers:!1,disableInteraction:!0,keyboardNavigation:!1});let t=window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group")[window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group").length-1],e=window.Buttonizer.bar.settingContainer;return this.tour.setOptions({steps:[{element:t,intro:"<b><h2>Button</h2></b> You have created a new button! This is a button. Buttons are contained within a group.",position:"right"},{element:this.amount<=7?t.querySelector(".group-title"):t,intro:"<b><h2>Button name</h2></b> This is the name of the button.",position:"bottom",scrollToElement:!1,highlightClass:"introjs-custom-gone"},{element:this.amount<=7?t.querySelector(".mobile-desktop"):t,intro:"<b><h2>Visibility</h2></b> You can quickly change the visibility of a button! Show or hide the button on desktop or mobile.",position:"bottom",highlightClass:"introjs-custom-gone"},{element:this.amount<=7?t.querySelector(".holder-button"):t,intro:"← Click here <br> to show the menu",position:"right",highlightClass:"introjs-custom-gone",disableInteraction:!1},{element:this.amount<=7?t.querySelector(".group-holder-quick-menu"):t,intro:'<b><h2>Menu</h2></b>\n <p style="text-align: left;">\n <b>Button settings:</b> Edit the style of the button.</br>\n <b>Advanced settings:</b> Make the button appear/hide on certain pages and time! (only for our premium users).</br>\n <b>Rename button:</b> Rename the button.</br>\n <b>Duplicate button:</b> Make a copy of the button.</br>\n <b>Delete button:</b> Delete the button.</br></p>\n ',position:"right",highlightClass:"introjs-custom-gone"},{element:this.amount<=7?t.querySelector(".group-holder-quick-menu").querySelector(".settings"):t,intro:"← Click here </br> to show the button settings",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-hidden"},{element:window.Buttonizer.bar.settingContainer,intro:"<b><h2>Button settings</h2></b> These are the button settings. Pretty similar to the group settings.",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone"},{element:e.querySelectorAll(".style-top")[e.querySelectorAll(".style-top").length-1],intro:"<b><h2>Position & device visibility</h2></b>\n <b>Button action:</b> Choose the action of the button.</br>\n <b>Device visibility:</b> You can choose whether you want the button to be visible on desktop or mobile devices.</br>\n ",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:e.querySelectorAll(".style-button")[e.querySelectorAll(".style-button").length-1],intro:"<b><h2>Button style</h2></b>\n When enabled, the button will copy the button and label style of the group. </br>\n Turn it off to change the style of the button!\n ",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:e.querySelectorAll(".style-icon")[e.querySelectorAll(".style-icon").length-1],intro:"<b><h2>Icon style</h2></b>\n <b>Graphic:</b> Choose whether to use an <u><b>icon</b></u> or an <u><b>image</b></u> as an icon.</br>\n <b><h2>Icon</h2></b>\n <b>Icon:</b> Choose an icon from your selected icon library.</br>\n <b>Icon color:</b> Change the color of the icon.</br>\n <b>Icon size:</b> Change the size of the icon.</br>\n <b><h2>Image</h2></b>\n <b>Icon image:</b> Choose an image to use as an icon for the button.</br>\n <b>Border radius:</b> You can change the border radius of the image.</br>\n <b>Image size:</b> Change the size of the image icon.</br>\n ",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:e.querySelectorAll(".style-label")[e.querySelectorAll(".style-label").length-1],intro:"<b><h2>Label style</h2></b>\n <b>Label:</b> Change the label of the button.<br>\n <b>Visibility:</b> Always show, show on hover or hide the label. Choose for desktop and mobile devices!</br>\n <b>Label color:</b> Change the label color.</br>\n <b>Font size & border radius:</b> Change the font size and border radius of the label.</br>\n ",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:window.Buttonizer.topBar.topBarElement.querySelector(".revert-save"),intro:"<b><h2>Revert or Save</h2></b>\n <b>Revert changes:</b> Delete all the changes you've made this session.</br>\n <b>Save & publish:</b> Save and publish the changes you've made this session.\n ",position:"right",disableInteraction:!0,tooltipClass:"right"},{intro:'<b><h2>That was it!</h2></b> \n Thank you for taking the tour, that\'s all folks! We hope that you now know how to use Buttonizer! If you have any questions left, ask them on the <a href="https://community.buttonizer.pro" target="_blank">Buttonizer Community</a> forums!<br />\n <br />\n If you have feedback regarding the Buttonizer Tour, let us know!\n ',position:"left",tooltipClass:"max-width"}]}),this.tour}}window.bdebug=new i;window.Buttonizer=new class{constructor(){this.loader={},this.topBar={},this.bar={},this.assetsLink=".",this.tour=null,this.version="-",this.settings={},this.buttonGroups=[],this.savingMechanism={},this.buttonizerInitData=[],this.timeSchedule={},this.pageRule={},this.windowsZindex=9999,this.bc,this.loading=!0,this.settingsWindow={},this.iframe=null,this.iframeLoaded=!1,this.iconLibraryLoaded=!1,this.ButtonizerStartedLoading=0,this.iconSelector=null,this.iconLibraryStylesheet=null,this.previewWarning=null,this.premium=!1,this.init(!0)}set buttonChanges(t){this.loading||(this.bc=t)}get buttonChanges(){return this.bc}init(t){document.body.className+=" buttonizer-initialized",bdebug.welcomeToTheConsole(),!0===t&&bdebug.startDebugging(),bdebug.warning("Buttonizer 2.0");let e=document.createElement("link");e.rel="shortcut icon",e.href=buttonizer_admin.dir+"/favicon.ico",document.head.appendChild(e),this.loader=new Te,this.loader.show("Loading settings..."),this.savingMechanism=new Be,bdebug.warning("Buttonizer settings loading"),this.ButtonizerStartedLoading=(new Date).getTime(),this.loadSettings()}loadSettings(){jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=ButtonizerInitializer",dataType:"json",method:"get",success:t=>{bdebug.warning("Buttonizer settings loaded: "+((new Date).getTime()-this.ButtonizerStartedLoading)/1e3+"s"),"success"===t.status?this.defineSettings(t):this.fatalErrorLoading("<b>"+t.message+"</b>","Buttonizer.loadSettings().success")},error:(t,e,n)=>{this.loader.hide(),this.fatalErrorLoading("<b>"+e.toUpperCase()+":</b><br />"+n,"Buttonizer.loadSettings().error")}})}fatalErrorLoading(t,e){new r({title:"Error!",content:`\n <p>Oh, that was not what I was expecting! Something went wrong while we tried to load all Buttonizer settings.</p>\n <p>Try to reload the webpage. If that did not work, send us a <a href="https://community.buttonizer.pro/" target="_blank">support request</a>.</p>\n <p>Report the following information:</p>\n <p style='color: #FF0000; display: block; border: 1px solid #FF0000; padding: 10px;'>${t}<br /><br />Function place: ${e}</p>`,onConfirm:()=>{document.location.reload()},buttons:[{text:"Reload webpage",confirm:!0}]})}fatalError(t){console.error(t);let e=document.createElement("div");e.innerHTML='<p>Oh, that was not what we were expecting! Something went wrong.</p>\n <p>Try to reload the webpage. If that did not work, send us a <a href="https://community.buttonizer.pro/" target="_blank">support request</a>.</p>';let n=document.createElement("p");n.innerHTML="Do you want to see technical details? <a href='javascript:void(0)'>Click here!</a>",e.appendChild(n);let i=document.createElement("code");i.style.overflowX="auto",i.style.whiteSpace="nowrap",i.innerText=`Error type: ${t.name}\n \n Stack trace:\n \n ${t.stack}`,i.style.display="none",e.appendChild(i),n.addEventListener("click",()=>{n.style.display="none",i.style.display="block"}),new r({title:"Error!?!?1?!1?!",content:e,buttons:[{text:"Close",confirm:!0}]})}defineSettings(t){this.settings=t.settings,this.version=t.version,this.buttonizerInitData=t,this.premium=t.premium,xt.setDefaults({onShow:()=>"true"===this.getSetting("show_tooltips","true")||!0===this.getSetting("show_tooltips")}),this.loader.show("Building bar..."),this.topBar=new Oe(this),this.bar=new Le(this),this.previewWarning=this.leftButtonizerWarning(),this.changes=t.changes,t.changes&&this.topBar.alertText.alert("Loaded changes from previous session"),this.initializeSettings(t.settings),this.initializeTimeSchedules(),this.initializePageRules(),this.loadButtonGroups(),this.loading=!1,this.settingsWindow=new Me,document.location.href.indexOf("open-settings")>=0&&this.settingsWindow.show(),this.iconSelector=new He,1!==this.buttonGroups.length||this.buttonGroups[0].singleButtonMode||this.buttonGroups[0].groupHolder.revealButtons(),this.createIframe();let e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href="https://use.fontawesome.com/releases/v5.8.2/css/all.css",e.integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay",e.setAttribute("crossorigin","anonymous"),document.getElementsByTagName("head")[0].appendChild(e),window.addEventListener("message",t=>{t.isTrusted&&void 0!==t.data&&void 0!==t.data.eventType&&"buttonizer"===t.data.eventType&&("warning"===t.data.messageType?this.topBar.updateEventLogs(t.data.message):"javascript_error"===t.data.messageType?new r({title:"Custom javascript error",content:`\n <p>Your custom javascript ran into an error. Read the error below:</p> <p><code style="display: block; padding: 15px;">${t.data.message}</code></p>\n `,buttons:[{text:"OK, I'll fix this",confirm:!0}]}):"(re)loaded"===t.data.messageType&&console.log("[Buttonizer ADMIN] Buttonizer is (re)loaded! So last changes can be seen in the preview window."))},!1),document.location.href.indexOf("tour")>=0&&this.startTour()}startTour(){null===this.tour&&(this.tour=new De),this.tour.build()}createIframe(){let t=""===document.location.hash||"#open-settings"===document.location.hash?this.buttonizerInitData.wordpress.base:decodeURIComponent(document.location.hash.substr(1)),e=document.createElement("div");e.className="buttonizer-frame";let n=document.createElement("iframe");n.src=t+"?buttonizer-preview=1",n.id="buttonizer-iframe",n.setAttribute("frameborder","0"),n.setAttribute("width","100%"),n.setAttribute("height","100%"),n.addEventListener("load",t=>{this.iframeLoaded=!0,-1===t.target.contentWindow.location.href.indexOf("buttonizer-preview")&&-1===document.body.className.indexOf("warning-left-preview-window")&&(document.body.className+=" warning-left-preview-window",this.previewWarning.style.display="block")}),e.appendChild(n),document.body.appendChild(e),this.loader.show("Waiting for your website...","site-loading"),setTimeout(()=>{this.iframeLoaded||this.loader.show("Waiting for your website...<br /><br /><small>It's taking longer than usual, slow website?<br /><br /><a href='javascript:void(0)' onclick='window.Buttonizer.loader.hide()'>Skip this step</a></small>")},5e3);let i=setInterval(()=>{this.iframeLoaded&&this.iconLibraryLoaded&&(this.loader.hide(),document.body.className+=" buttonizer-loaded",clearInterval(i))})}welcome(){this.loader.hide(),new r({title:"Welcome to Buttonizer "+this.version,content:`\n <img src="${buttonizer_admin.assets}/images/plugin-icon.png" width="100" align="left" style="margin-right: 20px; margin-bottom: 10px;" />\n <p>We are pleased to welcome you to <b>Buttonizer 2.0</b>!</p>\n <p>We've created a tour for our new users, would you like to take the tour?</p>\n `,onClose:()=>{this.saveSettings({welcome:"false"},!0)},onConfirm:()=>{this.startTour()},buttons:[{text:'No thanks, I know how it works <i class="fa fa-chevron-right" style="margin-left: 10px; vertical-align: middle;" aria-hidden="true"></i>',close:!0},{text:'Yes please <i class="fa fa-chevron-right" style="margin-left: 10px; vertical-align: middle;" aria-hidden="true"></i>',confirm:!0}]})}updateButtonsTo2Point0(){new r({title:"Hi Buttonizer!",content:"\n <p>It seems like you've installed Buttonizer 2.0 before, but, you installed version 1.5 later again and then updated back to 2.0!</p>\n <p>The migration progress did not run, as it already ran back then. So, to convert your buttons, press the button below!</p>\n \n <p>If this window keeps popping up, even when you've tried to convert the buttons, try to reset Buttonizer. Go to the 'cog' icon (<i class=\"fas fa-cog\"></i>) on the bar on the top, then go to 'Options <i class=\"fas fa-cogs\"></i>' and go to the tab 'Reset' and follow the steps.</p> \n ",onConfirm:()=>{window.Buttonizer.loader.show("Running migration..."),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=migrate-buttonizer",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{"success"===t.status?(window.Buttonizer.loader.show("Finishing..."),setTimeout(()=>{document.location.reload()},500)):(window.Buttonizer.loader.hide(),window.Buttonizer.savingError(t.message))},error:(t,e,n)=>{window.Buttonizer.loader.hide(),window.Buttonizer.savingError(e)}})},buttons:[{text:"I am OK",close:!0},{text:'Convert my buttons! <i class="fa fa-chevron-right" style="margin-left: 10px; vertical-align: middle;" aria-hidden="true"></i>',confirm:!0}]})}leftButtonizerWarning(){let t=document.createElement("div");t.className="buttonizer-warning warning-red",t.innerHTML="You left the Buttonizer preview window. You will not see changes you make..";let e=document.createElement("a");return e.href="javascript:void(0)",e.className="buttonizer-warning-button",e.innerText="Return to preview",e.addEventListener("click",()=>{document.body.className=document.body.className.replace("warning-left-preview-window",""),this.previewWarning.style.display="none",document.getElementById("buttonizer-iframe").setAttribute("src",window.Buttonizer.buttonizerInitData.wordpress.base+"?buttonizer-preview=true")}),t.appendChild(e),document.body.appendChild(t),t}saveSettings(t,e){e&&this.loader.show("Saving settings..."),Object.assign(this.settings,t),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=settings",dataType:"json",method:"post",data:{data:this.settings,security:buttonizer_admin.security},success:t=>{this.loader.hide(),"success"!==t.status&&window.Buttonizer.savingError(t.message)},error:t=>{this.loader.hide(),window.Buttonizer.savingError(t)}})}registerButton(t){}saveButtons(){console.log(this.buttons)}initializeSettings(t){"true"===t.welcome.toString()&&this.welcome(),this.settings=t,this.addIconLibrary()}addIconLibrary(){let t=!1;null===this.iconLibraryStylesheet&&(this.iconLibraryStylesheet=document.createElement("link"),this.iconLibraryStylesheet.rel="stylesheet",this.iconLibraryStylesheet.type="text/css",t=!0),"fontawesome"!==this.settings.icon_library||"5.free"!==this.settings.icon_library_version&&"5.paid"!==this.settings.icon_library_version?"fontawesome"===this.settings.icon_library&&"4.7.0"===this.settings.icon_library_version&&(this.iconLibraryStylesheet.setAttribute("integrity",""),this.iconLibraryStylesheet.href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"):("5.paid"===this.settings.icon_library_version&&""!==this.settings.icon_library_code?this.iconLibraryStylesheet.setAttribute("integrity",this.settings.icon_library_code):this.iconLibraryStylesheet.setAttribute("integrity","sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay"),this.iconLibraryStylesheet.setAttribute("crossorigin","anonymous"),this.iconLibraryStylesheet.href="https://"+("5.paid"===this.settings.icon_library_version?"pro":"use")+".fontawesome.com/releases/"+this.buttonizerInitData.fontawesome_current_version+"/css/all.css"),this.iconLibraryLoaded=!0}hasPremium(){return this.premium}showPremiumPopup(t){new r({title:'<i class="far fa-gem window-icon"></i> Premium feature',content:`\n <p>Hi there, this function is a premium feature. We will describe what this feature will do:</p>\n <code style="display: block; margin-bottom: 5px; padding: 10px;">${t}</code>\n <p><b>What do I get as a premium user?</b></p>\n \n <ul class="buttonizer-pro-checklist">\n <li><i class="fas fa-check"></i> Show button(groups) using the advanced time schedules</li>\n <li><i class="fas fa-check"></i> Show button(groups) on specific pages using advanced page rules</li>\n <li><i class="fas fa-check"></i> Create multiple button groups</li>\n <li><i class="fas fa-check"></i> Add custom button-icon and button background images</li>\n <li><i class="fas fa-check"></i> Exit intent</li>\n <li><i class="fas fa-check"></i> Show or hide on scroll</li>\n <li><i class="fas fa-check"></i> Show on timeout</li>\n <li><i class="fas fa-check"></i> Be able to set CSS class names and button IDs</li>\n <li><i class="fas fa-check"></i> Custom button background & icon image</li>\n <li><i class="fas fa-check"></i> Execute javascript on button clicks</li>\n </ul>`,onConfirm:()=>{document.location.href=buttonizer_admin.admin+"?page=Buttonizer-pricing"},buttons:[{text:"Close",close:!0},{text:'Go pro <i class="fas fa-chevron-right" style="margin-left: 5px;vertical-align: middle;"></i>',confirm:!0,close:!0,focus:!0}]})}getSetting(t,e){return void 0!==this.settings[t]?this.settings[t]:e}set changes(t){this.topBar.changes=t}updateButtonGroupList(t,e){this.buttonGroups.splice(t,0,this.buttonGroups.splice(e,1)[0]),this.buttonChanges=!0}updateButtonList(t,e,n,i){this.buttonGroups[n].buttons.splice(t,0,this.buttonGroups[i].buttons.splice(e,1)[0]),this.buttonGroups[n].buttons[t].groupObject=this.buttonGroups[n],this.buttonChanges=!0,this.buttonGroups[i].buttons.length<=1&&jQuery(this.buttonGroups[i].groupBody).sortable("option","cancel",".group-button")}savingError(t){new r({title:"Could not save settings",content:`<p>Something went wrong while saving your settings.</p><p>${t}</p>`,buttons:[{text:"Close",close:!0}]})}initializeTimeSchedules(){}initializePageRules(){}loadButtonGroups(){if(void 0!==this.buttonizerInitData.groups.buttonorder&&this.updateButtonsTo2Point0(),0===this.buttonizerInitData.groups.length)return new _e({name:"Buttonizer",position:"bottomright",icon:"fa fa-plus",horizontal:5,vertical:5},[{name:"First button",show_mobile:!0,show_desktop:!0},{name:"Second button",show_mobile:!0,show_desktop:!0}]),void setTimeout(()=>{this.buttonChanges=!0},1e3);new _e(this.buttonizerInitData.groups[0].data,this.buttonizerInitData.groups[0].buttons)}}},,function(t,e){}]);
|
buttonizer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Buttonizer - Smart Floating Action Button
|
4 |
* Plugin URI: https://buttonizer.pro
|
5 |
* Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
|
6 |
-
* Version: 2.0.
|
7 |
* Author: Buttonizer
|
8 |
* Author URI: https://buttonizer.pro
|
9 |
* License: GPL2
|
@@ -33,7 +33,7 @@ define('BUTTONIZER_NAME', 'buttonizer');
|
|
33 |
define('BUTTONIZER_DIR', dirname(__FILE__));
|
34 |
define('BUTTONIZER_SLUG', basename(BUTTONIZER_DIR));
|
35 |
define('BUTTONIZER_PLUGIN_DIR', __FILE__ );
|
36 |
-
define('BUTTONIZER_VERSION', '2.0.
|
37 |
define('BUTTONIZER_DEBUG', false);
|
38 |
|
39 |
define('FONTAWESOME_CURRENT_VERSION', 'v5.8.2');
|
3 |
* Plugin Name: Buttonizer - Smart Floating Action Button
|
4 |
* Plugin URI: https://buttonizer.pro
|
5 |
* Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
|
6 |
+
* Version: 2.0.4
|
7 |
* Author: Buttonizer
|
8 |
* Author URI: https://buttonizer.pro
|
9 |
* License: GPL2
|
33 |
define('BUTTONIZER_DIR', dirname(__FILE__));
|
34 |
define('BUTTONIZER_SLUG', basename(BUTTONIZER_DIR));
|
35 |
define('BUTTONIZER_PLUGIN_DIR', __FILE__ );
|
36 |
+
define('BUTTONIZER_VERSION', '2.0.4');
|
37 |
define('BUTTONIZER_DEBUG', false);
|
38 |
|
39 |
define('FONTAWESOME_CURRENT_VERSION', 'v5.8.2');
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Buy plugin: https://buttonizer.pro
|
|
4 |
Tags: Conversion, action button, call, marketing, Social Sharing
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 5.2
|
7 |
-
Stable tag: 2.0.
|
8 |
Requires PHP: 5.5
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -122,6 +122,11 @@ And the beauty of all: All actions are hidden in one button. The moment a visito
|
|
122 |
In fact, Buttonizer is an addiction to use. Your website visitors will interact as never before.
|
123 |
|
124 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
125 |
= 2.0.3 =
|
126 |
Release date: 19 June 2019
|
127 |
|
4 |
Tags: Conversion, action button, call, marketing, Social Sharing
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 5.2
|
7 |
+
Stable tag: 2.0.4
|
8 |
Requires PHP: 5.5
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
122 |
In fact, Buttonizer is an addiction to use. Your website visitors will interact as never before.
|
123 |
|
124 |
== Changelog ==
|
125 |
+
= 2.0.4 =
|
126 |
+
Release date: 19 June 2019
|
127 |
+
|
128 |
+
Fixed two bugs in this version. If you find any bugs or errors in Buttonizer, [report them here](https://community.buttonizer.pro/t/bugs-or-errors)
|
129 |
+
|
130 |
= 2.0.3 =
|
131 |
Release date: 19 June 2019
|
132 |
|