(function framework7ComponentLoader(t,e){void 0===e&&(e=!0);var a=t.$,s=(t.Template7,t.utils),o=(t.getDevice,t.getSupport,t.Class,t.Modal,t.ConstructorMethods,t.ModalMethods,s.bindMethods),n=s.getTranslate,f=s.nextFrame;function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(t[s]=a[s])}return t}).apply(this,arguments)}var r={morphOpen:function(t,e){var s=this,o=a(t),i=a(e);if(0!==i.length){i.transition(0).addClass("fab-morph-target-visible");var r={width:i[0].offsetWidth,height:i[0].offsetHeight,offset:i.offset(),borderRadius:i.css("border-radius"),zIndex:i.css("z-index")},h={width:o[0].offsetWidth,height:o[0].offsetHeight,offset:o.offset(),translateX:n(o[0],"x"),translateY:n(o[0],"y")};o[0].f7FabMorphData={$targetEl:i,target:r,fab:h};var l=h.offset.left+h.width/2-(r.offset.left+r.width/2)-h.translateX,d=h.offset.top+h.height/2-(r.offset.top+r.height/2)-h.translateY,p=r.width/h.width,c=r.height/h.height,b=Math.ceil(parseInt(r.borderRadius,10)/Math.max(p,c));b>0&&(b+=2),o[0].f7FabMorphResizeHandler=function(){o.transition(0).transform(""),i.transition(0),r.width=i[0].offsetWidth,r.height=i[0].offsetHeight,r.offset=i.offset(),h.offset=o.offset();var t=h.offset.left+h.width/2-(r.offset.left+r.width/2)-h.translateX,e=h.offset.top+h.height/2-(r.offset.top+r.height/2)-h.translateY,a=r.width/h.width,s=r.height/h.height;o.transform("translate3d("+-t+"px, "+-e+"px, 0) scale("+a+", "+s+")")},i.css("opacity",0).transform("scale("+1/p+", "+1/c+")"),o.addClass("fab-opened").css("z-index",r.zIndex-1).transform("translate3d("+-l+"px, "+-d+"px, 0)"),o.transitionEnd((function(){i.transition(""),f((function(){i.css("opacity",1).transform("scale(1,1)"),o.transform("translate3d("+-l+"px, "+-d+"px, 0) scale("+p+", "+c+")").css("border-radius",b+"px").css("box-shadow","none").css("opacity","0")})),s.on("resize",o[0].f7FabMorphResizeHandler),i.parents(".page-content").length>0&&i.parents(".page-content").on("scroll",o[0].f7FabMorphResizeHandler)}))}},morphClose:function(t){var e=a(t),s=e[0].f7FabMorphData;if(s){var o=s.$targetEl,n=s.target,i=s.fab;if(0!==o.length){var r=i.offset.left+i.width/2-(n.offset.left+n.width/2)-i.translateX,h=i.offset.top+i.height/2-(n.offset.top+n.height/2)-i.translateY,l=n.width/i.width,d=n.height/i.height;this.off("resize",e[0].f7FabMorphResizeHandler),o.parents(".page-content").length>0&&o.parents(".page-content").off("scroll",e[0].f7FabMorphResizeHandler),o.css("opacity",0).transform("scale("+1/l+", "+1/d+")"),e.transition("").css("box-shadow","").css("border-radius","").css("opacity","1").transform("translate3d("+-r+"px, "+-h+"px, 0)"),e.transitionEnd((function(){e.css("z-index","").removeClass("fab-opened").transform(""),f((function(){e.transitionEnd((function(){o.removeClass("fab-morph-target-visible").css("opacity","").transform("").transition("")}))}))}))}}},open:function(t,e){var s=a(t).eq(0),o=s.find(".fab-buttons");if(s.length&&!s.hasClass("fab-opened")&&(o.length||s.hasClass("fab-morph"))){if(this.fab.openedEl){if(this.fab.openedEl===s[0])return;this.fab.close(this.fab.openedEl)}this.fab.openedEl=s[0],s.hasClass("fab-morph")?this.fab.morphOpen(s,e||s.attr("data-morph-to")):s.addClass("fab-opened"),s.siblings(".fab-backdrop").addClass("backdrop-in"),s.trigger("fab:open")}},close:function(t){void 0===t&&(t=".fab-opened");var e=a(t).eq(0),s=e.find(".fab-buttons");e.length&&e.hasClass("fab-opened")&&(s.length||e.hasClass("fab-morph"))&&(this.fab.openedEl=null,e.hasClass("fab-morph")?this.fab.morphClose(e):e.removeClass("fab-opened"),e.siblings(".fab-backdrop").removeClass("backdrop-in"),e.trigger("fab:close"))},toggle:function(t){a(t).hasClass("fab-opened")?this.fab.close(t):this.fab.open(t)}},h={name:"fab",create:function(){o(this,{fab:i({openedEl:null},r)})},clicks:{".fab > a":function(t){this.fab.toggle(t.parents(".fab"))},".fab-open":function(t,e){void 0===e&&(e={});this.fab.open(e.fab)},".fab-close":function(t,e){void 0===e&&(e={});this.fab.close(e.fab)},".fab-backdrop":function(){this.fab.close()}}};if(e){if(t.prototype.modules&&t.prototype.modules[h.name])return;t.use(h),t.instance&&(t.instance.useModuleParams(h,t.instance.params),t.instance.useModule(h))}return h}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent))
