!function(Y,e,A){"use strict";e=void0!==e&&e.Math===Math?e:globalThis,Y.fn.shape=function(v){varb,x=Y(this),y=Date.now(),C=[],S=v,w="string"==typeofS,W=[].slice.call(arguments,1);returnx.each(function(){vari,n,t=x.selector||"",a=Y.isPlainObject(v)?Y.extend(!0,{},Y.fn.shape.settings,v):Y.extend({},Y.fn.shape.settings),e=a.namespace,r=a.selector,d=a.error,s=a.className,o="."+e,l="module-"+e,c=Y(this),u=c.find(">"+r.sides),f=u.find(">"+r.side),g=!1,h=this,p=c.data(l),m={initialize:function(){m.verbose("Initializing module for",h),m.set.defaultSide(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),p=m,c.data(l,p)},destroy:function(){m.verbose("Destroying previous module for",h),c.removeData(l).off(o)},refresh:function(){m.verbose("Refreshing selector cache for",h),c=Y(h),u=Y(this).find(r.sides),f=Y(this).find(r.side)},repaint:function(){m.verbose("Forcing repaint event");(u[0]||A.createElement("div")).offsetWidth},animate:function(e,t){m.verbose("Animating box with properties",e),t=t||function(e){m.verbose("Executing animation callback"),void0!==e&&e.stopPropagation(),m.reset(),m.set.active()},a.onBeforeChange.call(n[0]),m.verbose("Starting CSS animation"),c.addClass(s.animating),u.css(e).one("transitionend",t),m.set.duration(a.duration),requestAnimationFrame(function(){c.addClass(s.animating),i.addClass(s.hidden)})},queue:function(e){m.debug("Queueing animation of",e),u.one("transitionend",function(){m.debug("Executing queued animation"),setTimeout(function(){c.shape(e)},0)})},reset:function(){m.verbose("Animating states reset"),c.removeClass(s.animating).attr("style","").removeAttr("style"),u.attr("style","").removeAttr("style"),f.attr("style","").removeAttr("style").removeClass(s.hidden),n.removeClass(s.animating).attr("style","").removeAttr("style")},is:{complete:function(){returnf.filter("."+s.active)[0]===n[0]},animating:function(){returnc.hasClass(s.animating)},hidden:function(){return0<c.closest(":hidden").length}},set:{defaultSide:function(){i=f.filter("."+a.className.active),n=0<i.next(r.side).length?i.next(r.side):f.first(),g=!1,m.verbose("Active side set to",i),m.verbose("Next side set to",n)},duration:function(e){e=e||a.duration,m.verbose("Setting animation duration",e="number"==typeofe?e+"ms":e),!a.duration&&0!==a.duration||u.add(f).css({"transition-duration":e})},currentStageSize:function(){vare=f.filter("."+a.className.active),t=e.outerWidth(!0),e=e.outerHeight(!0);c.css({width:t,height:e})},stageSize:function(){vare=c.clone().addClass(s.loading),t=e.find(">"+r.sides+">"+r.side),i=t.filter("."+a.className.active),t=g?t.eq(g):0<i.next(r.side).length?i.next(r.side):t.first(),n="next"===a.width?t.outerWidth(!0):"initial"===a.width?c.width():a.width,o="next"===a.height?t.outerHeight(!0):"initial"===a.height?c.height():a.height;i.removeClass(s.active),t.addClass(s.active),e.insertAfter(c),e.remove(),"auto"!==a.width&&(c.css("width",n+a.jitter),m.verbose("Specifying width during animation",n)),"auto"!==a.height&&(c.css("height",o+a.jitter),m.verbose("Specifying height during animation",o))},nextSide:function(e){g=e,n=f.filter(e),g=f.index(n),0===n.length&&(m.set.defaultSide(),m.error(d.side)),m.verbose("Next side manually set to",n)},active:function(){m.verbose("Setting new side to active",n),f.removeClass(s.active),n.addClass(s.active),a.onChange.call(n[0]),m.set.defaultSide()}},flip:{to:function(e,t){vari;m.is.hidden()?m.debug("Module not visible",n):!m.is.complete()||m.is.animating()||a.allowRepeats?(i=m.get.transform[e](),m.is.animating()?m.queue("flip "+e):(m.debug("Flipping "+e,n),m.set.stageSize(),m.stage[t](),m.animate(i))):m.debug("Side already visible",n)},up:function(){m.flip.to("up","above")},down:function(){m.flip.to("down","below")},left:function(){m.flip.to("left","left")},right:function(){m.flip.to("right","right")},over:function(){m.flip.to("over","behind")},back:function(){m.flip.to("back","behind")}},get:{transform:{up:function(){vare=i.outerHeight(!0)/2;return{transform:"translateY("+(n.outerHeight(!0)-e)+"px) translateZ(-"+e+"px) rotateX(-90deg)"