Boxzilla - Version 3.2.25

Version Description

Download this release

Release Info

Developer DvanKooten
Plugin Icon 128x128 Boxzilla
Version 3.2.25
Comparing to
See all releases

Code changes from version 3.2.24 to 3.2.25

CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
  Changelog
2
  ==========
3
 
 
 
 
 
 
 
4
  #### 3.2.24 - Nov 3, 2020
5
 
6
  - Allow for `#boxzilla-ID` links in `<area>` elements.
1
  Changelog
2
  ==========
3
 
4
+ #### 3.2.25 - Apr 20, 2021
5
+
6
+ - Change usage of deprecated jQuery.load method.
7
+ - Add `aria-modal="true"` to overlay element.
8
+
9
+
10
  #### 3.2.24 - Nov 3, 2020
11
 
12
  - Allow for `#boxzilla-ID` links in `<area>` elements.
assets/js/admin-script.js CHANGED
@@ -26,7 +26,7 @@ var ruleComparisonEl = document.getElementById('boxzilla-rule-comparison');
26
  var rulesContainerEl = document.getElementById('boxzilla-box-rules');
27
  var ajaxurl = window.ajaxurl; // events
28
 
29
- $(window).load(function () {
30
  if (typeof window.tinyMCE === 'undefined') {
31
  document.getElementById('notice-notinymce').style.display = '';
32
  }
@@ -345,492 +345,512 @@ Option.prototype.setValue = function (value) {
345
  module.exports = Option;
346
 
347
  },{}],5:[function(require,module,exports){
 
 
 
 
348
  /*!
349
  * EventEmitter v5.2.9 - git.io/ee
350
  * Unlicense - http://unlicense.org/
351
  * Oliver Caldwell - https://oli.me.uk/
352
  * @preserve
353
  */
 
354
 
355
- ;(function (exports) {
356
- 'use strict';
357
-
358
- /**
359
- * Class for managing events.
360
- * Can be extended to provide event functionality in other classes.
361
- *
362
- * @class EventEmitter Manages event registering and emitting.
363
- */
364
- function EventEmitter() {}
365
-
366
- // Shortcuts to improve speed and size
367
- var proto = EventEmitter.prototype;
368
- var originalGlobalValue = exports.EventEmitter;
369
-
370
- /**
371
- * Finds the index of the listener for the event in its storage array.
372
- *
373
- * @param {Function[]} listeners Array of listeners to search through.
374
- * @param {Function} listener Method to look for.
375
- * @return {Number} Index of the specified listener, -1 if not found
376
- * @api private
377
- */
378
- function indexOfListener(listeners, listener) {
379
- var i = listeners.length;
380
- while (i--) {
381
- if (listeners[i].listener === listener) {
382
- return i;
383
- }
384
- }
385
 
386
- return -1;
387
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
388
 
389
- /**
390
- * Alias a method while keeping the context correct, to allow for overwriting of target method.
391
- *
392
- * @param {String} name The name of the target method.
393
- * @return {Function} The aliased method
394
- * @api private
395
- */
396
- function alias(name) {
397
- return function aliasClosure() {
398
- return this[name].apply(this, arguments);
399
- };
400
  }
401
 
402
- /**
403
- * Returns the listener array for the specified event.
404
- * Will initialise the event object and listener arrays if required.
405
- * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.
406
- * Each property in the object response is an array of listener functions.
407
- *
408
- * @param {String|RegExp} evt Name of the event to return the listeners from.
409
- * @return {Function[]|Object} All listener functions for the event.
410
- */
411
- proto.getListeners = function getListeners(evt) {
412
- var events = this._getEvents();
413
- var response;
414
- var key;
415
-
416
- // Return a concatenated array of all matching events if
417
- // the selector is a regular expression.
418
- if (evt instanceof RegExp) {
419
- response = {};
420
- for (key in events) {
421
- if (events.hasOwnProperty(key) && evt.test(key)) {
422
- response[key] = events[key];
423
- }
424
- }
425
- }
426
- else {
427
- response = events[evt] || (events[evt] = []);
428
- }
429
 
430
- return response;
 
 
431
  };
 
 
 
 
 
 
 
 
 
 
432
 
433
- /**
434
- * Takes a list of listener objects and flattens it into a list of listener functions.
435
- *
436
- * @param {Object[]} listeners Raw listener objects.
437
- * @return {Function[]} Just the listener functions.
438
- */
439
- proto.flattenListeners = function flattenListeners(listeners) {
440
- var flatListeners = [];
441
- var i;
442
-
443
- for (i = 0; i < listeners.length; i += 1) {
444
- flatListeners.push(listeners[i].listener);
445
- }
446
 
447
- return flatListeners;
448
- };
449
 
450
- /**
451
- * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.
452
- *
453
- * @param {String|RegExp} evt Name of the event to return the listeners from.
454
- * @return {Object} All listener functions for an event in an object.
455
- */
456
- proto.getListenersAsObject = function getListenersAsObject(evt) {
457
- var listeners = this.getListeners(evt);
458
- var response;
459
-
460
- if (listeners instanceof Array) {
461
- response = {};
462
- response[evt] = listeners;
463
- }
464
 
465
- return response || listeners;
466
- };
467
 
468
- function isValidListener (listener) {
469
- if (typeof listener === 'function' || listener instanceof RegExp) {
470
- return true
471
- } else if (listener && typeof listener === 'object') {
472
- return isValidListener(listener.listener)
473
- } else {
474
- return false
475
  }
 
 
 
476
  }
477
 
478
- /**
479
- * Adds a listener function to the specified event.
480
- * The listener will not be added if it is a duplicate.
481
- * If the listener returns true then it will be removed after it is called.
482
- * If you pass a regular expression as the event name then the listener will be added to all events that match it.
483
- *
484
- * @param {String|RegExp} evt Name of the event to attach the listener to.
485
- * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
486
- * @return {Object} Current instance of EventEmitter for chaining.
487
- */
488
- proto.addListener = function addListener(evt, listener) {
489
- if (!isValidListener(listener)) {
490
- throw new TypeError('listener must be a function');
491
- }
492
 
493
- var listeners = this.getListenersAsObject(evt);
494
- var listenerIsWrapped = typeof listener === 'object';
495
- var key;
496
-
497
- for (key in listeners) {
498
- if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {
499
- listeners[key].push(listenerIsWrapped ? listener : {
500
- listener: listener,
501
- once: false
502
- });
503
- }
504
- }
505
 
506
- return this;
507
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
508
 
509
- /**
510
- * Alias of addListener
511
- */
512
- proto.on = alias('addListener');
513
-
514
- /**
515
- * Semi-alias of addListener. It will add a listener that will be
516
- * automatically removed after its first execution.
517
- *
518
- * @param {String|RegExp} evt Name of the event to attach the listener to.
519
- * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
520
- * @return {Object} Current instance of EventEmitter for chaining.
521
- */
522
- proto.addOnceListener = function addOnceListener(evt, listener) {
523
- return this.addListener(evt, {
524
- listener: listener,
525
- once: true
526
  });
527
- };
 
528
 
529
- /**
530
- * Alias of addOnceListener.
531
- */
532
- proto.once = alias('addOnceListener');
533
-
534
- /**
535
- * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.
536
- * You need to tell it what event names should be matched by a regex.
537
- *
538
- * @param {String} evt Name of the event to create.
539
- * @return {Object} Current instance of EventEmitter for chaining.
540
- */
541
- proto.defineEvent = function defineEvent(evt) {
542
- this.getListeners(evt);
543
- return this;
544
- };
545
 
546
- /**
547
- * Uses defineEvent to define multiple events.
548
- *
549
- * @param {String[]} evts An array of event names to define.
550
- * @return {Object} Current instance of EventEmitter for chaining.
551
- */
552
- proto.defineEvents = function defineEvents(evts) {
553
- for (var i = 0; i < evts.length; i += 1) {
554
- this.defineEvent(evts[i]);
555
- }
556
- return this;
557
- };
558
 
559
- /**
560
- * Removes a listener function from the specified event.
561
- * When passed a regular expression as the event name, it will remove the listener from all events that match it.
562
- *
563
- * @param {String|RegExp} evt Name of the event to remove the listener from.
564
- * @param {Function} listener Method to remove from the event.
565
- * @return {Object} Current instance of EventEmitter for chaining.
566
- */
567
- proto.removeListener = function removeListener(evt, listener) {
568
- var listeners = this.getListenersAsObject(evt);
569
- var index;
570
- var key;
571
-
572
- for (key in listeners) {
573
- if (listeners.hasOwnProperty(key)) {
574
- index = indexOfListener(listeners[key], listener);
575
-
576
- if (index !== -1) {
577
- listeners[key].splice(index, 1);
578
- }
579
- }
580
- }
581
 
582
- return this;
583
- };
 
 
 
 
 
 
 
584
 
585
- /**
586
- * Alias of removeListener
587
- */
588
- proto.off = alias('removeListener');
589
-
590
- /**
591
- * Adds listeners in bulk using the manipulateListeners method.
592
- * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.
593
- * You can also pass it a regular expression to add the array of listeners to all events that match it.
594
- * Yeah, this function does quite a bit. That's probably a bad thing.
595
- *
596
- * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.
597
- * @param {Function[]} [listeners] An optional array of listener functions to add.
598
- * @return {Object} Current instance of EventEmitter for chaining.
599
- */
600
- proto.addListeners = function addListeners(evt, listeners) {
601
- // Pass through to manipulateListeners
602
- return this.manipulateListeners(false, evt, listeners);
603
- };
604
 
605
- /**
606
- * Removes listeners in bulk using the manipulateListeners method.
607
- * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
608
- * You can also pass it an event name and an array of listeners to be removed.
609
- * You can also pass it a regular expression to remove the listeners from all events that match it.
610
- *
611
- * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.
612
- * @param {Function[]} [listeners] An optional array of listener functions to remove.
613
- * @return {Object} Current instance of EventEmitter for chaining.
614
- */
615
- proto.removeListeners = function removeListeners(evt, listeners) {
616
- // Pass through to manipulateListeners
617
- return this.manipulateListeners(true, evt, listeners);
618
- };
619
 
620
- /**
621
- * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.
622
- * The first argument will determine if the listeners are removed (true) or added (false).
623
- * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
624
- * You can also pass it an event name and an array of listeners to be added/removed.
625
- * You can also pass it a regular expression to manipulate the listeners of all events that match it.
626
- *
627
- * @param {Boolean} remove True if you want to remove listeners, false if you want to add.
628
- * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.
629
- * @param {Function[]} [listeners] An optional array of listener functions to add/remove.
630
- * @return {Object} Current instance of EventEmitter for chaining.
631
- */
632
- proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {
633
- var i;
634
- var value;
635
- var single = remove ? this.removeListener : this.addListener;
636
- var multiple = remove ? this.removeListeners : this.addListeners;
637
-
638
- // If evt is an object then pass each of its properties to this method
639
- if (typeof evt === 'object' && !(evt instanceof RegExp)) {
640
- for (i in evt) {
641
- if (evt.hasOwnProperty(i) && (value = evt[i])) {
642
- // Pass the single listener straight through to the singular method
643
- if (typeof value === 'function') {
644
- single.call(this, i, value);
645
- }
646
- else {
647
- // Otherwise pass back to the multiple function
648
- multiple.call(this, i, value);
649
- }
650
- }
651
- }
652
- }
653
- else {
654
- // So evt must be a string
655
- // And listeners must be an array of listeners
656
- // Loop over it and pass each one to the multiple method
657
- i = listeners.length;
658
- while (i--) {
659
- single.call(this, evt, listeners[i]);
660
- }
661
- }
662
 
663
- return this;
664
- };
665
 
666
- /**
667
- * Removes all listeners from a specified event.
668
- * If you do not specify an event then all listeners will be removed.
669
- * That means every event will be emptied.
670
- * You can also pass a regex to remove all events that match it.
671
- *
672
- * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.
673
- * @return {Object} Current instance of EventEmitter for chaining.
674
- */
675
- proto.removeEvent = function removeEvent(evt) {
676
- var type = typeof evt;
677
- var events = this._getEvents();
678
- var key;
679
-
680
- // Remove different things depending on the state of evt
681
- if (type === 'string') {
682
- // Remove all listeners for the specified event
683
- delete events[evt];
684
- }
685
- else if (evt instanceof RegExp) {
686
- // Remove all events matching the regex.
687
- for (key in events) {
688
- if (events.hasOwnProperty(key) && evt.test(key)) {
689
- delete events[key];
690
- }
691
- }
692
- }
693
- else {
694
- // Remove all listeners in all events
695
- delete this._events;
696
- }
697
 
698
- return this;
699
- };
 
 
 
 
 
 
 
 
700
 
701
- /**
702
- * Alias of removeEvent.
703
- *
704
- * Added to mirror the node API.
705
- */
706
- proto.removeAllListeners = alias('removeEvent');
707
-
708
- /**
709
- * Emits an event of your choice.
710
- * When emitted, every listener attached to that event will be executed.
711
- * If you pass the optional argument array then those arguments will be passed to every listener upon execution.
712
- * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.
713
- * So they will not arrive within the array on the other side, they will be separate.
714
- * You can also pass a regular expression to emit to all events that match it.
715
- *
716
- * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
717
- * @param {Array} [args] Optional array of arguments to be passed to each listener.
718
- * @return {Object} Current instance of EventEmitter for chaining.
719
- */
720
- proto.emitEvent = function emitEvent(evt, args) {
721
- var listenersMap = this.getListenersAsObject(evt);
722
- var listeners;
723
- var listener;
724
- var i;
725
- var key;
726
- var response;
727
-
728
- for (key in listenersMap) {
729
- if (listenersMap.hasOwnProperty(key)) {
730
- listeners = listenersMap[key].slice(0);
731
-
732
- for (i = 0; i < listeners.length; i++) {
733
- // If the listener returns true then it shall be removed from the event
734
- // The function is executed either with a basic call or an apply if there is an args array
735
- listener = listeners[i];
736
-
737
- if (listener.once === true) {
738
- this.removeListener(evt, listener.listener);
739
- }
740
-
741
- response = listener.listener.apply(this, args || []);
742
-
743
- if (response === this._getOnceReturnValue()) {
744
- this.removeListener(evt, listener.listener);
745
- }
746
- }
747
- }
748
  }
 
 
749
 
750
- return this;
751
- };
 
 
 
752
 
753
- /**
754
- * Alias of emitEvent
755
- */
756
- proto.trigger = alias('emitEvent');
757
-
758
- /**
759
- * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.
760
- * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.
761
- *
762
- * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
763
- * @param {...*} Optional additional arguments to be passed to each listener.
764
- * @return {Object} Current instance of EventEmitter for chaining.
765
- */
766
- proto.emit = function emit(evt) {
767
- var args = Array.prototype.slice.call(arguments, 1);
768
- return this.emitEvent(evt, args);
769
- };
770
 
771
- /**
772
- * Sets the current value to check against when executing listeners. If a
773
- * listeners return value matches the one set here then it will be removed
774
- * after execution. This value defaults to true.
775
- *
776
- * @param {*} value The new value to check for when executing listeners.
777
- * @return {Object} Current instance of EventEmitter for chaining.
778
- */
779
- proto.setOnceReturnValue = function setOnceReturnValue(value) {
780
- this._onceReturnValue = value;
781
- return this;
782
- };
783
 
784
- /**
785
- * Fetches the current value to check against when executing listeners. If
786
- * the listeners return value matches this one then it should be removed
787
- * automatically. It will return true by default.
788
- *
789
- * @return {*|Boolean} The current value to check for or the default, true.
790
- * @api private
791
- */
792
- proto._getOnceReturnValue = function _getOnceReturnValue() {
793
- if (this.hasOwnProperty('_onceReturnValue')) {
794
- return this._onceReturnValue;
795
- }
796
- else {
797
- return true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
798
  }
799
- };
 
 
 
 
 
800
 
801
- /**
802
- * Fetches the events object and creates one if required.
803
- *
804
- * @return {Object} The events storage object.
805
- * @api private
806
- */
807
- proto._getEvents = function _getEvents() {
808
- return this._events || (this._events = {});
809
- };
810
 
811
- /**
812
- * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.
813
- *
814
- * @return {Function} Non conflicting EventEmitter class.
815
- */
816
- EventEmitter.noConflict = function noConflict() {
817
- exports.EventEmitter = originalGlobalValue;
818
- return EventEmitter;
819
- };
 
 
820
 
821
- // Expose the class either via AMD, CommonJS or the global object
822
- if (typeof define === 'function' && define.amd) {
823
- define(function () {
824
- return EventEmitter;
825
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
826
  }
827
- else if (typeof module === 'object' && module.exports){
828
- module.exports = EventEmitter;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
829
  }
830
- else {
831
- exports.EventEmitter = EventEmitter;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
832
  }
833
- }(typeof window !== 'undefined' ? window : this || {}));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
834
 
835
  },{}]},{},[1]);
836
  ; })();
26
  var rulesContainerEl = document.getElementById('boxzilla-box-rules');
27
  var ajaxurl = window.ajaxurl; // events
28
 
29
+ $(window).on('load', function () {
30
  if (typeof window.tinyMCE === 'undefined') {
31
  document.getElementById('notice-notinymce').style.display = '';
32
  }
345
  module.exports = Option;
346
 
347
  },{}],5:[function(require,module,exports){
348
+ "use strict";
349
+
350
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
351
+
352
  /*!
353
  * EventEmitter v5.2.9 - git.io/ee
354
  * Unlicense - http://unlicense.org/
355
  * Oliver Caldwell - https://oli.me.uk/
356
  * @preserve
357
  */
358
+ ;
359
 
360
+ (function (exports) {
361
+ 'use strict';
362
+ /**
363
+ * Class for managing events.
364
+ * Can be extended to provide event functionality in other classes.
365
+ *
366
+ * @class EventEmitter Manages event registering and emitting.
367
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
368
 
369
+ function EventEmitter() {} // Shortcuts to improve speed and size
370
+
371
+
372
+ var proto = EventEmitter.prototype;
373
+ var originalGlobalValue = exports.EventEmitter;
374
+ /**
375
+ * Finds the index of the listener for the event in its storage array.
376
+ *
377
+ * @param {Function[]} listeners Array of listeners to search through.
378
+ * @param {Function} listener Method to look for.
379
+ * @return {Number} Index of the specified listener, -1 if not found
380
+ * @api private
381
+ */
382
+
383
+ function indexOfListener(listeners, listener) {
384
+ var i = listeners.length;
385
 
386
+ while (i--) {
387
+ if (listeners[i].listener === listener) {
388
+ return i;
389
+ }
 
 
 
 
 
 
 
390
  }
391
 
392
+ return -1;
393
+ }
394
+ /**
395
+ * Alias a method while keeping the context correct, to allow for overwriting of target method.
396
+ *
397
+ * @param {String} name The name of the target method.
398
+ * @return {Function} The aliased method
399
+ * @api private
400
+ */
401
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
402
 
403
+ function alias(name) {
404
+ return function aliasClosure() {
405
+ return this[name].apply(this, arguments);
406
  };
407
+ }
408
+ /**
409
+ * Returns the listener array for the specified event.
410
+ * Will initialise the event object and listener arrays if required.
411
+ * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.
412
+ * Each property in the object response is an array of listener functions.
413
+ *
414
+ * @param {String|RegExp} evt Name of the event to return the listeners from.
415
+ * @return {Function[]|Object} All listener functions for the event.
416
+ */
417
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
 
419
+ proto.getListeners = function getListeners(evt) {
420
+ var events = this._getEvents();
421
 
422
+ var response;
423
+ var key; // Return a concatenated array of all matching events if
424
+ // the selector is a regular expression.
 
 
 
 
 
 
 
 
 
 
 
425
 
426
+ if (evt instanceof RegExp) {
427
+ response = {};
428
 
429
+ for (key in events) {
430
+ if (events.hasOwnProperty(key) && evt.test(key)) {
431
+ response[key] = events[key];
 
 
 
 
432
  }
433
+ }
434
+ } else {
435
+ response = events[evt] || (events[evt] = []);
436
  }
437
 
438
+ return response;
439
+ };
440
+ /**
441
+ * Takes a list of listener objects and flattens it into a list of listener functions.
442
+ *
443
+ * @param {Object[]} listeners Raw listener objects.
444
+ * @return {Function[]} Just the listener functions.
445
+ */
 
 
 
 
 
 
446
 
 
 
 
 
 
 
 
 
 
 
 
 
447
 
448
+ proto.flattenListeners = function flattenListeners(listeners) {
449
+ var flatListeners = [];
450
+ var i;
451
+
452
+ for (i = 0; i < listeners.length; i += 1) {
453
+ flatListeners.push(listeners[i].listener);
454
+ }
455
+
456
+ return flatListeners;
457
+ };
458
+ /**
459
+ * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.
460
+ *
461
+ * @param {String|RegExp} evt Name of the event to return the listeners from.
462
+ * @return {Object} All listener functions for an event in an object.
463
+ */
464
+
465
+
466
+ proto.getListenersAsObject = function getListenersAsObject(evt) {
467
+ var listeners = this.getListeners(evt);
468
+ var response;
469
+
470
+ if (listeners instanceof Array) {
471
+ response = {};
472
+ response[evt] = listeners;
473
+ }
474
+
475
+ return response || listeners;
476
+ };
477
+
478
+ function isValidListener(listener) {
479
+ if (typeof listener === 'function' || listener instanceof RegExp) {
480
+ return true;
481
+ } else if (listener && _typeof(listener) === 'object') {
482
+ return isValidListener(listener.listener);
483
+ } else {
484
+ return false;
485
+ }
486
+ }
487
+ /**
488
+ * Adds a listener function to the specified event.
489
+ * The listener will not be added if it is a duplicate.
490
+ * If the listener returns true then it will be removed after it is called.
491
+ * If you pass a regular expression as the event name then the listener will be added to all events that match it.
492
+ *
493
+ * @param {String|RegExp} evt Name of the event to attach the listener to.
494
+ * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
495
+ * @return {Object} Current instance of EventEmitter for chaining.
496
+ */
497
+
498
+
499
+ proto.addListener = function addListener(evt, listener) {
500
+ if (!isValidListener(listener)) {
501
+ throw new TypeError('listener must be a function');
502
+ }
503
+
504
+ var listeners = this.getListenersAsObject(evt);
505
+ var listenerIsWrapped = _typeof(listener) === 'object';
506
+ var key;
507
 
508
+ for (key in listeners) {
509
+ if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {
510
+ listeners[key].push(listenerIsWrapped ? listener : {
511
+ listener: listener,
512
+ once: false
 
 
 
 
 
 
 
 
 
 
 
 
513
  });
514
+ }
515
+ }
516
 
517
+ return this;
518
+ };
519
+ /**
520
+ * Alias of addListener
521
+ */
 
 
 
 
 
 
 
 
 
 
 
522
 
 
 
 
 
 
 
 
 
 
 
 
 
523
 
524
+ proto.on = alias('addListener');
525
+ /**
526
+ * Semi-alias of addListener. It will add a listener that will be
527
+ * automatically removed after its first execution.
528
+ *
529
+ * @param {String|RegExp} evt Name of the event to attach the listener to.
530
+ * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
531
+ * @return {Object} Current instance of EventEmitter for chaining.
532
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
533
 
534
+ proto.addOnceListener = function addOnceListener(evt, listener) {
535
+ return this.addListener(evt, {
536
+ listener: listener,
537
+ once: true
538
+ });
539
+ };
540
+ /**
541
+ * Alias of addOnceListener.
542
+ */
543
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
544
 
545
+ proto.once = alias('addOnceListener');
546
+ /**
547
+ * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.
548
+ * You need to tell it what event names should be matched by a regex.
549
+ *
550
+ * @param {String} evt Name of the event to create.
551
+ * @return {Object} Current instance of EventEmitter for chaining.
552
+ */
 
 
 
 
 
 
553
 
554
+ proto.defineEvent = function defineEvent(evt) {
555
+ this.getListeners(evt);
556
+ return this;
557
+ };
558
+ /**
559
+ * Uses defineEvent to define multiple events.
560
+ *
561
+ * @param {String[]} evts An array of event names to define.
562
+ * @return {Object} Current instance of EventEmitter for chaining.
563
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
564
 
 
 
565
 
566
+ proto.defineEvents = function defineEvents(evts) {
567
+ for (var i = 0; i < evts.length; i += 1) {
568
+ this.defineEvent(evts[i]);
569
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
570
 
571
+ return this;
572
+ };
573
+ /**
574
+ * Removes a listener function from the specified event.
575
+ * When passed a regular expression as the event name, it will remove the listener from all events that match it.
576
+ *
577
+ * @param {String|RegExp} evt Name of the event to remove the listener from.
578
+ * @param {Function} listener Method to remove from the event.
579
+ * @return {Object} Current instance of EventEmitter for chaining.
580
+ */
581
 
582
+
583
+ proto.removeListener = function removeListener(evt, listener) {
584
+ var listeners = this.getListenersAsObject(evt);
585
+ var index;
586
+ var key;
587
+
588
+ for (key in listeners) {
589
+ if (listeners.hasOwnProperty(key)) {
590
+ index = indexOfListener(listeners[key], listener);
591
+
592
+ if (index !== -1) {
593
+ listeners[key].splice(index, 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
594
  }
595
+ }
596
+ }
597
 
598
+ return this;
599
+ };
600
+ /**
601
+ * Alias of removeListener
602
+ */
603
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
604
 
605
+ proto.off = alias('removeListener');
606
+ /**
607
+ * Adds listeners in bulk using the manipulateListeners method.
608
+ * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.
609
+ * You can also pass it a regular expression to add the array of listeners to all events that match it.
610
+ * Yeah, this function does quite a bit. That's probably a bad thing.
611
+ *
612
+ * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.
613
+ * @param {Function[]} [listeners] An optional array of listener functions to add.
614
+ * @return {Object} Current instance of EventEmitter for chaining.
615
+ */
 
616
 
617
+ proto.addListeners = function addListeners(evt, listeners) {
618
+ // Pass through to manipulateListeners
619
+ return this.manipulateListeners(false, evt, listeners);
620
+ };
621
+ /**
622
+ * Removes listeners in bulk using the manipulateListeners method.
623
+ * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
624
+ * You can also pass it an event name and an array of listeners to be removed.
625
+ * You can also pass it a regular expression to remove the listeners from all events that match it.
626
+ *
627
+ * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.
628
+ * @param {Function[]} [listeners] An optional array of listener functions to remove.
629
+ * @return {Object} Current instance of EventEmitter for chaining.
630
+ */
631
+
632
+
633
+ proto.removeListeners = function removeListeners(evt, listeners) {
634
+ // Pass through to manipulateListeners
635
+ return this.manipulateListeners(true, evt, listeners);
636
+ };
637
+ /**
638
+ * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.
639
+ * The first argument will determine if the listeners are removed (true) or added (false).
640
+ * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
641
+ * You can also pass it an event name and an array of listeners to be added/removed.
642
+ * You can also pass it a regular expression to manipulate the listeners of all events that match it.
643
+ *
644
+ * @param {Boolean} remove True if you want to remove listeners, false if you want to add.
645
+ * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.
646
+ * @param {Function[]} [listeners] An optional array of listener functions to add/remove.
647
+ * @return {Object} Current instance of EventEmitter for chaining.
648
+ */
649
+
650
+
651
+ proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {
652
+ var i;
653
+ var value;
654
+ var single = remove ? this.removeListener : this.addListener;
655
+ var multiple = remove ? this.removeListeners : this.addListeners; // If evt is an object then pass each of its properties to this method
656
+
657
+ if (_typeof(evt) === 'object' && !(evt instanceof RegExp)) {
658
+ for (i in evt) {
659
+ if (evt.hasOwnProperty(i) && (value = evt[i])) {
660
+ // Pass the single listener straight through to the singular method
661
+ if (typeof value === 'function') {
662
+ single.call(this, i, value);
663
+ } else {
664
+ // Otherwise pass back to the multiple function
665
+ multiple.call(this, i, value);
666
+ }
667
  }
668
+ }
669
+ } else {
670
+ // So evt must be a string
671
+ // And listeners must be an array of listeners
672
+ // Loop over it and pass each one to the multiple method
673
+ i = listeners.length;
674
 
675
+ while (i--) {
676
+ single.call(this, evt, listeners[i]);
677
+ }
678
+ }
 
 
 
 
 
679
 
680
+ return this;
681
+ };
682
+ /**
683
+ * Removes all listeners from a specified event.
684
+ * If you do not specify an event then all listeners will be removed.
685
+ * That means every event will be emptied.
686
+ * You can also pass a regex to remove all events that match it.
687
+ *
688
+ * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.
689
+ * @return {Object} Current instance of EventEmitter for chaining.
690
+ */
691
 
692
+
693
+ proto.removeEvent = function removeEvent(evt) {
694
+ var type = _typeof(evt);
695
+
696
+ var events = this._getEvents();
697
+
698
+ var key; // Remove different things depending on the state of evt
699
+
700
+ if (type === 'string') {
701
+ // Remove all listeners for the specified event
702
+ delete events[evt];
703
+ } else if (evt instanceof RegExp) {
704
+ // Remove all events matching the regex.
705
+ for (key in events) {
706
+ if (events.hasOwnProperty(key) && evt.test(key)) {
707
+ delete events[key];
708
+ }
709
+ }
710
+ } else {
711
+ // Remove all listeners in all events
712
+ delete this._events;
713
  }
714
+
715
+ return this;
716
+ };
717
+ /**
718
+ * Alias of removeEvent.
719
+ *
720
+ * Added to mirror the node API.
721
+ */
722
+
723
+
724
+ proto.removeAllListeners = alias('removeEvent');
725
+ /**
726
+ * Emits an event of your choice.
727
+ * When emitted, every listener attached to that event will be executed.
728
+ * If you pass the optional argument array then those arguments will be passed to every listener upon execution.
729
+ * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.
730
+ * So they will not arrive within the array on the other side, they will be separate.
731
+ * You can also pass a regular expression to emit to all events that match it.
732
+ *
733
+ * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
734
+ * @param {Array} [args] Optional array of arguments to be passed to each listener.
735
+ * @return {Object} Current instance of EventEmitter for chaining.
736
+ */
737
+
738
+ proto.emitEvent = function emitEvent(evt, args) {
739
+ var listenersMap = this.getListenersAsObject(evt);
740
+ var listeners;
741
+ var listener;
742
+ var i;
743
+ var key;
744
+ var response;
745
+
746
+ for (key in listenersMap) {
747
+ if (listenersMap.hasOwnProperty(key)) {
748
+ listeners = listenersMap[key].slice(0);
749
+
750
+ for (i = 0; i < listeners.length; i++) {
751
+ // If the listener returns true then it shall be removed from the event
752
+ // The function is executed either with a basic call or an apply if there is an args array
753
+ listener = listeners[i];
754
+
755
+ if (listener.once === true) {
756
+ this.removeListener(evt, listener.listener);
757
+ }
758
+
759
+ response = listener.listener.apply(this, args || []);
760
+
761
+ if (response === this._getOnceReturnValue()) {
762
+ this.removeListener(evt, listener.listener);
763
+ }
764
+ }
765
+ }
766
  }
767
+
768
+ return this;
769
+ };
770
+ /**
771
+ * Alias of emitEvent
772
+ */
773
+
774
+
775
+ proto.trigger = alias('emitEvent');
776
+ /**
777
+ * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.
778
+ * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.
779
+ *
780
+ * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
781
+ * @param {...*} Optional additional arguments to be passed to each listener.
782
+ * @return {Object} Current instance of EventEmitter for chaining.
783
+ */
784
+
785
+ proto.emit = function emit(evt) {
786
+ var args = Array.prototype.slice.call(arguments, 1);
787
+ return this.emitEvent(evt, args);
788
+ };
789
+ /**
790
+ * Sets the current value to check against when executing listeners. If a
791
+ * listeners return value matches the one set here then it will be removed
792
+ * after execution. This value defaults to true.
793
+ *
794
+ * @param {*} value The new value to check for when executing listeners.
795
+ * @return {Object} Current instance of EventEmitter for chaining.
796
+ */
797
+
798
+
799
+ proto.setOnceReturnValue = function setOnceReturnValue(value) {
800
+ this._onceReturnValue = value;
801
+ return this;
802
+ };
803
+ /**
804
+ * Fetches the current value to check against when executing listeners. If
805
+ * the listeners return value matches this one then it should be removed
806
+ * automatically. It will return true by default.
807
+ *
808
+ * @return {*|Boolean} The current value to check for or the default, true.
809
+ * @api private
810
+ */
811
+
812
+
813
+ proto._getOnceReturnValue = function _getOnceReturnValue() {
814
+ if (this.hasOwnProperty('_onceReturnValue')) {
815
+ return this._onceReturnValue;
816
+ } else {
817
+ return true;
818
  }
819
+ };
820
+ /**
821
+ * Fetches the events object and creates one if required.
822
+ *
823
+ * @return {Object} The events storage object.
824
+ * @api private
825
+ */
826
+
827
+
828
+ proto._getEvents = function _getEvents() {
829
+ return this._events || (this._events = {});
830
+ };
831
+ /**
832
+ * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.
833
+ *
834
+ * @return {Function} Non conflicting EventEmitter class.
835
+ */
836
+
837
+
838
+ EventEmitter.noConflict = function noConflict() {
839
+ exports.EventEmitter = originalGlobalValue;
840
+ return EventEmitter;
841
+ }; // Expose the class either via AMD, CommonJS or the global object
842
+
843
+
844
+ if (typeof define === 'function' && define.amd) {
845
+ define(function () {
846
+ return EventEmitter;
847
+ });
848
+ } else if ((typeof module === "undefined" ? "undefined" : _typeof(module)) === 'object' && module.exports) {
849
+ module.exports = EventEmitter;
850
+ } else {
851
+ exports.EventEmitter = EventEmitter;
852
+ }
853
+ })(typeof window !== 'undefined' ? window : void 0 || {});
854
 
855
  },{}]},{},[1]);
