/** * Materialize Stepper - A little plugin that implements a stepper to Materializecss framework. * @version v3.1.0 * @author Igor Marcossi (Kinark) . * @link https://github.com/Kinark/Materialize-stepper * * Licensed under the MIT License (https://github.com/Kinark/Materialize-stepper/blob/master/LICENSE). */ "use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n').concat(n.feedbackPreloader,"")),i.dispatchEvent(r.FEEDBACKING)}),_defineProperty(this,"destroyFeedback",function(e){var t=g.getSteps,n=g.classes,i=g.nextStep,r=g.stepper,s=g.events,o=t().active.step;if(o&&o.classList.contains(n.FEEDBACKINGSTEP)){o.classList.remove(n.FEEDBACKINGSTEP);var a=o.getElementsByClassName(n.PRELOADERWRAPPER)[0];a.parentNode.removeChild(a),e&&i(void 0,!0),r.dispatchEvent(s.FEEDBACKDESTROYED)}}),_defineProperty(this,"getSteps",function(){var e=g.stepper,t=g.classes,n=e.children,i=e.querySelector("li.".concat(t.STEP,".").concat(t.ACTIVESTEP));return{steps:n,active:{step:i,index:Array.prototype.indexOf.call(n,i)}}}),_defineProperty(this,"activateStep",function(e,t){var n=g.getSteps,i=g._slideDown,r=g.stepper,s=g._methodsBindingManager,o=E.nodesIterator,a=n().steps,l=a.length>t,c=l?a[t]:a[a.length-1],p=null;if("string"==typeof e)c.insertAdjacentHTML(l?"beforeBegin":"afterEnd",e.trim()),p=l?c.previousSibling:c.nextSibling,i(p);else if(Array.isArray(e))p=[],e.forEach(function(e){c.insertAdjacentHTML(l?"beforeBegin":"afterEnd",e.trim());var t=l?c.previousSibling:c.nextSibling;p.push(t),i(t)});else if(e instanceof Element||e instanceof HTMLCollection||e instanceof NodeList){var d=l?r.insertBefore:r.appendChild;p=d(e,c),e instanceof Element?i(p):o(p,function(e){return i(e)})}return p&&s(p),p}),_defineProperty(this,"deactivateStep",function(t){var n=g._slideUp,i=g.stepper,r=g._methodsBindingManager,e=E.nodesIterator,s=function(e){i.contains(t)&&(r(e,!0),n(e,void 0,void 0,function(){return i.removeChild(e)}))};return t instanceof Element?s(t):(t instanceof HTMLCollection||t instanceof NodeList)&&e(t,function(e){return s(e)}),t}),_defineProperty(this,"_slideDown",function(n,e){var t=2
'},t),this.classes={HORIZONTALSTEPPER:"horizontal",LINEAR:"linear",NEXTSTEPBTN:"next-step",PREVSTEPBTN:"previous-step",STEPTITLE:"step-title",STEP:"step",STEPCONTENT:"step-content",PRELOADERWRAPPER:"wait-feedback",FEEDBACKINGSTEP:"feedbacking",ACTIVESTEP:"active",WRONGSTEP:"wrong",DONESTEP:"done"},this.events={STEPCHANGE:new Event("stepchange"),STEPOPEN:new Event("stepopen"),STEPCLOSE:new Event("stepclose"),NEXTSTEP:new Event("nextstep"),PREVSTEP:new Event("prevstep"),STEPERROR:new Event("steperror"),FEEDBACKING:new Event("feedbacking"),FEEDBACKDESTROYED:new Event("feedbackdestroyed")},this.listenerStore=[],this.form=null,this._init()}return _createClass(E,null,[{key:"addMultipleEventListeners",value:function(e,t,n){var i=3