856
  ; })();
assets/js/admin-script.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(){var u=void 0,s=void 0;!function o(r,i,l){function s(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof u&&u;if(!e&&n)return n(t,!0);if(a)return a(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return s(r[t][1][e]||e)},n,n.exports,o,r,i,l)}return i[t].exports}for(var a="function"==typeof u&&u,e=0;e<l.length;e++)s(l[e]);return s}({1:[function(e,t,n){"use strict";window.Boxzilla_Admin=e("./admin/_admin.js")},{"./admin/_admin.js":2}],2:[function(e,t,n){"use strict";var l=window.jQuery,o=e("./_option.js"),r=document.getElementById("boxzilla-box-options-controls"),i=l(r),s=document.createTextNode(" logged in"),a=new(e("wolfy87-eventemitter")),e=e("./_designer.js")(l,o,a),u=window.wp.template("rule-row-template"),c=window.boxzilla_i18n,p=document.getElementById("boxzilla-rule-comparison"),d=document.getElementById("boxzilla-box-rules"),f=window.ajaxurl;function y(){var e="any"===p.value?c.or:c.and;l(".boxzilla-andor").text(e)}function h(){i.find(".boxzilla-trigger-options").toggle(""!==this.value)}function m(){var e=l(this).parents("tr");e.prev().remove(),e.remove()}function g(){var e="tr"===this.tagName.toLowerCase()?this:l(this).parents("tr").get(0),t=e.querySelector(".boxzilla-rule-condition").value,n=e.querySelector(".boxzilla-rule-value"),o=e.querySelector(".boxzilla-rule-qualifier"),r=n.cloneNode(!0),i=l(r);switch(l(e.querySelectorAll(".boxzilla-helper")).remove(),r.removeAttribute("name"),r.className=r.className+" boxzilla-helper",n.parentNode.insertBefore(r,n.nextSibling),i.change(function(){n.value=this.value}),r.style.display="",n.style.display="none",o.style.display="",o.querySelector('option[value="not_contains"]').style.display="none",o.querySelector('option[value="contains"]').style.display="none",s.parentNode&&s.parentNode.removeChild(s),t){default:r.placeholder=c.enterCommaSeparatedValues;break;case"":case"everywhere":o.value="1",n.value="",r.style.display="none",o.style.display="none";break;case"is_single":case"is_post":r.placeholder=c.enterCommaSeparatedPosts,i.suggest(f+"?action=boxzilla_autocomplete&type=post",{multiple:!0,multipleSep:","});break;case"is_page":r.placeholder=c.enterCommaSeparatedPages,i.suggest(f+"?action=boxzilla_autocomplete&type=page",{multiple:!0,multipleSep:","});break;case"is_post_type":r.placeholder=c.enterCommaSeparatedPostTypes,i.suggest(f+"?action=boxzilla_autocomplete&type=post_type",{multiple:!0,multipleSep:","});break;case"is_url":o.querySelector('option[value="contains"]').style.display="",o.querySelector('option[value="not_contains"]').style.display="",r.placeholder=c.enterCommaSeparatedRelativeUrls;break;case"is_post_in_category":i.suggest(f+"?action=boxzilla_autocomplete&type=category",{multiple:!0,multipleSep:","});break;case"is_post_with_tag":i.suggest(f+"?action=boxzilla_autocomplete&type=post_tag",{multiple:!0,multipleSep:","});break;case"is_user_logged_in":r.style.display="none",n.parentNode.insertBefore(s,n.nextSibling);break;case"is_referer":o.querySelector('option[value="contains"]').style.display="",o.querySelector('option[value="not_contains"]').style.display=""}}function v(){var e={key:r.querySelectorAll(".boxzilla-rule-row").length,andor:"any"===p.value?c.or:c.and},e=u(e);return l(d).append(e),!1}l(window).load(function(){void 0===window.tinyMCE&&(document.getElementById("notice-notinymce").style.display=""),i.on("click",".boxzilla-add-rule",v),i.on("click",".boxzilla-remove-rule",m),i.on("change",".boxzilla-rule-condition",g),i.find(".boxzilla-auto-show-trigger").on("change",h),l(p).change(y),l(".boxzilla-rule-row").each(g)}),t.exports={Designer:e,Option:o,events:a}},{"./_designer.js":3,"./_option.js":4,"wolfy87-eventemitter":5}],3:[function(e,t,n){"use strict";function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.exports=function(e,t,n){var o,r,i,l=document.getElementById("post_ID").value||0,s={},a=!1,u=e("#boxzilla-box-appearance-controls");function c(){return!!a&&(window.setTimeout(function(){i.css({"border-color":s.borderColor.getColorValue(),"border-width":s.borderWidth.getPxValue(),"border-style":s.borderStyle.getValue(),"background-color":s.backgroundColor.getColorValue(),width:s.width.getPxValue(),color:s.color.getColorValue()}),n.trigger("editor.styles.apply")},10),!0)}return u.find("input.boxzilla-color-field").wpColorPicker({change:c,clear:c}),u.find(":input").not(".boxzilla-color-field").change(c),n.on("editor.init",c),{init:function(){"object"===p(window.tinyMCE)&&null!==window.tinyMCE.get("content")&&(s.borderColor=new t("border-color"),s.borderWidth=new t("border-width"),s.borderStyle=new t("border-style"),s.backgroundColor=new t("background-color"),s.width=new t("width"),s.color=new t("color"),r=e("#content_ifr"),(o=r.contents().find("html")).css({background:"white"}),(i=o.find("#tinymce")).addClass("boxzilla boxzilla-"+l),i.css({margin:0,background:"white",display:"inline-block",width:"auto","min-width":"240px",position:"relative"}),i.get(0).style.cssText+=";padding: 25px !important;",a=!0,n.trigger("editor.init"))},resetStyles:function(){for(var e in s)"theme"!==e.substring(0,5)&&s[e].clear();c(),n.trigger("editor.styles.reset")},options:s}}},{}],4:[function(e,t,n){"use strict";function o(e){"string"==typeof e&&(e=document.getElementById("boxzilla-"+e)),e||console.error("Unable to find option element."),this.element=e}var r=window.jQuery;o.prototype.getColorValue=function(){return 0<this.element.value.length?r(this.element).hasClass("wp-color-field")?r(this.element).wpColorPicker("color"):this.element.value:""},o.prototype.getPxValue=function(e){return 0<this.element.value.length?parseInt(this.element.value)+"px":e||""},o.prototype.getValue=function(e){return 0<this.element.value.length?this.element.value:e||""},o.prototype.clear=function(){this.element.value=""},o.prototype.setValue=function(e){this.element.value=e},t.exports=o},{}],5:[function(e,l,t){!function(e){"use strict";function t(){}var n=t.prototype,o=e.EventEmitter;function i(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function r(e){return function(){return this[e].apply(this,arguments)}}n.getListeners=function(e){var t,n,o=this._getEvents();if(e instanceof RegExp)for(n in t={},o)o.hasOwnProperty(n)&&e.test(n)&&(t[n]=o[n]);else t=o[e]||(o[e]=[]);return t},n.flattenListeners=function(e){for(var t=[],n=0;n<e.length;n+=1)t.push(e[n].listener);return t},n.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&((t={})[e]=n),t||n},n.addListener=function(e,t){if(!function e(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&e(t.listener)}(t))throw new TypeError("listener must be a function");var n,o=this.getListenersAsObject(e),r="object"==typeof t;for(n in o)o.hasOwnProperty(n)&&-1===i(o[n],t)&&o[n].push(r?t:{listener:t,once:!1});return this},n.on=r("addListener"),n.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},n.once=r("addOnceListener"),n.defineEvent=function(e){return this.getListeners(e),this},n.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},n.removeListener=function(e,t){var n,o,r=this.getListenersAsObject(e);for(o in r)r.hasOwnProperty(o)&&-1!==(n=i(r[o],t))&&r[o].splice(n,1);return this},n.off=r("removeListener"),n.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},n.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},n.manipulateListeners=function(e,t,n){var o,r,i=e?this.removeListener:this.addListener,l=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(o=n.length;o--;)i.call(this,t,n[o]);else for(o in t)t.hasOwnProperty(o)&&(r=t[o])&&("function"==typeof r?i:l).call(this,o,r);return this},n.removeEvent=function(e){var t,n=typeof e,o=this._getEvents();if("string"==n)delete o[e];else if(e instanceof RegExp)for(t in o)o.hasOwnProperty(t)&&e.test(t)&&delete o[t];else delete this._events;return this},n.removeAllListeners=r("removeEvent"),n.emitEvent=function(e,t){var n,o,r,i,l=this.getListenersAsObject(e);for(i in l)if(l.hasOwnProperty(i))for(n=l[i].slice(0),r=0;r<n.length;r++)!0===(o=n[r]).once&&this.removeListener(e,o.listener),o.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,o.listener);return this},n.trigger=r("emitEvent"),n.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},n.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},n._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return e.EventEmitter=o,t},"function"==typeof s&&s.amd?s(function(){return t}):"object"==typeof l&&l.exports?l.exports=t:e.EventEmitter=t}("undefined"!=typeof window?window:this||{})},{}]},{},[1])}();
2
  //# sourceMappingURL=admin-script.min.js.map
1
+ !function(){var u=void 0,c=void 0;!function o(r,i,l){function s(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof u&&u;if(!e&&n)return n(t,!0);if(a)return a(t,!0);throw(n=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return s(r[t][1][e]||e)},n,n.exports,o,r,i,l)}return i[t].exports}for(var a="function"==typeof u&&u,e=0;e<l.length;e++)s(l[e]);return s}({1:[function(e,t,n){"use strict";window.Boxzilla_Admin=e("./admin/_admin.js")},{"./admin/_admin.js":2}],2:[function(e,t,n){"use strict";var l=window.jQuery,o=e("./_option.js"),r=document.getElementById("boxzilla-box-options-controls"),i=l(r),s=document.createTextNode(" logged in"),a=new(e("wolfy87-eventemitter")),e=e("./_designer.js")(l,o,a),u=window.wp.template("rule-row-template"),c=window.boxzilla_i18n,p=document.getElementById("boxzilla-rule-comparison"),d=document.getElementById("boxzilla-box-rules"),f=window.ajaxurl;function y(){var e="any"===p.value?c.or:c.and;l(".boxzilla-andor").text(e)}function m(){i.find(".boxzilla-trigger-options").toggle(""!==this.value)}function h(){var e=l(this).parents("tr");e.prev().remove(),e.remove()}function g(){var e="tr"===this.tagName.toLowerCase()?this:l(this).parents("tr").get(0),t=e.querySelector(".boxzilla-rule-condition").value,n=e.querySelector(".boxzilla-rule-value"),o=e.querySelector(".boxzilla-rule-qualifier"),r=n.cloneNode(!0),i=l(r);switch(l(e.querySelectorAll(".boxzilla-helper")).remove(),r.removeAttribute("name"),r.className=r.className+" boxzilla-helper",n.parentNode.insertBefore(r,n.nextSibling),i.change(function(){n.value=this.value}),r.style.display="",n.style.display="none",o.style.display="",o.querySelector('option[value="not_contains"]').style.display="none",o.querySelector('option[value="contains"]').style.display="none",s.parentNode&&s.parentNode.removeChild(s),t){default:r.placeholder=c.enterCommaSeparatedValues;break;case"":case"everywhere":o.value="1",n.value="",r.style.display="none",o.style.display="none";break;case"is_single":case"is_post":r.placeholder=c.enterCommaSeparatedPosts,i.suggest(f+"?action=boxzilla_autocomplete&type=post",{multiple:!0,multipleSep:","});break;case"is_page":r.placeholder=c.enterCommaSeparatedPages,i.suggest(f+"?action=boxzilla_autocomplete&type=page",{multiple:!0,multipleSep:","});break;case"is_post_type":r.placeholder=c.enterCommaSeparatedPostTypes,i.suggest(f+"?action=boxzilla_autocomplete&type=post_type",{multiple:!0,multipleSep:","});break;case"is_url":o.querySelector('option[value="contains"]').style.display="",o.querySelector('option[value="not_contains"]').style.display="",r.placeholder=c.enterCommaSeparatedRelativeUrls;break;case"is_post_in_category":i.suggest(f+"?action=boxzilla_autocomplete&type=category",{multiple:!0,multipleSep:","});break;case"is_post_with_tag":i.suggest(f+"?action=boxzilla_autocomplete&type=post_tag",{multiple:!0,multipleSep:","});break;case"is_user_logged_in":r.style.display="none",n.parentNode.insertBefore(s,n.nextSibling);break;case"is_referer":o.querySelector('option[value="contains"]').style.display="",o.querySelector('option[value="not_contains"]').style.display=""}}function v(){var e={key:r.querySelectorAll(".boxzilla-rule-row").length,andor:"any"===p.value?c.or:c.and},e=u(e);return l(d).append(e),!1}l(window).on("load",function(){void 0===window.tinyMCE&&(document.getElementById("notice-notinymce").style.display=""),i.on("click",".boxzilla-add-rule",v),i.on("click",".boxzilla-remove-rule",h),i.on("change",".boxzilla-rule-condition",g),i.find(".boxzilla-auto-show-trigger").on("change",m),l(p).change(y),l(".boxzilla-rule-row").each(g)}),t.exports={Designer:e,Option:o,events:a}},{"./_designer.js":3,"./_option.js":4,"wolfy87-eventemitter":5}],3:[function(e,t,n){"use strict";function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.exports=function(e,t,n){var o,r,i,l=document.getElementById("post_ID").value||0,s={},a=!1,u=e("#boxzilla-box-appearance-controls");function c(){return!!a&&(window.setTimeout(function(){i.css({"border-color":s.borderColor.getColorValue(),"border-width":s.borderWidth.getPxValue(),"border-style":s.borderStyle.getValue(),"background-color":s.backgroundColor.getColorValue(),width:s.width.getPxValue(),color:s.color.getColorValue()}),n.trigger("editor.styles.apply")},10),!0)}return u.find("input.boxzilla-color-field").wpColorPicker({change:c,clear:c}),u.find(":input").not(".boxzilla-color-field").change(c),n.on("editor.init",c),{init:function(){"object"===p(window.tinyMCE)&&null!==window.tinyMCE.get("content")&&(s.borderColor=new t("border-color"),s.borderWidth=new t("border-width"),s.borderStyle=new t("border-style"),s.backgroundColor=new t("background-color"),s.width=new t("width"),s.color=new t("color"),r=e("#content_ifr"),(o=r.contents().find("html")).css({background:"white"}),(i=o.find("#tinymce")).addClass("boxzilla boxzilla-"+l),i.css({margin:0,background:"white",display:"inline-block",width:"auto","min-width":"240px",position:"relative"}),i.get(0).style.cssText+=";padding: 25px !important;",a=!0,n.trigger("editor.init"))},resetStyles:function(){for(var e in s)"theme"!==e.substring(0,5)&&s[e].clear();c(),n.trigger("editor.styles.reset")},options:s}}},{}],4:[function(e,t,n){"use strict";function o(e){"string"==typeof e&&(e=document.getElementById("boxzilla-"+e)),e||console.error("Unable to find option element."),this.element=e}var r=window.jQuery;o.prototype.getColorValue=function(){return 0<this.element.value.length?r(this.element).hasClass("wp-color-field")?r(this.element).wpColorPicker("color"):this.element.value:""},o.prototype.getPxValue=function(e){return 0<this.element.value.length?parseInt(this.element.value)+"px":e||""},o.prototype.getValue=function(e){return 0<this.element.value.length?this.element.value:e||""},o.prototype.clear=function(){this.element.value=""},o.prototype.setValue=function(e){this.element.value=e},t.exports=o},{}],5:[function(e,t,n){"use strict";function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){}function i(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function r(e){return function(){return this[e].apply(this,arguments)}}var l,a,u;l="undefined"!=typeof window?window:{},a=o.prototype,u=l.EventEmitter,a.getListeners=function(e){var t,n,o=this._getEvents();if(e instanceof RegExp)for(n in t={},o)o.hasOwnProperty(n)&&e.test(n)&&(t[n]=o[n]);else t=o[e]||(o[e]=[]);return t},a.flattenListeners=function(e){for(var t=[],n=0;n<e.length;n+=1)t.push(e[n].listener);return t},a.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&((t={})[e]=n),t||n},a.addListener=function(e,t){if(!function e(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!==s(t))&&e(t.listener)}(t))throw new TypeError("listener must be a function");var n,o=this.getListenersAsObject(e),r="object"===s(t);for(n in o)o.hasOwnProperty(n)&&-1===i(o[n],t)&&o[n].push(r?t:{listener:t,once:!1});return this},a.on=r("addListener"),a.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},a.once=r("addOnceListener"),a.defineEvent=function(e){return this.getListeners(e),this},a.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},a.removeListener=function(e,t){var n,o,r=this.getListenersAsObject(e);for(o in r)r.hasOwnProperty(o)&&-1!==(n=i(r[o],t))&&r[o].splice(n,1);return this},a.off=r("removeListener"),a.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},a.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},a.manipulateListeners=function(e,t,n){var o,r,i=e?this.removeListener:this.addListener,l=e?this.removeListeners:this.addListeners;if("object"!==s(t)||t instanceof RegExp)for(o=n.length;o--;)i.call(this,t,n[o]);else for(o in t)t.hasOwnProperty(o)&&(r=t[o])&&("function"==typeof r?i:l).call(this,o,r);return this},a.removeEvent=function(e){var t,n=s(e),o=this._getEvents();if("string"===n)delete o[e];else if(e instanceof RegExp)for(t in o)o.hasOwnProperty(t)&&e.test(t)&&delete o[t];else delete this._events;return this},a.removeAllListeners=r("removeEvent"),a.emitEvent=function(e,t){var n,o,r,i,l=this.getListenersAsObject(e);for(i in l)if(l.hasOwnProperty(i))for(n=l[i].slice(0),r=0;r<n.length;r++)!0===(o=n[r]).once&&this.removeListener(e,o.listener),o.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,o.listener);return this},a.trigger=r("emitEvent"),a.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},a.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},a._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},a._getEvents=function(){return this._events||(this._events={})},o.noConflict=function(){return l.EventEmitter=u,o},"function"==typeof c&&c.amd?c(function(){return o}):"object"===(void 0===t?"undefined":s(t))&&t.exports?t.exports=o:l.EventEmitter=o},{}]},{},[1])}();
2
  //# sourceMappingURL=admin-script.min.js.map
assets/js/admin-script.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"admin-script.min.js","sources":["admin-script.js"],"sourcesContent":["(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n\"use strict\";\n\nwindow.Boxzilla_Admin = require('./admin/_admin.js');\n\n},{\"./admin/_admin.js\":2}],2:[function(require,module,exports){\n\"use strict\";\n\nvar $ = window.jQuery;\n\nvar Option = require('./_option.js');\n\nvar optionControls = document.getElementById('boxzilla-box-options-controls');\nvar $optionControls = $(optionControls);\nvar tnLoggedIn = document.createTextNode(' logged in');\n\nvar EventEmitter = require('wolfy87-eventemitter');\n\nvar events = new EventEmitter();\n\nvar Designer = require('./_designer.js')($, Option, events);\n\nvar rowTemplate = window.wp.template('rule-row-template');\nvar i18n = window.boxzilla_i18n;\nvar ruleComparisonEl = document.getElementById('boxzilla-rule-comparison');\nvar rulesContainerEl = document.getElementById('boxzilla-box-rules');\nvar ajaxurl = window.ajaxurl; // events\n\n$(window).load(function () {\n if (typeof window.tinyMCE === 'undefined') {\n document.getElementById('notice-notinymce').style.display = '';\n }\n\n $optionControls.on('click', '.boxzilla-add-rule', addRuleFields);\n $optionControls.on('click', '.boxzilla-remove-rule', removeRule);\n $optionControls.on('change', '.boxzilla-rule-condition', setContextualHelpers);\n $optionControls.find('.boxzilla-auto-show-trigger').on('change', toggleTriggerOptions);\n $(ruleComparisonEl).change(toggleAndOrTexts);\n $('.boxzilla-rule-row').each(setContextualHelpers);\n});\n\nfunction toggleAndOrTexts() {\n var newText = ruleComparisonEl.value === 'any' ? i18n.or : i18n.and;\n $('.boxzilla-andor').text(newText);\n}\n\nfunction toggleTriggerOptions() {\n $optionControls.find('.boxzilla-trigger-options').toggle(this.value !== '');\n}\n\nfunction removeRule() {\n var row = $(this).parents('tr'); // delete andor row\n\n row.prev().remove(); // delete rule row\n\n row.remove();\n}\n\nfunction setContextualHelpers() {\n var context = this.tagName.toLowerCase() === 'tr' ? this : $(this).parents('tr').get(0);\n var condition = context.querySelector('.boxzilla-rule-condition').value;\n var valueInput = context.querySelector('.boxzilla-rule-value');\n var qualifierInput = context.querySelector('.boxzilla-rule-qualifier');\n var betterInput = valueInput.cloneNode(true);\n var $betterInput = $(betterInput); // remove previously added helpers\n\n $(context.querySelectorAll('.boxzilla-helper')).remove(); // prepare better input\n\n betterInput.removeAttribute('name');\n betterInput.className = betterInput.className + ' boxzilla-helper';\n valueInput.parentNode.insertBefore(betterInput, valueInput.nextSibling);\n $betterInput.change(function () {\n valueInput.value = this.value;\n });\n betterInput.style.display = '';\n valueInput.style.display = 'none';\n qualifierInput.style.display = '';\n qualifierInput.querySelector('option[value=\"not_contains\"]').style.display = 'none';\n qualifierInput.querySelector('option[value=\"contains\"]').style.display = 'none';\n\n if (tnLoggedIn.parentNode) {\n tnLoggedIn.parentNode.removeChild(tnLoggedIn);\n } // change placeholder for textual help\n\n\n switch (condition) {\n default:\n betterInput.placeholder = i18n.enterCommaSeparatedValues;\n break;\n\n case '':\n case 'everywhere':\n qualifierInput.value = '1';\n valueInput.value = '';\n betterInput.style.display = 'none';\n qualifierInput.style.display = 'none';\n break;\n\n case 'is_single':\n case 'is_post':\n betterInput.placeholder = i18n.enterCommaSeparatedPosts;\n $betterInput.suggest(ajaxurl + '?action=boxzilla_autocomplete&type=post', {\n multiple: true,\n multipleSep: ','\n });\n break;\n\n case 'is_page':\n betterInput.placeholder = i18n.enterCommaSeparatedPages;\n $betterInput.suggest(ajaxurl + '?action=boxzilla_autocomplete&type=page', {\n multiple: true,\n multipleSep: ','\n });\n break;\n\n case 'is_post_type':\n betterInput.placeholder = i18n.enterCommaSeparatedPostTypes;\n $betterInput.suggest(ajaxurl + '?action=boxzilla_autocomplete&type=post_type', {\n multiple: true,\n multipleSep: ','\n });\n break;\n\n case 'is_url':\n qualifierInput.querySelector('option[value=\"contains\"]').style.display = '';\n qualifierInput.querySelector('option[value=\"not_contains\"]').style.display = '';\n betterInput.placeholder = i18n.enterCommaSeparatedRelativeUrls;\n break;\n\n case 'is_post_in_category':\n $betterInput.suggest(ajaxurl + '?action=boxzilla_autocomplete&type=category', {\n multiple: true,\n multipleSep: ','\n });\n break;\n\n case 'is_post_with_tag':\n $betterInput.suggest(ajaxurl + '?action=boxzilla_autocomplete&type=post_tag', {\n multiple: true,\n multipleSep: ','\n });\n break;\n\n case 'is_user_logged_in':\n betterInput.style.display = 'none';\n valueInput.parentNode.insertBefore(tnLoggedIn, valueInput.nextSibling);\n break;\n\n case 'is_referer':\n qualifierInput.querySelector('option[value=\"contains\"]').style.display = '';\n qualifierInput.querySelector('option[value=\"not_contains\"]').style.display = '';\n break;\n }\n}\n\nfunction addRuleFields() {\n var data = {\n key: optionControls.querySelectorAll('.boxzilla-rule-row').length,\n andor: ruleComparisonEl.value === 'any' ? i18n.or : i18n.and\n };\n var html = rowTemplate(data);\n $(rulesContainerEl).append(html);\n return false;\n}\n\nmodule.exports = {\n Designer: Designer,\n Option: Option,\n events: events\n};\n\n},{\"./_designer.js\":3,\"./_option.js\":4,\"wolfy87-eventemitter\":5}],3:[function(require,module,exports){\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar Designer = function Designer($, Option, events) {\n // vars\n var boxId = document.getElementById('post_ID').value || 0;\n var $editor;\n var $editorFrame;\n var $innerEditor;\n var options = {};\n var visualEditorInitialised = false;\n var $appearanceControls = $('#boxzilla-box-appearance-controls'); // functions\n\n function init() {\n // Only run if TinyMCE has actually inited\n if (_typeof(window.tinyMCE) !== 'object' || window.tinyMCE.get('content') === null) {\n return;\n } // create Option objects\n\n\n options.borderColor = new Option('border-color');\n options.borderWidth = new Option('border-width');\n options.borderStyle = new Option('border-style');\n options.backgroundColor = new Option('background-color');\n options.width = new Option('width');\n options.color = new Option('color'); // add classes to TinyMCE <html>\n\n $editorFrame = $('#content_ifr');\n $editor = $editorFrame.contents().find('html');\n $editor.css({\n background: 'white'\n }); // add content class and padding to TinyMCE <body>\n\n $innerEditor = $editor.find('#tinymce');\n $innerEditor.addClass('boxzilla boxzilla-' + boxId);\n $innerEditor.css({\n margin: 0,\n background: 'white',\n display: 'inline-block',\n width: 'auto',\n 'min-width': '240px',\n position: 'relative'\n });\n $innerEditor.get(0).style.cssText += ';padding: 25px !important;';\n visualEditorInitialised = true;\n /* @since 2.0.3 */\n\n events.trigger('editor.init');\n }\n /**\n * Applies the styles from the options to the TinyMCE Editor\n *\n * @return bool\n */\n\n\n function applyStyles() {\n if (!visualEditorInitialised) {\n return false;\n } // Apply styles from CSS editor.\n // Use short timeout to make sure color values are updated.\n\n\n window.setTimeout(function () {\n $innerEditor.css({\n 'border-color': options.borderColor.getColorValue(),\n // getColorValue( 'borderColor', '' ),\n 'border-width': options.borderWidth.getPxValue(),\n // getPxValue( 'borderWidth', '' ),\n 'border-style': options.borderStyle.getValue(),\n // getValue('borderStyle', '' ),\n 'background-color': options.backgroundColor.getColorValue(),\n // getColorValue( 'backgroundColor', ''),\n width: options.width.getPxValue(),\n // getPxValue( 'width', 'auto' ),\n color: options.color.getColorValue() // getColorValue( 'color', '' )\n\n });\n /* @since 2.0.3 */\n\n events.trigger('editor.styles.apply');\n }, 10);\n return true;\n }\n\n function resetStyles() {\n for (var key in options) {\n if (key.substring(0, 5) === 'theme') {\n continue;\n }\n\n options[key].clear();\n }\n\n applyStyles();\n /* @since 2.0.3 */\n\n events.trigger('editor.styles.reset');\n } // event binders\n\n\n $appearanceControls.find('input.boxzilla-color-field').wpColorPicker({\n change: applyStyles,\n clear: applyStyles\n });\n $appearanceControls.find(':input').not('.boxzilla-color-field').change(applyStyles);\n events.on('editor.init', applyStyles); // public methods\n\n return {\n init: init,\n resetStyles: resetStyles,\n options: options\n };\n};\n\nmodule.exports = Designer;\n\n},{}],4:[function(require,module,exports){\n\"use strict\";\n\nvar $ = window.jQuery;\n\nvar Option = function Option(element) {\n // find corresponding element\n if (typeof element === 'string') {\n element = document.getElementById('boxzilla-' + element);\n }\n\n if (!element) {\n console.error('Unable to find option element.');\n }\n\n this.element = element;\n};\n\nOption.prototype.getColorValue = function () {\n if (this.element.value.length > 0) {\n if ($(this.element).hasClass('wp-color-field')) {\n return $(this.element).wpColorPicker('color');\n } else {\n return this.element.value;\n }\n }\n\n return '';\n};\n\nOption.prototype.getPxValue = function (fallbackValue) {\n if (this.element.value.length > 0) {\n return parseInt(this.element.value) + 'px';\n }\n\n return fallbackValue || '';\n};\n\nOption.prototype.getValue = function (fallbackValue) {\n if (this.element.value.length > 0) {\n return this.element.value;\n }\n\n return fallbackValue || '';\n};\n\nOption.prototype.clear = function () {\n this.element.value = '';\n};\n\nOption.prototype.setValue = function (value) {\n this.element.value = value;\n};\n\nmodule.exports = Option;\n\n},{}],5:[function(require,module,exports){\n/*!\n * EventEmitter v5.2.9 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - https://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\n }\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}(typeof window !== 'undefined' ? window : this || {}));\n\n},{}]},{},[1]);\n; })();"],"names":["require","undefined","define","r","e","n","t","o","i","f","c","u","a","Error","code","p","exports","call","length","1","module","window","Boxzilla_Admin","./admin/_admin.js","2","$","jQuery","Option","optionControls","document","getElementById","$optionControls","tnLoggedIn","createTextNode","events","Designer","rowTemplate","wp","template","i18n","boxzilla_i18n","ruleComparisonEl","rulesContainerEl","ajaxurl","toggleAndOrTexts","newText","value","or","and","text","toggleTriggerOptions","find","toggle","this","removeRule","row","parents","prev","remove","setContextualHelpers","context","tagName","toLowerCase","get","condition","querySelector","valueInput","qualifierInput","betterInput","cloneNode","$betterInput","querySelectorAll","removeAttribute","className","parentNode","insertBefore","nextSibling","change","style","display","removeChild","placeholder","enterCommaSeparatedValues","enterCommaSeparatedPosts","suggest","multiple","multipleSep","enterCommaSeparatedPages","enterCommaSeparatedPostTypes","enterCommaSeparatedRelativeUrls","addRuleFields","data","key","andor","html","append","load","tinyMCE","on","each","./_designer.js","./_option.js","wolfy87-eventemitter","3","_typeof","obj","Symbol","iterator","constructor","prototype","$editor","$editorFrame","$innerEditor","boxId","options","visualEditorInitialised","$appearanceControls","applyStyles","setTimeout","css","border-color","borderColor","getColorValue","border-width","borderWidth","getPxValue","border-style","borderStyle","getValue","background-color","backgroundColor","width","color","trigger","wpColorPicker","clear","not","init","contents","background","addClass","margin","min-width","position","cssText","resetStyles","substring","4","element","console","error","hasClass","fallbackValue","parseInt","setValue","5","EventEmitter","proto","originalGlobalValue","indexOfListener","listeners","listener","alias","name","apply","arguments","getListeners","evt","response","_getEvents","RegExp","hasOwnProperty","test","flattenListeners","flatListeners","push","getListenersAsObject","Array","addListener","isValidListener","TypeError","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","index","splice","off","addListeners","manipulateListeners","removeListeners","single","removeEvent","type","_events","removeAllListeners","emitEvent","args","listenersMap","slice","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict","amd"],"mappings":"CAAA,WAAe,IAAIA,OAAUC,EAAgEC,OAASD,GAAuB,SAASE,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAA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E,UAAU6F,MAAMzL,KAAKoJ,UAAW,GACjD,OAAOhH,KAAKkJ,UAAUhC,EAAKiC,IAW/B3C,EAAMgD,mBAAqB,SAA4B/J,GAEnD,OADAO,KAAKyJ,iBAAmBhK,EACjBO,MAWXwG,EAAM8C,oBAAsB,WACxB,OAAItJ,KAAKsH,eAAe,qBACbtH,KAAKyJ,kBAapBjD,EAAMY,WAAa,WACf,OAAOpH,KAAKgJ,UAAYhJ,KAAKgJ,QAAU,KAQ3CzC,EAAamD,WAAa,WAEtB,OADA/L,EAAQ4I,aAAeE,EAChBF,GAIW,mBAAX1J,GAAyBA,EAAO8M,IACvC9M,EAAO,WACH,OAAO0J,IAGY,iBAAXxI,GAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAU4I,EAGjB5I,EAAQ4I,aAAeA,EA5d9B,CA8dmB,oBAAXvI,OAAyBA,OAASgC,MAAQ,KAEjD,KAAK,GAAG,CAAC,IAl0BX"}
1
+ {"version":3,"file":"admin-script.min.js","sources":["admin-script.js"],"sourcesContent":["(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n\"use strict\";\n\nwindow.Boxzilla_Admin = require('./admin/_admin.js');\n\n},{\"./admin/_admin.js\":2}],2:[function(require,module,exports){\n\"use strict\";\n\nvar $ = window.jQuery;\n\nvar Option = require('./_option.js');\n\nvar optionControls = document.getElementById('boxzilla-box-options-controls');\nvar $optionControls = $(optionControls);\nvar tnLoggedIn = document.createTextNode(' logged in');\n\nvar EventEmitter = require('wolfy87-eventemitter');\n\nvar events = new EventEmitter();\n\nvar Designer = require('./_designer.js')($, Option, events);\n\nvar rowTemplate = window.wp.template('rule-row-template');\nvar i18n = window.boxzilla_i18n;\nvar ruleComparisonEl = document.getElementById('boxzilla-rule-comparison');\nvar rulesContainerEl = document.getElementById('boxzilla-box-rules');\nvar ajaxurl = window.ajaxurl; // events\n\n$(window).on('load', function () {\n if (typeof window.tinyMCE === 'undefined') {\n document.getElementById('notice-notinymce').style.display = '';\n }\n\n $optionControls.on('click', '.boxzilla-add-rule', addRuleFields);\n $optionControls.on('click', '.boxzilla-remove-rule', removeRule);\n $optionControls.on('change', '.boxzilla-rule-condition', setContextualHelpers);\n $optionControls.find('.boxzilla-auto-show-trigger').on('change', toggleTriggerOptions);\n $(ruleComparisonEl).change(toggleAndOrTexts);\n $('.boxzilla-rule-row').each(setContextualHelpers);\n});\n\nfunction toggleAndOrTexts() {\n var newText = ruleComparisonEl.value === 'any' ? i18n.or : i18n.and;\n $('.boxzilla-andor').text(newText);\n}\n\nfunction toggleTriggerOptions() {\n $optionControls.find('.boxzilla-trigger-options').toggle(this.value !== '');\n}\n\nfunction removeRule() {\n var row = $(this).parents('tr'); // delete andor row\n\n row.prev().remove(); // delete rule row\n\n row.remove();\n}\n\nfunction setContextualHelpers() {\n var context = this.tagName.toLowerCase() === 'tr' ? this : $(this).parents('tr').get(0);\n var condition = context.querySelector('.boxzilla-rule-condition').value;\n var valueInput = context.querySelector('.boxzilla-rule-value');\n var qualifierInput = context.querySelector('.boxzilla-rule-qualifier');\n var betterInput = valueInput.cloneNode(true);\n var $betterInput = $(betterInput); // remove previously added helpers\n\n $(context.querySelectorAll('.boxzilla-helper')).remove(); // prepare better input\n\n betterInput.removeAttribute('name');\n betterInput.className = betterInput.className + ' boxzilla-helper';\n valueInput.parentNode.insertBefore(betterInput, valueInput.nextSibling);\n $betterInput.change(function () {\n valueInput.value = this.value;\n });\n betterInput.style.display = '';\n valueInput.style.display = 'none';\n qualifierInput.style.display = '';\n qualifierInput.querySelector('option[value=\"not_contains\"]').style.display = 'none';\n qualifierInput.querySelector('option[value=\"contains\"]').style.display = 'none';\n\n if (tnLoggedIn.parentNode) {\n tnLoggedIn.parentNode.removeChild(tnLoggedIn);\n } // change placeholder for textual help\n\n\n switch (condition) {\n default:\n betterInput.placeholder = i18n.enterCommaSeparatedValues;\n break;\n\n case '':\n case 'everywhere':\n qualifierInput.value = '1';\n valueInput.value = '';\n betterInput.style.display = 'none';\n qualifierInput.style.display = 'none';\n break;\n\n case 'is_single':\n case 'is_post':\n betterInput.placeholder = i18n.enterCommaSeparatedPosts;\n $betterInput.suggest(ajaxurl + '?action=boxzilla_autocomplete&type=post', {\n multiple: true,\n multipleSep: ','\n });\n break;\n\n case 'is_page':\n betterInput.placeholder = i18n.enterCommaSeparatedPages;\n $betterInput.suggest(ajaxurl + '?action=boxzilla_autocomplete&type=page', {\n multiple: true,\n multipleSep: ','\n });\n break;\n\n case 'is_post_type':\n betterInput.placeholder = i18n.enterCommaSeparatedPostTypes;\n $betterInput.suggest(ajaxurl + '?action=boxzilla_autocomplete&type=post_type', {\n multiple: true,\n multipleSep: ','\n });\n break;\n\n case 'is_url':\n qualifierInput.querySelector('option[value=\"contains\"]').style.display = '';\n qualifierInput.querySelector('option[value=\"not_contains\"]').style.display = '';\n betterInput.placeholder = i18n.enterCommaSeparatedRelativeUrls;\n break;\n\n case 'is_post_in_category':\n $betterInput.suggest(ajaxurl + '?action=boxzilla_autocomplete&type=category', {\n multiple: true,\n multipleSep: ','\n });\n break;\n\n case 'is_post_with_tag':\n $betterInput.suggest(ajaxurl + '?action=boxzilla_autocomplete&type=post_tag', {\n multiple: true,\n multipleSep: ','\n });\n break;\n\n case 'is_user_logged_in':\n betterInput.style.display = 'none';\n valueInput.parentNode.insertBefore(tnLoggedIn, valueInput.nextSibling);\n break;\n\n case 'is_referer':\n qualifierInput.querySelector('option[value=\"contains\"]').style.display = '';\n qualifierInput.querySelector('option[value=\"not_contains\"]').style.display = '';\n break;\n }\n}\n\nfunction addRuleFields() {\n var data = {\n key: optionControls.querySelectorAll('.boxzilla-rule-row').length,\n andor: ruleComparisonEl.value === 'any' ? i18n.or : i18n.and\n };\n var html = rowTemplate(data);\n $(rulesContainerEl).append(html);\n return false;\n}\n\nmodule.exports = {\n Designer: Designer,\n Option: Option,\n events: events\n};\n\n},{\"./_designer.js\":3,\"./_option.js\":4,\"wolfy87-eventemitter\":5}],3:[function(require,module,exports){\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar Designer = function Designer($, Option, events) {\n // vars\n var boxId = document.getElementById('post_ID').value || 0;\n var $editor;\n var $editorFrame;\n var $innerEditor;\n var options = {};\n var visualEditorInitialised = false;\n var $appearanceControls = $('#boxzilla-box-appearance-controls'); // functions\n\n function init() {\n // Only run if TinyMCE has actually inited\n if (_typeof(window.tinyMCE) !== 'object' || window.tinyMCE.get('content') === null) {\n return;\n } // create Option objects\n\n\n options.borderColor = new Option('border-color');\n options.borderWidth = new Option('border-width');\n options.borderStyle = new Option('border-style');\n options.backgroundColor = new Option('background-color');\n options.width = new Option('width');\n options.color = new Option('color'); // add classes to TinyMCE <html>\n\n $editorFrame = $('#content_ifr');\n $editor = $editorFrame.contents().find('html');\n $editor.css({\n background: 'white'\n }); // add content class and padding to TinyMCE <body>\n\n $innerEditor = $editor.find('#tinymce');\n $innerEditor.addClass('boxzilla boxzilla-' + boxId);\n $innerEditor.css({\n margin: 0,\n background: 'white',\n display: 'inline-block',\n width: 'auto',\n 'min-width': '240px',\n position: 'relative'\n });\n $innerEditor.get(0).style.cssText += ';padding: 25px !important;';\n visualEditorInitialised = true;\n /* @since 2.0.3 */\n\n events.trigger('editor.init');\n }\n /**\n * Applies the styles from the options to the TinyMCE Editor\n *\n * @return bool\n */\n\n\n function applyStyles() {\n if (!visualEditorInitialised) {\n return false;\n } // Apply styles from CSS editor.\n // Use short timeout to make sure color values are updated.\n\n\n window.setTimeout(function () {\n $innerEditor.css({\n 'border-color': options.borderColor.getColorValue(),\n // getColorValue( 'borderColor', '' ),\n 'border-width': options.borderWidth.getPxValue(),\n // getPxValue( 'borderWidth', '' ),\n 'border-style': options.borderStyle.getValue(),\n // getValue('borderStyle', '' ),\n 'background-color': options.backgroundColor.getColorValue(),\n // getColorValue( 'backgroundColor', ''),\n width: options.width.getPxValue(),\n // getPxValue( 'width', 'auto' ),\n color: options.color.getColorValue() // getColorValue( 'color', '' )\n\n });\n /* @since 2.0.3 */\n\n events.trigger('editor.styles.apply');\n }, 10);\n return true;\n }\n\n function resetStyles() {\n for (var key in options) {\n if (key.substring(0, 5) === 'theme') {\n continue;\n }\n\n options[key].clear();\n }\n\n applyStyles();\n /* @since 2.0.3 */\n\n events.trigger('editor.styles.reset');\n } // event binders\n\n\n $appearanceControls.find('input.boxzilla-color-field').wpColorPicker({\n change: applyStyles,\n clear: applyStyles\n });\n $appearanceControls.find(':input').not('.boxzilla-color-field').change(applyStyles);\n events.on('editor.init', applyStyles); // public methods\n\n return {\n init: init,\n resetStyles: resetStyles,\n options: options\n };\n};\n\nmodule.exports = Designer;\n\n},{}],4:[function(require,module,exports){\n\"use strict\";\n\nvar $ = window.jQuery;\n\nvar Option = function Option(element) {\n // find corresponding element\n if (typeof element === 'string') {\n element = document.getElementById('boxzilla-' + element);\n }\n\n if (!element) {\n console.error('Unable to find option element.');\n }\n\n this.element = element;\n};\n\nOption.prototype.getColorValue = function () {\n if (this.element.value.length > 0) {\n if ($(this.element).hasClass('wp-color-field')) {\n return $(this.element).wpColorPicker('color');\n } else {\n return this.element.value;\n }\n }\n\n return '';\n};\n\nOption.prototype.getPxValue = function (fallbackValue) {\n if (this.element.value.length > 0) {\n return parseInt(this.element.value) + 'px';\n }\n\n return fallbackValue || '';\n};\n\nOption.prototype.getValue = function (fallbackValue) {\n if (this.element.value.length > 0) {\n return this.element.value;\n }\n\n return fallbackValue || '';\n};\n\nOption.prototype.clear = function () {\n this.element.value = '';\n};\n\nOption.prototype.setValue = function (value) {\n this.element.value = value;\n};\n\nmodule.exports = Option;\n\n},{}],5:[function(require,module,exports){\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\n * EventEmitter v5.2.9 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - https://oli.me.uk/\n * @preserve\n */\n;\n\n(function (exports) {\n 'use strict';\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n\n function EventEmitter() {} // Shortcuts to improve speed and size\n\n\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n\n\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n\n\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n\n var response;\n var key; // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n\n if (evt instanceof RegExp) {\n response = {};\n\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n } else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n\n\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n\n\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener(listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true;\n } else if (listener && _typeof(listener) === 'object') {\n return isValidListener(listener.listener);\n } else {\n return false;\n }\n }\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = _typeof(listener) === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n /**\n * Alias of addListener\n */\n\n\n proto.on = alias('addListener');\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n /**\n * Alias of addOnceListener.\n */\n\n\n proto.once = alias('addOnceListener');\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n\n return this;\n };\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n /**\n * Alias of removeListener\n */\n\n\n proto.off = alias('removeListener');\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners; // If evt is an object then pass each of its properties to this method\n\n if (_typeof(evt) === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n } else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n } else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.removeEvent = function removeEvent(evt) {\n var type = _typeof(evt);\n\n var events = this._getEvents();\n\n var key; // Remove different things depending on the state of evt\n\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n } else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n } else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n\n\n proto.removeAllListeners = alias('removeEvent');\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n /**\n * Alias of emitEvent\n */\n\n\n proto.trigger = alias('emitEvent');\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n\n\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n } else {\n return true;\n }\n };\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n\n\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n\n\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n }; // Expose the class either via AMD, CommonJS or the global object\n\n\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n } else if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === 'object' && module.exports) {\n module.exports = EventEmitter;\n } else {\n exports.EventEmitter = EventEmitter;\n }\n})(typeof window !== 'undefined' ? window : void 0 || {});\n\n},{}]},{},[1]);\n; })();"],"names":["require","undefined","define","r","e","n","t","o","i","f","c","u","a","Error","code","p","exports","call","length","1","module","window","Boxzilla_Admin","./admin/_admin.js","2","$","jQuery","Option","optionControls","document","getElementById","$optionControls","tnLoggedIn","createTextNode","events","Designer","rowTemplate","wp","template","i18n","boxzilla_i18n","ruleComparisonEl","rulesContainerEl","ajaxurl","toggleAndOrTexts","newText","value","or","and","text","toggleTriggerOptions","find","toggle","this","removeRule","row","parents","prev","remove","setContextualHelpers","context","tagName","toLowerCase","get","condition","querySelector","valueInput","qualifierInput","betterInput","cloneNode","$betterInput","querySelectorAll","removeAttribute","className","parentNode","insertBefore","nextSibling","change","style","display","removeChild","placeholder","enterCommaSeparatedValues","enterCommaSeparatedPosts","suggest","multiple","multipleSep","enterCommaSeparatedPages","enterCommaSeparatedPostTypes","enterCommaSeparatedRelativeUrls","addRuleFields","data","key","andor","html","append","on","tinyMCE","each","./_designer.js","./_option.js","wolfy87-eventemitter","3","_typeof","obj","Symbol","iterator","constructor","prototype","$editor","$editorFrame","$innerEditor","boxId","options","visualEditorInitialised","$appearanceControls","applyStyles","setTimeout","css","border-color","borderColor","getColorValue","border-width","borderWidth","getPxValue","border-style","borderStyle","getValue","background-color","backgroundColor","width","color","trigger","wpColorPicker","clear","not","init","contents","background","addClass","margin","min-width","position","cssText","resetStyles","substring","4","element","console","error","hasClass","fallbackValue","parseInt","setValue","5","EventEmitter","indexOfListener","listeners","listener","alias","name","apply","arguments","proto","originalGlobalValue","getListeners","evt","response","_getEvents","RegExp","hasOwnProperty","test","flattenListeners","flatListeners","push","getListenersAsObject","Array","addListener","isValidListener","TypeError","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","index","splice","off","addListeners","manipulateListeners","removeListeners","single","removeEvent","type","_events","removeAllListeners","emitEvent","args","listenersMap","slice","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict","amd"],"mappings":"CAAA,WAAe,IAAIA,OAAUC,EAAgEC,OAASD,GAAuB,SAASE,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,EAAE,mBAAmBV,GAASA,EAAQ,IAAIS,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGG,EAAE,OAAOA,EAAEH,GAAE,GAAkD,MAA1CI,EAAE,IAAIC,MAAM,uBAAuBL,EAAE,MAAaM,KAAK,mBAAmBF,EAAMG,EAAEV,EAAEG,GAAG,CAACQ,QAAQ,IAAIZ,EAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAoB,OAAOI,EAAlBH,EAAEI,GAAG,GAAGL,IAAeA,IAAIY,EAAEA,EAAEC,QAAQb,EAAEC,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGQ,QAAQ,IAAI,IAAIL,EAAE,mBAAmBX,GAASA,EAAQQ,EAAE,EAAEA,EAAEF,EAAEY,OAAOV,IAAID,EAAED,EAAEE,IAAI,OAAOD,EAA7b,CAA4c,CAACY,EAAE,CAAC,SA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WAAa,WACjB,OAAOnH,KAAK+I,UAAY/I,KAAK+I,QAAU,KASzCzC,EAAamD,WAAa,WAExB,OADA9L,EAAQ2I,aAAeS,EAChBT,GAIa,mBAAXzJ,GAAyBA,EAAO6M,IACzC7M,EAAO,WACL,OAAOyJ,IAEoE,iBAAjD,IAAXvI,EAAyB,YAAcmF,EAAQnF,KAAyBA,EAAOJ,QAChGI,EAAOJ,QAAU2I,EAEjB3I,EAAQ2I,aAAeA,GAIzB,KAAK,GAAG,CAAC,IAt1BX"}
assets/js/script.js CHANGED
@@ -1,138 +1,6 @@
1
  (function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
2
  "use strict";
3
 
4
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5
-
6
- (function () {
7
- var Boxzilla = require('boxzilla');
8
-
9
- var options = window.boxzilla_options; // helper function for setting CSS styles
10
-
11
- function css(element, styles) {
12
- if (styles.background_color) {
13
- element.style.background = styles.background_color;
14
- }
15
-
16
- if (styles.color) {
17
- element.style.color = styles.color;
18
- }
19
-
20
- if (styles.border_color) {
21
- element.style.borderColor = styles.border_color;
22
- }
23
-
24
- if (styles.border_width) {
25
- element.style.borderWidth = parseInt(styles.border_width) + 'px';
26
- }
27
-
28
- if (styles.border_style) {
29
- element.style.borderStyle = styles.border_style;
30
- }
31
-
32
- if (styles.width) {
33
- element.style.maxWidth = parseInt(styles.width) + 'px';
34
- }
35
- }
36
-
37
- function createBoxesFromConfig() {
38
- // failsafe against including script twice.
39
- if (options.inited) {
40
- return;
41
- } // create boxes from options
42
-
43
-
44
- for (var key in options.boxes) {
45
- // get opts
46
- var boxOpts = options.boxes[key];
47
- boxOpts.testMode = isLoggedIn && options.testMode; // find box content element, bail if not found
48
-
49
- var boxContentElement = document.getElementById('boxzilla-box-' + boxOpts.id + '-content');
50
-
51
- if (!boxContentElement) {
52
- continue;
53
- } // use element as content option
54
-
55
-
56
- boxOpts.content = boxContentElement; // create box
57
-
58
- var box = Boxzilla.create(boxOpts.id, boxOpts); // add box slug to box element as classname
59
-
60
- box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug; // add custom css to box
61
-
62
- css(box.element, boxOpts.css);
63
-
64
- try {
65
- box.element.firstChild.firstChild.className += ' first-child';
66
- box.element.firstChild.lastChild.className += ' last-child';
67
- } catch (e) {} // maybe show box right away
68
-
69
-
70
- if (box.fits() && locationHashRefersBox(box)) {
71
- box.show();
72
- }
73
- } // set flag to prevent initialising twice
74
-
75
-
76
- options.inited = true; // trigger "done" event.
77
-
78
- Boxzilla.trigger('done'); // maybe open box with MC4WP form in it
79
-
80
- maybeOpenMailChimpForWordPressBox();
81
- }
82
-
83
- function locationHashRefersBox(box) {
84
- if (!window.location.hash || window.location.hash.length === 0) {
85
- return false;
86
- } // parse "boxzilla-{id}" from location hash
87
-
88
-
89
- var match = window.location.hash.match(/[#&](boxzilla-\d+)/);
90
-
91
- if (!match || _typeof(match) !== 'object' || match.length < 2) {
92
- return false;
93
- }
94
-
95
- var elementId = match[1];
96
-
97
- if (elementId === box.element.id) {
98
- return true;
99
- } else if (box.element.querySelector('#' + elementId)) {
100
- return true;
101
- }
102
-
103
- return false;
104
- }
105
-
106
- function maybeOpenMailChimpForWordPressBox() {
107
- if ((_typeof(window.mc4wp_forms_config) !== 'object' || !window.mc4wp_forms_config.submitted_form) && _typeof(window.mc4wp_submitted_form) !== 'object') {
108
- return;
109
- }
110
-
111
- var form = window.mc4wp_submitted_form || window.mc4wp_forms_config.submitted_form;
112
- var selector = '#' + form.element_id;
113
- Boxzilla.boxes.forEach(function (box) {
114
- if (box.element.querySelector(selector)) {
115
- box.show();
116
- }
117
- });
118
- } // print message when test mode is enabled
119
-
120
-
121
- var isLoggedIn = document.body && document.body.className && document.body.className.indexOf('logged-in') > -1;
122
-
123
- if (isLoggedIn && options.testMode) {
124
- console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\'re done testing.');
125
- } // init boxzilla
126
-
127
-
128
- Boxzilla.init(); // on window.load, create DOM elements for boxes
129
-
130
- window.addEventListener('load', createBoxesFromConfig);
131
- })();
132
-
133
- },{"boxzilla":4}],2:[function(require,module,exports){
134
- "use strict";
135
-
136
  var duration = 320;
137
 
138
  function css(element, styles) {
@@ -318,7 +186,7 @@ module.exports = {
318
  animated: animated
319
  };
320
 
321
- },{}],3:[function(require,module,exports){
322
  "use strict";
323
 
324
  var defaults = {
@@ -382,6 +250,7 @@ function Box(id, config, fireEvent) {
382
  this.config = merge(defaults, config); // add overlay element to dom and store ref to overlay
383
 
384
  this.overlay = document.createElement('div');
 
385
  this.overlay.style.display = 'none';
386
  this.overlay.id = 'boxzilla-overlay-' + this.id;
387
  this.overlay.classList.add('boxzilla-overlay');
@@ -685,7 +554,7 @@ Box.prototype.dismiss = function (animate) {
685
 
686
  module.exports = Box;
687
 
688
- },{"./animator.js":2}],4:[function(require,module,exports){
689
  "use strict";
690
 
691
  var Box = require('./box.js');
@@ -869,13 +738,13 @@ if (typeof module !== 'undefined' && module.exports) {
869
  module.exports = Boxzilla;
870
  }
871
 
872
- },{"./box.js":3,"./styles.js":5,"./triggers/exit-intent.js":7,"./triggers/pageviews.js":8,"./triggers/scroll.js":9,"./triggers/time.js":10,"./util.js":11}],5:[function(require,module,exports){
873
  "use strict";
874
 
875
  var styles = "#boxzilla-overlay,.boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:10000}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:11000;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:12000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}";
876
  module.exports = styles;
877
 
878
- },{}],6:[function(require,module,exports){
879
  "use strict";
880
 
881
  var Timer = function Timer() {
@@ -902,7 +771,7 @@ Timer.prototype.stop = function () {
902
 
903
  module.exports = Timer;
904
 
905
- },{}],7:[function(require,module,exports){
906
  "use strict";
907
 
908
  module.exports = function (boxes) {
@@ -992,7 +861,7 @@ module.exports = function (boxes) {
992
  document.documentElement.addEventListener('click', clearTimeout);
993
  };
994
 
995
- },{}],8:[function(require,module,exports){
996
  "use strict";
997
 
998
  module.exports = function (boxes) {
@@ -1014,7 +883,7 @@ module.exports = function (boxes) {
1014
  }, 1000);
1015
  };
1016
 
1017
- },{}],9:[function(require,module,exports){
1018
  "use strict";
1019
 
1020
  var throttle = require('../util.js').throttle;
@@ -1042,7 +911,7 @@ module.exports = function (boxes) {
1042
  window.addEventListener('scroll', throttle(checkHeightCriteria), true);
1043
  };
1044
 
1045
- },{"../util.js":11}],10:[function(require,module,exports){
1046
  "use strict";
1047
 
1048
  var Timer = require('../timer.js');
@@ -1089,7 +958,7 @@ module.exports = function (boxes) {
1089
  }, 1000);
1090
  };
1091
 
1092
- },{"../timer.js":6}],11:[function(require,module,exports){
1093
  "use strict";
1094
 
1095
  function throttle(fn, threshold, scope) {
@@ -1119,5 +988,137 @@ module.exports = {
1119
  throttle: throttle
1120
  };
1121
 
1122
- },{}]},{},[1]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1123
  ; })();
1
  (function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
2
  "use strict";
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  var duration = 320;
5
 
6
  function css(element, styles) {
186
  animated: animated
187
  };
188
 
189
+ },{}],2:[function(require,module,exports){
190
  "use strict";
191
 
192
  var defaults = {
250
  this.config = merge(defaults, config); // add overlay element to dom and store ref to overlay
251
 
252
  this.overlay = document.createElement('div');
253
+ this.overlay.setAttribute('aria-modal', true);
254
  this.overlay.style.display = 'none';
255
  this.overlay.id = 'boxzilla-overlay-' + this.id;
256
  this.overlay.classList.add('boxzilla-overlay');
554
 
555
  module.exports = Box;
556
 
557
+ },{"./animator.js":1}],3:[function(require,module,exports){
558
  "use strict";
559
 
560
  var Box = require('./box.js');
738
  module.exports = Boxzilla;
739
  }
740
 
741
+ },{"./box.js":2,"./styles.js":4,"./triggers/exit-intent.js":6,"./triggers/pageviews.js":7,"./triggers/scroll.js":8,"./triggers/time.js":9,"./util.js":10}],4:[function(require,module,exports){
742
  "use strict";
743
 
744
  var styles = "#boxzilla-overlay,.boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:10000}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:11000;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:12000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}";
745
  module.exports = styles;
746
 
747
+ },{}],5:[function(require,module,exports){
748
  "use strict";
749
 
750
  var Timer = function Timer() {
771
 
772
  module.exports = Timer;
773
 
774
+ },{}],6:[function(require,module,exports){
775
  "use strict";
776
 
777
  module.exports = function (boxes) {
861
  document.documentElement.addEventListener('click', clearTimeout);
862
  };
863
 
864
+ },{}],7:[function(require,module,exports){
865
  "use strict";
866
 
867
  module.exports = function (boxes) {
883
  }, 1000);
884
  };
885
 
886
+ },{}],8:[function(require,module,exports){
887
  "use strict";
888
 
889
  var throttle = require('../util.js').throttle;
911
  window.addEventListener('scroll', throttle(checkHeightCriteria), true);
912
  };
913
 
914
+ },{"../util.js":10}],9:[function(require,module,exports){
915
  "use strict";
916
 
917
  var Timer = require('../timer.js');
958
  }, 1000);
959
  };
960
 
961
+ },{"../timer.js":5}],10:[function(require,module,exports){
962
  "use strict";
963
 
964
  function throttle(fn, threshold, scope) {
988
  throttle: throttle
989
  };
990
 
991
+ },{}],11:[function(require,module,exports){
992
+ "use strict";
993
+
994
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
995
+
996
+ (function () {
997
+ var Boxzilla = require('./boxzilla/boxzilla.js');
998
+
999
+ var options = window.boxzilla_options; // helper function for setting CSS styles
1000
+
1001
+ function css(element, styles) {
1002
+ if (styles.background_color) {
1003
+ element.style.background = styles.background_color;
1004
+ }
1005
+
1006
+ if (styles.color) {
1007
+ element.style.color = styles.color;
1008
+ }
1009
+
1010
+ if (styles.border_color) {
1011
+ element.style.borderColor = styles.border_color;
1012
+ }
1013
+
1014
+ if (styles.border_width) {
1015
+ element.style.borderWidth = parseInt(styles.border_width) + 'px';
1016
+ }
1017
+
1018
+ if (styles.border_style) {
1019
+ element.style.borderStyle = styles.border_style;
1020
+ }
1021
+
1022
+ if (styles.width) {
1023
+ element.style.maxWidth = parseInt(styles.width) + 'px';
1024
+ }
1025
+ }
1026
+
1027
+ function createBoxesFromConfig() {
1028
+ // failsafe against including script twice.
1029
+ if (options.inited) {
1030
+ return;
1031
+ } // create boxes from options
1032
+
1033
+
1034
+ for (var key in options.boxes) {
1035
+ // get opts
1036
+ var boxOpts = options.boxes[key];
1037
+ boxOpts.testMode = isLoggedIn && options.testMode; // find box content element, bail if not found
1038
+
1039
+ var boxContentElement = document.getElementById('boxzilla-box-' + boxOpts.id + '-content');
1040
+
1041
+ if (!boxContentElement) {
1042
+ continue;
1043
+ } // use element as content option
1044
+
1045
+
1046
+ boxOpts.content = boxContentElement; // create box
1047
+
1048
+ var box = Boxzilla.create(boxOpts.id, boxOpts); // add box slug to box element as classname
1049
+
1050
+ box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug; // add custom css to box
1051
+
1052
+ css(box.element, boxOpts.css);
1053
+
1054
+ try {
1055
+ box.element.firstChild.firstChild.className += ' first-child';
1056
+ box.element.firstChild.lastChild.className += ' last-child';
1057
+ } catch (e) {} // maybe show box right away
1058
+
1059
+
1060
+ if (box.fits() && locationHashRefersBox(box)) {
1061
+ box.show();
1062
+ }
1063
+ } // set flag to prevent initialising twice
1064
+
1065
+
1066
+ options.inited = true; // trigger "done" event.
1067
+
1068
+ Boxzilla.trigger('done'); // maybe open box with MC4WP form in it
1069
+
1070
+ maybeOpenMailChimpForWordPressBox();
1071
+ }
1072
+
1073
+ function locationHashRefersBox(box) {
1074
+ if (!window.location.hash || window.location.hash.length === 0) {
1075
+ return false;
1076
+ } // parse "boxzilla-{id}" from location hash
1077
+
1078
+
1079
+ var match = window.location.hash.match(/[#&](boxzilla-\d+)/);
1080
+
1081
+ if (!match || _typeof(match) !== 'object' || match.length < 2) {
1082
+ return false;
1083
+ }
1084
+
1085
+ var elementId = match[1];
1086
+
1087
+ if (elementId === box.element.id) {
1088
+ return true;
1089
+ } else if (box.element.querySelector('#' + elementId)) {
1090
+ return true;
1091
+ }
1092
+
1093
+ return false;
1094
+ }
1095
+
1096
+ function maybeOpenMailChimpForWordPressBox() {
1097
+ if ((_typeof(window.mc4wp_forms_config) !== 'object' || !window.mc4wp_forms_config.submitted_form) && _typeof(window.mc4wp_submitted_form) !== 'object') {
1098
+ return;
1099
+ }
1100
+
1101
+ var form = window.mc4wp_submitted_form || window.mc4wp_forms_config.submitted_form;
1102
+ var selector = '#' + form.element_id;
1103
+ Boxzilla.boxes.forEach(function (box) {
1104
+ if (box.element.querySelector(selector)) {
1105
+ box.show();
1106
+ }
1107
+ });
1108
+ } // print message when test mode is enabled
1109
+
1110
+
1111
+ var isLoggedIn = document.body && document.body.className && document.body.className.indexOf('logged-in') > -1;
1112
+
1113
+ if (isLoggedIn && options.testMode) {
1114
+ console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\'re done testing.');
1115
+ } // init boxzilla
1116
+
1117
+
1118
+ Boxzilla.init(); // on window.load, create DOM elements for boxes
1119
+
1120
+ window.addEventListener('load', createBoxesFromConfig);
1121
+ })();
1122
+
1123
+ },{"./boxzilla/boxzilla.js":3}]},{},[11]);
1124
  ; })();
assets/js/script.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(){var a=void 0;!function o(n,r,s){function l(e,t){if(!r[e]){if(!n[e]){var i="function"==typeof a&&a;if(!t&&i)return i(e,!0);if(c)return c(e,!0);throw(i=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",i}i=r[e]={exports:{}},n[e][0].call(i.exports,function(t){return l(n[e][1][t]||t)},i,i.exports,o,n,r,s)}return r[e].exports}for(var c="function"==typeof a&&a,t=0;t<s.length;t++)l(s[t]);return l}({1:[function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r,s,l;r=t("boxzilla"),s=window.boxzilla_options,(l=document.body&&document.body.className&&-1<document.body.className.indexOf("logged-in"))&&s.testMode&&console.log("Boxzilla: Test mode is enabled. Please disable test mode if you're done testing."),r.init(),window.addEventListener("load",function(){if(!s.inited){for(var t in s.boxes){var e=s.boxes[t];e.testMode=l&&s.testMode;var i=document.getElementById("boxzilla-box-"+e.id+"-content");if(i){e.content=i;var o=r.create(e.id,e);o.element.className=o.element.className+" boxzilla-"+e.post.slug,i=o.element,(e=e.css).background_color&&(i.style.background=e.background_color),e.color&&(i.style.color=e.color),e.border_color&&(i.style.borderColor=e.border_color),e.border_width&&(i.style.borderWidth=parseInt(e.border_width)+"px"),e.border_style&&(i.style.borderStyle=e.border_style),e.width&&(i.style.maxWidth=parseInt(e.width)+"px");try{o.element.firstChild.firstChild.className+=" first-child",o.element.firstChild.lastChild.className+=" last-child"}catch(t){}o.fits()&&function(t){if(!window.location.hash||0===window.location.hash.length)return!1;var e=window.location.hash.match(/[#&](boxzilla-\d+)/);if(!e||"object"!==n(e)||e.length<2)return!1;e=e[1];{if(e===t.element.id)return!0;if(t.element.querySelector("#"+e))return!0}return!1}(o)&&o.show()}}s.inited=!0,r.trigger("done"),function(){if(("object"!==n(window.mc4wp_forms_config)||!window.mc4wp_forms_config.submitted_form)&&"object"!==n(window.mc4wp_submitted_form))return;var e="#"+(window.mc4wp_submitted_form||window.mc4wp_forms_config.submitted_form).element_id;r.boxes.forEach(function(t){t.element.querySelector(e)&&t.show()})}()}})},{boxzilla:4}],2:[function(t,e,i){"use strict";var n=320;function c(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i])}function a(l,c,a){var t,e,i,d=+new Date,o=window.getComputedStyle(l),h={},u={};for(t in c)c.hasOwnProperty(t)&&(c[t]=parseFloat(c[t]),e=c[t],(i=parseFloat(o[t]))!==e?(u[t]=(e-i)/n,h[t]=i):delete c[t]);(function t(){var e,i,o,n,r=+new Date-d,s=!0;for(n in c)c.hasOwnProperty(n)&&(e=u[n],i=c[n],o=e*r,o=h[n]+o,0<e&&i<=o||e<0&&o<=i?o=i:s=!1,h[n]=o,l.style[n]="opacity"!==n?o+"px":o);d=+new Date,s?a&&a():window.requestAnimationFrame(t)})()}e.exports={toggle:function(t,e,i){function o(){t.removeAttribute("data-animated"),t.setAttribute("style",l.getAttribute("style")),t.style.display=s?"none":"",i&&i()}var n,r,s="none"!==t.style.display||0<t.offsetLeft,l=t.cloneNode(!0);t.setAttribute("data-animated","true"),s||(t.style.display=""),"slide"===e?(r=function(t,e){for(var i={},o=0;o<t.length;o++)i[t[o]]=e;return i}(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],0),n={},s||(n=function(t,e){for(var i={},o=0;o<t.length;o++)i[t[o]]=e[t[o]];return i}(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],window.getComputedStyle(t)),isFinite(n.height)||(e=t.getBoundingClientRect(),n.height=e.height),c(t,r)),t.style.overflowY="hidden"):(r={opacity:0},n={opacity:1},s||c(t,r)),a(t,s?r:n,o)},animate:a,animated:function(t){return!!t.getAttribute("data-animated")}}},{}],3:[function(t,e,i){"use strict";var o={animation:"fade",rehide:!1,content:"",cookie:null,icon:"&times",screenWidthCondition:null,position:"center",testMode:!1,trigger:!1,closable:!0},n=t("./animator.js");function r(t,e,i){this.id=t,this.fireEvent=i,this.config=function(t,e){var i,o,n={};for(i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);for(o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);return n}(o,e),this.overlay=document.createElement("div"),this.overlay.style.display="none",this.overlay.id="boxzilla-overlay-"+this.id,this.overlay.classList.add("boxzilla-overlay"),document.body.appendChild(this.overlay),this.visible=!1,this.dismissed=!1,this.triggered=!1,this.triggerHeight=this.calculateTriggerHeight(),this.cookieSet=this.isCookieSet(),this.element=null,this.contentElement=null,this.closeIcon=null,this.dom(),this.events()}r.prototype.events=function(){var o=this;this.closeIcon&&this.closeIcon.addEventListener("click",function(t){t.preventDefault(),o.dismiss()}),this.element.addEventListener("click",function(t){"A"!==t.target.tagName&&"AREA"!==t.target.tagName||o.fireEvent("box.interactions.link",[o,t.target])},!1),this.element.addEventListener("submit",function(t){o.setCookie(),o.fireEvent("box.interactions.form",[o,t.target])},!1),this.overlay.addEventListener("click",function(t){var e=t.offsetX,i=t.offsetY,t=o.element.getBoundingClientRect();(e<t.left-40||e>t.right+40||i<t.top-40||i>t.bottom+40)&&o.dismiss()})},r.prototype.dom=function(){var t=document.createElement("div");t.className="boxzilla-container boxzilla-"+this.config.position+"-container";var e,i,o=document.createElement("div");o.id="boxzilla-"+this.id,o.className="boxzilla boxzilla-"+this.id+" boxzilla-"+this.config.position,o.style.display="none",t.appendChild(o),"string"==typeof this.config.content?(e=document.createElement("div")).innerHTML=this.config.content:(e=this.config.content).style.display="",e.className="boxzilla-content",o.appendChild(e),this.config.closable&&this.config.icon&&((i=document.createElement("span")).className="boxzilla-close-icon",i.innerHTML=this.config.icon,i.setAttribute("aria-label","close"),o.appendChild(i),this.closeIcon=i),document.body.appendChild(t),this.contentElement=e,this.element=o},r.prototype.setCustomBoxStyling=function(){var t=this.element.style.display;this.element.style.display="",this.element.style.overflowY="",this.element.style.maxHeight="";var e=window.innerHeight,i=this.element.clientHeight;e<i&&(this.element.style.maxHeight=e+"px",this.element.style.overflowY="scroll"),"center"===this.config.position&&(i=0<=(i=(e-i)/2)?i:0,this.element.style.marginTop=i+"px"),this.element.style.display=t},r.prototype.toggle=function(t,e){return e=void 0===e||e,(t=void 0===t?!this.visible:t)!==this.visible&&(!n.animated(this.element)&&(!(!t&&!this.config.closable)&&(this.visible=t,this.setCustomBoxStyling(),this.fireEvent("box."+(t?"show":"hide"),[this]),"center"===this.config.position&&(this.overlay.classList.toggle("boxzilla-"+this.id+"-overlay"),e?n.toggle(this.overlay,"fade"):this.overlay.style.display=t?"":"none"),e?n.toggle(this.element,this.config.animation,function(){this.visible||(this.contentElement.innerHTML=this.contentElement.innerHTML+"")}.bind(this)):this.element.style.display=t?"":"none",!0)))},r.prototype.show=function(t){return this.toggle(!0,t)},r.prototype.hide=function(t){return this.toggle(!1,t)},r.prototype.calculateTriggerHeight=function(){var t,e,i=0;return this.config.trigger&&("element"===this.config.trigger.method?(e=document.body.querySelector(this.config.trigger.value))&&(i=e.getBoundingClientRect().top):"percentage"===this.config.trigger.method&&(i=this.config.trigger.value/100*(t=document.body,e=document.documentElement,Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)))),i},r.prototype.fits=function(){if(!this.config.screenWidthCondition||!this.config.screenWidthCondition.value)return!0;switch(this.config.screenWidthCondition.condition){case"larger":return window.innerWidth>this.config.screenWidthCondition.value;case"smaller":return window.innerWidth<this.config.screenWidthCondition.value}return!0},r.prototype.onResize=function(){this.triggerHeight=this.calculateTriggerHeight(),this.setCustomBoxStyling()},r.prototype.mayAutoShow=function(){return!this.dismissed&&(!!this.fits()&&(!!this.config.trigger&&!this.cookieSet))},r.prototype.mayRehide=function(){return this.config.rehide&&this.triggered},r.prototype.isCookieSet=function(){return!(this.config.testMode||!this.config.trigger)&&(!(!this.config.cookie||!this.config.cookie.triggered&&!this.config.cookie.dismissed)&&"true"===document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*boxzilla_box_"+this.id+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))},r.prototype.setCookie=function(t){var e=new Date;e.setHours(e.getHours()+t),document.cookie="boxzilla_box_"+this.id+"=true; expires="+e.toUTCString()+"; path=/"},r.prototype.trigger=function(){this.show()&&(this.triggered=!0,this.config.cookie&&this.config.cookie.triggered&&this.setCookie(this.config.cookie.triggered))},r.prototype.dismiss=function(t){return!!this.visible&&(this.hide(t),this.config.cookie&&this.config.cookie.dismissed&&this.setCookie(this.config.cookie.dismissed),this.dismissed=!0,this.fireEvent("box.dismiss",[this]),!0)},e.exports=r},{"./animator.js":2}],4:[function(t,e,i){"use strict";var o=t("./box.js"),n=t("./util.js").throttle,r=t("./styles.js"),s=t("./triggers/exit-intent.js"),l=t("./triggers/scroll.js"),c=t("./triggers/pageviews.js"),a=t("./triggers/time.js"),d=!1,h=[],u={};function g(t){"Escape"!==t.key&&"Esc"!==t.key||b()}function f(){h.forEach(function(t){return t.onResize()})}function m(t){for(var e=t.target,i=0;i<=3&&(e&&"A"!==e.tagName&&"AREA"!==e.tagName);i++)e=e.parentElement;!e||"A"!==e.tagName&&"AREA"!==e.tagName||!e.href||(t=e.href.match(/[#&]boxzilla-(.+)/i))&&1<t.length&&y(t[1])}function p(t,e){u[t]&&u[t].forEach(function(t){return t.apply(null,e)})}function w(t){t=String(t);for(var e=0;e<h.length;e++)if(h[e].id===t)return h[e];throw new Error("No box exists with ID "+t)}function b(t,e){t?w(t).dismiss(e):h.forEach(function(t){return t.dismiss(e)})}function y(t,e){t?w(t).toggle(e):h.forEach(function(t){return t.toggle(e)})}t={off:function(t,e){u[t]&&u[t].filter(function(t){return t!==e})},on:function(t,e){u[t]=u[t]||[],u[t].push(e)},get:w,init:function(){var t;d||((t=document.createElement("style")).innerHTML=r,document.head.appendChild(t),s(h),c(h),l(h),a(h),document.body.addEventListener("click",m,!0),window.addEventListener("resize",n(f)),window.addEventListener("load",f),document.addEventListener("keyup",g),p("ready"),d=!0)},create:function(t,e){return void 0!==e.minimumScreenWidth&&(e.screenWidthCondition={condition:"larger",value:e.minimumScreenWidth}),t=String(t),e=new o(t,e,p),h.push(e),e},trigger:p,show:function(t,e){t?w(t).show(e):h.forEach(function(t){return t.show(e)})},hide:function(t,e){t?w(t).hide(e):h.forEach(function(t){return t.hide(e)})},dismiss:b,toggle:y,boxes:h};window.Boxzilla=t,void 0!==e&&e.exports&&(e.exports=t)},{"./box.js":3,"./styles.js":5,"./triggers/exit-intent.js":7,"./triggers/pageviews.js":8,"./triggers/scroll.js":9,"./triggers/time.js":10,"./util.js":11}],5:[function(t,e,i){"use strict";e.exports="#boxzilla-overlay,.boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:10000}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:11000;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:12000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}"},{}],6:[function(t,e,i){"use strict";function o(){this.time=0,this.interval=0}o.prototype.tick=function(){this.time++},o.prototype.start=function(){this.interval||(this.interval=window.setInterval(this.tick.bind(this),1e3))},o.prototype.stop=function(){this.interval&&(window.clearInterval(this.interval),this.interval=0)},e.exports=o},{}],7:[function(t,e,i){"use strict";e.exports=function(t){var e=null,i={};function o(){document.documentElement.removeEventListener("mouseleave",s),document.documentElement.removeEventListener("mouseenter",r),document.documentElement.removeEventListener("click",n),window.removeEventListener("touchstart",l),window.removeEventListener("touchend",c),t.forEach(function(t){t.mayAutoShow()&&"exit_intent"===t.config.trigger.method&&t.trigger()})}function n(){null!==e&&(window.clearTimeout(e),e=null)}function r(){n()}function s(t){n(),t.clientY<=(document.documentMode||/Edge\//.test(navigator.userAgent)?5:0)&&t.clientX<.8*window.innerWidth&&(e=window.setTimeout(o,600))}function l(){n(),i={timestamp:performance.now(),scrollY:window.scrollY,windowHeight:window.innerHeight}}function c(t){n(),window.innerHeight>i.windowHeight||window.scrollY+20>i.scrollY||300<performance.now()-i.timestamp||-1<["A","INPUT","BUTTON"].indexOf(t.target.tagName)||(e=window.setTimeout(o,800))}window.addEventListener("touchstart",l),window.addEventListener("touchend",c),document.documentElement.addEventListener("mouseenter",r),document.documentElement.addEventListener("mouseleave",s),document.documentElement.addEventListener("click",n)}},{}],8:[function(t,e,i){"use strict";e.exports=function(t){var e;try{e=sessionStorage.getItem("boxzilla_pageviews")||0,sessionStorage.setItem("boxzilla_pageviews",++e)}catch(t){e=0}window.setTimeout(function(){t.forEach(function(t){"pageviews"===t.config.trigger.method&&e>t.config.trigger.value&&t.mayAutoShow()&&t.trigger()})},1e3)}},{}],9:[function(t,e,i){"use strict";var o=t("../util.js").throttle;e.exports=function(t){function e(){var e=window.hasOwnProperty("pageYOffset")?window.pageYOffset:window.scrollTop;e+=.9*window.innerHeight,t.forEach(function(t){!t.mayAutoShow()||t.triggerHeight<=0||(e>t.triggerHeight?t.trigger():t.mayRehide()&&e<t.triggerHeight-5&&t.hide())})}window.addEventListener("touchstart",o(e),!0),window.addEventListener("scroll",o(e),!0)}},{"../util.js":11}],10:[function(t,e,i){"use strict";var r=t("../timer.js");e.exports=function(t){var e=new r,i=new r,o=function(){try{var t=parseInt(sessionStorage.getItem("boxzilla_timer"));t&&(e.time=t)}catch(t){}e.start(),i.start()},n=function(){sessionStorage.setItem("boxzilla_timer",e.time),e.stop(),i.stop()};o(),document.addEventListener("visibilitychange",function(){(document.hidden?n:o)()}),window.addEventListener("beforeunload",function(){n()}),window.setInterval(function(){t.forEach(function(t){("time_on_site"===t.config.trigger.method&&e.time>t.config.trigger.value&&t.mayAutoShow()||"time_on_page"===t.config.trigger.method&&i.time>t.config.trigger.value&&t.mayAutoShow())&&t.trigger()})},1e3)}},{"../timer.js":6}],11:[function(t,e,i){"use strict";e.exports={throttle:function(o,n,r){var s,l;return n=n||800,function(){var t=r||this,e=+new Date,i=arguments;s&&e<s+n?(clearTimeout(l),l=setTimeout(function(){s=e,o.apply(t,i)},n)):(s=e,o.apply(t,i))}}}},{}]},{},[1])}();
2
  //# sourceMappingURL=script.min.js.map
1
+ !function(){var a=void 0;!function o(n,r,s){function l(e,t){if(!r[e]){if(!n[e]){var i="function"==typeof a&&a;if(!t&&i)return i(e,!0);if(c)return c(e,!0);throw(i=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",i}i=r[e]={exports:{}},n[e][0].call(i.exports,function(t){return l(n[e][1][t]||t)},i,i.exports,o,n,r,s)}return r[e].exports}for(var c="function"==typeof a&&a,t=0;t<s.length;t++)l(s[t]);return l}({1:[function(t,e,i){"use strict";var n=320;function c(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i])}function a(l,c,a){var t,e,i,d=+new Date,o=window.getComputedStyle(l),h={},u={};for(t in c)c.hasOwnProperty(t)&&(c[t]=parseFloat(c[t]),e=c[t],(i=parseFloat(o[t]))!==e?(u[t]=(e-i)/n,h[t]=i):delete c[t]);(function t(){var e,i,o,n,r=+new Date-d,s=!0;for(n in c)c.hasOwnProperty(n)&&(e=u[n],i=c[n],o=e*r,o=h[n]+o,0<e&&i<=o||e<0&&o<=i?o=i:s=!1,h[n]=o,l.style[n]="opacity"!==n?o+"px":o);d=+new Date,s?a&&a():window.requestAnimationFrame(t)})()}e.exports={toggle:function(t,e,i){function o(){t.removeAttribute("data-animated"),t.setAttribute("style",l.getAttribute("style")),t.style.display=s?"none":"",i&&i()}var n,r,s="none"!==t.style.display||0<t.offsetLeft,l=t.cloneNode(!0);t.setAttribute("data-animated","true"),s||(t.style.display=""),"slide"===e?(r=function(t,e){for(var i={},o=0;o<t.length;o++)i[t[o]]=e;return i}(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],0),n={},s||(n=function(t,e){for(var i={},o=0;o<t.length;o++)i[t[o]]=e[t[o]];return i}(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],window.getComputedStyle(t)),isFinite(n.height)||(e=t.getBoundingClientRect(),n.height=e.height),c(t,r)),t.style.overflowY="hidden"):(r={opacity:0},n={opacity:1},s||c(t,r)),a(t,s?r:n,o)},animate:a,animated:function(t){return!!t.getAttribute("data-animated")}}},{}],2:[function(t,e,i){"use strict";var o={animation:"fade",rehide:!1,content:"",cookie:null,icon:"&times",screenWidthCondition:null,position:"center",testMode:!1,trigger:!1,closable:!0},n=t("./animator.js");function r(t,e,i){this.id=t,this.fireEvent=i,this.config=function(t,e){var i,o,n={};for(i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);for(o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);return n}(o,e),this.overlay=document.createElement("div"),this.overlay.setAttribute("aria-modal",!0),this.overlay.style.display="none",this.overlay.id="boxzilla-overlay-"+this.id,this.overlay.classList.add("boxzilla-overlay"),document.body.appendChild(this.overlay),this.visible=!1,this.dismissed=!1,this.triggered=!1,this.triggerHeight=this.calculateTriggerHeight(),this.cookieSet=this.isCookieSet(),this.element=null,this.contentElement=null,this.closeIcon=null,this.dom(),this.events()}r.prototype.events=function(){var o=this;this.closeIcon&&this.closeIcon.addEventListener("click",function(t){t.preventDefault(),o.dismiss()}),this.element.addEventListener("click",function(t){"A"!==t.target.tagName&&"AREA"!==t.target.tagName||o.fireEvent("box.interactions.link",[o,t.target])},!1),this.element.addEventListener("submit",function(t){o.setCookie(),o.fireEvent("box.interactions.form",[o,t.target])},!1),this.overlay.addEventListener("click",function(t){var e=t.offsetX,i=t.offsetY,t=o.element.getBoundingClientRect();(e<t.left-40||e>t.right+40||i<t.top-40||i>t.bottom+40)&&o.dismiss()})},r.prototype.dom=function(){var t=document.createElement("div");t.className="boxzilla-container boxzilla-"+this.config.position+"-container";var e,i,o=document.createElement("div");o.id="boxzilla-"+this.id,o.className="boxzilla boxzilla-"+this.id+" boxzilla-"+this.config.position,o.style.display="none",t.appendChild(o),"string"==typeof this.config.content?(e=document.createElement("div")).innerHTML=this.config.content:(e=this.config.content).style.display="",e.className="boxzilla-content",o.appendChild(e),this.config.closable&&this.config.icon&&((i=document.createElement("span")).className="boxzilla-close-icon",i.innerHTML=this.config.icon,i.setAttribute("aria-label","close"),o.appendChild(i),this.closeIcon=i),document.body.appendChild(t),this.contentElement=e,this.element=o},r.prototype.setCustomBoxStyling=function(){var t=this.element.style.display;this.element.style.display="",this.element.style.overflowY="",this.element.style.maxHeight="";var e=window.innerHeight,i=this.element.clientHeight;e<i&&(this.element.style.maxHeight=e+"px",this.element.style.overflowY="scroll"),"center"===this.config.position&&(i=0<=(i=(e-i)/2)?i:0,this.element.style.marginTop=i+"px"),this.element.style.display=t},r.prototype.toggle=function(t,e){return e=void 0===e||e,(t=void 0===t?!this.visible:t)!==this.visible&&(!n.animated(this.element)&&(!(!t&&!this.config.closable)&&(this.visible=t,this.setCustomBoxStyling(),this.fireEvent("box."+(t?"show":"hide"),[this]),"center"===this.config.position&&(this.overlay.classList.toggle("boxzilla-"+this.id+"-overlay"),e?n.toggle(this.overlay,"fade"):this.overlay.style.display=t?"":"none"),e?n.toggle(this.element,this.config.animation,function(){this.visible||(this.contentElement.innerHTML=this.contentElement.innerHTML+"")}.bind(this)):this.element.style.display=t?"":"none",!0)))},r.prototype.show=function(t){return this.toggle(!0,t)},r.prototype.hide=function(t){return this.toggle(!1,t)},r.prototype.calculateTriggerHeight=function(){var t,e,i=0;return this.config.trigger&&("element"===this.config.trigger.method?(e=document.body.querySelector(this.config.trigger.value))&&(i=e.getBoundingClientRect().top):"percentage"===this.config.trigger.method&&(i=this.config.trigger.value/100*(t=document.body,e=document.documentElement,Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)))),i},r.prototype.fits=function(){if(!this.config.screenWidthCondition||!this.config.screenWidthCondition.value)return!0;switch(this.config.screenWidthCondition.condition){case"larger":return window.innerWidth>this.config.screenWidthCondition.value;case"smaller":return window.innerWidth<this.config.screenWidthCondition.value}return!0},r.prototype.onResize=function(){this.triggerHeight=this.calculateTriggerHeight(),this.setCustomBoxStyling()},r.prototype.mayAutoShow=function(){return!this.dismissed&&(!!this.fits()&&(!!this.config.trigger&&!this.cookieSet))},r.prototype.mayRehide=function(){return this.config.rehide&&this.triggered},r.prototype.isCookieSet=function(){return!(this.config.testMode||!this.config.trigger)&&(!(!this.config.cookie||!this.config.cookie.triggered&&!this.config.cookie.dismissed)&&"true"===document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*boxzilla_box_"+this.id+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))},r.prototype.setCookie=function(t){var e=new Date;e.setHours(e.getHours()+t),document.cookie="boxzilla_box_"+this.id+"=true; expires="+e.toUTCString()+"; path=/"},r.prototype.trigger=function(){this.show()&&(this.triggered=!0,this.config.cookie&&this.config.cookie.triggered&&this.setCookie(this.config.cookie.triggered))},r.prototype.dismiss=function(t){return!!this.visible&&(this.hide(t),this.config.cookie&&this.config.cookie.dismissed&&this.setCookie(this.config.cookie.dismissed),this.dismissed=!0,this.fireEvent("box.dismiss",[this]),!0)},e.exports=r},{"./animator.js":1}],3:[function(t,e,i){"use strict";var o=t("./box.js"),n=t("./util.js").throttle,r=t("./styles.js"),s=t("./triggers/exit-intent.js"),l=t("./triggers/scroll.js"),c=t("./triggers/pageviews.js"),a=t("./triggers/time.js"),d=!1,h=[],u={};function g(t){"Escape"!==t.key&&"Esc"!==t.key||b()}function f(){h.forEach(function(t){return t.onResize()})}function m(t){for(var e=t.target,i=0;i<=3&&(e&&"A"!==e.tagName&&"AREA"!==e.tagName);i++)e=e.parentElement;!e||"A"!==e.tagName&&"AREA"!==e.tagName||!e.href||(t=e.href.match(/[#&]boxzilla-(.+)/i))&&1<t.length&&y(t[1])}function p(t,e){u[t]&&u[t].forEach(function(t){return t.apply(null,e)})}function w(t){t=String(t);for(var e=0;e<h.length;e++)if(h[e].id===t)return h[e];throw new Error("No box exists with ID "+t)}function b(t,e){t?w(t).dismiss(e):h.forEach(function(t){return t.dismiss(e)})}function y(t,e){t?w(t).toggle(e):h.forEach(function(t){return t.toggle(e)})}t={off:function(t,e){u[t]&&u[t].filter(function(t){return t!==e})},on:function(t,e){u[t]=u[t]||[],u[t].push(e)},get:w,init:function(){var t;d||((t=document.createElement("style")).innerHTML=r,document.head.appendChild(t),s(h),c(h),l(h),a(h),document.body.addEventListener("click",m,!0),window.addEventListener("resize",n(f)),window.addEventListener("load",f),document.addEventListener("keyup",g),p("ready"),d=!0)},create:function(t,e){return void 0!==e.minimumScreenWidth&&(e.screenWidthCondition={condition:"larger",value:e.minimumScreenWidth}),t=String(t),e=new o(t,e,p),h.push(e),e},trigger:p,show:function(t,e){t?w(t).show(e):h.forEach(function(t){return t.show(e)})},hide:function(t,e){t?w(t).hide(e):h.forEach(function(t){return t.hide(e)})},dismiss:b,toggle:y,boxes:h};window.Boxzilla=t,void 0!==e&&e.exports&&(e.exports=t)},{"./box.js":2,"./styles.js":4,"./triggers/exit-intent.js":6,"./triggers/pageviews.js":7,"./triggers/scroll.js":8,"./triggers/time.js":9,"./util.js":10}],4:[function(t,e,i){"use strict";e.exports="#boxzilla-overlay,.boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:10000}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:11000;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:12000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}"},{}],5:[function(t,e,i){"use strict";function o(){this.time=0,this.interval=0}o.prototype.tick=function(){this.time++},o.prototype.start=function(){this.interval||(this.interval=window.setInterval(this.tick.bind(this),1e3))},o.prototype.stop=function(){this.interval&&(window.clearInterval(this.interval),this.interval=0)},e.exports=o},{}],6:[function(t,e,i){"use strict";e.exports=function(t){var e=null,i={};function o(){document.documentElement.removeEventListener("mouseleave",s),document.documentElement.removeEventListener("mouseenter",r),document.documentElement.removeEventListener("click",n),window.removeEventListener("touchstart",l),window.removeEventListener("touchend",c),t.forEach(function(t){t.mayAutoShow()&&"exit_intent"===t.config.trigger.method&&t.trigger()})}function n(){null!==e&&(window.clearTimeout(e),e=null)}function r(){n()}function s(t){n(),t.clientY<=(document.documentMode||/Edge\//.test(navigator.userAgent)?5:0)&&t.clientX<.8*window.innerWidth&&(e=window.setTimeout(o,600))}function l(){n(),i={timestamp:performance.now(),scrollY:window.scrollY,windowHeight:window.innerHeight}}function c(t){n(),window.innerHeight>i.windowHeight||window.scrollY+20>i.scrollY||300<performance.now()-i.timestamp||-1<["A","INPUT","BUTTON"].indexOf(t.target.tagName)||(e=window.setTimeout(o,800))}window.addEventListener("touchstart",l),window.addEventListener("touchend",c),document.documentElement.addEventListener("mouseenter",r),document.documentElement.addEventListener("mouseleave",s),document.documentElement.addEventListener("click",n)}},{}],7:[function(t,e,i){"use strict";e.exports=function(t){var e;try{e=sessionStorage.getItem("boxzilla_pageviews")||0,sessionStorage.setItem("boxzilla_pageviews",++e)}catch(t){e=0}window.setTimeout(function(){t.forEach(function(t){"pageviews"===t.config.trigger.method&&e>t.config.trigger.value&&t.mayAutoShow()&&t.trigger()})},1e3)}},{}],8:[function(t,e,i){"use strict";var o=t("../util.js").throttle;e.exports=function(t){function e(){var e=window.hasOwnProperty("pageYOffset")?window.pageYOffset:window.scrollTop;e+=.9*window.innerHeight,t.forEach(function(t){!t.mayAutoShow()||t.triggerHeight<=0||(e>t.triggerHeight?t.trigger():t.mayRehide()&&e<t.triggerHeight-5&&t.hide())})}window.addEventListener("touchstart",o(e),!0),window.addEventListener("scroll",o(e),!0)}},{"../util.js":10}],9:[function(t,e,i){"use strict";var r=t("../timer.js");e.exports=function(t){var e=new r,i=new r,o=function(){try{var t=parseInt(sessionStorage.getItem("boxzilla_timer"));t&&(e.time=t)}catch(t){}e.start(),i.start()},n=function(){sessionStorage.setItem("boxzilla_timer",e.time),e.stop(),i.stop()};o(),document.addEventListener("visibilitychange",function(){(document.hidden?n:o)()}),window.addEventListener("beforeunload",function(){n()}),window.setInterval(function(){t.forEach(function(t){("time_on_site"===t.config.trigger.method&&e.time>t.config.trigger.value&&t.mayAutoShow()||"time_on_page"===t.config.trigger.method&&i.time>t.config.trigger.value&&t.mayAutoShow())&&t.trigger()})},1e3)}},{"../timer.js":5}],10:[function(t,e,i){"use strict";e.exports={throttle:function(o,n,r){var s,l;return n=n||800,function(){var t=r||this,e=+new Date,i=arguments;s&&e<s+n?(clearTimeout(l),l=setTimeout(function(){s=e,o.apply(t,i)},n)):(s=e,o.apply(t,i))}}}},{}],11:[function(t,e,i){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r,s,l;r=t("./boxzilla/boxzilla.js"),s=window.boxzilla_options,(l=document.body&&document.body.className&&-1<document.body.className.indexOf("logged-in"))&&s.testMode&&console.log("Boxzilla: Test mode is enabled. Please disable test mode if you're done testing."),r.init(),window.addEventListener("load",function(){if(!s.inited){for(var t in s.boxes){var e=s.boxes[t];e.testMode=l&&s.testMode;var i=document.getElementById("boxzilla-box-"+e.id+"-content");if(i){e.content=i;var o=r.create(e.id,e);o.element.className=o.element.className+" boxzilla-"+e.post.slug,i=o.element,(e=e.css).background_color&&(i.style.background=e.background_color),e.color&&(i.style.color=e.color),e.border_color&&(i.style.borderColor=e.border_color),e.border_width&&(i.style.borderWidth=parseInt(e.border_width)+"px"),e.border_style&&(i.style.borderStyle=e.border_style),e.width&&(i.style.maxWidth=parseInt(e.width)+"px");try{o.element.firstChild.firstChild.className+=" first-child",o.element.firstChild.lastChild.className+=" last-child"}catch(t){}o.fits()&&function(t){if(!window.location.hash||0===window.location.hash.length)return!1;var e=window.location.hash.match(/[#&](boxzilla-\d+)/);if(!e||"object"!==n(e)||e.length<2)return!1;e=e[1];{if(e===t.element.id)return!0;if(t.element.querySelector("#"+e))return!0}return!1}(o)&&o.show()}}s.inited=!0,r.trigger("done"),function(){if(("object"!==n(window.mc4wp_forms_config)||!window.mc4wp_forms_config.submitted_form)&&"object"!==n(window.mc4wp_submitted_form))return;var e="#"+(window.mc4wp_submitted_form||window.mc4wp_forms_config.submitted_form).element_id;r.boxes.forEach(function(t){t.element.querySelector(e)&&t.show()})}()}})},{"./boxzilla/boxzilla.js":3}]},{},[11])}();
2
  //# sourceMappingURL=script.min.js.map
assets/js/script.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"script.min.js","sources":["script.js"],"sourcesContent":["(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n(function () {\n var Boxzilla = require('boxzilla');\n\n var options = window.boxzilla_options; // helper function for setting CSS styles\n\n function css(element, styles) {\n if (styles.background_color) {\n element.style.background = styles.background_color;\n }\n\n if (styles.color) {\n element.style.color = styles.color;\n }\n\n if (styles.border_color) {\n element.style.borderColor = styles.border_color;\n }\n\n if (styles.border_width) {\n element.style.borderWidth = parseInt(styles.border_width) + 'px';\n }\n\n if (styles.border_style) {\n element.style.borderStyle = styles.border_style;\n }\n\n if (styles.width) {\n element.style.maxWidth = parseInt(styles.width) + 'px';\n }\n }\n\n function createBoxesFromConfig() {\n // failsafe against including script twice.\n if (options.inited) {\n return;\n } // create boxes from options\n\n\n for (var key in options.boxes) {\n // get opts\n var boxOpts = options.boxes[key];\n boxOpts.testMode = isLoggedIn && options.testMode; // find box content element, bail if not found\n\n var boxContentElement = document.getElementById('boxzilla-box-' + boxOpts.id + '-content');\n\n if (!boxContentElement) {\n continue;\n } // use element as content option\n\n\n boxOpts.content = boxContentElement; // create box\n\n var box = Boxzilla.create(boxOpts.id, boxOpts); // add box slug to box element as classname\n\n box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug; // add custom css to box\n\n css(box.element, boxOpts.css);\n\n try {\n box.element.firstChild.firstChild.className += ' first-child';\n box.element.firstChild.lastChild.className += ' last-child';\n } catch (e) {} // maybe show box right away\n\n\n if (box.fits() && locationHashRefersBox(box)) {\n box.show();\n }\n } // set flag to prevent initialising twice\n\n\n options.inited = true; // trigger \"done\" event.\n\n Boxzilla.trigger('done'); // maybe open box with MC4WP form in it\n\n maybeOpenMailChimpForWordPressBox();\n }\n\n function locationHashRefersBox(box) {\n if (!window.location.hash || window.location.hash.length === 0) {\n return false;\n } // parse \"boxzilla-{id}\" from location hash\n\n\n var match = window.location.hash.match(/[#&](boxzilla-\\d+)/);\n\n if (!match || _typeof(match) !== 'object' || match.length < 2) {\n return false;\n }\n\n var elementId = match[1];\n\n if (elementId === box.element.id) {\n return true;\n } else if (box.element.querySelector('#' + elementId)) {\n return true;\n }\n\n return false;\n }\n\n function maybeOpenMailChimpForWordPressBox() {\n if ((_typeof(window.mc4wp_forms_config) !== 'object' || !window.mc4wp_forms_config.submitted_form) && _typeof(window.mc4wp_submitted_form) !== 'object') {\n return;\n }\n\n var form = window.mc4wp_submitted_form || window.mc4wp_forms_config.submitted_form;\n var selector = '#' + form.element_id;\n Boxzilla.boxes.forEach(function (box) {\n if (box.element.querySelector(selector)) {\n box.show();\n }\n });\n } // print message when test mode is enabled\n\n\n var isLoggedIn = document.body && document.body.className && document.body.className.indexOf('logged-in') > -1;\n\n if (isLoggedIn && options.testMode) {\n console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\\'re done testing.');\n } // init boxzilla\n\n\n Boxzilla.init(); // on window.load, create DOM elements for boxes\n\n window.addEventListener('load', createBoxesFromConfig);\n})();\n\n},{\"boxzilla\":4}],2:[function(require,module,exports){\n\"use strict\";\n\nvar duration = 320;\n\nfunction css(element, styles) {\n for (var property in styles) {\n if (!styles.hasOwnProperty(property)) {\n continue;\n }\n\n element.style[property] = styles[property];\n }\n}\n\nfunction initObjectProperties(properties, value) {\n var newObject = {};\n\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = value;\n }\n\n return newObject;\n}\n\nfunction copyObjectProperties(properties, object) {\n var newObject = {};\n\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = object[properties[i]];\n }\n\n return newObject;\n}\n/**\n * Checks if the given element is currently being animated.\n *\n * @param element\n * @returns {boolean}\n */\n\n\nfunction animated(element) {\n return !!element.getAttribute('data-animated');\n}\n/**\n * Toggles the element using the given animation.\n *\n * @param element\n * @param animation Either \"fade\" or \"slide\"\n * @param callbackFn\n */\n\n\nfunction toggle(element, animation, callbackFn) {\n var nowVisible = element.style.display !== 'none' || element.offsetLeft > 0; // create clone for reference\n\n var clone = element.cloneNode(true);\n\n var cleanup = function cleanup() {\n element.removeAttribute('data-animated');\n element.setAttribute('style', clone.getAttribute('style'));\n element.style.display = nowVisible ? 'none' : '';\n\n if (callbackFn) {\n callbackFn();\n }\n }; // store attribute so everyone knows we're animating this element\n\n\n element.setAttribute('data-animated', 'true'); // toggle element visiblity right away if we're making something visible\n\n if (!nowVisible) {\n element.style.display = '';\n }\n\n var hiddenStyles;\n var visibleStyles; // animate properties\n\n if (animation === 'slide') {\n hiddenStyles = initObjectProperties(['height', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'], 0);\n visibleStyles = {};\n\n if (!nowVisible) {\n var computedStyles = window.getComputedStyle(element);\n visibleStyles = copyObjectProperties(['height', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'], computedStyles); // in some browsers, getComputedStyle returns \"auto\" value. this falls back to getBoundingClientRect() in those browsers since we need an actual height.\n\n if (!isFinite(visibleStyles.height)) {\n var clientRect = element.getBoundingClientRect();\n visibleStyles.height = clientRect.height;\n }\n\n css(element, hiddenStyles);\n } // don't show a scrollbar during animation\n\n\n element.style.overflowY = 'hidden';\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n } else {\n hiddenStyles = {\n opacity: 0\n };\n visibleStyles = {\n opacity: 1\n };\n\n if (!nowVisible) {\n css(element, hiddenStyles);\n }\n\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n }\n}\n\nfunction animate(element, targetStyles, fn) {\n var last = +new Date();\n var initialStyles = window.getComputedStyle(element);\n var currentStyles = {};\n var propSteps = {};\n\n for (var property in targetStyles) {\n if (!targetStyles.hasOwnProperty(property)) {\n continue;\n } // make sure we have an object filled with floats\n\n\n targetStyles[property] = parseFloat(targetStyles[property]); // calculate step size & current value\n\n var to = targetStyles[property];\n var current = parseFloat(initialStyles[property]); // is there something to do?\n\n if (current === to) {\n delete targetStyles[property];\n continue;\n }\n\n propSteps[property] = (to - current) / duration; // points per second\n\n currentStyles[property] = current;\n }\n\n var tick = function tick() {\n var now = +new Date();\n var timeSinceLastTick = now - last;\n var done = true;\n var step, to, increment, newValue;\n\n for (var _property in targetStyles) {\n if (!targetStyles.hasOwnProperty(_property)) {\n continue;\n }\n\n step = propSteps[_property];\n to = targetStyles[_property];\n increment = step * timeSinceLastTick;\n newValue = currentStyles[_property] + increment;\n\n if (step > 0 && newValue >= to || step < 0 && newValue <= to) {\n newValue = to;\n } else {\n done = false;\n } // store new value\n\n\n currentStyles[_property] = newValue;\n element.style[_property] = _property !== 'opacity' ? newValue + 'px' : newValue;\n }\n\n last = +new Date();\n\n if (!done) {\n // keep going until we're done for all props\n window.requestAnimationFrame(tick);\n } else {\n // call callback\n fn && fn();\n }\n };\n\n tick();\n}\n\nmodule.exports = {\n toggle: toggle,\n animate: animate,\n animated: animated\n};\n\n},{}],3:[function(require,module,exports){\n\"use strict\";\n\nvar defaults = {\n animation: 'fade',\n rehide: false,\n content: '',\n cookie: null,\n icon: '&times',\n screenWidthCondition: null,\n position: 'center',\n testMode: false,\n trigger: false,\n closable: true\n};\n\nvar Animator = require('./animator.js');\n/**\n * Merge 2 objects, values of the latter overwriting the former.\n *\n * @param obj1\n * @param obj2\n * @returns {*}\n */\n\n\nfunction merge(obj1, obj2) {\n var obj3 = {}; // add obj1 to obj3\n\n for (var attrname in obj1) {\n if (obj1.hasOwnProperty(attrname)) {\n obj3[attrname] = obj1[attrname];\n }\n } // add obj2 to obj3\n\n\n for (var _attrname in obj2) {\n if (obj2.hasOwnProperty(_attrname)) {\n obj3[_attrname] = obj2[_attrname];\n }\n }\n\n return obj3;\n}\n/**\n * Get the real height of entire document.\n * @returns {number}\n */\n\n\nfunction getDocumentHeight() {\n var body = document.body;\n var html = document.documentElement;\n return Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);\n} // Box Object\n\n\nfunction Box(id, config, fireEvent) {\n this.id = id;\n this.fireEvent = fireEvent; // store config values\n\n this.config = merge(defaults, config); // add overlay element to dom and store ref to overlay\n\n this.overlay = document.createElement('div');\n this.overlay.style.display = 'none';\n this.overlay.id = 'boxzilla-overlay-' + this.id;\n this.overlay.classList.add('boxzilla-overlay');\n document.body.appendChild(this.overlay); // state\n\n this.visible = false;\n this.dismissed = false;\n this.triggered = false;\n this.triggerHeight = this.calculateTriggerHeight();\n this.cookieSet = this.isCookieSet();\n this.element = null;\n this.contentElement = null;\n this.closeIcon = null; // create dom elements for this box\n\n this.dom(); // further initialise the box\n\n this.events();\n} // initialise the box\n\n\nBox.prototype.events = function () {\n var box = this; // attach event to \"close\" icon inside box\n\n if (this.closeIcon) {\n this.closeIcon.addEventListener('click', function (evt) {\n evt.preventDefault();\n box.dismiss();\n });\n }\n\n this.element.addEventListener('click', function (evt) {\n if (evt.target.tagName === 'A' || evt.target.tagName === 'AREA') {\n box.fireEvent('box.interactions.link', [box, evt.target]);\n }\n }, false);\n this.element.addEventListener('submit', function (evt) {\n box.setCookie();\n box.fireEvent('box.interactions.form', [box, evt.target]);\n }, false);\n this.overlay.addEventListener('click', function (evt) {\n var x = evt.offsetX;\n var y = evt.offsetY; // calculate if click was less than 40px outside box to avoid closing it by accident\n\n var rect = box.element.getBoundingClientRect();\n var margin = 40; // if click was not anywhere near box, dismiss it.\n\n if (x < rect.left - margin || x > rect.right + margin || y < rect.top - margin || y > rect.bottom + margin) {\n box.dismiss();\n }\n });\n}; // generate dom elements for this box\n\n\nBox.prototype.dom = function () {\n var wrapper = document.createElement('div');\n wrapper.className = 'boxzilla-container boxzilla-' + this.config.position + '-container';\n var box = document.createElement('div');\n box.id = 'boxzilla-' + this.id;\n box.className = 'boxzilla boxzilla-' + this.id + ' boxzilla-' + this.config.position;\n box.style.display = 'none';\n wrapper.appendChild(box);\n var content;\n\n if (typeof this.config.content === 'string') {\n content = document.createElement('div');\n content.innerHTML = this.config.content;\n } else {\n content = this.config.content; // make sure element is visible\n\n content.style.display = '';\n }\n\n content.className = 'boxzilla-content';\n box.appendChild(content);\n\n if (this.config.closable && this.config.icon) {\n var closeIcon = document.createElement('span');\n closeIcon.className = 'boxzilla-close-icon';\n closeIcon.innerHTML = this.config.icon;\n closeIcon.setAttribute('aria-label', 'close');\n box.appendChild(closeIcon);\n this.closeIcon = closeIcon;\n }\n\n document.body.appendChild(wrapper);\n this.contentElement = content;\n this.element = box;\n}; // set (calculate) custom box styling depending on box options\n\n\nBox.prototype.setCustomBoxStyling = function () {\n // reset element to its initial state\n var origDisplay = this.element.style.display;\n this.element.style.display = '';\n this.element.style.overflowY = '';\n this.element.style.maxHeight = ''; // get new dimensions\n\n var windowHeight = window.innerHeight;\n var boxHeight = this.element.clientHeight; // add scrollbar to box and limit height\n\n if (boxHeight > windowHeight) {\n this.element.style.maxHeight = windowHeight + 'px';\n this.element.style.overflowY = 'scroll';\n } // set new top margin for boxes which are centered\n\n\n if (this.config.position === 'center') {\n var newTopMargin = (windowHeight - boxHeight) / 2;\n newTopMargin = newTopMargin >= 0 ? newTopMargin : 0;\n this.element.style.marginTop = newTopMargin + 'px';\n }\n\n this.element.style.display = origDisplay;\n}; // toggle visibility of the box\n\n\nBox.prototype.toggle = function (show, animate) {\n show = typeof show === 'undefined' ? !this.visible : show;\n animate = typeof animate === 'undefined' ? true : animate; // is box already at desired visibility?\n\n if (show === this.visible) {\n return false;\n } // is box being animated?\n\n\n if (Animator.animated(this.element)) {\n return false;\n } // if box should be hidden but is not closable, bail.\n\n\n if (!show && !this.config.closable) {\n return false;\n } // set new visibility status\n\n\n this.visible = show; // calculate new styling rules\n\n this.setCustomBoxStyling(); // trigger event\n\n this.fireEvent('box.' + (show ? 'show' : 'hide'), [this]); // show or hide box using selected animation\n\n if (this.config.position === 'center') {\n this.overlay.classList.toggle('boxzilla-' + this.id + '-overlay');\n\n if (animate) {\n Animator.toggle(this.overlay, 'fade');\n } else {\n this.overlay.style.display = show ? '' : 'none';\n }\n }\n\n if (animate) {\n Animator.toggle(this.element, this.config.animation, function () {\n if (this.visible) {\n return;\n }\n\n this.contentElement.innerHTML = this.contentElement.innerHTML + '';\n }.bind(this));\n } else {\n this.element.style.display = show ? '' : 'none';\n }\n\n return true;\n}; // show the box\n\n\nBox.prototype.show = function (animate) {\n return this.toggle(true, animate);\n}; // hide the box\n\n\nBox.prototype.hide = function (animate) {\n return this.toggle(false, animate);\n}; // calculate trigger height\n\n\nBox.prototype.calculateTriggerHeight = function () {\n var triggerHeight = 0;\n\n if (this.config.trigger) {\n if (this.config.trigger.method === 'element') {\n var triggerElement = document.body.querySelector(this.config.trigger.value);\n\n if (triggerElement) {\n var offset = triggerElement.getBoundingClientRect();\n triggerHeight = offset.top;\n }\n } else if (this.config.trigger.method === 'percentage') {\n triggerHeight = this.config.trigger.value / 100 * getDocumentHeight();\n }\n }\n\n return triggerHeight;\n};\n\nBox.prototype.fits = function () {\n if (!this.config.screenWidthCondition || !this.config.screenWidthCondition.value) {\n return true;\n }\n\n switch (this.config.screenWidthCondition.condition) {\n case 'larger':\n return window.innerWidth > this.config.screenWidthCondition.value;\n\n case 'smaller':\n return window.innerWidth < this.config.screenWidthCondition.value;\n } // meh.. condition should be \"smaller\" or \"larger\", just return true.\n\n\n return true;\n};\n\nBox.prototype.onResize = function () {\n this.triggerHeight = this.calculateTriggerHeight();\n this.setCustomBoxStyling();\n}; // is this box enabled?\n\n\nBox.prototype.mayAutoShow = function () {\n if (this.dismissed) {\n return false;\n } // check if box fits on given minimum screen width\n\n\n if (!this.fits()) {\n return false;\n } // if trigger empty or error in calculating triggerHeight, return false\n\n\n if (!this.config.trigger) {\n return false;\n } // rely on cookie value (show if not set, don't show if set)\n\n\n return !this.cookieSet;\n};\n\nBox.prototype.mayRehide = function () {\n return this.config.rehide && this.triggered;\n};\n\nBox.prototype.isCookieSet = function () {\n // always show on test mode or when no auto-trigger is configured\n if (this.config.testMode || !this.config.trigger) {\n return false;\n } // if either cookie is null or trigger & dismiss are both falsey, don't bother checking.\n\n\n if (!this.config.cookie || !this.config.cookie.triggered && !this.config.cookie.dismissed) {\n return false;\n }\n\n return document.cookie.replace(new RegExp('(?:(?:^|.*;)\\\\s*' + 'boxzilla_box_' + this.id + '\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$'), '$1') === 'true';\n}; // set cookie that disables automatically showing the box\n\n\nBox.prototype.setCookie = function (hours) {\n var expiryDate = new Date();\n expiryDate.setHours(expiryDate.getHours() + hours);\n document.cookie = 'boxzilla_box_' + this.id + '=true; expires=' + expiryDate.toUTCString() + '; path=/';\n};\n\nBox.prototype.trigger = function () {\n var shown = this.show();\n\n if (!shown) {\n return;\n }\n\n this.triggered = true;\n\n if (this.config.cookie && this.config.cookie.triggered) {\n this.setCookie(this.config.cookie.triggered);\n }\n};\n/**\n * Dismisses the box and optionally sets a cookie.\n * @param animate\n * @returns {boolean}\n */\n\n\nBox.prototype.dismiss = function (animate) {\n // only dismiss box if it's currently open.\n if (!this.visible) {\n return false;\n } // hide box element\n\n\n this.hide(animate); // set cookie\n\n if (this.config.cookie && this.config.cookie.dismissed) {\n this.setCookie(this.config.cookie.dismissed);\n }\n\n this.dismissed = true;\n this.fireEvent('box.dismiss', [this]);\n return true;\n};\n\nmodule.exports = Box;\n\n},{\"./animator.js\":2}],4:[function(require,module,exports){\n\"use strict\";\n\nvar Box = require('./box.js');\n\nvar throttle = require('./util.js').throttle;\n\nvar styles = require('./styles.js');\n\nvar ExitIntent = require('./triggers/exit-intent.js');\n\nvar Scroll = require('./triggers/scroll.js');\n\nvar Pageviews = require('./triggers/pageviews.js');\n\nvar Time = require('./triggers/time.js');\n\nvar initialised = false;\nvar boxes = [];\nvar listeners = {};\n\nfunction onKeyUp(evt) {\n if (evt.key === 'Escape' || evt.key === 'Esc') {\n dismiss();\n }\n}\n\nfunction recalculateHeights() {\n boxes.forEach(function (box) {\n return box.onResize();\n });\n}\n\nfunction onElementClick(evt) {\n // bubble up to <a> or <area> element\n var el = evt.target;\n\n for (var i = 0; i <= 3; i++) {\n if (!el || el.tagName === 'A' || el.tagName === 'AREA') {\n break;\n }\n\n el = el.parentElement;\n }\n\n if (!el || el.tagName !== 'A' && el.tagName !== 'AREA' || !el.href) {\n return;\n }\n\n var match = el.href.match(/[#&]boxzilla-(.+)/i);\n\n if (match && match.length > 1) {\n toggle(match[1]);\n }\n}\n\nfunction trigger(event, args) {\n listeners[event] && listeners[event].forEach(function (f) {\n return f.apply(null, args);\n });\n}\n\nfunction on(event, fn) {\n listeners[event] = listeners[event] || [];\n listeners[event].push(fn);\n}\n\nfunction off(event, fn) {\n listeners[event] && listeners[event].filter(function (f) {\n return f !== fn;\n });\n} // initialise & add event listeners\n\n\nfunction init() {\n if (initialised) {\n return;\n } // insert styles into DOM\n\n\n var styleElement = document.createElement('style');\n styleElement.innerHTML = styles;\n document.head.appendChild(styleElement); // init triggers\n\n ExitIntent(boxes);\n Pageviews(boxes);\n Scroll(boxes);\n Time(boxes);\n document.body.addEventListener('click', onElementClick, true);\n window.addEventListener('resize', throttle(recalculateHeights));\n window.addEventListener('load', recalculateHeights);\n document.addEventListener('keyup', onKeyUp);\n trigger('ready');\n initialised = true; // ensure this function doesn't run again\n}\n\nfunction create(id, opts) {\n // preserve backwards compat for minimumScreenWidth option\n if (typeof opts.minimumScreenWidth !== 'undefined') {\n opts.screenWidthCondition = {\n condition: 'larger',\n value: opts.minimumScreenWidth\n };\n }\n\n id = String(id);\n var box = new Box(id, opts, trigger);\n boxes.push(box);\n return box;\n}\n\nfunction get(id) {\n id = String(id);\n\n for (var i = 0; i < boxes.length; i++) {\n if (boxes[i].id === id) {\n return boxes[i];\n }\n }\n\n throw new Error('No box exists with ID ' + id);\n} // dismiss a single box (or all by omitting id param)\n\n\nfunction dismiss(id, animate) {\n if (id) {\n get(id).dismiss(animate);\n } else {\n boxes.forEach(function (box) {\n return box.dismiss(animate);\n });\n }\n}\n\nfunction hide(id, animate) {\n if (id) {\n get(id).hide(animate);\n } else {\n boxes.forEach(function (box) {\n return box.hide(animate);\n });\n }\n}\n\nfunction show(id, animate) {\n if (id) {\n get(id).show(animate);\n } else {\n boxes.forEach(function (box) {\n return box.show(animate);\n });\n }\n}\n\nfunction toggle(id, animate) {\n if (id) {\n get(id).toggle(animate);\n } else {\n boxes.forEach(function (box) {\n return box.toggle(animate);\n });\n }\n} // expose boxzilla object\n\n\nvar Boxzilla = {\n off: off,\n on: on,\n get: get,\n init: init,\n create: create,\n trigger: trigger,\n show: show,\n hide: hide,\n dismiss: dismiss,\n toggle: toggle,\n boxes: boxes\n};\nwindow.Boxzilla = Boxzilla;\n\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = Boxzilla;\n}\n\n},{\"./box.js\":3,\"./styles.js\":5,\"./triggers/exit-intent.js\":7,\"./triggers/pageviews.js\":8,\"./triggers/scroll.js\":9,\"./triggers/time.js\":10,\"./util.js\":11}],5:[function(require,module,exports){\n\"use strict\";\n\nvar styles = \"#boxzilla-overlay,.boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:10000}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:11000;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:12000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}\";\nmodule.exports = styles;\n\n},{}],6:[function(require,module,exports){\n\"use strict\";\n\nvar Timer = function Timer() {\n this.time = 0;\n this.interval = 0;\n};\n\nTimer.prototype.tick = function () {\n this.time++;\n};\n\nTimer.prototype.start = function () {\n if (!this.interval) {\n this.interval = window.setInterval(this.tick.bind(this), 1000);\n }\n};\n\nTimer.prototype.stop = function () {\n if (this.interval) {\n window.clearInterval(this.interval);\n this.interval = 0;\n }\n};\n\nmodule.exports = Timer;\n\n},{}],7:[function(require,module,exports){\n\"use strict\";\n\nmodule.exports = function (boxes) {\n var timeout = null;\n var touchStart = {};\n\n function trigger() {\n document.documentElement.removeEventListener('mouseleave', onMouseLeave);\n document.documentElement.removeEventListener('mouseenter', onMouseEnter);\n document.documentElement.removeEventListener('click', clearTimeout);\n window.removeEventListener('touchstart', onTouchStart);\n window.removeEventListener('touchend', onTouchEnd); // show boxes with exit intent trigger\n\n boxes.forEach(function (box) {\n if (box.mayAutoShow() && box.config.trigger.method === 'exit_intent') {\n box.trigger();\n }\n });\n }\n\n function clearTimeout() {\n if (timeout === null) {\n return;\n }\n\n window.clearTimeout(timeout);\n timeout = null;\n }\n\n function onMouseEnter() {\n clearTimeout();\n }\n\n function getAddressBarY() {\n if (document.documentMode || /Edge\\//.test(navigator.userAgent)) {\n return 5;\n }\n\n return 0;\n }\n\n function onMouseLeave(evt) {\n clearTimeout(); // did mouse leave at top of window?\n // add small exception space in the top-right corner\n\n if (evt.clientY <= getAddressBarY() && evt.clientX < 0.8 * window.innerWidth) {\n timeout = window.setTimeout(trigger, 600);\n }\n }\n\n function onTouchStart() {\n clearTimeout();\n touchStart = {\n timestamp: performance.now(),\n scrollY: window.scrollY,\n windowHeight: window.innerHeight\n };\n }\n\n function onTouchEnd(evt) {\n clearTimeout(); // did address bar appear?\n\n if (window.innerHeight > touchStart.windowHeight) {\n return;\n } // allow a tiny tiny margin for error, to not fire on clicks\n\n\n if (window.scrollY + 20 > touchStart.scrollY) {\n return;\n }\n\n if (performance.now() - touchStart.timestamp > 300) {\n return;\n }\n\n if (['A', 'INPUT', 'BUTTON'].indexOf(evt.target.tagName) > -1) {\n return;\n }\n\n timeout = window.setTimeout(trigger, 800);\n }\n\n window.addEventListener('touchstart', onTouchStart);\n window.addEventListener('touchend', onTouchEnd);\n document.documentElement.addEventListener('mouseenter', onMouseEnter);\n document.documentElement.addEventListener('mouseleave', onMouseLeave);\n document.documentElement.addEventListener('click', clearTimeout);\n};\n\n},{}],8:[function(require,module,exports){\n\"use strict\";\n\nmodule.exports = function (boxes) {\n var pageviews;\n\n try {\n pageviews = sessionStorage.getItem('boxzilla_pageviews') || 0;\n sessionStorage.setItem('boxzilla_pageviews', ++pageviews);\n } catch (e) {\n pageviews = 0;\n }\n\n window.setTimeout(function () {\n boxes.forEach(function (box) {\n if (box.config.trigger.method === 'pageviews' && pageviews > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n }\n });\n }, 1000);\n};\n\n},{}],9:[function(require,module,exports){\n\"use strict\";\n\nvar throttle = require('../util.js').throttle;\n\nmodule.exports = function (boxes) {\n // check triggerHeight criteria for all boxes\n function checkHeightCriteria() {\n var scrollY = window.hasOwnProperty('pageYOffset') ? window.pageYOffset : window.scrollTop;\n scrollY = scrollY + window.innerHeight * 0.9;\n boxes.forEach(function (box) {\n if (!box.mayAutoShow() || box.triggerHeight <= 0) {\n return;\n }\n\n if (scrollY > box.triggerHeight) {\n box.trigger();\n } else if (box.mayRehide() && scrollY < box.triggerHeight - 5) {\n // if box may auto-hide and scrollY is less than triggerHeight (with small margin of error), hide box\n box.hide();\n }\n });\n }\n\n window.addEventListener('touchstart', throttle(checkHeightCriteria), true);\n window.addEventListener('scroll', throttle(checkHeightCriteria), true);\n};\n\n},{\"../util.js\":11}],10:[function(require,module,exports){\n\"use strict\";\n\nvar Timer = require('../timer.js');\n\nmodule.exports = function (boxes) {\n var siteTimer = new Timer();\n var pageTimer = new Timer();\n var timers = {\n start: function start() {\n try {\n var sessionTime = parseInt(sessionStorage.getItem('boxzilla_timer'));\n\n if (sessionTime) {\n siteTimer.time = sessionTime;\n }\n } catch (e) {}\n\n siteTimer.start();\n pageTimer.start();\n },\n stop: function stop() {\n sessionStorage.setItem('boxzilla_timer', siteTimer.time);\n siteTimer.stop();\n pageTimer.stop();\n }\n }; // start timers\n\n timers.start(); // stop timers when leaving page or switching to other tab\n\n document.addEventListener('visibilitychange', function () {\n document.hidden ? timers.stop() : timers.start();\n });\n window.addEventListener('beforeunload', function () {\n timers.stop();\n });\n window.setInterval(function () {\n boxes.forEach(function (box) {\n if (box.config.trigger.method === 'time_on_site' && siteTimer.time > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n } else if (box.config.trigger.method === 'time_on_page' && pageTimer.time > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n }\n });\n }, 1000);\n};\n\n},{\"../timer.js\":6}],11:[function(require,module,exports){\n\"use strict\";\n\nfunction throttle(fn, threshold, scope) {\n threshold || (threshold = 800);\n var last;\n var deferTimer;\n return function () {\n var context = scope || this;\n var now = +new Date();\n var args = arguments;\n\n if (last && now < last + threshold) {\n // hold on to it\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n fn.apply(context, args);\n }, threshold);\n } else {\n last = now;\n fn.apply(context, args);\n }\n };\n}\n\nmodule.exports = {\n throttle: throttle\n};\n\n},{}]},{},[1]);\n; })();"],"names":["require","undefined","r","e","n","t","o","i","f","c","u","a","Error","code","p","exports","call","length","1","module","_typeof","obj","Symbol","iterator","constructor","prototype","Boxzilla","options","isLoggedIn","window","boxzilla_options","document","body","className","indexOf","testMode","console","log","init","addEventListener","inited","key","boxes","boxOpts","boxContentElement","getElementById","id","content","box","create","element","post","slug","styles","css","background_color","style","background","color","border_color","borderColor","border_width","borderWidth","parseInt","border_style","borderStyle","width","maxWidth","firstChild","lastChild","fits","location","hash","match","elementId","querySelector","locationHashRefersBox","show","trigger","mc4wp_forms_config","submitted_form","mc4wp_submitted_form","selector","element_id","forEach","maybeOpenMailChimpForWordPressBox","boxzilla","2","duration","property","hasOwnProperty","animate","targetStyles","fn","to","current","last","Date","initialStyles","getComputedStyle","currentStyles","propSteps","parseFloat","tick","step","newValue","_property","timeSinceLastTick","done","increment","requestAnimationFrame","toggle","animation","callbackFn","cleanup","removeAttribute","setAttribute","clone","getAttribute","display","nowVisible","visibleStyles","hiddenStyles","offsetLeft","cloneNode","properties","value","newObject","initObjectProperties","object","copyObjectProperties","isFinite","height","clientRect","getBoundingClientRect","overflowY","opacity","animated","3","defaults","rehide","cookie","icon","screenWidthCondition","position","closable","Animator","Box","config","fireEvent","this","obj1","obj2","attrname","_attrname","obj3","merge","overlay","createElement","classList","add","appendChild","visible","dismissed","triggered","triggerHeight","calculateTriggerHeight","cookieSet","isCookieSet","contentElement","closeIcon","dom","events","evt","preventDefault","dismiss","target","tagName","setCookie","x","offsetX","y","offsetY","rect","left","right","top","bottom","wrapper","innerHTML","setCustomBoxStyling","origDisplay","maxHeight","windowHeight","innerHeight","boxHeight","clientHeight","newTopMargin","marginTop","bind","hide","html","method","triggerElement","documentElement","Math","max","scrollHeight","offsetHeight","condition","innerWidth","onResize","mayAutoShow","mayRehide","replace","RegExp","hours","expiryDate","setHours","getHours","toUTCString","./animator.js","4","throttle","ExitIntent","Scroll","Pageviews","Time","initialised","listeners","onKeyUp","recalculateHeights","onElementClick","el","parentElement","href","event","args","apply","get","String","off","filter","on","push","styleElement","head","opts","minimumScreenWidth","./box.js","./styles.js","./triggers/exit-intent.js","./triggers/pageviews.js","./triggers/scroll.js","./triggers/time.js","./util.js","5","6","Timer","time","interval","start","setInterval","stop","clearInterval","7","timeout","touchStart","removeEventListener","onMouseLeave","onMouseEnter","clearTimeout","onTouchStart","onTouchEnd","clientY","documentMode","test","navigator","userAgent","clientX","setTimeout","timestamp","performance","now","scrollY","8","pageviews","sessionStorage","getItem","setItem","9","checkHeightCriteria","pageYOffset","scrollTop","../util.js","10","siteTimer","pageTimer","timers","sessionTime","hidden","../timer.js","11","threshold","scope","deferTimer","context","arguments"],"mappings":"CAAA,WAAe,IAAIA,OAAUC,GAAgG,SAASC,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ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AAO,IAAI1L,KACX4I,EAAOsE,UAEPnN,GAAQ2L,EAAM3L,EAAO+M,GAEvBhC,aAAakC,GACbA,EAAazB,WAAW,WACtBxL,EAAO2L,EACP9L,EAAGiJ,MAAMoE,EAASrE,IACjBkE,KAEH/M,EAAO2L,EACP9L,EAAGiJ,MAAMoE,EAASrE,QAStB,KAAK,GAAG,CAAC,IAjmCX"}
1
+ {"version":3,"file":"script.min.js","sources":["script.js"],"sourcesContent":["(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n\"use strict\";\n\nvar duration = 320;\n\nfunction css(element, styles) {\n for (var property in styles) {\n if (!styles.hasOwnProperty(property)) {\n continue;\n }\n\n element.style[property] = styles[property];\n }\n}\n\nfunction initObjectProperties(properties, value) {\n var newObject = {};\n\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = value;\n }\n\n return newObject;\n}\n\nfunction copyObjectProperties(properties, object) {\n var newObject = {};\n\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = object[properties[i]];\n }\n\n return newObject;\n}\n/**\n * Checks if the given element is currently being animated.\n *\n * @param element\n * @returns {boolean}\n */\n\n\nfunction animated(element) {\n return !!element.getAttribute('data-animated');\n}\n/**\n * Toggles the element using the given animation.\n *\n * @param element\n * @param animation Either \"fade\" or \"slide\"\n * @param callbackFn\n */\n\n\nfunction toggle(element, animation, callbackFn) {\n var nowVisible = element.style.display !== 'none' || element.offsetLeft > 0; // create clone for reference\n\n var clone = element.cloneNode(true);\n\n var cleanup = function cleanup() {\n element.removeAttribute('data-animated');\n element.setAttribute('style', clone.getAttribute('style'));\n element.style.display = nowVisible ? 'none' : '';\n\n if (callbackFn) {\n callbackFn();\n }\n }; // store attribute so everyone knows we're animating this element\n\n\n element.setAttribute('data-animated', 'true'); // toggle element visiblity right away if we're making something visible\n\n if (!nowVisible) {\n element.style.display = '';\n }\n\n var hiddenStyles;\n var visibleStyles; // animate properties\n\n if (animation === 'slide') {\n hiddenStyles = initObjectProperties(['height', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'], 0);\n visibleStyles = {};\n\n if (!nowVisible) {\n var computedStyles = window.getComputedStyle(element);\n visibleStyles = copyObjectProperties(['height', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'], computedStyles); // in some browsers, getComputedStyle returns \"auto\" value. this falls back to getBoundingClientRect() in those browsers since we need an actual height.\n\n if (!isFinite(visibleStyles.height)) {\n var clientRect = element.getBoundingClientRect();\n visibleStyles.height = clientRect.height;\n }\n\n css(element, hiddenStyles);\n } // don't show a scrollbar during animation\n\n\n element.style.overflowY = 'hidden';\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n } else {\n hiddenStyles = {\n opacity: 0\n };\n visibleStyles = {\n opacity: 1\n };\n\n if (!nowVisible) {\n css(element, hiddenStyles);\n }\n\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n }\n}\n\nfunction animate(element, targetStyles, fn) {\n var last = +new Date();\n var initialStyles = window.getComputedStyle(element);\n var currentStyles = {};\n var propSteps = {};\n\n for (var property in targetStyles) {\n if (!targetStyles.hasOwnProperty(property)) {\n continue;\n } // make sure we have an object filled with floats\n\n\n targetStyles[property] = parseFloat(targetStyles[property]); // calculate step size & current value\n\n var to = targetStyles[property];\n var current = parseFloat(initialStyles[property]); // is there something to do?\n\n if (current === to) {\n delete targetStyles[property];\n continue;\n }\n\n propSteps[property] = (to - current) / duration; // points per second\n\n currentStyles[property] = current;\n }\n\n var tick = function tick() {\n var now = +new Date();\n var timeSinceLastTick = now - last;\n var done = true;\n var step, to, increment, newValue;\n\n for (var _property in targetStyles) {\n if (!targetStyles.hasOwnProperty(_property)) {\n continue;\n }\n\n step = propSteps[_property];\n to = targetStyles[_property];\n increment = step * timeSinceLastTick;\n newValue = currentStyles[_property] + increment;\n\n if (step > 0 && newValue >= to || step < 0 && newValue <= to) {\n newValue = to;\n } else {\n done = false;\n } // store new value\n\n\n currentStyles[_property] = newValue;\n element.style[_property] = _property !== 'opacity' ? newValue + 'px' : newValue;\n }\n\n last = +new Date();\n\n if (!done) {\n // keep going until we're done for all props\n window.requestAnimationFrame(tick);\n } else {\n // call callback\n fn && fn();\n }\n };\n\n tick();\n}\n\nmodule.exports = {\n toggle: toggle,\n animate: animate,\n animated: animated\n};\n\n},{}],2:[function(require,module,exports){\n\"use strict\";\n\nvar defaults = {\n animation: 'fade',\n rehide: false,\n content: '',\n cookie: null,\n icon: '&times',\n screenWidthCondition: null,\n position: 'center',\n testMode: false,\n trigger: false,\n closable: true\n};\n\nvar Animator = require('./animator.js');\n/**\n * Merge 2 objects, values of the latter overwriting the former.\n *\n * @param obj1\n * @param obj2\n * @returns {*}\n */\n\n\nfunction merge(obj1, obj2) {\n var obj3 = {}; // add obj1 to obj3\n\n for (var attrname in obj1) {\n if (obj1.hasOwnProperty(attrname)) {\n obj3[attrname] = obj1[attrname];\n }\n } // add obj2 to obj3\n\n\n for (var _attrname in obj2) {\n if (obj2.hasOwnProperty(_attrname)) {\n obj3[_attrname] = obj2[_attrname];\n }\n }\n\n return obj3;\n}\n/**\n * Get the real height of entire document.\n * @returns {number}\n */\n\n\nfunction getDocumentHeight() {\n var body = document.body;\n var html = document.documentElement;\n return Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);\n} // Box Object\n\n\nfunction Box(id, config, fireEvent) {\n this.id = id;\n this.fireEvent = fireEvent; // store config values\n\n this.config = merge(defaults, config); // add overlay element to dom and store ref to overlay\n\n this.overlay = document.createElement('div');\n this.overlay.setAttribute('aria-modal', true);\n this.overlay.style.display = 'none';\n this.overlay.id = 'boxzilla-overlay-' + this.id;\n this.overlay.classList.add('boxzilla-overlay');\n document.body.appendChild(this.overlay); // state\n\n this.visible = false;\n this.dismissed = false;\n this.triggered = false;\n this.triggerHeight = this.calculateTriggerHeight();\n this.cookieSet = this.isCookieSet();\n this.element = null;\n this.contentElement = null;\n this.closeIcon = null; // create dom elements for this box\n\n this.dom(); // further initialise the box\n\n this.events();\n} // initialise the box\n\n\nBox.prototype.events = function () {\n var box = this; // attach event to \"close\" icon inside box\n\n if (this.closeIcon) {\n this.closeIcon.addEventListener('click', function (evt) {\n evt.preventDefault();\n box.dismiss();\n });\n }\n\n this.element.addEventListener('click', function (evt) {\n if (evt.target.tagName === 'A' || evt.target.tagName === 'AREA') {\n box.fireEvent('box.interactions.link', [box, evt.target]);\n }\n }, false);\n this.element.addEventListener('submit', function (evt) {\n box.setCookie();\n box.fireEvent('box.interactions.form', [box, evt.target]);\n }, false);\n this.overlay.addEventListener('click', function (evt) {\n var x = evt.offsetX;\n var y = evt.offsetY; // calculate if click was less than 40px outside box to avoid closing it by accident\n\n var rect = box.element.getBoundingClientRect();\n var margin = 40; // if click was not anywhere near box, dismiss it.\n\n if (x < rect.left - margin || x > rect.right + margin || y < rect.top - margin || y > rect.bottom + margin) {\n box.dismiss();\n }\n });\n}; // generate dom elements for this box\n\n\nBox.prototype.dom = function () {\n var wrapper = document.createElement('div');\n wrapper.className = 'boxzilla-container boxzilla-' + this.config.position + '-container';\n var box = document.createElement('div');\n box.id = 'boxzilla-' + this.id;\n box.className = 'boxzilla boxzilla-' + this.id + ' boxzilla-' + this.config.position;\n box.style.display = 'none';\n wrapper.appendChild(box);\n var content;\n\n if (typeof this.config.content === 'string') {\n content = document.createElement('div');\n content.innerHTML = this.config.content;\n } else {\n content = this.config.content; // make sure element is visible\n\n content.style.display = '';\n }\n\n content.className = 'boxzilla-content';\n box.appendChild(content);\n\n if (this.config.closable && this.config.icon) {\n var closeIcon = document.createElement('span');\n closeIcon.className = 'boxzilla-close-icon';\n closeIcon.innerHTML = this.config.icon;\n closeIcon.setAttribute('aria-label', 'close');\n box.appendChild(closeIcon);\n this.closeIcon = closeIcon;\n }\n\n document.body.appendChild(wrapper);\n this.contentElement = content;\n this.element = box;\n}; // set (calculate) custom box styling depending on box options\n\n\nBox.prototype.setCustomBoxStyling = function () {\n // reset element to its initial state\n var origDisplay = this.element.style.display;\n this.element.style.display = '';\n this.element.style.overflowY = '';\n this.element.style.maxHeight = ''; // get new dimensions\n\n var windowHeight = window.innerHeight;\n var boxHeight = this.element.clientHeight; // add scrollbar to box and limit height\n\n if (boxHeight > windowHeight) {\n this.element.style.maxHeight = windowHeight + 'px';\n this.element.style.overflowY = 'scroll';\n } // set new top margin for boxes which are centered\n\n\n if (this.config.position === 'center') {\n var newTopMargin = (windowHeight - boxHeight) / 2;\n newTopMargin = newTopMargin >= 0 ? newTopMargin : 0;\n this.element.style.marginTop = newTopMargin + 'px';\n }\n\n this.element.style.display = origDisplay;\n}; // toggle visibility of the box\n\n\nBox.prototype.toggle = function (show, animate) {\n show = typeof show === 'undefined' ? !this.visible : show;\n animate = typeof animate === 'undefined' ? true : animate; // is box already at desired visibility?\n\n if (show === this.visible) {\n return false;\n } // is box being animated?\n\n\n if (Animator.animated(this.element)) {\n return false;\n } // if box should be hidden but is not closable, bail.\n\n\n if (!show && !this.config.closable) {\n return false;\n } // set new visibility status\n\n\n this.visible = show; // calculate new styling rules\n\n this.setCustomBoxStyling(); // trigger event\n\n this.fireEvent('box.' + (show ? 'show' : 'hide'), [this]); // show or hide box using selected animation\n\n if (this.config.position === 'center') {\n this.overlay.classList.toggle('boxzilla-' + this.id + '-overlay');\n\n if (animate) {\n Animator.toggle(this.overlay, 'fade');\n } else {\n this.overlay.style.display = show ? '' : 'none';\n }\n }\n\n if (animate) {\n Animator.toggle(this.element, this.config.animation, function () {\n if (this.visible) {\n return;\n }\n\n this.contentElement.innerHTML = this.contentElement.innerHTML + '';\n }.bind(this));\n } else {\n this.element.style.display = show ? '' : 'none';\n }\n\n return true;\n}; // show the box\n\n\nBox.prototype.show = function (animate) {\n return this.toggle(true, animate);\n}; // hide the box\n\n\nBox.prototype.hide = function (animate) {\n return this.toggle(false, animate);\n}; // calculate trigger height\n\n\nBox.prototype.calculateTriggerHeight = function () {\n var triggerHeight = 0;\n\n if (this.config.trigger) {\n if (this.config.trigger.method === 'element') {\n var triggerElement = document.body.querySelector(this.config.trigger.value);\n\n if (triggerElement) {\n var offset = triggerElement.getBoundingClientRect();\n triggerHeight = offset.top;\n }\n } else if (this.config.trigger.method === 'percentage') {\n triggerHeight = this.config.trigger.value / 100 * getDocumentHeight();\n }\n }\n\n return triggerHeight;\n};\n\nBox.prototype.fits = function () {\n if (!this.config.screenWidthCondition || !this.config.screenWidthCondition.value) {\n return true;\n }\n\n switch (this.config.screenWidthCondition.condition) {\n case 'larger':\n return window.innerWidth > this.config.screenWidthCondition.value;\n\n case 'smaller':\n return window.innerWidth < this.config.screenWidthCondition.value;\n } // meh.. condition should be \"smaller\" or \"larger\", just return true.\n\n\n return true;\n};\n\nBox.prototype.onResize = function () {\n this.triggerHeight = this.calculateTriggerHeight();\n this.setCustomBoxStyling();\n}; // is this box enabled?\n\n\nBox.prototype.mayAutoShow = function () {\n if (this.dismissed) {\n return false;\n } // check if box fits on given minimum screen width\n\n\n if (!this.fits()) {\n return false;\n } // if trigger empty or error in calculating triggerHeight, return false\n\n\n if (!this.config.trigger) {\n return false;\n } // rely on cookie value (show if not set, don't show if set)\n\n\n return !this.cookieSet;\n};\n\nBox.prototype.mayRehide = function () {\n return this.config.rehide && this.triggered;\n};\n\nBox.prototype.isCookieSet = function () {\n // always show on test mode or when no auto-trigger is configured\n if (this.config.testMode || !this.config.trigger) {\n return false;\n } // if either cookie is null or trigger & dismiss are both falsey, don't bother checking.\n\n\n if (!this.config.cookie || !this.config.cookie.triggered && !this.config.cookie.dismissed) {\n return false;\n }\n\n return document.cookie.replace(new RegExp('(?:(?:^|.*;)\\\\s*' + 'boxzilla_box_' + this.id + '\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$'), '$1') === 'true';\n}; // set cookie that disables automatically showing the box\n\n\nBox.prototype.setCookie = function (hours) {\n var expiryDate = new Date();\n expiryDate.setHours(expiryDate.getHours() + hours);\n document.cookie = 'boxzilla_box_' + this.id + '=true; expires=' + expiryDate.toUTCString() + '; path=/';\n};\n\nBox.prototype.trigger = function () {\n var shown = this.show();\n\n if (!shown) {\n return;\n }\n\n this.triggered = true;\n\n if (this.config.cookie && this.config.cookie.triggered) {\n this.setCookie(this.config.cookie.triggered);\n }\n};\n/**\n * Dismisses the box and optionally sets a cookie.\n * @param animate\n * @returns {boolean}\n */\n\n\nBox.prototype.dismiss = function (animate) {\n // only dismiss box if it's currently open.\n if (!this.visible) {\n return false;\n } // hide box element\n\n\n this.hide(animate); // set cookie\n\n if (this.config.cookie && this.config.cookie.dismissed) {\n this.setCookie(this.config.cookie.dismissed);\n }\n\n this.dismissed = true;\n this.fireEvent('box.dismiss', [this]);\n return true;\n};\n\nmodule.exports = Box;\n\n},{\"./animator.js\":1}],3:[function(require,module,exports){\n\"use strict\";\n\nvar Box = require('./box.js');\n\nvar throttle = require('./util.js').throttle;\n\nvar styles = require('./styles.js');\n\nvar ExitIntent = require('./triggers/exit-intent.js');\n\nvar Scroll = require('./triggers/scroll.js');\n\nvar Pageviews = require('./triggers/pageviews.js');\n\nvar Time = require('./triggers/time.js');\n\nvar initialised = false;\nvar boxes = [];\nvar listeners = {};\n\nfunction onKeyUp(evt) {\n if (evt.key === 'Escape' || evt.key === 'Esc') {\n dismiss();\n }\n}\n\nfunction recalculateHeights() {\n boxes.forEach(function (box) {\n return box.onResize();\n });\n}\n\nfunction onElementClick(evt) {\n // bubble up to <a> or <area> element\n var el = evt.target;\n\n for (var i = 0; i <= 3; i++) {\n if (!el || el.tagName === 'A' || el.tagName === 'AREA') {\n break;\n }\n\n el = el.parentElement;\n }\n\n if (!el || el.tagName !== 'A' && el.tagName !== 'AREA' || !el.href) {\n return;\n }\n\n var match = el.href.match(/[#&]boxzilla-(.+)/i);\n\n if (match && match.length > 1) {\n toggle(match[1]);\n }\n}\n\nfunction trigger(event, args) {\n listeners[event] && listeners[event].forEach(function (f) {\n return f.apply(null, args);\n });\n}\n\nfunction on(event, fn) {\n listeners[event] = listeners[event] || [];\n listeners[event].push(fn);\n}\n\nfunction off(event, fn) {\n listeners[event] && listeners[event].filter(function (f) {\n return f !== fn;\n });\n} // initialise & add event listeners\n\n\nfunction init() {\n if (initialised) {\n return;\n } // insert styles into DOM\n\n\n var styleElement = document.createElement('style');\n styleElement.innerHTML = styles;\n document.head.appendChild(styleElement); // init triggers\n\n ExitIntent(boxes);\n Pageviews(boxes);\n Scroll(boxes);\n Time(boxes);\n document.body.addEventListener('click', onElementClick, true);\n window.addEventListener('resize', throttle(recalculateHeights));\n window.addEventListener('load', recalculateHeights);\n document.addEventListener('keyup', onKeyUp);\n trigger('ready');\n initialised = true; // ensure this function doesn't run again\n}\n\nfunction create(id, opts) {\n // preserve backwards compat for minimumScreenWidth option\n if (typeof opts.minimumScreenWidth !== 'undefined') {\n opts.screenWidthCondition = {\n condition: 'larger',\n value: opts.minimumScreenWidth\n };\n }\n\n id = String(id);\n var box = new Box(id, opts, trigger);\n boxes.push(box);\n return box;\n}\n\nfunction get(id) {\n id = String(id);\n\n for (var i = 0; i < boxes.length; i++) {\n if (boxes[i].id === id) {\n return boxes[i];\n }\n }\n\n throw new Error('No box exists with ID ' + id);\n} // dismiss a single box (or all by omitting id param)\n\n\nfunction dismiss(id, animate) {\n if (id) {\n get(id).dismiss(animate);\n } else {\n boxes.forEach(function (box) {\n return box.dismiss(animate);\n });\n }\n}\n\nfunction hide(id, animate) {\n if (id) {\n get(id).hide(animate);\n } else {\n boxes.forEach(function (box) {\n return box.hide(animate);\n });\n }\n}\n\nfunction show(id, animate) {\n if (id) {\n get(id).show(animate);\n } else {\n boxes.forEach(function (box) {\n return box.show(animate);\n });\n }\n}\n\nfunction toggle(id, animate) {\n if (id) {\n get(id).toggle(animate);\n } else {\n boxes.forEach(function (box) {\n return box.toggle(animate);\n });\n }\n} // expose boxzilla object\n\n\nvar Boxzilla = {\n off: off,\n on: on,\n get: get,\n init: init,\n create: create,\n trigger: trigger,\n show: show,\n hide: hide,\n dismiss: dismiss,\n toggle: toggle,\n boxes: boxes\n};\nwindow.Boxzilla = Boxzilla;\n\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = Boxzilla;\n}\n\n},{\"./box.js\":2,\"./styles.js\":4,\"./triggers/exit-intent.js\":6,\"./triggers/pageviews.js\":7,\"./triggers/scroll.js\":8,\"./triggers/time.js\":9,\"./util.js\":10}],4:[function(require,module,exports){\n\"use strict\";\n\nvar styles = \"#boxzilla-overlay,.boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:10000}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:11000;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:12000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}\";\nmodule.exports = styles;\n\n},{}],5:[function(require,module,exports){\n\"use strict\";\n\nvar Timer = function Timer() {\n this.time = 0;\n this.interval = 0;\n};\n\nTimer.prototype.tick = function () {\n this.time++;\n};\n\nTimer.prototype.start = function () {\n if (!this.interval) {\n this.interval = window.setInterval(this.tick.bind(this), 1000);\n }\n};\n\nTimer.prototype.stop = function () {\n if (this.interval) {\n window.clearInterval(this.interval);\n this.interval = 0;\n }\n};\n\nmodule.exports = Timer;\n\n},{}],6:[function(require,module,exports){\n\"use strict\";\n\nmodule.exports = function (boxes) {\n var timeout = null;\n var touchStart = {};\n\n function trigger() {\n document.documentElement.removeEventListener('mouseleave', onMouseLeave);\n document.documentElement.removeEventListener('mouseenter', onMouseEnter);\n document.documentElement.removeEventListener('click', clearTimeout);\n window.removeEventListener('touchstart', onTouchStart);\n window.removeEventListener('touchend', onTouchEnd); // show boxes with exit intent trigger\n\n boxes.forEach(function (box) {\n if (box.mayAutoShow() && box.config.trigger.method === 'exit_intent') {\n box.trigger();\n }\n });\n }\n\n function clearTimeout() {\n if (timeout === null) {\n return;\n }\n\n window.clearTimeout(timeout);\n timeout = null;\n }\n\n function onMouseEnter() {\n clearTimeout();\n }\n\n function getAddressBarY() {\n if (document.documentMode || /Edge\\//.test(navigator.userAgent)) {\n return 5;\n }\n\n return 0;\n }\n\n function onMouseLeave(evt) {\n clearTimeout(); // did mouse leave at top of window?\n // add small exception space in the top-right corner\n\n if (evt.clientY <= getAddressBarY() && evt.clientX < 0.8 * window.innerWidth) {\n timeout = window.setTimeout(trigger, 600);\n }\n }\n\n function onTouchStart() {\n clearTimeout();\n touchStart = {\n timestamp: performance.now(),\n scrollY: window.scrollY,\n windowHeight: window.innerHeight\n };\n }\n\n function onTouchEnd(evt) {\n clearTimeout(); // did address bar appear?\n\n if (window.innerHeight > touchStart.windowHeight) {\n return;\n } // allow a tiny tiny margin for error, to not fire on clicks\n\n\n if (window.scrollY + 20 > touchStart.scrollY) {\n return;\n }\n\n if (performance.now() - touchStart.timestamp > 300) {\n return;\n }\n\n if (['A', 'INPUT', 'BUTTON'].indexOf(evt.target.tagName) > -1) {\n return;\n }\n\n timeout = window.setTimeout(trigger, 800);\n }\n\n window.addEventListener('touchstart', onTouchStart);\n window.addEventListener('touchend', onTouchEnd);\n document.documentElement.addEventListener('mouseenter', onMouseEnter);\n document.documentElement.addEventListener('mouseleave', onMouseLeave);\n document.documentElement.addEventListener('click', clearTimeout);\n};\n\n},{}],7:[function(require,module,exports){\n\"use strict\";\n\nmodule.exports = function (boxes) {\n var pageviews;\n\n try {\n pageviews = sessionStorage.getItem('boxzilla_pageviews') || 0;\n sessionStorage.setItem('boxzilla_pageviews', ++pageviews);\n } catch (e) {\n pageviews = 0;\n }\n\n window.setTimeout(function () {\n boxes.forEach(function (box) {\n if (box.config.trigger.method === 'pageviews' && pageviews > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n }\n });\n }, 1000);\n};\n\n},{}],8:[function(require,module,exports){\n\"use strict\";\n\nvar throttle = require('../util.js').throttle;\n\nmodule.exports = function (boxes) {\n // check triggerHeight criteria for all boxes\n function checkHeightCriteria() {\n var scrollY = window.hasOwnProperty('pageYOffset') ? window.pageYOffset : window.scrollTop;\n scrollY = scrollY + window.innerHeight * 0.9;\n boxes.forEach(function (box) {\n if (!box.mayAutoShow() || box.triggerHeight <= 0) {\n return;\n }\n\n if (scrollY > box.triggerHeight) {\n box.trigger();\n } else if (box.mayRehide() && scrollY < box.triggerHeight - 5) {\n // if box may auto-hide and scrollY is less than triggerHeight (with small margin of error), hide box\n box.hide();\n }\n });\n }\n\n window.addEventListener('touchstart', throttle(checkHeightCriteria), true);\n window.addEventListener('scroll', throttle(checkHeightCriteria), true);\n};\n\n},{\"../util.js\":10}],9:[function(require,module,exports){\n\"use strict\";\n\nvar Timer = require('../timer.js');\n\nmodule.exports = function (boxes) {\n var siteTimer = new Timer();\n var pageTimer = new Timer();\n var timers = {\n start: function start() {\n try {\n var sessionTime = parseInt(sessionStorage.getItem('boxzilla_timer'));\n\n if (sessionTime) {\n siteTimer.time = sessionTime;\n }\n } catch (e) {}\n\n siteTimer.start();\n pageTimer.start();\n },\n stop: function stop() {\n sessionStorage.setItem('boxzilla_timer', siteTimer.time);\n siteTimer.stop();\n pageTimer.stop();\n }\n }; // start timers\n\n timers.start(); // stop timers when leaving page or switching to other tab\n\n document.addEventListener('visibilitychange', function () {\n document.hidden ? timers.stop() : timers.start();\n });\n window.addEventListener('beforeunload', function () {\n timers.stop();\n });\n window.setInterval(function () {\n boxes.forEach(function (box) {\n if (box.config.trigger.method === 'time_on_site' && siteTimer.time > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n } else if (box.config.trigger.method === 'time_on_page' && pageTimer.time > box.config.trigger.value && box.mayAutoShow()) {\n box.trigger();\n }\n });\n }, 1000);\n};\n\n},{\"../timer.js\":5}],10:[function(require,module,exports){\n\"use strict\";\n\nfunction throttle(fn, threshold, scope) {\n threshold || (threshold = 800);\n var last;\n var deferTimer;\n return function () {\n var context = scope || this;\n var now = +new Date();\n var args = arguments;\n\n if (last && now < last + threshold) {\n // hold on to it\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n fn.apply(context, args);\n }, threshold);\n } else {\n last = now;\n fn.apply(context, args);\n }\n };\n}\n\nmodule.exports = {\n throttle: throttle\n};\n\n},{}],11:[function(require,module,exports){\n\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n(function () {\n var Boxzilla = require('./boxzilla/boxzilla.js');\n\n var options = window.boxzilla_options; // helper function for setting CSS styles\n\n function css(element, styles) {\n if (styles.background_color) {\n element.style.background = styles.background_color;\n }\n\n if (styles.color) {\n element.style.color = styles.color;\n }\n\n if (styles.border_color) {\n element.style.borderColor = styles.border_color;\n }\n\n if (styles.border_width) {\n element.style.borderWidth = parseInt(styles.border_width) + 'px';\n }\n\n if (styles.border_style) {\n element.style.borderStyle = styles.border_style;\n }\n\n if (styles.width) {\n element.style.maxWidth = parseInt(styles.width) + 'px';\n }\n }\n\n function createBoxesFromConfig() {\n // failsafe against including script twice.\n if (options.inited) {\n return;\n } // create boxes from options\n\n\n for (var key in options.boxes) {\n // get opts\n var boxOpts = options.boxes[key];\n boxOpts.testMode = isLoggedIn && options.testMode; // find box content element, bail if not found\n\n var boxContentElement = document.getElementById('boxzilla-box-' + boxOpts.id + '-content');\n\n if (!boxContentElement) {\n continue;\n } // use element as content option\n\n\n boxOpts.content = boxContentElement; // create box\n\n var box = Boxzilla.create(boxOpts.id, boxOpts); // add box slug to box element as classname\n\n box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug; // add custom css to box\n\n css(box.element, boxOpts.css);\n\n try {\n box.element.firstChild.firstChild.className += ' first-child';\n box.element.firstChild.lastChild.className += ' last-child';\n } catch (e) {} // maybe show box right away\n\n\n if (box.fits() && locationHashRefersBox(box)) {\n box.show();\n }\n } // set flag to prevent initialising twice\n\n\n options.inited = true; // trigger \"done\" event.\n\n Boxzilla.trigger('done'); // maybe open box with MC4WP form in it\n\n maybeOpenMailChimpForWordPressBox();\n }\n\n function locationHashRefersBox(box) {\n if (!window.location.hash || window.location.hash.length === 0) {\n return false;\n } // parse \"boxzilla-{id}\" from location hash\n\n\n var match = window.location.hash.match(/[#&](boxzilla-\\d+)/);\n\n if (!match || _typeof(match) !== 'object' || match.length < 2) {\n return false;\n }\n\n var elementId = match[1];\n\n if (elementId === box.element.id) {\n return true;\n } else if (box.element.querySelector('#' + elementId)) {\n return true;\n }\n\n return false;\n }\n\n function maybeOpenMailChimpForWordPressBox() {\n if ((_typeof(window.mc4wp_forms_config) !== 'object' || !window.mc4wp_forms_config.submitted_form) && _typeof(window.mc4wp_submitted_form) !== 'object') {\n return;\n }\n\n var form = window.mc4wp_submitted_form || window.mc4wp_forms_config.submitted_form;\n var selector = '#' + form.element_id;\n Boxzilla.boxes.forEach(function (box) {\n if (box.element.querySelector(selector)) {\n box.show();\n }\n });\n } // print message when test mode is enabled\n\n\n var isLoggedIn = document.body && document.body.className && document.body.className.indexOf('logged-in') > -1;\n\n if (isLoggedIn && options.testMode) {\n console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\\'re done testing.');\n } // init boxzilla\n\n\n Boxzilla.init(); // on window.load, create DOM elements for boxes\n\n window.addEventListener('load', createBoxesFromConfig);\n})();\n\n},{\"./boxzilla/boxzilla.js\":3}]},{},[11]);\n; })();"],"names":["require","undefined","r","e","n","t","o","i","f","c","u","a","Error","code","p","exports","call","length","1","module","duration","css","element","styles","property","hasOwnProperty","style","animate","targetStyles","fn","to","current","last","Date","initialStyles","window","getComputedStyle","currentStyles","propSteps","parseFloat","tick","step","newValue","_property","timeSinceLastTick","done","increment","requestAnimationFrame","toggle","animation","callbackFn","cleanup","removeAttribute","setAttribute","clone","getAttribute","display","nowVisible","visibleStyles","hiddenStyles","offsetLeft","cloneNode","properties","value","newObject","initObjectProperties","object","copyObjectProperties","isFinite","height","clientRect","getBoundingClientRect","overflowY","opacity","animated","2","defaults","rehide","content","cookie","icon","screenWidthCondition","position","testMode","trigger","closable","Animator","Box","id","config","fireEvent","this","obj1","obj2","attrname","_attrname","obj3","merge","overlay","document","createElement","classList","add","body","appendChild","visible","dismissed","triggered","triggerHeight","calculateTriggerHeight","cookieSet","isCookieSet","contentElement","closeIcon","dom","events","prototype","box","addEventListener","evt","preventDefault","dismiss","target","tagName","setCookie","x","offsetX","y","offsetY","rect","left","right","top","bottom","wrapper","className","innerHTML","setCustomBoxStyling","origDisplay","maxHeight","windowHeight","innerHeight","boxHeight","clientHeight","newTopMargin","marginTop","show","bind","hide","html","method","triggerElement","querySelector","documentElement","Math","max","scrollHeight","offsetHeight","fits","condition","innerWidth","onResize","mayAutoShow","mayRehide","replace","RegExp","hours","expiryDate","setHours","getHours","toUTCString","./animator.js","3","throttle","ExitIntent","Scroll","Pageviews","Time","initialised","boxes","listeners","onKeyUp","key","recalculateHeights","forEach","onElementClick","el","parentElement","href","match","event","args","apply","get","String","Boxzilla","off","filter","on","push","init","styleElement","head","create","opts","minimumScreenWidth","./box.js","./styles.js","./triggers/exit-intent.js","./triggers/pageviews.js","./triggers/scroll.js","./triggers/time.js","./util.js","4","5","Timer","time","interval","start","setInterval","stop","clearInterval","6","timeout","touchStart","removeEventListener","onMouseLeave","onMouseEnter","clearTimeout","onTouchStart","onTouchEnd","clientY","documentMode","test","navigator","userAgent","clientX","setTimeout","timestamp","performance","now","scrollY","indexOf","7","pageviews","sessionStorage","getItem","setItem","8","checkHeightCriteria","pageYOffset","scrollTop","../util.js","9","siteTimer","pageTimer","timers","sessionTime","parseInt","hidden","../timer.js","10","threshold","scope","deferTimer","context","arguments","11","_typeof","obj","Symbol","iterator","constructor","options","isLoggedIn","boxzilla_options","console","log","inited","boxOpts","boxContentElement","getElementById","post","slug","background_color","background","color","border_color","borderColor","border_width","borderWidth","border_style","borderStyle","width","maxWidth","firstChild","lastChild","location","hash","elementId","locationHashRefersBox","mc4wp_forms_config","submitted_form","mc4wp_submitted_form","selector","element_id","maybeOpenMailChimpForWordPressBox","./boxzilla/boxzilla.js"],"mappings":"CAAA,WAAe,IAAIA,OAAUC,GAAgG,SAASC,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,EAAE,mBAAmBT,GAASA,EAAQ,IAAIQ,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGG,EAAE,OAAOA,EAAEH,GAAE,GAAkD,MAA1CI,EAAE,IAAIC,MAAM,uBAAuBL,EAAE,MAAaM,KAAK,mBAAmBF,EAAMG,EAAEV,EAAEG,GAAG,CAACQ,QAAQ,IAAIZ,EAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,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GED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Boxzilla
4
- Version: 3.2.24
5
  Plugin URI: https://boxzillaplugin.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page
6
  Description: Call-To-Action Boxes that display after visitors scroll down far enough. Unobtrusive, but highly conversing!
7
  Author: ibericode
@@ -41,7 +41,7 @@ if ( ! defined( 'ABSPATH' ) ) {
41
  function _load_boxzilla() {
42
 
43
  define( 'BOXZILLA_FILE', __FILE__ );
44
- define( 'BOXZILLA_VERSION', '3.2.24' );
45
 
46
  require __DIR__ . '/bootstrap.php';
47
  }
1
  <?php
2
  /*
3
  Plugin Name: Boxzilla
4
+ Version: 3.2.25
5
  Plugin URI: https://boxzillaplugin.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page
6
  Description: Call-To-Action Boxes that display after visitors scroll down far enough. Unobtrusive, but highly conversing!
7
  Author: ibericode
41
  function _load_boxzilla() {
42
 
43
  define( 'BOXZILLA_FILE', __FILE__ );
44
+ define( 'BOXZILLA_VERSION', '3.2.25' );
45
 
46
  require __DIR__ . '/bootstrap.php';
47
  }
languages/boxzilla-wp.pot ADDED
@@ -0,0 +1,560 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2021 ibericode
2
+ # This file is distributed under the same license as the Boxzilla plugin.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Boxzilla 3.2.25p\n"
6
+ "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/boxzilla-wp\n"
7
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
+ "Language-Team: LANGUAGE <LL@li.org>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2021-04-20T09:38:41+00:00\n"
13
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
+ "X-Generator: WP-CLI 2.4.0\n"
15
+ "X-Domain: boxzilla\n"
16
+
17
+ #. Plugin Name of the plugin
18
+ #: src/default-actions.php:14
19
+ #: src/default-actions.php:26
20
+ msgid "Boxzilla"
21
+ msgstr ""
22
+
23
+ #. Plugin URI of the plugin
24
+ msgid "https://boxzillaplugin.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page"
25
+ msgstr ""
26
+
27
+ #. Description of the plugin
28
+ msgid "Call-To-Action Boxes that display after visitors scroll down far enough. Unobtrusive, but highly conversing!"
29
+ msgstr ""
30
+
31
+ #. Author of the plugin
32
+ msgid "ibericode"
33
+ msgstr ""
34
+
35
+ #. Author URI of the plugin
36
+ msgid "https://ibericode.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page"
37
+ msgstr ""
38
+
39
+ #: src/admin/class-admin.php:88
40
+ msgid "Duplicate box"
41
+ msgstr ""
42
+
43
+ #: src/admin/class-admin.php:133
44
+ msgid "Awesome, you are using Boxzilla! You can now safely <a href=\"%s\">deactivate the Scroll Triggered Boxes plugin</a>."
45
+ msgstr ""
46
+
47
+ #: src/admin/class-admin.php:202
48
+ msgid "Box ID"
49
+ msgstr ""
50
+
51
+ #: src/admin/class-admin.php:207
52
+ msgid "Box Title"
53
+ msgstr ""
54
+
55
+ #: src/admin/class-admin.php:246
56
+ #: src/admin/class-admin.php:247
57
+ #: src/admin/views/settings.php:7
58
+ msgid "Settings"
59
+ msgstr ""
60
+
61
+ #: src/admin/class-admin.php:252
62
+ #: src/admin/class-admin.php:253
63
+ msgid "Extensions"
64
+ msgstr ""
65
+
66
+ #: src/admin/class-admin.php:344
67
+ #: src/admin/views/metaboxes/box-option-controls.php:62
68
+ msgid "and"
69
+ msgstr ""
70
+
71
+ #: src/admin/class-admin.php:345
72
+ #: src/admin/views/metaboxes/box-option-controls.php:61
73
+ msgid "or"
74
+ msgstr ""
75
+
76
+ #: src/admin/class-admin.php:346
77
+ msgid "Enter a comma-separated list of values."
78
+ msgstr ""
79
+
80
+ #: src/admin/class-admin.php:347
81
+ msgid "Enter a comma-separated list of post slugs or post ID's.."
82
+ msgstr ""
83
+
84
+ #: src/admin/class-admin.php:348
85
+ msgid "Enter a comma-separated list of page slugs or page ID's.."
86
+ msgstr ""
87
+
88
+ #: src/admin/class-admin.php:349
89
+ msgid "Enter a comma-separated list of post types.."
90
+ msgstr ""
91
+
92
+ #: src/admin/class-admin.php:350
93
+ msgid "Enter a comma-separated list of relative URL's, eg /contact/"
94
+ msgstr ""
95
+
96
+ #: src/admin/class-admin.php:380
97
+ msgid "Box Appearance"
98
+ msgstr ""
99
+
100
+ #: src/admin/class-admin.php:389
101
+ msgid "Box Options"
102
+ msgstr ""
103
+
104
+ #: src/admin/class-admin.php:398
105
+ #: src/admin/views/settings.php:40
106
+ msgid "Looking for help?"
107
+ msgstr ""
108
+
109
+ #: src/admin/class-admin.php:406
110
+ #: src/admin/views/settings.php:45
111
+ msgid "Our other plugins"
112
+ msgstr ""
113
+
114
+ #: src/admin/class-admin.php:414
115
+ #: src/admin/views/settings.php:50
116
+ msgid "Subscribe to our newsletter"
117
+ msgstr ""
118
+
119
+ #: src/admin/class-admin.php:675
120
+ msgid "Boxes"
121
+ msgstr ""
122
+
123
+ #: src/admin/class-menu.php:25
124
+ #: src/admin/class-menu.php:92
125
+ #: src/admin/class-menu.php:93
126
+ msgid "Boxzilla Pop-ups"
127
+ msgstr ""
128
+
129
+ #: src/admin/class-menu.php:75
130
+ msgid "Add to menu"
131
+ msgstr ""
132
+
133
+ #: src/admin/class-menu.php:126
134
+ msgid "Custom Link"
135
+ msgstr ""
136
+
137
+ #: src/admin/class-review-notice.php:68
138
+ msgid "You've been using Boxzilla for some time now; we hope you love it!"
139
+ msgstr ""
140
+
141
+ #: src/admin/class-review-notice.php:69
142
+ msgid "If you do, please <a href=\"%s\">leave us a 5★ rating on WordPress.org</a>. It would be of great help to us."
143
+ msgstr ""
144
+
145
+ #: src/admin/class-review-notice.php:71
146
+ msgid "Dismiss this notice."
147
+ msgstr ""
148
+
149
+ #: src/admin/views/extensions.php:4
150
+ msgid "Available Add-On Plugins"
151
+ msgstr ""
152
+
153
+ #: src/admin/views/extensions.php:6
154
+ msgid "There are various add-ons available for Boxzilla which further enhance the functionality of the core plugin."
155
+ msgstr ""
156
+
157
+ #: src/admin/views/extensions.php:9
158
+ msgid "To gain instant access the premium add-on plugins listed here, <a href=\"%s\">have a look at our pricing</a>."
159
+ msgstr ""
160
+
161
+ #: src/admin/views/extensions.php:18
162
+ msgid "You will be redirected to the Boxzilla site in a few seconds.."
163
+ msgstr ""
164
+
165
+ #: src/admin/views/extensions.php:19
166
+ msgid "If not, please click here: %s."
167
+ msgstr ""
168
+
169
+ #: src/admin/views/metaboxes/box-appearance-controls.php:2
170
+ msgid "For the best experience when styling your box, please use the default WordPress visual editor."
171
+ msgstr ""
172
+
173
+ #: src/admin/views/metaboxes/box-appearance-controls.php:8
174
+ msgid "Background color"
175
+ msgstr ""
176
+
177
+ #: src/admin/views/metaboxes/box-appearance-controls.php:12
178
+ msgid "Text color"
179
+ msgstr ""
180
+
181
+ #: src/admin/views/metaboxes/box-appearance-controls.php:16
182
+ msgid "Box width"
183
+ msgstr ""
184
+
185
+ #: src/admin/views/metaboxes/box-appearance-controls.php:18
186
+ #: src/admin/views/metaboxes/box-appearance-controls.php:29
187
+ msgid "Width in px"
188
+ msgstr ""
189
+
190
+ #: src/admin/views/metaboxes/box-appearance-controls.php:23
191
+ msgid "Border color"
192
+ msgstr ""
193
+
194
+ #: src/admin/views/metaboxes/box-appearance-controls.php:27
195
+ msgid "Border width"
196
+ msgstr ""
197
+
198
+ #: src/admin/views/metaboxes/box-appearance-controls.php:32
199
+ #: src/admin/views/metaboxes/box-appearance-controls.php:40
200
+ msgid "Border style"
201
+ msgstr ""
202
+
203
+ #: src/admin/views/metaboxes/box-appearance-controls.php:34
204
+ msgid "Default"
205
+ msgstr ""
206
+
207
+ #: src/admin/views/metaboxes/box-appearance-controls.php:35
208
+ msgid "Solid"
209
+ msgstr ""
210
+
211
+ #: src/admin/views/metaboxes/box-appearance-controls.php:36
212
+ msgid "Dashed"
213
+ msgstr ""
214
+
215
+ #: src/admin/views/metaboxes/box-appearance-controls.php:37
216
+ msgid "Dotted"
217
+ msgstr ""
218
+
219
+ #: src/admin/views/metaboxes/box-appearance-controls.php:38
220
+ msgid "Double"
221
+ msgstr ""
222
+
223
+ #: src/admin/views/metaboxes/box-appearance-controls.php:46
224
+ msgid "<a href=\"%s\">Click here to reset all styling settings</a>."
225
+ msgstr ""
226
+
227
+ #: src/admin/views/metaboxes/box-option-controls.php:11
228
+ msgid "everywhere"
229
+ msgstr ""
230
+
231
+ #: src/admin/views/metaboxes/box-option-controls.php:12
232
+ msgid "if page"
233
+ msgstr ""
234
+
235
+ #: src/admin/views/metaboxes/box-option-controls.php:13
236
+ msgid "if post"
237
+ msgstr ""
238
+
239
+ #: src/admin/views/metaboxes/box-option-controls.php:14
240
+ msgid "if post tag"
241
+ msgstr ""
242
+
243
+ #: src/admin/views/metaboxes/box-option-controls.php:15
244
+ msgid "if post category"
245
+ msgstr ""
246
+
247
+ #: src/admin/views/metaboxes/box-option-controls.php:16
248
+ msgid "if post type"
249
+ msgstr ""
250
+
251
+ #: src/admin/views/metaboxes/box-option-controls.php:17
252
+ msgid "if URL"
253
+ msgstr ""
254
+
255
+ #: src/admin/views/metaboxes/box-option-controls.php:18
256
+ msgid "if referer"
257
+ msgstr ""
258
+
259
+ #: src/admin/views/metaboxes/box-option-controls.php:19
260
+ msgid "if user"
261
+ msgstr ""
262
+
263
+ #: src/admin/views/metaboxes/box-option-controls.php:38
264
+ msgid "Load this box if"
265
+ msgstr ""
266
+
267
+ #: src/admin/views/metaboxes/box-option-controls.php:41
268
+ msgid "Request matches"
269
+ msgstr ""
270
+
271
+ #: src/admin/views/metaboxes/box-option-controls.php:43
272
+ msgid "any"
273
+ msgstr ""
274
+
275
+ #: src/admin/views/metaboxes/box-option-controls.php:44
276
+ msgid "all"
277
+ msgstr ""
278
+
279
+ #: src/admin/views/metaboxes/box-option-controls.php:46
280
+ msgid "of the following conditions."
281
+ msgstr ""
282
+
283
+ #: src/admin/views/metaboxes/box-option-controls.php:73
284
+ #: src/admin/views/metaboxes/box-option-controls.php:254
285
+ msgid "Remove rule"
286
+ msgstr ""
287
+
288
+ #: src/admin/views/metaboxes/box-option-controls.php:85
289
+ #: src/admin/views/metaboxes/box-option-controls.php:265
290
+ msgid "is"
291
+ msgstr ""
292
+
293
+ #: src/admin/views/metaboxes/box-option-controls.php:86
294
+ #: src/admin/views/metaboxes/box-option-controls.php:266
295
+ msgid "is not"
296
+ msgstr ""
297
+
298
+ #: src/admin/views/metaboxes/box-option-controls.php:87
299
+ #: src/admin/views/metaboxes/box-option-controls.php:267
300
+ msgid "contains"
301
+ msgstr ""
302
+
303
+ #: src/admin/views/metaboxes/box-option-controls.php:88
304
+ #: src/admin/views/metaboxes/box-option-controls.php:268
305
+ msgid "does not contain"
306
+ msgstr ""
307
+
308
+ #: src/admin/views/metaboxes/box-option-controls.php:91
309
+ #: src/admin/views/metaboxes/box-option-controls.php:271
310
+ msgid "Leave empty for any or enter (comma-separated) names or ID's"
311
+ msgstr ""
312
+
313
+ #: src/admin/views/metaboxes/box-option-controls.php:101
314
+ msgid "Add another rule"
315
+ msgstr ""
316
+
317
+ #: src/admin/views/metaboxes/box-option-controls.php:104
318
+ msgid "Box Position"
319
+ msgstr ""
320
+
321
+ #: src/admin/views/metaboxes/box-option-controls.php:111
322
+ msgid "Top Left"
323
+ msgstr ""
324
+
325
+ #: src/admin/views/metaboxes/box-option-controls.php:119
326
+ msgid "Top Right"
327
+ msgstr ""
328
+
329
+ #: src/admin/views/metaboxes/box-option-controls.php:129
330
+ msgid "Center"
331
+ msgstr ""
332
+
333
+ #: src/admin/views/metaboxes/box-option-controls.php:139
334
+ msgid "Bottom Left"
335
+ msgstr ""
336
+
337
+ #: src/admin/views/metaboxes/box-option-controls.php:147
338
+ msgid "Bottom Right"
339
+ msgstr ""
340
+
341
+ #: src/admin/views/metaboxes/box-option-controls.php:156
342
+ msgid "Animation"
343
+ msgstr ""
344
+
345
+ #: src/admin/views/metaboxes/box-option-controls.php:158
346
+ msgid "Fade In"
347
+ msgstr ""
348
+
349
+ #: src/admin/views/metaboxes/box-option-controls.php:159
350
+ msgid "Slide In"
351
+ msgstr ""
352
+
353
+ #: src/admin/views/metaboxes/box-option-controls.php:160
354
+ msgid "Which animation type should be used to show the box when triggered?"
355
+ msgstr ""
356
+
357
+ #: src/admin/views/metaboxes/box-option-controls.php:164
358
+ msgid "Auto-show box?"
359
+ msgstr ""
360
+
361
+ #: src/admin/views/metaboxes/box-option-controls.php:166
362
+ msgid "Never"
363
+ msgstr ""
364
+
365
+ #: src/admin/views/metaboxes/box-option-controls.php:167
366
+ msgid "Yes, after %s seconds on the page."
367
+ msgstr ""
368
+
369
+ #: src/admin/views/metaboxes/box-option-controls.php:168
370
+ msgid "Yes, when at %s of page height"
371
+ msgstr ""
372
+
373
+ #: src/admin/views/metaboxes/box-option-controls.php:169
374
+ msgid "Yes, when at element %s"
375
+ msgstr ""
376
+
377
+ #: src/admin/views/metaboxes/box-option-controls.php:169
378
+ msgid "Example: #comments"
379
+ msgstr ""
380
+
381
+ #: src/admin/views/metaboxes/box-option-controls.php:175
382
+ msgid "Cookie expiration"
383
+ msgstr ""
384
+
385
+ #: src/admin/views/metaboxes/box-option-controls.php:178
386
+ msgid "Triggered"
387
+ msgstr ""
388
+
389
+ #: src/admin/views/metaboxes/box-option-controls.php:180
390
+ #: src/admin/views/metaboxes/box-option-controls.php:185
391
+ msgid "hours"
392
+ msgstr ""
393
+
394
+ #: src/admin/views/metaboxes/box-option-controls.php:183
395
+ msgid "Dismissed"
396
+ msgstr ""
397
+
398
+ #: src/admin/views/metaboxes/box-option-controls.php:189
399
+ msgid "After this box is triggered or dismissed, how many hours should it stay hidden?"
400
+ msgstr ""
401
+
402
+ #: src/admin/views/metaboxes/box-option-controls.php:193
403
+ msgid "Screen width"
404
+ msgstr ""
405
+
406
+ #: src/admin/views/metaboxes/box-option-controls.php:198
407
+ msgid "larger"
408
+ msgstr ""
409
+
410
+ #: src/admin/views/metaboxes/box-option-controls.php:198
411
+ msgid "smaller"
412
+ msgstr ""
413
+
414
+ #: src/admin/views/metaboxes/box-option-controls.php:200
415
+ msgid "Only show on screens %1$s than %2$s."
416
+ msgstr ""
417
+
418
+ #: src/admin/views/metaboxes/box-option-controls.php:201
419
+ msgid "Leave empty if you want to show the box on all screen sizes."
420
+ msgstr ""
421
+
422
+ #: src/admin/views/metaboxes/box-option-controls.php:207
423
+ msgid "Auto-hide?"
424
+ msgstr ""
425
+
426
+ #: src/admin/views/metaboxes/box-option-controls.php:209
427
+ #: src/admin/views/metaboxes/box-option-controls.php:220
428
+ #: src/admin/views/metaboxes/box-option-controls.php:231
429
+ #: src/admin/views/settings.php:22
430
+ msgid "Yes"
431
+ msgstr ""
432
+
433
+ #: src/admin/views/metaboxes/box-option-controls.php:210
434
+ #: src/admin/views/metaboxes/box-option-controls.php:221
435
+ #: src/admin/views/metaboxes/box-option-controls.php:232
436
+ #: src/admin/views/settings.php:23
437
+ msgid "No"
438
+ msgstr ""
439
+
440
+ #: src/admin/views/metaboxes/box-option-controls.php:211
441
+ msgid "Hide box again when visitors scroll back up?"
442
+ msgstr ""
443
+
444
+ #: src/admin/views/metaboxes/box-option-controls.php:218
445
+ msgid "Show close icon?"
446
+ msgstr ""
447
+
448
+ #: src/admin/views/metaboxes/box-option-controls.php:223
449
+ msgid "If you decide to hide the close icon, make sure to offer an alternative way to close the box."
450
+ msgstr ""
451
+
452
+ #: src/admin/views/metaboxes/box-option-controls.php:224
453
+ msgid "Example: "
454
+ msgstr ""
455
+
456
+ #: src/admin/views/metaboxes/box-option-controls.php:229
457
+ #: src/admin/views/settings.php:20
458
+ msgid "Enable test mode?"
459
+ msgstr ""
460
+
461
+ #: src/admin/views/metaboxes/box-option-controls.php:233
462
+ #: src/admin/views/settings.php:24
463
+ msgid "If test mode is enabled, all boxes will show up regardless of whether a cookie has been set."
464
+ msgstr ""
465
+
466
+ #: src/admin/views/metaboxes/need-help.php:2
467
+ msgid "Please make sure to look at the following available resources."
468
+ msgstr ""
469
+
470
+ #: src/default-actions.php:15
471
+ msgid "Box"
472
+ msgstr ""
473
+
474
+ #: src/default-actions.php:16
475
+ msgid "Add New"
476
+ msgstr ""
477
+
478
+ #: src/default-actions.php:17
479
+ msgid "Add New Box"
480
+ msgstr ""
481
+
482
+ #: src/default-actions.php:18
483
+ msgid "Edit Box"
484
+ msgstr ""
485
+
486
+ #: src/default-actions.php:19
487
+ msgid "New Box"
488
+ msgstr ""
489
+
490
+ #: src/default-actions.php:20
491
+ msgid "All Boxes"
492
+ msgstr ""
493
+
494
+ #: src/default-actions.php:21
495
+ msgid "View Box"
496
+ msgstr ""
497
+
498
+ #: src/default-actions.php:22
499
+ msgid "Search Boxes"
500
+ msgstr ""
501
+
502
+ #: src/default-actions.php:23
503
+ msgid "No Boxes found"
504
+ msgstr ""
505
+
506
+ #: src/default-actions.php:24
507
+ msgid "No Boxes found in Trash"
508
+ msgstr ""
509
+
510
+ #: src/licensing/class-api.php:164
511
+ msgid "The Boxzilla server returned an invalid response."
512
+ msgstr ""
513
+
514
+ #: src/licensing/views/license-form.php:8
515
+ msgid "License & Plugin Updates"
516
+ msgstr ""
517
+
518
+ #: src/licensing/views/license-form.php:15
519
+ msgid "Warning! You are <u>not</u> receiving plugin updates for the following plugin(s):"
520
+ msgstr ""
521
+
522
+ #: src/licensing/views/license-form.php:25
523
+ msgid "To fix this, please activate your license using the form below."
524
+ msgstr ""
525
+
526
+ #: src/licensing/views/license-form.php:45
527
+ msgid "License Key"
528
+ msgstr ""
529
+
530
+ #: src/licensing/views/license-form.php:47
531
+ msgid "Enter your license key.."
532
+ msgstr ""
533
+
534
+ #: src/licensing/views/license-form.php:56
535
+ msgid "The license key received when purchasing your premium Boxzilla plan. <a href=\"%s\">You can find it here</a>."
536
+ msgstr ""
537
+
538
+ #: src/licensing/views/license-form.php:61
539
+ msgid "License Status"
540
+ msgstr ""
541
+
542
+ #: src/licensing/views/license-form.php:66
543
+ msgid "ACTIVE"
544
+ msgstr ""
545
+
546
+ #: src/licensing/views/license-form.php:66
547
+ msgid "you are receiving plugin updates"
548
+ msgstr ""
549
+
550
+ #: src/licensing/views/license-form.php:70
551
+ msgid "INACTIVE"
552
+ msgstr ""
553
+
554
+ #: src/licensing/views/license-form.php:70
555
+ msgid "you are <strong>not</strong> receiving plugin updates"
556
+ msgstr ""
557
+
558
+ #: src/licensing/views/license-form.php:82
559
+ msgid "Save Changes"
560
+ msgstr ""
languages/boxzilla.pot CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2020 boxzilla
2
  # This file is distributed under the same license as the boxzilla package.
3
  msgid ""
4
  msgstr ""
1
+ # Copyright (C) 2021 boxzilla
2
  # This file is distributed under the same license as the boxzilla package.
3
  msgid ""
4
  msgstr ""
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Ibericode, DvanKooten, hchouhan, lapzor
3
  Donate link: https://boxzillaplugin.com/#utm_source=wp-plugin-repo&utm_medium=boxzilla&utm_campaign=donate-link
4
  Tags: scroll triggered box, cta, social, pop-up, newsletter, call to action, mailchimp, contact form 7, social media, mc4wp, ibericode
5
  Requires at least: 4.6
6
- Tested up to: 5.5
7
- Stable tag: 3.2.24
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Requires PHP: 5.3
@@ -131,6 +131,12 @@ Have a look at the [frequently asked questions](https://wordpress.org/plugins/bo
131
  == Changelog ==
132
 
133
 
 
 
 
 
 
 
134
  #### 3.2.24 - Nov 3, 2020
135
 
136
  - Allow for `#boxzilla-ID` links in `<area>` elements.
3
  Donate link: https://boxzillaplugin.com/#utm_source=wp-plugin-repo&utm_medium=boxzilla&utm_campaign=donate-link
4
  Tags: scroll triggered box, cta, social, pop-up, newsletter, call to action, mailchimp, contact form 7, social media, mc4wp, ibericode
5
  Requires at least: 4.6
6
+ Tested up to: 6.0
7
+ Stable tag: 3.2.25
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Requires PHP: 5.3
131
  == Changelog ==
132
 
133
 
134
+ #### 3.2.25 - Apr 20, 2021
135
+
136
+ - Change usage of deprecated jQuery.load method.
137
+ - Add `aria-modal="true"` to overlay element.
138
+
139
+
140
  #### 3.2.24 - Nov 3, 2020
141
 
142
  - Allow for `#boxzilla-ID` links in `<area>` elements.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitab4e82062a8c36f4e6dfe6df05841190::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit2689a1770ff906f84990069cc9873f8b::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -37,8 +37,8 @@ namespace Composer\Autoload;
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
- * @see http://www.php-fig.org/psr/psr-0/
41
- * @see http://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
@@ -60,7 +60,7 @@ class ClassLoader
60
  public function getPrefixes()
61
  {
62
  if (!empty($this->prefixesPsr0)) {
63
- return call_user_func_array('array_merge', $this->prefixesPsr0);
64
  }
65
 
66
  return array();
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see https://www.php-fig.org/psr/psr-0/
41
+ * @see https://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
60
  public function getPrefixes()
61
  {
62
  if (!empty($this->prefixesPsr0)) {
63
+ return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
64
  }
65
 
66
  return array();
vendor/composer/InstalledVersions.php ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+ namespace Composer;
14
+
15
+ use Composer\Semver\VersionParser;
16
+
17
+
18
+
19
+
20
+
21
+
22
+ class InstalledVersions
23
+ {
24
+ private static $installed = array (
25
+ 'root' =>
26
+ array (
27
+ 'pretty_version' => 'dev-master',
28
+ 'version' => 'dev-master',
29
+ 'aliases' =>
30
+ array (
31
+ ),
32
+ 'reference' => '9c0334e13b70299f0b39de29e6a98d12eabd7a5c',
33
+ 'name' => 'ibericode/boxzilla-wp',
34
+ ),
35
+ 'versions' =>
36
+ array (
37
+ 'ibericode/boxzilla-wp' =>
38
+ array (
39
+ 'pretty_version' => 'dev-master',
40
+ 'version' => 'dev-master',
41
+ 'aliases' =>
42
+ array (
43
+ ),
44
+ 'reference' => '9c0334e13b70299f0b39de29e6a98d12eabd7a5c',
45
+ ),
46
+ ),
47
+ );
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+ public static function getInstalledPackages()
56
+ {
57
+ return array_keys(self::$installed['versions']);
58
+ }
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+ public static function isInstalled($packageName)
69
+ {
70
+ return isset(self::$installed['versions'][$packageName]);
71
+ }
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
87
+ {
88
+ $constraint = $parser->parseConstraints($constraint);
89
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
90
+
91
+ return $provided->matches($constraint);
92
+ }
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+ public static function getVersionRanges($packageName)
104
+ {
105
+ if (!isset(self::$installed['versions'][$packageName])) {
106
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
107
+ }
108
+
109
+ $ranges = array();
110
+ if (isset(self::$installed['versions'][$packageName]['pretty_version'])) {
111
+ $ranges[] = self::$installed['versions'][$packageName]['pretty_version'];
112
+ }
113
+ if (array_key_exists('aliases', self::$installed['versions'][$packageName])) {
114
+ $ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']);
115
+ }
116
+ if (array_key_exists('replaced', self::$installed['versions'][$packageName])) {
117
+ $ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']);
118
+ }
119
+ if (array_key_exists('provided', self::$installed['versions'][$packageName])) {
120
+ $ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']);
121
+ }
122
+
123
+ return implode(' || ', $ranges);
124
+ }
125
+
126
+
127
+
128
+
129
+
130
+ public static function getVersion($packageName)
131
+ {
132
+ if (!isset(self::$installed['versions'][$packageName])) {
133
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
134
+ }
135
+
136
+ if (!isset(self::$installed['versions'][$packageName]['version'])) {
137
+ return null;
138
+ }
139
+
140
+ return self::$installed['versions'][$packageName]['version'];
141
+ }
142
+
143
+
144
+
145
+
146
+
147
+ public static function getPrettyVersion($packageName)
148
+ {
149
+ if (!isset(self::$installed['versions'][$packageName])) {
150
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
151
+ }
152
+
153
+ if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) {
154
+ return null;
155
+ }
156
+
157
+ return self::$installed['versions'][$packageName]['pretty_version'];
158
+ }
159
+
160
+
161
+
162
+
163
+
164
+ public static function getReference($packageName)
165
+ {
166
+ if (!isset(self::$installed['versions'][$packageName])) {
167
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
168
+ }
169
+
170
+ if (!isset(self::$installed['versions'][$packageName]['reference'])) {
171
+ return null;
172
+ }
173
+
174
+ return self::$installed['versions'][$packageName]['reference'];
175
+ }
176
+
177
+
178
+
179
+
180
+
181
+ public static function getRootPackage()
182
+ {
183
+ return self::$installed['root'];
184
+ }
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+ public static function getRawData()
193
+ {
194
+ return self::$installed;
195
+ }
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+ public static function reload($data)
216
+ {
217
+ self::$installed = $data;
218
+ }
219
+ }
vendor/composer/autoload_classmap.php CHANGED
@@ -27,4 +27,5 @@ return array(
27
  'Boxzilla\\Licensing\\UpdateManager' => $baseDir . '/src/licensing/class-update-manager.php',
28
  'Boxzilla\\Plugin' => $baseDir . '/src/class-plugin.php',
29
  'Boxzilla_PHP_Fallback' => $baseDir . '/src/class-php-fallback.php',
 
30
  );
27
  'Boxzilla\\Licensing\\UpdateManager' => $baseDir . '/src/licensing/class-update-manager.php',
28
  'Boxzilla\\Plugin' => $baseDir . '/src/class-plugin.php',
29
  'Boxzilla_PHP_Fallback' => $baseDir . '/src/class-php-fallback.php',
30
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
31
  );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitab4e82062a8c36f4e6dfe6df05841190
6
  {
7
  private static $loader;
8
 
@@ -13,21 +13,26 @@ class ComposerAutoloaderInitab4e82062a8c36f4e6dfe6df05841190
13
  }
14
  }
15
 
 
 
 
16
  public static function getLoader()
17
  {
18
  if (null !== self::$loader) {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitab4e82062a8c36f4e6dfe6df05841190', 'loadClassLoader'), true, true);
 
 
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitab4e82062a8c36f4e6dfe6df05841190', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
- require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitab4e82062a8c36f4e6dfe6df05841190::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +53,19 @@ class ComposerAutoloaderInitab4e82062a8c36f4e6dfe6df05841190
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInitab4e82062a8c36f4e6dfe6df05841190::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequireab4e82062a8c36f4e6dfe6df05841190($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequireab4e82062a8c36f4e6dfe6df05841190($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit2689a1770ff906f84990069cc9873f8b
6
  {
7
  private static $loader;
8
 
13
  }
14
  }
15
 
16
+ /**
17
+ * @return \Composer\Autoload\ClassLoader
18
+ */
19
  public static function getLoader()
20
  {
21
  if (null !== self::$loader) {
22
  return self::$loader;
23
  }
24
 
25
+ require __DIR__ . '/platform_check.php';
26
+
27
+ spl_autoload_register(array('ComposerAutoloaderInit2689a1770ff906f84990069cc9873f8b', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit2689a1770ff906f84990069cc9873f8b', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
+ require __DIR__ . '/autoload_static.php';
34
 
35
+ call_user_func(\Composer\Autoload\ComposerStaticInit2689a1770ff906f84990069cc9873f8b::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
53
  $loader->register(true);
54
 
55
  if ($useStaticLoader) {
56
+ $includeFiles = Composer\Autoload\ComposerStaticInit2689a1770ff906f84990069cc9873f8b::$files;
57
  } else {
58
  $includeFiles = require __DIR__ . '/autoload_files.php';
59
  }
60
  foreach ($includeFiles as $fileIdentifier => $file) {
61
+ composerRequire2689a1770ff906f84990069cc9873f8b($fileIdentifier, $file);
62
  }
63
 
64
  return $loader;
65
  }
66
  }
67
 
68
+ function composerRequire2689a1770ff906f84990069cc9873f8b($fileIdentifier, $file)
69
  {
70
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
71
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitab4e82062a8c36f4e6dfe6df05841190
8
  {
9
  public static $files = array (
10
  '94cc07ee52e9ca5ddcd07a46efdfe8cc' => __DIR__ . '/../..' . '/src/functions.php',
@@ -32,12 +32,13 @@ class ComposerStaticInitab4e82062a8c36f4e6dfe6df05841190
32
  'Boxzilla\\Licensing\\UpdateManager' => __DIR__ . '/../..' . '/src/licensing/class-update-manager.php',
33
  'Boxzilla\\Plugin' => __DIR__ . '/../..' . '/src/class-plugin.php',
34
  'Boxzilla_PHP_Fallback' => __DIR__ . '/../..' . '/src/class-php-fallback.php',
 
35
  );
36
 
37
  public static function getInitializer(ClassLoader $loader)
38
  {
39
  return \Closure::bind(function () use ($loader) {
40
- $loader->classMap = ComposerStaticInitab4e82062a8c36f4e6dfe6df05841190::$classMap;
41
 
42
  }, null, ClassLoader::class);
43
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit2689a1770ff906f84990069cc9873f8b
8
  {
9
  public static $files = array (
10
  '94cc07ee52e9ca5ddcd07a46efdfe8cc' => __DIR__ . '/../..' . '/src/functions.php',
32
  'Boxzilla\\Licensing\\UpdateManager' => __DIR__ . '/../..' . '/src/licensing/class-update-manager.php',
33
  'Boxzilla\\Plugin' => __DIR__ . '/../..' . '/src/class-plugin.php',
34
  'Boxzilla_PHP_Fallback' => __DIR__ . '/../..' . '/src/class-php-fallback.php',
35
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
36
  );
37
 
38
  public static function getInitializer(ClassLoader $loader)
39
  {
40
  return \Closure::bind(function () use ($loader) {
41
+ $loader->classMap = ComposerStaticInit2689a1770ff906f84990069cc9873f8b::$classMap;
42
 
43
  }, null, ClassLoader::class);
44
  }
vendor/composer/installed.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php return array (
2
+ 'root' =>
3
+ array (
4
+ 'pretty_version' => 'dev-master',
5
+ 'version' => 'dev-master',
6
+ 'aliases' =>
7
+ array (
8
+ ),
9
+ 'reference' => '9c0334e13b70299f0b39de29e6a98d12eabd7a5c',
10
+ 'name' => 'ibericode/boxzilla-wp',
11
+ ),
12
+ 'versions' =>
13
+ array (
14
+ 'ibericode/boxzilla-wp' =>
15
+ array (
16
+ 'pretty_version' => 'dev-master',
17
+ 'version' => 'dev-master',
18
+ 'aliases' =>
19
+ array (
20
+ ),
21
+ 'reference' => '9c0334e13b70299f0b39de29e6a98d12eabd7a5c',
22
+ ),
23
+ ),
24
+ );
vendor/composer/platform_check.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // platform_check.php @generated by Composer
4
+
5
+ $issues = array();
6
+
7
+ if (!(PHP_VERSION_ID >= 50300)) {
8
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 5.3.0". You are running ' . PHP_VERSION . '.';
9
+ }
10
+
11
+ if ($issues) {
12
+ if (!headers_sent()) {
13
+ header('HTTP/1.1 500 Internal Server Error');
14
+ }
15
+ if (!ini_get('display_errors')) {
16
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17
+ fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18
+ } elseif (!headers_sent()) {
19
+ echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20
+ }
21
+ }
22
+ trigger_error(
23
+ 'Composer detected issues in your platform: ' . implode(' ', $issues),
24
+ E_USER_ERROR
25
+ );
26
+ }