From adbe9149b654a3a3988ac6d5eac47fdd05903ea3 Mon Sep 17 00:00:00 2001 From: Vladimir Kharlampidi Date: Sun, 18 Aug 2019 18:12:43 +0300 Subject: [PATCH] 5.0.0-beta.6 release --- packages/core/components/photo-browser.js | 2 +- .../photo-browser/photo-browser-class.js | 10 ++++++++-- .../components/photo-browser/photo-browser.d.ts | 2 ++ .../core/components/photo-browser/photo-browser.js | 1 + packages/core/components/popup.js | 2 +- packages/core/components/popup/popup-class.js | 1 + packages/core/css/framework7.bundle.css | 2 +- packages/core/css/framework7.bundle.min.css | 2 +- packages/core/css/framework7.bundle.rtl.css | 2 +- packages/core/css/framework7.bundle.rtl.min.css | 2 +- packages/core/css/framework7.css | 2 +- packages/core/css/framework7.min.css | 2 +- packages/core/css/framework7.rtl.css | 2 +- packages/core/css/framework7.rtl.min.css | 2 +- packages/core/framework7.bundle.less | 2 +- packages/core/framework7.esm.bundle.js | 2 +- packages/core/framework7.esm.js | 2 +- packages/core/framework7.less | 2 +- packages/core/js/framework7.bundle.js | 14 ++++++++++---- packages/core/js/framework7.bundle.min.js | 4 ++-- packages/core/js/framework7.bundle.min.js.map | 2 +- packages/core/js/framework7.js | 2 +- packages/core/js/framework7.min.js | 2 +- packages/core/package.json | 2 +- packages/react/framework7-react.bundle.js | 4 ++-- packages/react/framework7-react.bundle.min.js | 2 +- packages/react/framework7-react.esm.js | 2 +- packages/react/package.json | 2 +- packages/vue/framework7-vue.bundle.js | 4 ++-- packages/vue/framework7-vue.bundle.min.js | 2 +- packages/vue/framework7-vue.esm.bundle.js | 2 +- packages/vue/framework7-vue.esm.js | 2 +- packages/vue/package.json | 2 +- 33 files changed, 53 insertions(+), 37 deletions(-) diff --git a/packages/core/components/photo-browser.js b/packages/core/components/photo-browser.js index 990af2e9e0..f2003497a6 100644 --- a/packages/core/components/photo-browser.js +++ b/packages/core/components/photo-browser.js @@ -1 +1 @@ -(function framework7ComponentLoader(e,o){void 0===o&&(o=!0);document,window;var r=e.$,a=(e.Template7,e.utils),t=(e.device,e.support,e.Class),n=(e.Modal,e.ConstructorMethods),p=(e.ModalMethods,function(e){function o(o,r){void 0===r&&(r={}),e.call(this,r,[o]);var t=this;t.app=o;var n=a.extend({on:{}},o.params.photoBrowser);t.useModulesParams(n),t.params=a.extend(n,r),a.extend(t,{exposed:!1,opened:!1,activeIndex:t.params.swiper.initialSlide,url:t.params.url,view:t.params.view||o.views.main,swipeToClose:{allow:!0,isTouched:!1,diff:void 0,start:void 0,current:void 0,started:!1,activeSlide:void 0,timeStart:void 0}}),t.useModules(),t.init()}return e&&(o.__proto__=e),o.prototype=Object.create(e&&e.prototype),o.prototype.constructor=o,o.prototype.onSlideChange=function(e){var o=this;o.activeIndex=e.activeIndex;var a=e.activeIndex+1,t=o.params.virtualSlides?o.params.photos.length:e.slides.length;e.params.loop&&(t-=2,(a-=e.loopedSlides)<1&&(a=t+a),a>t&&(a-=t));var n=o.params.virtualSlides?e.$wrapperEl.find('.swiper-slide[data-swiper-slide-index="'+e.activeIndex+'"]'):e.slides.eq(e.activeIndex),p=o.params.virtualSlides?e.$wrapperEl.find('.swiper-slide[data-swiper-slide-index="'+e.previousIndex+'"]'):e.slides.eq(e.previousIndex),s=o.$el.find(".photo-browser-current"),i=o.$el.find(".photo-browser-total");if("page"===o.params.type&&o.params.navbar&&0===s.length&&"ios"===o.app.theme){var l=o.app.navbar.getElByPage(o.$el);l&&(s=r(l).find(".photo-browser-current"),i=r(l).find(".photo-browser-total"))}if(s.text(a),i.text(t),o.captions.length>0){var d=e.params.loop?n.attr("data-swiper-slide-index"):o.activeIndex;o.$captionsContainerEl.find(".photo-browser-caption-active").removeClass("photo-browser-caption-active"),o.$captionsContainerEl.find('[data-caption-index="'+d+'"]').addClass("photo-browser-caption-active")}var c=p.find("video");c.length>0&&"pause"in c[0]&&c[0].pause()},o.prototype.onTouchStart=function(){var e=this.swipeToClose;e.allow&&(e.isTouched=!0)},o.prototype.onTouchMove=function(e){var o=this,r=o.swipeToClose;if(r.isTouched){r.started||(r.started=!0,r.start="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,o.params.virtualSlides?r.activeSlide=o.swiper.$wrapperEl.children(".swiper-slide-active"):r.activeSlide=o.swiper.slides.eq(o.swiper.activeIndex),r.timeStart=a.now()),e.preventDefault(),r.current="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,r.diff=r.start-r.current;var t=1-Math.abs(r.diff)/300,n=o.exposed||"dark"===o.params.theme?0:255;r.activeSlide.transform("translate3d(0,"+-r.diff+"px,0)"),o.swiper.$el.css("background-color","rgba("+n+", "+n+", "+n+", "+t+")").transition(0)}},o.prototype.onTouchEnd=function(){var e=this,o=e.swipeToClose;if(o.isTouched=!1,o.started){o.started=!1,o.allow=!1;var r=Math.abs(o.diff),t=(new Date).getTime()-o.timeStart;t<300&&r>20||t>=300&&r>100?a.nextTick(function(){e.$el&&(o.diff<0?e.$el.addClass("swipe-close-to-bottom"):e.$el.addClass("swipe-close-to-top")),e.emit("local::swipeToClose",e),e.close(),o.allow=!0}):(0!==r?o.activeSlide.addClass("photo-browser-transitioning").transitionEnd(function(){o.allow=!0,o.activeSlide.removeClass("photo-browser-transitioning")}):o.allow=!0,e.swiper.$el.transition("").css("background-color",""),o.activeSlide.transform(""))}else o.started=!1},o.prototype.renderNavbar=function(){var e=this;if(e.params.renderNavbar)return e.params.renderNavbar.call(e);var o=e.params.iconsColor;e.params.iconsColor||"dark"!==e.params.theme||(o="white");var r="ios"!==e.app.theme&&"aurora"!==e.app.theme||!e.params.backLinkText?"":e.params.backLinkText,a="page"!==e.params.type;return('\n \n ').trim()},o.prototype.renderToolbar=function(){var e=this;if(e.params.renderToolbar)return e.params.renderToolbar.call(e);var o=e.params.iconsColor;return e.params.iconsColor||"dark"!==e.params.theme||(o="white"),('\n
\n
\n \n \n \n \n \n \n
\n
\n ').trim()},o.prototype.renderCaption=function(e,o){return this.params.renderCaption?this.params.renderCaption.call(this,e,o):('\n
\n '+e+"\n
\n ").trim()},o.prototype.renderObject=function(e,o){return this.params.renderObject?this.params.renderObject.call(this,e,o):'\n
'+(e.html?e.html:e)+"
\n "},o.prototype.renderLazyPhoto=function(e,o){var r=this;return r.params.renderLazyPhoto?r.params.renderLazyPhoto.call(r,e,o):('\n
\n
'+(a[r.app.theme+"PreloaderContent"]||"")+'
\n \n \n \n
\n ').trim()},o.prototype.renderPhoto=function(e,o){return this.params.renderPhoto?this.params.renderPhoto.call(this,e,o):('\n
\n \n \n \n
\n ').trim()},o.prototype.render=function(){var e=this;return e.params.render?e.params.render.call(e,e.params):('\n
\n
\n
\n '+(e.params.navbar?e.renderNavbar():"")+"\n "+(e.params.toolbar?e.renderToolbar():"")+'\n
\n '+e.params.photos.map(function(o,r){return o.caption?e.renderCaption(o.caption,r):""}).join(" ")+'\n
\n
\n
\n '+(e.params.virtualSlides?"":e.params.photos.map(function(o,r){return o.html||("string"==typeof o||o instanceof String)&&o.indexOf("<")>=0&&o.indexOf(">")>=0?e.renderObject(o,r):!0===e.params.swiper.lazy||e.params.swiper.lazy&&e.params.swiper.lazy.enabled?e.renderLazyPhoto(o,r):e.renderPhoto(o,r)}).join(" "))+"\n
\n
\n
\n
\n
\n ").trim()},o.prototype.renderStandalone=function(){return this.params.renderStandalone?this.params.renderStandalone.call(this):'"},o.prototype.renderPage=function(){return this.params.renderPage?this.params.renderPage.call(this):this.render()},o.prototype.renderPopup=function(){return this.params.renderPopup?this.params.renderPopup.call(this):'"},o.prototype.onOpen=function(e,o){var t=this,n=t.app,p=r(o);p[0].f7PhotoBrowser=t,t.$el=p,t.el=p[0],t.openedIn=e,t.opened=!0,t.$swiperContainerEl=t.$el.find(".photo-browser-swiper-container"),t.$swiperWrapperEl=t.$el.find(".photo-browser-swiper-wrapper"),t.slides=t.$el.find(".photo-browser-slide"),t.$captionsContainerEl=t.$el.find(".photo-browser-captions"),t.captions=t.$el.find(".photo-browser-caption");var s=a.extend({},t.params.swiper,{initialSlide:t.activeIndex,on:{tap:function(e){t.emit("local::tap",e)},click:function(e){t.params.exposition&&t.expositionToggle(),t.emit("local::click",e)},doubleTap:function(e){t.emit("local::doubleTap",e)},slideChange:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];t.onSlideChange(this),t.emit.apply(t,["local::slideChange"].concat(e))},transitionStart:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];t.emit.apply(t,["local::transitionStart"].concat(e))},transitionEnd:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];t.emit.apply(t,["local::transitionEnd"].concat(e))},slideChangeTransitionStart:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];t.emit.apply(t,["local::slideChangeTransitionStart"].concat(e))},slideChangeTransitionEnd:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];t.emit.apply(t,["local::slideChangeTransitionEnd"].concat(e))},lazyImageLoad:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];t.emit.apply(t,["local::lazyImageLoad"].concat(e))},lazyImageReady:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];var a=e[0];r(a).removeClass("photo-browser-slide-lazy"),t.emit.apply(t,["local::lazyImageReady"].concat(e))}}});t.params.swipeToClose&&"page"!==t.params.type&&a.extend(s.on,{touchStart:function(e){t.onTouchStart(e),t.emit("local::touchStart",e)},touchMoveOpposite:function(e){t.onTouchMove(e),t.emit("local::touchMoveOpposite",e)},touchEnd:function(e){t.onTouchEnd(e),t.emit("local::touchEnd",e)}}),t.params.virtualSlides&&a.extend(s,{virtual:{slides:t.params.photos,renderSlide:function(e,o){return e.html||("string"==typeof e||e instanceof String)&&e.indexOf("<")>=0&&e.indexOf(">")>=0?t.renderObject(e,o):!0===t.params.swiper.lazy||t.params.swiper.lazy&&t.params.swiper.lazy.enabled?t.renderLazyPhoto(e,o):t.renderPhoto(e,o)}}}),t.swiper=n.swiper.create(t.$swiperContainerEl,s),0===t.activeIndex&&t.onSlideChange(t.swiper),t.$el&&t.$el.trigger("photobrowser:open"),t.emit("local::open photoBrowserOpen",t)},o.prototype.onOpened=function(){this.$el&&this.$el.trigger("photobrowser:opened"),this.emit("local::opened photoBrowserOpened",this)},o.prototype.onClose=function(){var e=this;e.destroyed||(e.swiper&&e.swiper.destroy&&(e.swiper.destroy(!0,!1),e.swiper=null,delete e.swiper),e.$el&&e.$el.trigger("photobrowser:close"),e.emit("local::close photoBrowserClose",e))},o.prototype.onClosed=function(){var e=this;e.destroyed||(e.opened=!1,e.$el=null,e.el=null,delete e.$el,delete e.el,e.$el&&e.$el.trigger("photobrowser:closed"),e.emit("local::closed photoBrowserClosed",e))},o.prototype.openPage=function(){var e=this;if(e.opened)return e;var o=e.renderPage();return e.view.router.navigate({url:e.url,route:{content:o,path:e.url,on:{pageBeforeIn:function(o,r){e.view.$el.addClass("with-photo-browser-page with-photo-browser-page-"+e.params.theme),e.onOpen("page",r.el)},pageAfterIn:function(o,r){e.onOpened("page",r.el)},pageBeforeOut:function(o,r){e.view.$el.removeClass("with-photo-browser-page with-photo-browser-page-exposed with-photo-browser-page-"+e.params.theme),e.onClose("page",r.el)},pageAfterOut:function(o,r){e.onClosed("page",r.el)}}}}),e},o.prototype.openStandalone=function(){var e=this;if(e.opened)return e;var o={backdrop:!1,content:e.renderStandalone(),on:{popupOpen:function(o){e.onOpen("popup",o.el)},popupOpened:function(o){e.onOpened("popup",o.el)},popupClose:function(o){e.onClose("popup",o.el)},popupClosed:function(o){e.onClosed("popup",o.el)}}};return e.params.routableModals?e.view.router.navigate({url:e.url,route:{path:e.url,popup:o}}):e.modal=e.app.popup.create(o).open(),e},o.prototype.openPopup=function(){var e=this;if(e.opened)return e;var o={content:e.renderPopup(),on:{popupOpen:function(o){e.onOpen("popup",o.el)},popupOpened:function(o){e.onOpened("popup",o.el)},popupClose:function(o){e.onClose("popup",o.el)},popupClosed:function(o){e.onClosed("popup",o.el)}}};return e.params.routableModals?e.view.router.navigate({url:e.url,route:{path:e.url,popup:o}}):e.modal=e.app.popup.create(o).open(),e},o.prototype.expositionEnable=function(){var e=this;return"page"===e.params.type&&e.view.$el.addClass("with-photo-browser-page-exposed"),e.$el&&e.$el.addClass("photo-browser-exposed"),e.params.expositionHideCaptions&&e.$captionsContainerEl.addClass("photo-browser-captions-exposed"),e.exposed=!0,e},o.prototype.expositionDisable=function(){var e=this;return"page"===e.params.type&&e.view.$el.removeClass("with-photo-browser-page-exposed"),e.$el&&e.$el.removeClass("photo-browser-exposed"),e.params.expositionHideCaptions&&e.$captionsContainerEl.removeClass("photo-browser-captions-exposed"),e.exposed=!1,e},o.prototype.expositionToggle=function(){var e=this;return"page"===e.params.type&&e.view.$el.toggleClass("with-photo-browser-page-exposed"),e.$el&&e.$el.toggleClass("photo-browser-exposed"),e.params.expositionHideCaptions&&e.$captionsContainerEl.toggleClass("photo-browser-captions-exposed"),e.exposed=!e.exposed,e},o.prototype.open=function(e){var o=this,r=o.params.type;return o.opened?(o.swiper&&void 0!==e&&o.swiper.slideTo(parseInt(e,10)),o):(void 0!==e&&(o.activeIndex=e),"standalone"===r&&o.openStandalone(),"page"===r&&o.openPage(),"popup"===r&&o.openPopup(),o)},o.prototype.close=function(){var e=this;return e.opened?(e.params.routableModals||"page"===e.openedIn?e.view&&e.view.router.back():(e.modal.once("modalClosed",function(){a.nextTick(function(){e.modal.destroy(),delete e.modal})}),e.modal.close()),e):e},o.prototype.init=function(){},o.prototype.destroy=function(){var e=this;e.emit("local::beforeDestroy photoBrowserBeforeDestroy",e),e.$el&&(e.$el.trigger("photobrowser:beforedestroy"),e.$el[0].f7PhotoBrowser=null,delete e.$el[0].f7PhotoBrowser),a.deleteProps(e),e=null},o}(t)),s={name:"photoBrowser",params:{photoBrowser:{photos:[],exposition:!0,expositionHideCaptions:!1,type:"standalone",navbar:!0,toolbar:!0,theme:"light",captionsTheme:void 0,iconsColor:void 0,swipeToClose:!0,backLinkText:"Close",navbarOfText:"of",view:void 0,url:"photos/",routableModals:!0,virtualSlides:!0,renderNavbar:void 0,renderToolbar:void 0,renderCaption:void 0,renderObject:void 0,renderLazyPhoto:void 0,renderPhoto:void 0,renderPage:void 0,renderPopup:void 0,renderStandalone:void 0,swiper:{initialSlide:0,spaceBetween:20,speed:300,loop:!1,preloadImages:!0,navigation:{nextEl:".photo-browser-next",prevEl:".photo-browser-prev"},zoom:{enabled:!0,maxRatio:3,minRatio:1},lazy:{enabled:!0}}}},create:function(){this.photoBrowser=n({defaultSelector:".photo-browser",constructor:p,app:this,domProp:"f7PhotoBrowser"})},static:{PhotoBrowser:p}};if(o){if(e.prototype.modules&&e.prototype.modules[s.name])return;e.use(s),e.instance&&(e.instance.useModuleParams(s,e.instance.params),e.instance.useModule(s))}return s}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent)) +(function framework7ComponentLoader(e,o){void 0===o&&(o=!0);document,window;var r=e.$,a=(e.Template7,e.utils),t=(e.device,e.support,e.Class),n=(e.Modal,e.ConstructorMethods),p=(e.ModalMethods,function(e){function o(o,r){void 0===r&&(r={}),e.call(this,r,[o]);var t=this;t.app=o;var n=a.extend({on:{}},o.params.photoBrowser);t.useModulesParams(n),t.params=a.extend(n,r),a.extend(t,{exposed:!1,opened:!1,activeIndex:t.params.swiper.initialSlide,url:t.params.url,view:t.params.view||o.views.main,swipeToClose:{allow:!0,isTouched:!1,diff:void 0,start:void 0,current:void 0,started:!1,activeSlide:void 0,timeStart:void 0}}),t.useModules(),t.init()}return e&&(o.__proto__=e),o.prototype=Object.create(e&&e.prototype),o.prototype.constructor=o,o.prototype.onSlideChange=function(e){var o=this;o.activeIndex=e.activeIndex;var a=e.activeIndex+1,t=o.params.virtualSlides?o.params.photos.length:e.slides.length;e.params.loop&&(t-=2,(a-=e.loopedSlides)<1&&(a=t+a),a>t&&(a-=t));var n=o.params.virtualSlides?e.$wrapperEl.find('.swiper-slide[data-swiper-slide-index="'+e.activeIndex+'"]'):e.slides.eq(e.activeIndex),p=o.params.virtualSlides?e.$wrapperEl.find('.swiper-slide[data-swiper-slide-index="'+e.previousIndex+'"]'):e.slides.eq(e.previousIndex),s=o.$el.find(".photo-browser-current"),i=o.$el.find(".photo-browser-total");if("page"===o.params.type&&o.params.navbar&&0===s.length&&"ios"===o.app.theme){var l=o.app.navbar.getElByPage(o.$el);l&&(s=r(l).find(".photo-browser-current"),i=r(l).find(".photo-browser-total"))}if(s.length&&i.length&&(s.text(a),i.text(t)),o.captions.length>0){var d=e.params.loop?n.attr("data-swiper-slide-index"):o.activeIndex;o.$captionsContainerEl.find(".photo-browser-caption-active").removeClass("photo-browser-caption-active"),o.$captionsContainerEl.find('[data-caption-index="'+d+'"]').addClass("photo-browser-caption-active")}var c=p.find("video");c.length>0&&"pause"in c[0]&&c[0].pause()},o.prototype.onTouchStart=function(){var e=this.swipeToClose;e.allow&&(e.isTouched=!0)},o.prototype.onTouchMove=function(e){var o=this,r=o.swipeToClose;if(r.isTouched){r.started||(r.started=!0,r.start="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,o.params.virtualSlides?r.activeSlide=o.swiper.$wrapperEl.children(".swiper-slide-active"):r.activeSlide=o.swiper.slides.eq(o.swiper.activeIndex),r.timeStart=a.now()),e.preventDefault(),r.current="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,r.diff=r.start-r.current;var t=1-Math.abs(r.diff)/300,n=o.exposed||"dark"===o.params.theme?0:255;r.activeSlide.transform("translate3d(0,"+-r.diff+"px,0)"),o.swiper.$el.css("background-color","rgba("+n+", "+n+", "+n+", "+t+")").transition(0)}},o.prototype.onTouchEnd=function(){var e=this,o=e.swipeToClose;if(o.isTouched=!1,o.started){o.started=!1,o.allow=!1;var r=Math.abs(o.diff),t=(new Date).getTime()-o.timeStart;t<300&&r>20||t>=300&&r>100?a.nextTick(function(){e.$el&&(o.diff<0?e.$el.addClass("swipe-close-to-bottom"):e.$el.addClass("swipe-close-to-top")),e.emit("local::swipeToClose",e),e.close(),o.allow=!0}):(0!==r?o.activeSlide.addClass("photo-browser-transitioning").transitionEnd(function(){o.allow=!0,o.activeSlide.removeClass("photo-browser-transitioning")}):o.allow=!0,e.swiper.$el.transition("").css("background-color",""),o.activeSlide.transform(""))}else o.started=!1},o.prototype.renderNavbar=function(){var e=this;if(e.params.renderNavbar)return e.params.renderNavbar.call(e);var o=e.params.iconsColor;e.params.iconsColor||"dark"!==e.params.theme||(o="white");var r="ios"!==e.app.theme&&"aurora"!==e.app.theme||!e.params.backLinkText?"":e.params.backLinkText,a=void 0===e.params.navbarShowCount?e.params.photos.length>0:e.params.navbarShowCount,t="page"!==e.params.type;return('\n \n ').trim()},o.prototype.renderToolbar=function(){var e=this;if(e.params.renderToolbar)return e.params.renderToolbar.call(e);var o=e.params.iconsColor;return e.params.iconsColor||"dark"!==e.params.theme||(o="white"),('\n
\n
\n \n \n \n \n \n \n
\n
\n ').trim()},o.prototype.renderCaption=function(e,o){return this.params.renderCaption?this.params.renderCaption.call(this,e,o):('\n
\n '+e+"\n
\n ").trim()},o.prototype.renderObject=function(e,o){return this.params.renderObject?this.params.renderObject.call(this,e,o):'\n
'+(e.html?e.html:e)+"
\n "},o.prototype.renderLazyPhoto=function(e,o){var r=this;return r.params.renderLazyPhoto?r.params.renderLazyPhoto.call(r,e,o):('\n
\n
'+(a[r.app.theme+"PreloaderContent"]||"")+'
\n \n \n \n
\n ').trim()},o.prototype.renderPhoto=function(e,o){return this.params.renderPhoto?this.params.renderPhoto.call(this,e,o):('\n
\n \n \n \n
\n ').trim()},o.prototype.render=function(){var e=this;return e.params.render?e.params.render.call(e,e.params):('\n
\n
\n
\n '+(e.params.navbar?e.renderNavbar():"")+"\n "+(e.params.toolbar?e.renderToolbar():"")+'\n
\n '+e.params.photos.map(function(o,r){return o.caption?e.renderCaption(o.caption,r):""}).join(" ")+'\n
\n
\n
\n '+(e.params.virtualSlides?"":e.params.photos.map(function(o,r){return o.html||("string"==typeof o||o instanceof String)&&o.indexOf("<")>=0&&o.indexOf(">")>=0?e.renderObject(o,r):!0===e.params.swiper.lazy||e.params.swiper.lazy&&e.params.swiper.lazy.enabled?e.renderLazyPhoto(o,r):e.renderPhoto(o,r)}).join(" "))+"\n
\n
\n
\n
\n
\n ").trim()},o.prototype.renderStandalone=function(){return this.params.renderStandalone?this.params.renderStandalone.call(this):'"},o.prototype.renderPage=function(){return this.params.renderPage?this.params.renderPage.call(this):this.render()},o.prototype.renderPopup=function(){return this.params.renderPopup?this.params.renderPopup.call(this):'"},o.prototype.onOpen=function(e,o){var t=this,n=t.app,p=r(o);p[0].f7PhotoBrowser=t,t.$el=p,t.el=p[0],t.openedIn=e,t.opened=!0,t.$swiperContainerEl=t.$el.find(".photo-browser-swiper-container"),t.$swiperWrapperEl=t.$el.find(".photo-browser-swiper-wrapper"),t.slides=t.$el.find(".photo-browser-slide"),t.$captionsContainerEl=t.$el.find(".photo-browser-captions"),t.captions=t.$el.find(".photo-browser-caption");var s=a.extend({},t.params.swiper,{initialSlide:t.activeIndex,on:{tap:function(e){t.emit("local::tap",e)},click:function(e){t.params.exposition&&t.expositionToggle(),t.emit("local::click",e)},doubleTap:function(e){t.emit("local::doubleTap",e)},slideChange:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];t.onSlideChange(this),t.emit.apply(t,["local::slideChange"].concat(e))},transitionStart:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];t.emit.apply(t,["local::transitionStart"].concat(e))},transitionEnd:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];t.emit.apply(t,["local::transitionEnd"].concat(e))},slideChangeTransitionStart:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];t.emit.apply(t,["local::slideChangeTransitionStart"].concat(e))},slideChangeTransitionEnd:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];t.emit.apply(t,["local::slideChangeTransitionEnd"].concat(e))},lazyImageLoad:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];t.emit.apply(t,["local::lazyImageLoad"].concat(e))},lazyImageReady:function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];var a=e[0];r(a).removeClass("photo-browser-slide-lazy"),t.emit.apply(t,["local::lazyImageReady"].concat(e))}}});t.params.swipeToClose&&"page"!==t.params.type&&a.extend(s.on,{touchStart:function(e){t.onTouchStart(e),t.emit("local::touchStart",e)},touchMoveOpposite:function(e){t.onTouchMove(e),t.emit("local::touchMoveOpposite",e)},touchEnd:function(e){t.onTouchEnd(e),t.emit("local::touchEnd",e)}}),t.params.virtualSlides&&a.extend(s,{virtual:{slides:t.params.photos,renderSlide:function(e,o){return e.html||("string"==typeof e||e instanceof String)&&e.indexOf("<")>=0&&e.indexOf(">")>=0?t.renderObject(e,o):!0===t.params.swiper.lazy||t.params.swiper.lazy&&t.params.swiper.lazy.enabled?t.renderLazyPhoto(e,o):t.renderPhoto(e,o)}}}),t.swiper=n.swiper.create(t.$swiperContainerEl,s),0===t.activeIndex&&t.onSlideChange(t.swiper),t.$el&&t.$el.trigger("photobrowser:open"),t.emit("local::open photoBrowserOpen",t)},o.prototype.onOpened=function(){this.$el&&this.$el.trigger("photobrowser:opened"),this.emit("local::opened photoBrowserOpened",this)},o.prototype.onClose=function(){var e=this;e.destroyed||(e.swiper&&e.swiper.destroy&&(e.swiper.destroy(!0,!1),e.swiper=null,delete e.swiper),e.$el&&e.$el.trigger("photobrowser:close"),e.emit("local::close photoBrowserClose",e))},o.prototype.onClosed=function(){var e=this;e.destroyed||(e.opened=!1,e.$el=null,e.el=null,delete e.$el,delete e.el,e.$el&&e.$el.trigger("photobrowser:closed"),e.emit("local::closed photoBrowserClosed",e))},o.prototype.openPage=function(){var e=this;if(e.opened)return e;var o=e.renderPage();return e.view.router.navigate({url:e.url,route:{content:o,path:e.url,on:{pageBeforeIn:function(o,r){e.view.$el.addClass("with-photo-browser-page with-photo-browser-page-"+e.params.theme),e.onOpen("page",r.el)},pageAfterIn:function(o,r){e.onOpened("page",r.el)},pageBeforeOut:function(o,r){e.view.$el.removeClass("with-photo-browser-page with-photo-browser-page-exposed with-photo-browser-page-"+e.params.theme),e.onClose("page",r.el)},pageAfterOut:function(o,r){e.onClosed("page",r.el)}}}}),e},o.prototype.openStandalone=function(){var e=this;if(e.opened)return e;var o={backdrop:!1,content:e.renderStandalone(),on:{popupOpen:function(o){e.onOpen("popup",o.el)},popupOpened:function(o){e.onOpened("popup",o.el)},popupClose:function(o){e.onClose("popup",o.el)},popupClosed:function(o){e.onClosed("popup",o.el)}}};return e.params.routableModals?e.view.router.navigate({url:e.url,route:{path:e.url,popup:o}}):e.modal=e.app.popup.create(o).open(),e},o.prototype.openPopup=function(){var e=this;if(e.opened)return e;var o={content:e.renderPopup(),on:{popupOpen:function(o){e.onOpen("popup",o.el)},popupOpened:function(o){e.onOpened("popup",o.el)},popupClose:function(o){e.onClose("popup",o.el)},popupClosed:function(o){e.onClosed("popup",o.el)}}};return e.params.routableModals?e.view.router.navigate({url:e.url,route:{path:e.url,popup:o}}):e.modal=e.app.popup.create(o).open(),e},o.prototype.expositionEnable=function(){var e=this;return"page"===e.params.type&&e.view.$el.addClass("with-photo-browser-page-exposed"),e.$el&&e.$el.addClass("photo-browser-exposed"),e.params.expositionHideCaptions&&e.$captionsContainerEl.addClass("photo-browser-captions-exposed"),e.exposed=!0,e},o.prototype.expositionDisable=function(){var e=this;return"page"===e.params.type&&e.view.$el.removeClass("with-photo-browser-page-exposed"),e.$el&&e.$el.removeClass("photo-browser-exposed"),e.params.expositionHideCaptions&&e.$captionsContainerEl.removeClass("photo-browser-captions-exposed"),e.exposed=!1,e},o.prototype.expositionToggle=function(){var e=this;return"page"===e.params.type&&e.view.$el.toggleClass("with-photo-browser-page-exposed"),e.$el&&e.$el.toggleClass("photo-browser-exposed"),e.params.expositionHideCaptions&&e.$captionsContainerEl.toggleClass("photo-browser-captions-exposed"),e.exposed=!e.exposed,e},o.prototype.open=function(e){var o=this,r=o.params.type;return o.opened?(o.swiper&&void 0!==e&&o.swiper.slideTo(parseInt(e,10)),o):(void 0!==e&&(o.activeIndex=e),"standalone"===r&&o.openStandalone(),"page"===r&&o.openPage(),"popup"===r&&o.openPopup(),o)},o.prototype.close=function(){var e=this;return e.opened?(e.params.routableModals||"page"===e.openedIn?e.view&&e.view.router.back():(e.modal.once("modalClosed",function(){a.nextTick(function(){e.modal.destroy(),delete e.modal})}),e.modal.close()),e):e},o.prototype.init=function(){},o.prototype.destroy=function(){var e=this;e.emit("local::beforeDestroy photoBrowserBeforeDestroy",e),e.$el&&(e.$el.trigger("photobrowser:beforedestroy"),e.$el[0].f7PhotoBrowser=null,delete e.$el[0].f7PhotoBrowser),a.deleteProps(e),e=null},o}(t)),s={name:"photoBrowser",params:{photoBrowser:{photos:[],exposition:!0,expositionHideCaptions:!1,type:"standalone",navbar:!0,toolbar:!0,theme:"light",captionsTheme:void 0,iconsColor:void 0,swipeToClose:!0,backLinkText:"Close",navbarOfText:"of",navbarShowCount:void 0,view:void 0,url:"photos/",routableModals:!0,virtualSlides:!0,renderNavbar:void 0,renderToolbar:void 0,renderCaption:void 0,renderObject:void 0,renderLazyPhoto:void 0,renderPhoto:void 0,renderPage:void 0,renderPopup:void 0,renderStandalone:void 0,swiper:{initialSlide:0,spaceBetween:20,speed:300,loop:!1,preloadImages:!0,navigation:{nextEl:".photo-browser-next",prevEl:".photo-browser-prev"},zoom:{enabled:!0,maxRatio:3,minRatio:1},lazy:{enabled:!0}}}},create:function(){this.photoBrowser=n({defaultSelector:".photo-browser",constructor:p,app:this,domProp:"f7PhotoBrowser"})},static:{PhotoBrowser:p}};if(o){if(e.prototype.modules&&e.prototype.modules[s.name])return;e.use(s),e.instance&&(e.instance.useModuleParams(s,e.instance.params),e.instance.useModule(s))}return s}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent)) diff --git a/packages/core/components/photo-browser/photo-browser-class.js b/packages/core/components/photo-browser/photo-browser-class.js index ca95475794..bba16ac94a 100644 --- a/packages/core/components/photo-browser/photo-browser-class.js +++ b/packages/core/components/photo-browser/photo-browser-class.js @@ -73,8 +73,10 @@ class PhotoBrowser extends Framework7Class { $totalEl = $(navbarEl).find('.photo-browser-total'); } } - $currentEl.text(current); - $totalEl.text(total); + if ($currentEl.length && $totalEl.length) { + $currentEl.text(current); + $totalEl.text(total); + } // Update captions if (pb.captions.length > 0) { @@ -167,6 +169,8 @@ class PhotoBrowser extends Framework7Class { const backLinkText = (pb.app.theme === 'ios' || pb.app.theme === 'aurora') && pb.params.backLinkText ? pb.params.backLinkText : ''; + const renderNavbarCount = typeof pb.params.navbarShowCount === 'undefined' ? pb.params.photos.length > 0 : pb.params.navbarShowCount; + const isPopup = pb.params.type !== 'page'; const navbarHtml = ` + ${renderNavbarCount ? `
${pb.params.navbarOfText}
+ ` : ''}
diff --git a/packages/core/components/photo-browser/photo-browser.d.ts b/packages/core/components/photo-browser/photo-browser.d.ts index e9b884f5bb..2da7000acd 100644 --- a/packages/core/components/photo-browser/photo-browser.d.ts +++ b/packages/core/components/photo-browser/photo-browser.d.ts @@ -40,6 +40,8 @@ export namespace PhotoBrowser { backLinkText?: string /** Text of "of" in photos counter: "3 of 5" (default "of") */ navbarOfText?: string + /** Defines should it display "3 of 5" text in navbar title or not. If not specified (undefined) then it will show this text if there is more than 1 item */ + navbarShowCount?: boolean | undefined /** One of the default colors */ iconsColor?: string /** Swiper parameters */ diff --git a/packages/core/components/photo-browser/photo-browser.js b/packages/core/components/photo-browser/photo-browser.js index 475f22c6e9..8fa2f37213 100644 --- a/packages/core/components/photo-browser/photo-browser.js +++ b/packages/core/components/photo-browser/photo-browser.js @@ -17,6 +17,7 @@ export default { swipeToClose: true, backLinkText: 'Close', navbarOfText: 'of', + navbarShowCount: undefined, view: undefined, url: 'photos/', routableModals: true, diff --git a/packages/core/components/popup.js b/packages/core/components/popup.js index ba16aa00e7..44f01e5697 100644 --- a/packages/core/components/popup.js +++ b/packages/core/components/popup.js @@ -1 +1 @@ -(function framework7ComponentLoader(o,e){void 0===e&&(e=!0);document,window;var t=o.$,p=(o.Template7,o.utils),a=(o.device,o.support),s=(o.Class,o.Modal),r=(o.ConstructorMethods,o.ModalMethods),n=function(o){function e(e,s){var r=p.extend({on:{}},e.params.popup,s);o.call(this,e,r);var n,i,l,c,u=this;if(u.params=r,(n=u.params.el?t(u.params.el).eq(0):t(u.params.content).filter(function(o,e){return 1===e.nodeType}).eq(0))&&n.length>0&&n[0].f7Modal)return n[0].f7Modal;if(0===n.length)return u.destroy();function d(o){var p=o.target,a=t(p);if(!(!e.device.desktop&&e.device.cordova&&(window.Keyboard&&window.Keyboard.isVisible||window.cordova.plugins&&window.cordova.plugins.Keyboard&&window.cordova.plugins.Keyboard.isVisible))&&0===a.closest(u.el).length&&u.params&&u.params.closeByBackdropClick&&u.params.backdrop&&u.backdropEl&&u.backdropEl===p){var s=!0;u.$el.nextAll(".popup.modal-in").each(function(o,e){var t=e.f7Modal;t&&t.params.closeByBackdropClick&&t.params.backdrop&&t.backdropEl===u.backdropEl&&(s=!1)}),s&&u.close()}}function m(o){27===o.keyCode&&u.params.closeOnEscape&&u.close()}function h(o){return(e.height-2*o)/e.height}u.params.backdrop&&u.params.backdropEl?i=t(u.params.backdropEl):u.params.backdrop&&0===(i=e.root.children(".popup-backdrop")).length&&(i=t(''),e.root.append(i)),p.extend(u,{app:e,push:n.hasClass("popup-push")||u.params.push,$el:n,el:n[0],$backdropEl:i,backdropEl:i&&i[0],type:"popup",$htmlEl:t("html")});var f,v,w,y,b,g,k,C,E,T,M,$=!0,B=!1,x=!1;function H(o){!B&&$&&u.params.swipeToClose&&(u.params.swipeHandler&&0===t(o.target).closest(u.params.swipeHandler).length||(B=!0,x=!1,f={x:"touchstart"===o.type?o.targetTouches[0].pageX:o.pageX,y:"touchstart"===o.type?o.targetTouches[0].pageY:o.pageY},y=p.now(),w=void 0,u.params.swipeHandler||"touchstart"!==o.type||(g=t(o.target).closest(".page-content")[0])))}function O(o){if(B){if(v={x:"touchmove"===o.type?o.targetTouches[0].pageX:o.pageX,y:"touchmove"===o.type?o.targetTouches[0].pageY:o.pageY},void 0===w&&(w=!!(w||Math.abs(v.x-f.x)>Math.abs(v.y-f.y))),w)return B=!1,void(x=!1);b=f.y-v.y,c&&l&&b>0&&(b=0);var t=b<0?"to-bottom":"to-top";if(n.transition(0),"string"!=typeof u.params.swipeToClose||t===u.params.swipeToClose){if(!x){if(c&&l&&(T=n[0].offsetHeight,M=e.root.children(".view, .views")),g&&(k=g.scrollTop,E=g.scrollHeight,C=g.offsetHeight,!(E===C||"to-bottom"===t&&0===k||"to-top"===t&&k===E-C)))return n.transform(""),n.transition(""),B=!1,void(x=!1);x=!0}if(o.preventDefault(),c&&l){var p=1-Math.abs(b/T),a=1-(1-h(l))*p;M.transition(0).transform("translate3d(0,0,0) scale("+a+")")}n.transition(0).transform("translate3d(0,"+-b+"px,0)")}else n.transform("")}}function K(){if(B=!1,x){x=!1,$=!1,n.transition(""),c&&l&&M.transition("").transform("");var o=b<=0?"to-bottom":"to-top";if("string"==typeof u.params.swipeToClose&&o!==u.params.swipeToClose)return n.transform(""),void($=!0);var e=Math.abs(b),t=(new Date).getTime()-y;t<300&&e>20||t>=300&&e>100?p.nextTick(function(){"to-bottom"===o?n.addClass("swipe-close-to-bottom"):n.addClass("swipe-close-to-top"),n.transform(""),u.close(),$=!0}):($=!0,n.transform(""))}}var P=!!a.passiveListener&&{passive:!0};return u.params.swipeToClose&&(n.on(e.touchEvents.start,H,P),e.on("touchmove",O),e.on("touchend:passive",K),u.once("popupDestroy",function(){n.off(e.touchEvents.start,H,P),e.off("touchmove",O),e.off("touchend:passive",K)})),u.on("open",function(){u.params.closeOnEscape&&t(document).on("keydown",m),u.push&&(c=u.push&&(e.width<630||e.height<630||n.hasClass("popup-tablet-fullscreen"))),c&&(l=parseInt(n.css("--f7-popup-push-offset"),10),Number.isNaN(l)&&(l=0),l&&(n.addClass("popup-push"),u.$htmlEl.addClass("with-modal-popup-push"),u.$htmlEl[0].style.setProperty("--f7-popup-push-scale",h(l))))}),u.on("opened",function(){n.removeClass("swipe-close-to-bottom swipe-close-to-top"),u.params.closeByBackdropClick&&e.on("click",d)}),u.on("close",function(){u.params.closeOnEscape&&t(document).off("keydown",m),u.params.closeByBackdropClick&&e.off("click",d),c&&l&&(u.$htmlEl.removeClass("with-modal-popup-push"),u.$htmlEl.addClass("with-modal-popup-push-closing"))}),u.on("closed",function(){c&&l&&(u.$htmlEl.removeClass("with-modal-popup-push-closing"),u.$htmlEl[0].style.removeProperty("--f7-popup-push-scale"))}),n[0].f7Modal=u,u}return o&&(e.__proto__=o),e.prototype=Object.create(o&&o.prototype),e.prototype.constructor=e,e}(s),i={name:"popup",params:{popup:{backdrop:!0,backdropEl:void 0,closeByBackdropClick:!0,closeOnEscape:!1,swipeToClose:!1,swipeHandler:null,push:!1}},static:{Popup:n},create:function(){this.popup=r({app:this,constructor:n,defaultSelector:".popup.modal-in"})},clicks:{".popup-open":function(o,e){void 0===e&&(e={});this.popup.open(e.popup,e.animate)},".popup-close":function(o,e){void 0===e&&(e={});this.popup.close(e.popup,e.animate)}}};if(e){if(o.prototype.modules&&o.prototype.modules[i.name])return;o.use(i),o.instance&&(o.instance.useModuleParams(i,o.instance.params),o.instance.useModule(i))}return i}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent)) +(function framework7ComponentLoader(o,t){void 0===t&&(t=!0);document,window;var e=o.$,p=(o.Template7,o.utils),a=(o.device,o.support),s=(o.Class,o.Modal),r=(o.ConstructorMethods,o.ModalMethods),n=function(o){function t(t,s){var r=p.extend({on:{}},t.params.popup,s);o.call(this,t,r);var n,i,l,c,u=this;if(u.params=r,(n=u.params.el?e(u.params.el).eq(0):e(u.params.content).filter(function(o,t){return 1===t.nodeType}).eq(0))&&n.length>0&&n[0].f7Modal)return n[0].f7Modal;if(0===n.length)return u.destroy();function d(o){var p=o.target,a=e(p);if(!(!t.device.desktop&&t.device.cordova&&(window.Keyboard&&window.Keyboard.isVisible||window.cordova.plugins&&window.cordova.plugins.Keyboard&&window.cordova.plugins.Keyboard.isVisible))&&0===a.closest(u.el).length&&u.params&&u.params.closeByBackdropClick&&u.params.backdrop&&u.backdropEl&&u.backdropEl===p){var s=!0;u.$el.nextAll(".popup.modal-in").each(function(o,t){var e=t.f7Modal;e&&e.params.closeByBackdropClick&&e.params.backdrop&&e.backdropEl===u.backdropEl&&(s=!1)}),s&&u.close()}}function m(o){27===o.keyCode&&u.params.closeOnEscape&&u.close()}function h(o){return(t.height-2*o)/t.height}u.params.backdrop&&u.params.backdropEl?i=e(u.params.backdropEl):u.params.backdrop&&0===(i=t.root.children(".popup-backdrop")).length&&(i=e(''),t.root.append(i)),p.extend(u,{app:t,push:n.hasClass("popup-push")||u.params.push,$el:n,el:n[0],$backdropEl:i,backdropEl:i&&i[0],type:"popup",$htmlEl:e("html")});var f,v,w,y,b,g,k,C,E,T,M,$=!0,B=!1,x=!1;function H(o){!B&&$&&u.params.swipeToClose&&(u.params.swipeHandler&&0===e(o.target).closest(u.params.swipeHandler).length||(B=!0,x=!1,f={x:"touchstart"===o.type?o.targetTouches[0].pageX:o.pageX,y:"touchstart"===o.type?o.targetTouches[0].pageY:o.pageY},y=p.now(),w=void 0,u.params.swipeHandler||"touchstart"!==o.type||(g=e(o.target).closest(".page-content")[0])))}function O(o){if(B){if(v={x:"touchmove"===o.type?o.targetTouches[0].pageX:o.pageX,y:"touchmove"===o.type?o.targetTouches[0].pageY:o.pageY},void 0===w&&(w=!!(w||Math.abs(v.x-f.x)>Math.abs(v.y-f.y))),w)return B=!1,void(x=!1);b=f.y-v.y,c&&l&&b>0&&(b=0);var e=b<0?"to-bottom":"to-top";if(n.transition(0),"string"==typeof u.params.swipeToClose&&e!==u.params.swipeToClose)return n.transform(""),void n.transition("");if(!x){if(c&&l&&(T=n[0].offsetHeight,M=t.root.children(".view, .views")),g&&(k=g.scrollTop,E=g.scrollHeight,C=g.offsetHeight,!(E===C||"to-bottom"===e&&0===k||"to-top"===e&&k===E-C)))return n.transform(""),n.transition(""),B=!1,void(x=!1);x=!0}if(o.preventDefault(),c&&l){var p=1-Math.abs(b/T),a=1-(1-h(l))*p;M.transition(0).transform("translate3d(0,0,0) scale("+a+")")}n.transition(0).transform("translate3d(0,"+-b+"px,0)")}}function K(){if(B=!1,x){x=!1,$=!1,n.transition(""),c&&l&&M.transition("").transform("");var o=b<=0?"to-bottom":"to-top";if("string"==typeof u.params.swipeToClose&&o!==u.params.swipeToClose)return n.transform(""),void($=!0);var t=Math.abs(b),e=(new Date).getTime()-y;e<300&&t>20||e>=300&&t>100?p.nextTick(function(){"to-bottom"===o?n.addClass("swipe-close-to-bottom"):n.addClass("swipe-close-to-top"),n.transform(""),u.close(),$=!0}):($=!0,n.transform(""))}}var P=!!a.passiveListener&&{passive:!0};return u.params.swipeToClose&&(n.on(t.touchEvents.start,H,P),t.on("touchmove",O),t.on("touchend:passive",K),u.once("popupDestroy",function(){n.off(t.touchEvents.start,H,P),t.off("touchmove",O),t.off("touchend:passive",K)})),u.on("open",function(){u.params.closeOnEscape&&e(document).on("keydown",m),u.push&&(c=u.push&&(t.width<630||t.height<630||n.hasClass("popup-tablet-fullscreen"))),c&&(l=parseInt(n.css("--f7-popup-push-offset"),10),Number.isNaN(l)&&(l=0),l&&(n.addClass("popup-push"),u.$htmlEl.addClass("with-modal-popup-push"),u.$htmlEl[0].style.setProperty("--f7-popup-push-scale",h(l))))}),u.on("opened",function(){n.removeClass("swipe-close-to-bottom swipe-close-to-top"),u.params.closeByBackdropClick&&t.on("click",d)}),u.on("close",function(){u.params.closeOnEscape&&e(document).off("keydown",m),u.params.closeByBackdropClick&&t.off("click",d),c&&l&&(u.$htmlEl.removeClass("with-modal-popup-push"),u.$htmlEl.addClass("with-modal-popup-push-closing"))}),u.on("closed",function(){c&&l&&(u.$htmlEl.removeClass("with-modal-popup-push-closing"),u.$htmlEl[0].style.removeProperty("--f7-popup-push-scale"))}),n[0].f7Modal=u,u}return o&&(t.__proto__=o),t.prototype=Object.create(o&&o.prototype),t.prototype.constructor=t,t}(s),i={name:"popup",params:{popup:{backdrop:!0,backdropEl:void 0,closeByBackdropClick:!0,closeOnEscape:!1,swipeToClose:!1,swipeHandler:null,push:!1}},static:{Popup:n},create:function(){this.popup=r({app:this,constructor:n,defaultSelector:".popup.modal-in"})},clicks:{".popup-open":function(o,t){void 0===t&&(t={});this.popup.open(t.popup,t.animate)},".popup-close":function(o,t){void 0===t&&(t={});this.popup.close(t.popup,t.animate)}}};if(t){if(o.prototype.modules&&o.prototype.modules[i.name])return;o.use(i),o.instance&&(o.instance.useModuleParams(i,o.instance.params),o.instance.useModule(i))}return i}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent)) diff --git a/packages/core/components/popup/popup-class.js b/packages/core/components/popup/popup-class.js index e869053de2..13f5cdff3f 100644 --- a/packages/core/components/popup/popup-class.js +++ b/packages/core/components/popup/popup-class.js @@ -159,6 +159,7 @@ class Popup extends Modal { if (typeof popup.params.swipeToClose === 'string' && direction !== popup.params.swipeToClose) { $el.transform(''); + $el.transition(''); return; } diff --git a/packages/core/css/framework7.bundle.css b/packages/core/css/framework7.bundle.css index 5dbab7179f..9a422f5a4c 100644 --- a/packages/core/css/framework7.bundle.css +++ b/packages/core/css/framework7.bundle.css @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * diff --git a/packages/core/css/framework7.bundle.min.css b/packages/core/css/framework7.bundle.min.css index 288e1f1196..6ea92c4762 100644 --- a/packages/core/css/framework7.bundle.min.css +++ b/packages/core/css/framework7.bundle.min.css @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * diff --git a/packages/core/css/framework7.bundle.rtl.css b/packages/core/css/framework7.bundle.rtl.css index 8a5ed6bb97..ae368f9f8f 100644 --- a/packages/core/css/framework7.bundle.rtl.css +++ b/packages/core/css/framework7.bundle.rtl.css @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * diff --git a/packages/core/css/framework7.bundle.rtl.min.css b/packages/core/css/framework7.bundle.rtl.min.css index 91afba51ad..1d40230498 100644 --- a/packages/core/css/framework7.bundle.rtl.min.css +++ b/packages/core/css/framework7.bundle.rtl.min.css @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * diff --git a/packages/core/css/framework7.css b/packages/core/css/framework7.css index 361e97a444..d0c9b5038b 100644 --- a/packages/core/css/framework7.css +++ b/packages/core/css/framework7.css @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * diff --git a/packages/core/css/framework7.min.css b/packages/core/css/framework7.min.css index 247f8f4b95..9699aef754 100644 --- a/packages/core/css/framework7.min.css +++ b/packages/core/css/framework7.min.css @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * diff --git a/packages/core/css/framework7.rtl.css b/packages/core/css/framework7.rtl.css index 1f5ba79706..6f8dc7ae7a 100644 --- a/packages/core/css/framework7.rtl.css +++ b/packages/core/css/framework7.rtl.css @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * diff --git a/packages/core/css/framework7.rtl.min.css b/packages/core/css/framework7.rtl.min.css index 7a22affc15..fe04941663 100644 --- a/packages/core/css/framework7.rtl.min.css +++ b/packages/core/css/framework7.rtl.min.css @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * diff --git a/packages/core/framework7.bundle.less b/packages/core/framework7.bundle.less index 7d020066a6..f3f3444750 100644 --- a/packages/core/framework7.bundle.less +++ b/packages/core/framework7.bundle.less @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * diff --git a/packages/core/framework7.esm.bundle.js b/packages/core/framework7.esm.bundle.js index 49b459d7e0..3ef0584308 100644 --- a/packages/core/framework7.esm.bundle.js +++ b/packages/core/framework7.esm.bundle.js @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * diff --git a/packages/core/framework7.esm.js b/packages/core/framework7.esm.js index c9ca5eeffb..ffda2071a6 100644 --- a/packages/core/framework7.esm.js +++ b/packages/core/framework7.esm.js @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * diff --git a/packages/core/framework7.less b/packages/core/framework7.less index 8d80d88fef..6b3b0e70a3 100644 --- a/packages/core/framework7.less +++ b/packages/core/framework7.less @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * diff --git a/packages/core/js/framework7.bundle.js b/packages/core/js/framework7.bundle.js index 71bc20b390..65df6d459b 100644 --- a/packages/core/js/framework7.bundle.js +++ b/packages/core/js/framework7.bundle.js @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * @@ -14002,6 +14002,7 @@ if (typeof popup.params.swipeToClose === 'string' && direction !== popup.params.swipeToClose) { $el.transform(''); + $el.transition(''); return; } @@ -35001,8 +35002,10 @@ $totalEl = $(navbarEl).find('.photo-browser-total'); } } - $currentEl.text(current); - $totalEl.text(total); + if ($currentEl.length && $totalEl.length) { + $currentEl.text(current); + $totalEl.text(total); + } // Update captions if (pb.captions.length > 0) { @@ -35095,8 +35098,10 @@ var backLinkText = (pb.app.theme === 'ios' || pb.app.theme === 'aurora') && pb.params.backLinkText ? pb.params.backLinkText : ''; + var renderNavbarCount = typeof pb.params.navbarShowCount === 'undefined' ? pb.params.photos.length > 0 : pb.params.navbarShowCount; + var isPopup = pb.params.type !== 'page'; - var navbarHtml = ("\n
\n
\n
\n \n
\n \n " + (pb.params.navbarOfText) + "\n \n
\n
\n
\n
\n ").trim(); + var navbarHtml = ("\n
\n
\n
\n \n " + (renderNavbarCount ? ("\n
\n \n " + (pb.params.navbarOfText) + "\n \n
\n ") : '') + "\n
\n
\n
\n ").trim(); return navbarHtml; }; @@ -35564,6 +35569,7 @@ swipeToClose: true, backLinkText: 'Close', navbarOfText: 'of', + navbarShowCount: undefined, view: undefined, url: 'photos/', routableModals: true, diff --git a/packages/core/js/framework7.bundle.min.js b/packages/core/js/framework7.bundle.min.js index 5cd71f6056..2718dc355d 100644 --- a/packages/core/js/framework7.bundle.min.js +++ b/packages/core/js/framework7.bundle.min.js @@ -1,5 +1,5 @@ /** - * Framework7 5.0.0-beta.5 + * Framework7 5.0.0-beta.6 * Full featured mobile HTML framework for building iOS & Android apps * http://framework7.io/ * @@ -10,5 +10,5 @@ * Released on: August 18, 2019 */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Framework7=t()}(this,function(){"use strict";var t7ctx;t7ctx="undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;var Template7Context=t7ctx,Template7Utils={quoteSingleRexExp:new RegExp("'","g"),quoteDoubleRexExp:new RegExp('"',"g"),isFunction:function(e){return"function"==typeof e},escape:function(e){return void 0===e&&(e=""),e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},helperToSlices:function(e){var t,a,r,i=Template7Utils.quoteDoubleRexExp,n=Template7Utils.quoteSingleRexExp,s=e.replace(/[{}#}]/g,"").trim().split(" "),o=[];for(a=0;a=0){t=r,o.push(l);break}t&&(a=t)}else if(l.indexOf("=")>0){var d=l.split("="),u=d[0],h=d[1];if(p||(p=0===h.indexOf('"')?i:n,c=0===h.indexOf('"')?'"':"'"),2!==h.match(p).length){for(t=0,r=a+1;r=0){t=r;break}t&&(a=t)}var f=[u,h.replace(p,"")];o.push(f)}else o.push(l)}return o},stringToBlocks:function(e){var t,a,r=[];if(!e)return[];var i=e.split(/({{[^{^}]*}})/);for(t=0;t=0)continue;if((n=n.replace(/{{([#\/])*([ ])*/,"{{$1").replace(/([ ])*}}/,"}}")).indexOf("{#")<0&&n.indexOf(" ")<0&&n.indexOf("else")<0){r.push({type:"variable",contextName:n.replace(/[{}]/g,"")});continue}var s=Template7Utils.helperToSlices(n),o=s[0],l=">"===o,p=[],c={};for(a=1;a=0){var u="",h="",f=0,v=void 0,m=!1,g=!1,b=0;for(a=t+1;a=0&&(b+=1),i[a].indexOf("{{/")>=0&&(b-=1),i[a].indexOf("{{#"+o)>=0)u+=i[a],g&&(h+=i[a]),f+=1;else if(i[a].indexOf("{{/"+o)>=0){if(!(f>0)){v=a,m=!0;break}f-=1,u+=i[a],g&&(h+=i[a])}else i[a].indexOf("else")>=0&&0===b?g=!0:(g||(u+=i[a]),g&&(h+=i[a]));m&&(v&&(t=v),"raw"===o?r.push({type:"plain",content:u}):r.push({type:"helper",helperName:o,contextName:p,content:u,inverseContent:h,hash:c}))}else n.indexOf(" ")>0&&(l&&(o="_partial",p[0]&&(0===p[0].indexOf("[")?p[0]=p[0].replace(/[[\]]/g,""):p[0]='"'+p[0].replace(/"|'/g,"")+'"')),r.push({type:"helper",helperName:o,contextName:p,hash:c}))}}return r},parseJsVariable:function(e,t,a){return e.split(/([+ \-*\/^()&=|<>!%:?])/g).reduce(function(e,r){if(!r)return e;if(r.indexOf(t)<0)return e.push(r),e;if(!a)return e.push(JSON.stringify("")),e;var i=a;return r.indexOf(t+".")>=0&&r.split(t+".")[1].split(".").forEach(function(e){i=e in i?i[e]:void 0}),("string"==typeof i||Array.isArray(i)||i.constructor&&i.constructor===Object)&&(i=JSON.stringify(i)),void 0===i&&(i="undefined"),e.push(i),e},[]).join("")},parseJsParents:function(e,t){return e.split(/([+ \-*^()&=|<>!%:?])/g).reduce(function(e,a){if(!a)return e;if(a.indexOf("../")<0)return e.push(a),e;if(!t||0===t.length)return e.push(JSON.stringify("")),e;var r=a.split("../").length-1,i=r>t.length?t[t.length-1]:t[r-1];return a.replace(/..\//g,"").split(".").forEach(function(e){i=void 0!==i[e]?i[e]:"undefined"}),!1===i||!0===i?(e.push(JSON.stringify(i)),e):null===i||"undefined"===i?(e.push(JSON.stringify("")),e):(e.push(JSON.stringify(i)),e)},[]).join("")},getCompileVar:function(e,t,a){void 0===a&&(a="data_1");var r,i,n=t,s=0;0===e.indexOf("../")?(s=e.split("../").length-1,i=n.split("_")[1]-s,n="ctx_"+(i>=1?i:1),r=e.split("../")[s].split(".")):0===e.indexOf("@global")?(n="Template7.global",r=e.split("@global.")[1].split(".")):0===e.indexOf("@root")?(n="root",r=e.split("@root.")[1].split(".")):r=e.split(".");for(var o=0;o0&&(p=i),o>0?n+="[(data_"+p+" && data_"+p+"."+l.replace("@","")+")]":n="(data_"+p+" && data_"+p+"."+l.replace("@","")+")"}else(Number.isFinite?Number.isFinite(l):Template7Context.isFinite(l))?n+="["+l+"]":"this"===l||l.indexOf("this.")>=0||l.indexOf("this[")>=0||l.indexOf("this(")>=0?n=l.replace("this",t):n+="."+l}return n},getCompiledArguments:function(e,t,a){for(var r=[],i=0;i0?r:t.inverse(this)},with:function(e,t){var a=e;return Template7Utils.isFunction(a)&&(a=e.call(this)),t.fn(a)},join:function(e,t){var a=e;return Template7Utils.isFunction(a)&&(a=a.call(this)),a.join(t.hash.delimiter||t.hash.delimeter)},js:function js(expression,options){var data=options.data,func,execute=expression;return"index first last key".split(" ").forEach(function(e){if(void 0!==data[e]){var t=new RegExp("this.@"+e,"g"),a=new RegExp("@"+e,"g");execute=execute.replace(t,JSON.stringify(data[e])).replace(a,JSON.stringify(data[e]))}}),options.root&&execute.indexOf("@root")>=0&&(execute=Template7Utils.parseJsVariable(execute,"@root",options.root)),execute.indexOf("@global")>=0&&(execute=Template7Utils.parseJsVariable(execute,"@global",Template7Context.Template7.global)),execute.indexOf("../")>=0&&(execute=Template7Utils.parseJsParents(execute,options.parents)),func=execute.indexOf("return")>=0?"(function(){"+execute+"})":"(function(){return ("+execute+")})",eval(func).call(this)},js_if:function js_if(expression,options){var data=options.data,func,execute=expression;"index first last key".split(" ").forEach(function(e){if(void 0!==data[e]){var t=new RegExp("this.@"+e,"g"),a=new RegExp("@"+e,"g");execute=execute.replace(t,JSON.stringify(data[e])).replace(a,JSON.stringify(data[e]))}}),options.root&&execute.indexOf("@root")>=0&&(execute=Template7Utils.parseJsVariable(execute,"@root",options.root)),execute.indexOf("@global")>=0&&(execute=Template7Utils.parseJsVariable(execute,"@global",Template7Context.Template7.global)),execute.indexOf("../")>=0&&(execute=Template7Utils.parseJsParents(execute,options.parents)),func=execute.indexOf("return")>=0?"(function(){"+execute+"})":"(function(){return ("+execute+")})";var condition=eval(func).call(this);return condition?options.fn(this,options.data):options.inverse(this,options.data)}};Template7Helpers.js_compare=Template7Helpers.js_if;var Template7Options={},Template7Partials={},Template7Class=function(e){this.template=e},staticAccessors={options:{configurable:!0},partials:{configurable:!0},helpers:{configurable:!0}};function Template7(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a=e[0],r=e[1];if(2===e.length){var i=new Template7Class(a),n=i.compile()(r);return i=null,n}return new Template7Class(a)}Template7Class.prototype.compile=function compile(template,depth){void 0===template&&(template=this.template),void 0===depth&&(depth=1);var t=this;if(t.compiled)return t.compiled;if("string"!=typeof template)throw new Error("Template7: Template must be a string");var stringToBlocks=Template7Utils.stringToBlocks,getCompileVar=Template7Utils.getCompileVar,getCompiledArguments=Template7Utils.getCompiledArguments,blocks=stringToBlocks(template),ctx="ctx_"+depth,data="data_"+depth;if(0===blocks.length)return function(){return""};function getCompileFn(e,a){return e.content?t.compile(e.content,a):function(){return""}}function getCompileInverse(e,a){return e.inverseContent?t.compile(e.inverseContent,a):function(){return""}}var resultString="",i;for(resultString+=1===depth?"(function ("+ctx+", "+data+", root) {\n":"(function ("+ctx+", "+data+") {\n",1===depth&&(resultString+="function isArray(arr){return Array.isArray(arr);}\n",resultString+="function isFunction(func){return (typeof func === 'function');}\n",resultString+='function c(val, ctx) {if (typeof val !== "undefined" && val !== null) {if (isFunction(val)) {return val.call(ctx);} else return val;} else return "";}\n',resultString+="root = root || ctx_1 || {};\n"),resultString+="var r = '';\n",i=0;i=1;j-=1)parentsString+=", ctx_"+j;parents="["+parentsString+"]"}else parents="["+ctx+"]";var dynamicHelper=void 0;if(0===block.helperName.indexOf("[")&&(block.helperName=getCompileVar(block.helperName.replace(/[[\]]/g,""),ctx,data),dynamicHelper=!0),dynamicHelper||block.helperName in Template7Helpers)compiledArguments=getCompiledArguments(block.contextName,ctx,data),resultString+="r += (Template7Helpers"+(dynamicHelper?"["+block.helperName+"]":"."+block.helperName)+").call("+ctx+", "+(compiledArguments&&compiledArguments+", ")+"{hash:"+JSON.stringify(block.hash)+", data: "+data+" || {}, fn: "+getCompileFn(block,depth+1)+", inverse: "+getCompileInverse(block,depth+1)+", root: root, parents: "+parents+"});";else{if(block.contextName.length>0)throw new Error('Template7: Missing helper: "'+block.helperName+'"');variable=getCompileVar(block.helperName,ctx,data),resultString+="if ("+variable+") {",resultString+="if (isArray("+variable+")) {",resultString+="r += (Template7Helpers.each).call("+ctx+", "+variable+", {hash:"+JSON.stringify(block.hash)+", data: "+data+" || {}, fn: "+getCompileFn(block,depth+1)+", inverse: "+getCompileInverse(block,depth+1)+", root: root, parents: "+parents+"});",resultString+="}else {",resultString+="r += (Template7Helpers.with).call("+ctx+", "+variable+", {hash:"+JSON.stringify(block.hash)+", data: "+data+" || {}, fn: "+getCompileFn(block,depth+1)+", inverse: "+getCompileInverse(block,depth+1)+", root: root, parents: "+parents+"});",resultString+="}}"}}}else resultString+="r +='"+block.content.replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/'/g,"\\'")+"';"}return resultString+="\nreturn r;})",1===depth?(t.compiled=eval(resultString),t.compiled):resultString},staticAccessors.options.get=function(){return Template7Options},staticAccessors.partials.get=function(){return Template7Partials},staticAccessors.helpers.get=function(){return Template7Helpers},Object.defineProperties(Template7Class,staticAccessors),Template7.registerHelper=function(e,t){Template7Class.helpers[e]=t},Template7.unregisterHelper=function(e){Template7Class.helpers[e]=void 0,delete Template7Class.helpers[e]},Template7.registerPartial=function(e,t){Template7Class.partials[e]={template:t}},Template7.unregisterPartial=function(e){Template7Class.partials[e]&&(Template7Class.partials[e]=void 0,delete Template7Class.partials[e])},Template7.compile=function(e,t){return new Template7Class(e,t).compile()},Template7.options=Template7Class.options,Template7.helpers=Template7Class.helpers,Template7.partials=Template7Class.partials;var doc="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,win="undefined"==typeof window?{document:doc,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,Dom7=function(e){for(var t=0;t=0&&s.indexOf(">")>=0){var o="div";for(0===s.indexOf(":~]/)?(t||doc).querySelectorAll(e.trim()):[doc.getElementById(e.trim().split("#")[1])],r=0;r0&&e[0].nodeType)for(r=0;r=0&&(t[toCamelCase(i.name.split("data-")[1])]=i.value)}for(var n in t)"false"===t[n]?t[n]=!1:"true"===t[n]?t[n]=!0:parseFloat(t[n])===1*t[n]&&(t[n]*=1);return t}}function val(e){if(void 0!==e){for(var t=0;t=0;else a.value=e}return this}if(this[0]){if(this[0].multiple&&"select"===this[0].nodeName.toLowerCase()){for(var i=[],n=0;n=0;h-=1){var f=u[h];n&&f.listener===n?(d.removeEventListener(p,f.proxyListener,s),u.splice(h,1)):n&&f.listener&&f.listener.dom7proxy&&f.listener.dom7proxy===n?(d.removeEventListener(p,f.proxyListener,s),u.splice(h,1)):n||(d.removeEventListener(p,f.proxyListener,s),u.splice(h,1))}}return this}function once(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];var r=this,i=t[0],n=t[1],s=t[2],o=t[3];function l(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];s.apply(this,e),r.off(i,n,l,o),l.dom7proxy&&delete l.dom7proxy}return"function"==typeof t[1]&&(i=(e=t)[0],s=e[1],o=e[2],n=void 0),l.dom7proxy=s,r.on(i,n,l,o)}function trigger(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var a=e[0].split(" "),r=e[1],i=0;i0}),o.dispatchEvent(l),o.dom7EventData=[],delete o.dom7EventData}return this}function transitionEnd(e){var t,a=["webkitTransitionEnd","transitionend"],r=this;function i(n){if(n.target===this)for(e.call(this,n),t=0;t0?parseFloat(this.css("width")):null}function outerWidth(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null}function height(){return this[0]===win?win.innerHeight:this.length>0?parseFloat(this.css("height")):null}function outerHeight(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null}function offset(){if(this.length>0){var e=this[0],t=e.getBoundingClientRect(),a=doc.body,r=e.clientTop||a.clientTop||0,i=e.clientLeft||a.clientLeft||0,n=e===win?win.scrollY:e.scrollTop,s=e===win?win.scrollX:e.scrollLeft;return{top:t.top+n-r,left:t.left+s-i}}return null}function hide(){for(var e=0;ea-1?[]:e<0?(t=a+e)<0?[]:[this[t]]:[this[e]])}function append(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];for(var r=0;r=0;a-=1)this[t].insertBefore(r.childNodes[a],this[t].childNodes[0])}else if(e instanceof Dom7)for(a=0;a1)for(var r=0;r1)for(var r=0;r0?e?this[0].nextElementSibling&&$(this[0].nextElementSibling).is(e)?new Dom7([this[0].nextElementSibling]):new Dom7([]):this[0].nextElementSibling?new Dom7([this[0].nextElementSibling]):new Dom7([]):new Dom7([])}function nextAll(e){var t=[],a=this[0];if(!a)return new Dom7([]);for(;a.nextElementSibling;){var r=a.nextElementSibling;e?$(r).is(e)&&t.push(r):t.push(r),a=r}return new Dom7(t)}function prev(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&$(t.previousElementSibling).is(e)?new Dom7([t.previousElementSibling]):new Dom7([]):t.previousElementSibling?new Dom7([t.previousElementSibling]):new Dom7([])}return new Dom7([])}function prevAll(e){var t=[],a=this[0];if(!a)return new Dom7([]);for(;a.previousElementSibling;){var r=a.previousElementSibling;e?$(r).is(e)&&t.push(r):t.push(r),a=r}return new Dom7(t)}function siblings(e){return this.nextAll(e).add(this.prevAll(e))}function parent(e){for(var t=[],a=0;a0||0===i,v=r>0||0===r;if(void 0===s&&(s="swing"),f&&(e=h.scrollTop,n||(h.scrollTop=i)),v&&(t=h.scrollLeft,n||(h.scrollLeft=r)),n){f&&(a=h.scrollHeight-h.offsetHeight,p=Math.max(Math.min(i,a),0)),v&&(l=h.scrollWidth-h.offsetWidth,c=Math.max(Math.min(r,l),0));var m=null;f&&p===e&&(f=!1),v&&c===t&&(v=!1),requestAnimationFrame(function a(r){void 0===r&&(r=(new Date).getTime()),null===m&&(m=r);var i,l=Math.max(Math.min((r-m)/n,1),0),g="linear"===s?l:.5-Math.cos(l*Math.PI)/2;f&&(d=e+g*(p-e)),v&&(u=t+g*(c-t)),f&&p>e&&d>=p&&(h.scrollTop=p,i=!0),f&&pt&&u>=c&&(h.scrollLeft=c,i=!0),v&&c0?this[0].scrollTop:null:this.scrollTo(void 0,r,i,n,s)}function scrollLeft(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];var r=t[0],i=t[1],n=t[2],s=t[3];3===t.length&&"function"==typeof n&&(r=(e=t)[0],i=e[1],s=e[2],n=e[3]);return void 0===r?this.length>0?this[0].scrollLeft:null:this.scrollTo(r,void 0,i,n,s)}var Scroll=Object.freeze({scrollTo:scrollTo,scrollTop:scrollTop,scrollLeft:scrollLeft});function animate(e,t){var a,r=this,i={props:Object.assign({},e),params:Object.assign({duration:300,easing:"swing"},t),elements:r,animating:!1,que:[],easingProgress:function(e,t){return"swing"===e?.5-Math.cos(t*Math.PI)/2:"function"==typeof e?e(t):t},stop:function(){i.frameId&&cancelAnimationFrame(i.frameId),i.animating=!1,i.elements.each(function(e,t){delete t.dom7AnimateInstance}),i.que=[]},done:function(e){if(i.animating=!1,i.elements.each(function(e,t){delete t.dom7AnimateInstance}),e&&e(r),i.que.length>0){var t=i.que.shift();i.animate(t[0],t[1])}},animate:function(e,t){if(i.animating)return i.que.push([e,t]),i;var a=[];i.elements.each(function(t,r){var n,s,o,l,p;r.dom7AnimateInstance||(i.elements[t].dom7AnimateInstance=i),a[t]={container:r},Object.keys(e).forEach(function(i){n=win.getComputedStyle(r,null).getPropertyValue(i).replace(",","."),s=parseFloat(n),o=n.replace(s,""),l=parseFloat(e[i]),p=e[i]+o,a[t][i]={initialFullValue:n,initialValue:s,unit:o,finalValue:l,finalFullValue:p,currentValue:s}})});var n,s,o=null,l=0,p=0,c=!1;return i.animating=!0,i.frameId=requestAnimationFrame(function d(){var u,h;n=(new Date).getTime(),c||(c=!0,t.begin&&t.begin(r)),null===o&&(o=n),t.progress&&t.progress(r,Math.max(Math.min((n-o)/t.duration,1),0),o+t.duration-n<0?0:o+t.duration-n,o),a.forEach(function(r){var c=r;s||c.done||Object.keys(e).forEach(function(r){if(!s&&!c.done){u=Math.max(Math.min((n-o)/t.duration,1),0),h=i.easingProgress(t.easing,u);var d=c[r],f=d.initialValue,v=d.finalValue,m=d.unit;c[r].currentValue=f+h*(v-f);var g=c[r].currentValue;(v>f&&g>=v||v0;)a[r]=arguments[r+1];if(void 0===a[0]){for(var i=0;i0?a=s:t=s}while(Math.abs(n)>SUBDIVISION_PRECISION&&++o=NEWTON_MIN_SLOPE?newtonRaphsonIterate(t,o,e,a):0===l?o:binarySubdivide(t,r,r+kSampleStepSize,e,a)}(n),t,r)}}for(var defaultDiacriticsRemovalap=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"ŒŒ"},{base:"oe",letters:"œœ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],diacriticsMap={},i=0;i\n \n \n \n \n \n \n \n \n '.trim(),iosPreloaderContent:('\n \n '+[0,1,2,3,4,5,6,7,8,9,10,11].map(function(){return''}).join("")+"\n \n ").trim(),auroraPreloaderContent:'\n \n \n \n ',eventNameToColonCase:function(e){var t;return e.split("").map(function(e,a){return e.match(/[A-Z]/)&&0!==a&&!t?(t=!0,":"+e.toLowerCase()):e.toLowerCase()}).join("")},deleteProps:function(e){var t=e;Object.keys(t).forEach(function(e){try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})},bezier:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return bezier.apply(void 0,e)},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},nextFrame:function(e){return Utils.requestAnimationFrame(function(){Utils.requestAnimationFrame(e)})},now:function(){return Date.now()},requestAnimationFrame:function(e){return win.requestAnimationFrame(e)},cancelAnimationFrame:function(e){return win.cancelAnimationFrame(e)},removeDiacritics:function(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return diacriticsMap[e]||e})},parseUrlQuery:function(e){var t,a,r,i,n={},s=e||win.location.href;if("string"==typeof s&&s.length)for(i=(a=(s=s.indexOf("?")>-1?s.replace(/\S*\?/,""):"").split("&").filter(function(e){return""!==e})).length,t=0;t6&&(r=r.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),i=new win.WebKitCSSMatrix("none"===r?"":r)):a=(i=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(r=win.WebKitCSSMatrix?i.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(r=win.WebKitCSSMatrix?i.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),r||0},serializeObject:function(e,t){if(void 0===t&&(t=[]),"string"==typeof e)return e;var a,r=[];function i(e){if(t.length>0){for(var a="",r=0;r0?2*n/r.b:r.s,[r.h,r.s,r.b]},colorThemeCSSProperties:function(){for(var e,t,a=[],r=arguments.length;r--;)a[r]=arguments[r];if(1===a.length?(e=a[0],t=Utils.colorHexToRgb(e)):3===a.length&&(t=a,e=Utils.colorRgbToHex.apply(Utils,t)),!t)return{};var i=Utils.colorRgbToHsl.apply(Utils,t),n=[i[0],i[1],Math.max(0,i[2]-.08)],s=[i[0],i[1],Math.max(0,i[2]+.08)],o=Utils.colorRgbToHex.apply(Utils,Utils.colorHslToRgb.apply(Utils,n)),l=Utils.colorRgbToHex.apply(Utils,Utils.colorHslToRgb.apply(Utils,s));return{"--f7-theme-color":e,"--f7-theme-color-rgb":t.join(", "),"--f7-theme-color-shade":o,"--f7-theme-color-tint":l}}},Support=(testDiv=doc.createElement("div"),{touch:!!(win.navigator.maxTouchPoints>0||"ontouchstart"in win||win.DocumentTouch&&doc instanceof win.DocumentTouch),pointerEvents:!!(win.navigator.pointerEnabled||win.PointerEvent||"maxTouchPoints"in win.navigator&&win.navigator.maxTouchPoints>0),prefixedPointerEvents:!!win.navigator.msPointerEnabled,transition:(style=testDiv.style,"transition"in style||"webkitTransition"in style||"MozTransition"in style),transforms3d:win.Modernizr&&!0===win.Modernizr.csstransforms3d||function(){var e=testDiv.style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=doc.createElement("div").style,t="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),a=0;a=0||t.indexOf("Trident/")>=0,d=t.indexOf("Edge/")>=0,u=t.indexOf("Gecko/")>=0&&t.indexOf("Firefox/")>=0,h="Win32"===e,f=t.toLowerCase().indexOf("electron")>=0,v="MacIntel"===e;!o&&v&&Support.touch&&(1024===r&&1366===i||834===r&&1194===i||834===r&&1112===i||768===r&&1024===i)&&(o=t.match(/(Version)\/([\d.]+)/),v=!1),a.ie=c,a.edge=d,a.firefox=u,s&&!h&&(a.os="android",a.osVersion=s[2],a.android=!0,a.androidChrome=t.toLowerCase().indexOf("chrome")>=0),(o||p||l)&&(a.os="ios",a.ios=!0),p&&!l&&(a.osVersion=p[2].replace(/_/g,"."),a.iphone=!0),o&&(a.osVersion=o[2].replace(/_/g,"."),a.ipad=!0),l&&(a.osVersion=l[3]?l[3].replace(/_/g,"."):null,a.ipod=!0),a.ios&&a.osVersion&&t.indexOf("Version/")>=0&&"10"===a.osVersion.split(".")[0]&&(a.osVersion=t.toLowerCase().split("version/")[1].split(" ")[0]),a.webView=!(!(p||o||l)||!t.match(/.*AppleWebKit(?!.*Safari)/i)&&!win.navigator.standalone)||win.matchMedia&&win.matchMedia("(display-mode: standalone)").matches,a.webview=a.webView,a.standalone=a.webView,a.desktop=!(a.ios||a.android||n)||f,a.desktop&&(a.electron=f,a.macos=v,a.windows=h,a.macos&&(a.os="macos"),a.windows&&(a.os="windows"));var m=doc.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');a.needsStatusbarOverlay=function(){return!a.desktop&&(!!(a.standalone&&a.ios&&m&&"black-translucent"===m.content)||!(!(a.webView||a.android&&a.cordova)||win.innerWidth*win.innerHeight!=win.screen.width*win.screen.height))},a.statusbar=a.needsStatusbarOverlay(),a.pixelRatio=win.devicePixelRatio||1;return a.prefersColorScheme=function(){var e;return win.matchMedia&&win.matchMedia("(prefers-color-scheme: light)").matches&&(e="light"),win.matchMedia&&win.matchMedia("(prefers-color-scheme: dark)").matches&&(e="dark"),e},a}(),EventsClass=function(e){void 0===e&&(e=[]);this.eventsParents=e,this.eventsListeners={}};EventsClass.prototype.on=function(e,t,a){var r=this;if("function"!=typeof t)return r;var i=a?"unshift":"push";return e.split(" ").forEach(function(e){r.eventsListeners[e]||(r.eventsListeners[e]=[]),r.eventsListeners[e][i](t)}),r},EventsClass.prototype.once=function(e,t,a){var r=this;if("function"!=typeof t)return r;function i(){for(var a=[],n=arguments.length;n--;)a[n]=arguments[n];t.apply(r,a),r.off(e,i),i.f7proxy&&delete i.f7proxy}return i.f7proxy=t,r.on(e,i,a)},EventsClass.prototype.off=function(e,t){var a=this;return a.eventsListeners?(e.split(" ").forEach(function(e){void 0===t?a.eventsListeners[e]=[]:a.eventsListeners[e]&&a.eventsListeners[e].forEach(function(r,i){(r===t||r.f7proxy&&r.f7proxy===t)&&a.eventsListeners[e].splice(i,1)})}),a):a},EventsClass.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,r,i,n,s=this;if(!s.eventsListeners)return s;"string"==typeof e[0]||Array.isArray(e[0])?(a=e[0],r=e.slice(1,e.length),i=s,n=s.eventsParents):(a=e[0].events,r=e[0].data,i=e[0].context||s,n=e[0].local?[]:e[0].parents||s.eventsParents);var o=Array.isArray(a)?a:a.split(" "),l=o.map(function(e){return e.replace("local::","")}),p=o.filter(function(e){return e.indexOf("local::")<0});return l.forEach(function(e){if(s.eventsListeners&&s.eventsListeners[e]){var t=[];s.eventsListeners[e].forEach(function(e){t.push(e)}),t.forEach(function(e){e.apply(i,r)})}}),n&&n.length>0&&n.forEach(function(e){e.emit.apply(e,[p].concat(r))}),s};var Framework7Class=function(e){function t(t,a){void 0===t&&(t={}),void 0===a&&(a=[]),e.call(this,a);var r=this;r.params=t,r.params&&r.params.on&&Object.keys(r.params.on).forEach(function(e){r.on(e,r.params.on[e])})}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var a={components:{configurable:!0}};return t.prototype.useModuleParams=function(e,t){if(e.params){var a={};Object.keys(e.params).forEach(function(e){void 0!==t[e]&&(a[e]=Utils.extend({},t[e]))}),Utils.extend(t,e.params),Object.keys(a).forEach(function(e){Utils.extend(t[e],a[e])})}},t.prototype.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach(function(a){var r=t.modules[a];r.params&&Utils.extend(e,r.params)})},t.prototype.useModule=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var a=this;if(a.modules){var r="string"==typeof e?a.modules[e]:e;r&&(r.instance&&Object.keys(r.instance).forEach(function(e){var t=r.instance[e];a[e]="function"==typeof t?t.bind(a):t}),r.on&&a.on&&Object.keys(r.on).forEach(function(e){a.on(e,r.on[e])}),r.vnode&&(a.vnodeHooks||(a.vnodeHooks={}),Object.keys(r.vnode).forEach(function(e){Object.keys(r.vnode[e]).forEach(function(t){var i=r.vnode[e][t];a.vnodeHooks[t]||(a.vnodeHooks[t]={}),a.vnodeHooks[t][e]||(a.vnodeHooks[t][e]=[]),a.vnodeHooks[t][e].push(i.bind(a))})})),r.create&&r.create.bind(a)(t))}},t.prototype.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach(function(a){var r=e[a]||{};t.useModule(a,r)})},a.components.set=function(e){this.use&&this.use(e)},t.installModule=function(e){for(var t=[],a=arguments.length-1;a-- >0;)t[a]=arguments[a+1];var r=this;r.prototype.modules||(r.prototype.modules={});var i=e.name||Object.keys(r.prototype.modules).length+"_"+Utils.now();return r.prototype.modules[i]=e,e.proto&&Object.keys(e.proto).forEach(function(t){r.prototype[t]=e.proto[t]}),e.static&&Object.keys(e.static).forEach(function(t){r[t]=e.static[t]}),e.install&&e.install.apply(r,t),r},t.use=function(e){for(var t=[],a=arguments.length-1;a-- >0;)t[a]=arguments[a+1];var r=this;return Array.isArray(e)?(e.forEach(function(e){return r.installModule(e)}),r):r.installModule.apply(r,[e].concat(t))},Object.defineProperties(t,a),t}(EventsClass);function ConstructorMethods(e){void 0===e&&(e={});var t=e.defaultSelector,a=e.constructor,r=e.domProp,i=e.app,n=e.addMethods,s={create:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return i?new(Function.prototype.bind.apply(a,[null].concat([i],e))):new(Function.prototype.bind.apply(a,[null].concat(e)))},get:function(e){if(void 0===e&&(e=t),e instanceof a)return e;var i=$(e);return 0!==i.length?i[0][r]:void 0},destroy:function(e){var t=s.get(e);if(t&&t.destroy)return t.destroy()}};return n&&Array.isArray(n)&&n.forEach(function(e){s[e]=function(a){void 0===a&&(a=t);for(var r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];var n=s.get(a);if(n&&n[e])return n[e].apply(n,r)}}),s}function ModalMethods(e){void 0===e&&(e={});var t=e.defaultSelector,a=e.constructor,r=e.app;return Utils.extend(ConstructorMethods({defaultSelector:t,constructor:a,app:r,domProp:"f7Modal"}),{open:function(e,t){var i=$(e),n=i[0].f7Modal;return n||(n=new a(r,{el:i})),n.open(t)},close:function(e,i){void 0===e&&(e=t);var n=$(e);if(0!==n.length){var s=n[0].f7Modal;return s||(s=new a(r,{el:n})),s.close(i)}}})}var fetchedModules=[];function loadModule(e){var t=this;return new Promise(function(a,r){var i,n,s,o=t.instance;if(e){if("string"==typeof e){var l=e.match(/([a-z0-9-]*)/i);if(e.indexOf(".")<0&&l&&l[0].length===e.length){if(!o||o&&!o.params.lazyModulesPath)return void r(new Error('Framework7: "lazyModulesPath" app parameter must be specified to fetch module by name'));i=o.params.lazyModulesPath+"/"+e+".js"}else i=e}else"function"==typeof e?s=e:n=e;if(s){var p=s(t,!1);if(!p)return void r(new Error("Framework7: Can't find Framework7 component in specified component function"));if(t.prototype.modules&&t.prototype.modules[p.name])return void a();h(p),a()}if(n){var c=n;if(!c)return void r(new Error("Framework7: Can't find Framework7 component in specified component"));if(t.prototype.modules&&t.prototype.modules[c.name])return void a();h(c),a()}if(i){if(fetchedModules.indexOf(i)>=0)return void a();fetchedModules.push(i);var d=new Promise(function(e,a){t.request.get(i,function(r){var n="f7_component_loader_callback_"+Utils.id(),s=document.createElement("script");s.innerHTML="window."+n+" = function (Framework7, Framework7AutoInstallComponent) {return "+r.trim()+"}",$("head").append(s);var o=window[n];delete window[n],$(s).remove();var l=o(t,!1);l?t.prototype.modules&&t.prototype.modules[l.name]?e():(h(l),e()):a(new Error("Framework7: Can't find Framework7 component in "+i+" file"))},function(e,t){a(e,t)})}),u=new Promise(function(e){t.request.get(i.replace(".js",o.rtl?".rtl.css":".css"),function(t){var a=document.createElement("style");a.innerHTML=t,$("head").append(a),e()},function(){e()})});Promise.all([d,u]).then(function(){a()}).catch(function(e){r(e)})}}else r(new Error("Framework7: Lazy module must be specified"));function h(e){t.use(e),o&&(o.useModuleParams(e,o.params),o.useModule(e))}})}var Framework7=function(e){function t(a){if(e.call(this,a),t.instance)throw new Error("Framework7 is already initialized and can't be initialized more than once");var r=Utils.extend({},a),i=this;t.instance=i;var n={version:"1.0.0",id:"io.framework7.testapp",root:"body",theme:"auto",language:win.navigator.language,routes:[],name:"Framework7",lazyModulesPath:null,initOnDeviceReady:!0,init:!0,autoDarkTheme:!1,iosTranslucentBars:!0,iosTranslucentModals:!0};i.useModulesParams(n),i.params=Utils.extend(n,a);var s=$(i.params.root);Utils.extend(i,{id:i.params.id,name:i.params.name,version:i.params.version,routes:i.params.routes,language:i.params.language,root:s,rtl:"rtl"===s.css("direction"),theme:"auto"===i.params.theme?Device.ios?"ios":Device.desktop&&Device.electron?"aurora":"md":i.params.theme,passedParams:r}),i.root&&i.root[0]&&(i.root[0].f7=i),i.useModules(),i.initData();var o="(prefers-color-scheme: dark)",l="(prefers-color-scheme: light)";return i.mq={},win.matchMedia&&(i.mq.dark=win.matchMedia(o),i.mq.light=win.matchMedia(l)),i.colorSchemeListener=function(e){var t=e.matches,a=e.media;if(t){var r=doc.querySelector("html");a===o?r.classList.add("theme-dark"):a===l&&r.classList.remove("theme-dark")}},i.params.init&&(Device.cordova&&i.params.initOnDeviceReady?$(doc).on("deviceready",function(){i.init()}):i.init()),i}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var a={$:{configurable:!0},t7:{configurable:!0}},r={Dom7:{configurable:!0},$:{configurable:!0},Template7:{configurable:!0},Class:{configurable:!0},Events:{configurable:!0}};return t.prototype.initData=function(){var e=this;e.data={},e.params.data&&"function"==typeof e.params.data?Utils.extend(e.data,e.params.data.bind(e)()):e.params.data&&Utils.extend(e.data,e.params.data),e.methods={},e.params.methods&&Object.keys(e.params.methods).forEach(function(t){"function"==typeof e.params.methods[t]?e.methods[t]=e.params.methods[t].bind(e):e.methods[t]=e.params.methods[t]})},t.prototype.enableAutoDarkTheme=function(){if(win.matchMedia){var e=this,t=doc.querySelector("html");e.mq.dark&&e.mq.light&&(e.mq.dark.addListener(e.colorSchemeListener),e.mq.light.addListener(e.colorSchemeListener)),e.mq.dark&&e.mq.dark.matches?t.classList.add("theme-dark"):e.mq.light&&e.mq.light.matches&&t.classList.remove("theme-dark")}},t.prototype.disableAutoDarkTheme=function(){if(win.matchMedia){this.mq.dark&&this.mq.dark.removeListener(this.colorSchemeListener),this.mq.light&&this.mq.light.removeListener(this.colorSchemeListener)}},t.prototype.init=function(){var e=this;return e.initialized?e:(e.root.addClass("framework7-initializing"),e.rtl&&$("html").attr("dir","rtl"),e.params.autoDarkTheme&&e.enableAutoDarkTheme(),e.root.addClass("framework7-root"),$("html").removeClass("ios md aurora").addClass(e.theme),"ios"===e.theme&&e.params.iosTranslucentBars&&Device.ios&&$("html").addClass("ios-translucent-bars"),"ios"===e.theme&&e.params.iosTranslucentModals&&Device.ios&&$("html").addClass("ios-translucent-modals"),Utils.nextFrame(function(){e.root.removeClass("framework7-initializing")}),e.initialized=!0,e.emit("init"),e)},t.prototype.loadModule=function(){for(var e=[],a=arguments.length;a--;)e[a]=arguments[a];return t.loadModule.apply(t,e)},t.prototype.loadModules=function(){for(var e=[],a=arguments.length;a--;)e[a]=arguments[a];return t.loadModules.apply(t,e)},t.prototype.getVnodeHooks=function(e,t){return this.vnodeHooks&&this.vnodeHooks[e]&&this.vnodeHooks[e][t]||[]},a.$.get=function(){return $},a.t7.get=function(){return Template7},r.Dom7.get=function(){return $},r.$.get=function(){return $},r.Template7.get=function(){return Template7},r.Class.get=function(){return e},r.Events.get=function(){return EventsClass},Object.defineProperties(t.prototype,a),Object.defineProperties(t,r),t}(Framework7Class);Framework7.ModalMethods=ModalMethods,Framework7.ConstructorMethods=ConstructorMethods,Framework7.loadModule=loadModule,Framework7.loadModules=function(e){return Promise.all(e.map(function(e){return Framework7.loadModule(e)}))};var DeviceModule={name:"device",proto:{device:Device},static:{device:Device},on:{init:function(){var e=[],t=doc.querySelector("html"),a=doc.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]');if(t){if(Device.standalone&&Device.ios&&a&&"black-translucent"===a.content&&e.push("device-full-viewport"),e.push("device-pixel-ratio-"+Math.floor(Device.pixelRatio)),Device.pixelRatio>=2&&e.push("device-retina"),Device.os&&!Device.desktop){if(e.push("device-"+Device.os,"device-"+Device.os+"-"+Device.osVersion.split(".")[0],"device-"+Device.os+"-"+Device.osVersion.replace(/\./g,"-")),"ios"===Device.os)for(var r=parseInt(Device.osVersion.split(".")[0],10)-1;r>=6;r-=1)e.push("device-ios-gt-"+r)}else Device.desktop&&(e.push("device-desktop"),Device.os&&e.push("device-"+Device.os));(Device.cordova||Device.phonegap)&&e.push("device-cordova"),e.forEach(function(e){t.classList.add(e)})}}}},SupportModule={name:"support",proto:{support:Support},static:{support:Support}},UtilsModule={name:"utils",proto:{utils:Utils},static:{utils:Utils}},ResizeModule={name:"resize",instance:{getSize:function(){if(!this.root[0])return{width:0,height:0,left:0,top:0};var e=this.root.offset(),t=[this.root[0].offsetWidth,this.root[0].offsetHeight,e.left,e.top],a=t[0],r=t[1],i=t[2],n=t[3];return this.width=a,this.height=r,this.left=i,this.top=n,{width:a,height:r,left:i,top:n}}},on:{init:function(){var e=this;e.getSize(),win.addEventListener("resize",function(){e.emit("resize")},!1),win.addEventListener("orientationchange",function(){e.emit("orientationchange")})},orientationchange:function(){this.device.ipad&&(doc.body.scrollLeft=0,setTimeout(function(){doc.body.scrollLeft=0},0))},resize:function(){this.getSize()}}},globals={},jsonpRequests=0;function Request(e){var t=Utils.extend({},globals);"beforeCreate beforeOpen beforeSend error complete success statusCode".split(" ").forEach(function(e){delete t[e]});var a=Utils.extend({url:win.location.toString(),method:"GET",data:!1,async:!0,cache:!0,user:"",password:"",headers:{},xhrFields:{},statusCode:{},processData:!0,dataType:"text",contentType:"application/x-www-form-urlencoded",timeout:0},t),r=Utils.extend({},a,e);function i(e){for(var t,a,i=[],n=arguments.length-1;n-- >0;)i[n]=arguments[n+1];return globals[e]&&(t=globals[e].apply(globals,i)),r[e]&&(a=r[e].apply(r,i)),"boolean"!=typeof t&&(t=!0),"boolean"!=typeof a&&(a=!0),t&&a}if(!1!==i("beforeCreate",r)){r.type&&(r.method=r.type);var n,s=r.url.indexOf("?")>=0?"&":"?",o=r.method.toUpperCase();if(("GET"===o||"HEAD"===o||"OPTIONS"===o||"DELETE"===o)&&r.data)(n="string"==typeof r.data?r.data.indexOf("?")>=0?r.data.split("?")[1]:r.data:Utils.serializeObject(r.data)).length&&(r.url+=s+n,"?"===s&&(s="&"));if("json"===r.dataType&&r.url.indexOf("callback=")>=0){var l,p="f7jsonp_"+(Date.now()+(jsonpRequests+=1)),c=r.url.split("callback="),d=c[0]+"callback="+p;if(c[1].indexOf("&")>=0){var u=c[1].split("&").filter(function(e){return e.indexOf("=")>0}).join("&");u.length>0&&(d+="&"+u)}var h=doc.createElement("script");return h.type="text/javascript",h.onerror=function(){clearTimeout(l),i("error",null,"scripterror","scripterror"),i("complete",null,"scripterror")},h.src=d,win[p]=function(e){clearTimeout(l),i("success",e),h.parentNode.removeChild(h),h=null,delete win[p]},doc.querySelector("head").appendChild(h),void(r.timeout>0&&(l=setTimeout(function(){h.parentNode.removeChild(h),h=null,i("error",null,"timeout","timeout")},r.timeout)))}"GET"!==o&&"HEAD"!==o&&"OPTIONS"!==o&&"DELETE"!==o||!1===r.cache&&(r.url+=s+"_nocache"+Date.now());var f=new XMLHttpRequest;if(f.requestUrl=r.url,f.requestParameters=r,!1===i("beforeOpen",f,r))return f;f.open(o,r.url,r.async,r.user,r.password);var v,m=null;if(("POST"===o||"PUT"===o||"PATCH"===o)&&r.data)if(r.processData)if([ArrayBuffer,Blob,Document,FormData].indexOf(r.data.constructor)>=0)m=r.data;else{var g="---------------------------"+Date.now().toString(16);"multipart/form-data"===r.contentType?f.setRequestHeader("Content-Type","multipart/form-data; boundary="+g):f.setRequestHeader("Content-Type",r.contentType),m="";var b=Utils.serializeObject(r.data);if("multipart/form-data"===r.contentType){b=b.split("&");for(var y=[],w=0;w=200&&f.status<300||0===f.status)if("json"===r.dataType){var t;try{e=JSON.parse(f.responseText)}catch(e){t=!0}t?i("error",f,"parseerror","parseerror"):i("success",e,f.status,f)}else i("success",e="text"===f.responseType||""===f.responseType?f.responseText:f.response,f.status,f);else i("error",f,f.status,f.statusText);r.statusCode&&(globals.statusCode&&globals.statusCode[f.status]&&globals.statusCode[f.status](f),r.statusCode[f.status]&&r.statusCode[f.status](f)),i("complete",f,f.status)},f.onerror=function(){v&&clearTimeout(v),i("error",f,f.status,f.status),i("complete",f,"error")},r.timeout>0&&(f.onabort=function(){v&&clearTimeout(v)},v=setTimeout(function(){f.abort(),i("error",f,"timeout","timeout"),i("complete",f,"timeout")},r.timeout)),!1===i("beforeSend",f,r)?f:(f.send(m),f)}}function RequestShortcut(e){for(var t,a,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];var n=[],s=n[0],o=n[1],l=n[2],p=n[3],c=n[4];"function"==typeof r[1]?(s=(t=r)[0],l=t[1],p=t[2],c=t[3]):(s=(a=r)[0],o=a[1],l=a[2],p=a[3],c=a[4]),[l,p].forEach(function(e){"string"==typeof e&&(c=e,e===l?l=void 0:p=void 0)});var d={url:s,method:"post"===e||"postJSON"===e?"POST":"GET",data:o,success:l,error:p,dataType:c=c||("json"===e||"postJSON"===e?"json":void 0)};return"postJSON"===e&&Utils.extend(d,{contentType:"application/json",processData:!1,crossDomain:!0,data:"string"==typeof o?o:JSON.stringify(o)}),Request(d)}function RequestShortcutPromise(e){for(var t=[],a=arguments.length-1;a-- >0;)t[a]=arguments[a+1];var r=t[0],i=t[1],n=t[2];return new Promise(function(t,a){RequestShortcut(e,r,i,function(e,a,r){t({data:e,status:a,xhr:r})},function(e,t,r){a({xhr:e,status:t,message:r})},n)})}Object.assign(Request,{get:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcut.apply(void 0,["get"].concat(e))},post:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcut.apply(void 0,["post"].concat(e))},json:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcut.apply(void 0,["json"].concat(e))},getJSON:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcut.apply(void 0,["json"].concat(e))},postJSON:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcut.apply(void 0,["postJSON"].concat(e))}}),Request.promise=function(e){return new Promise(function(t,a){Request(Object.assign(e,{success:function(e,a,r){t({data:e,status:a,xhr:r})},error:function(e,t,r){a({xhr:e,status:t,message:r})}}))})},Object.assign(Request.promise,{get:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcutPromise.apply(void 0,["get"].concat(e))},post:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcutPromise.apply(void 0,["post"].concat(e))},json:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcutPromise.apply(void 0,["json"].concat(e))},getJSON:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcutPromise.apply(void 0,["json"].concat(e))},postJSON:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return RequestShortcutPromise.apply(void 0,["postJSON"].concat(e))}}),Request.setup=function(e){e.type&&!e.method&&Utils.extend(e,{method:e.type}),Utils.extend(globals,e)};var RequestModule={name:"request",proto:{request:Request},static:{request:Request}};function initTouch(){var e,t,a,r,i,n,s,o,l,p,c,d,u,h,f,v,m,g,b,y=this,w=y.params.touch,C=w[y.theme+"TouchRipple"];function x(e){var t,a=$(e),r=a.parents(w.activeStateElements);if(a.is(w.activeStateElements)&&(t=a),r.length>0&&(t=t?t.add(r):r),t&&t.length>1){for(var i,n=[],s=0;s0}function E(){u&&u.addClass("active-state")}function T(){u&&(u.removeClass("active-state"),u=null)}function S(e,t,a){e&&(m=y.touchRipple.create(e,t,a))}function M(){m&&(m.remove(),m=void 0,g=void 0)}function P(a){(g=function(e){var t=w.touchRippleElements,a=$(e);if(a.is(t))return!a.hasClass("no-ripple")&&a;if(a.parents(t).length>0){var r=a.parents(t).eq(0);return!r.hasClass("no-ripple")&&r}return!1}(a))&&0!==g.length?(w.fastClicks?function(e){var t=e.parents(".page-content");return 0!==t.length&&("yes"!==t.prop("scrollHandlerSet")&&(t.on("scroll",function(){clearTimeout(h),clearTimeout(b)}),t.prop("scrollHandlerSet","yes")),!0)}(g):k(g))?(clearTimeout(b),b=setTimeout(function(){M(),S(g,e,t)},80)):(M(),S(g,e,t)):g=void 0}function O(){clearTimeout(b),M()}function D(){m||!g||l?M():(clearTimeout(b),S(g,e,t),setTimeout(M,0))}function I(e,t){y.emit({events:e,data:[t]})}function B(e){I("touchstart touchstart:active",e)}function R(e){I("touchmove touchmove:active",e)}function L(e){I("touchend touchend:active",e)}function H(e){I("touchstart:passive",e)}function z(e){I("touchmove:passive",e)}function A(e){I("touchend:passive",e)}Device.ios&&Device.webView&&win.addEventListener("touchstart",function(){});var U=!!Support.passiveListener&&{passive:!0},N=!!Support.passiveListener&&{passive:!1};doc.addEventListener("click",function(e){I("click",e)},!0),Support.passiveListener?(doc.addEventListener(y.touchEvents.start,B,N),doc.addEventListener(y.touchEvents.move,R,N),doc.addEventListener(y.touchEvents.end,L,N),doc.addEventListener(y.touchEvents.start,H,U),doc.addEventListener(y.touchEvents.move,z,U),doc.addEventListener(y.touchEvents.end,A,U)):(doc.addEventListener(y.touchEvents.start,function(e){B(e),H(e)},!1),doc.addEventListener(y.touchEvents.move,function(e){R(e),z(e)},!1),doc.addEventListener(y.touchEvents.end,function(e){L(e),A(e)},!1)),Support.touch?(w.fastClicks?(y.on("click",function(e){var t,a,n=!1;return i?(r=null,i=!1,!0):"submit"===e.target.type&&0===e.detail||"file"===e.target.type||(r||(t=e.target,a="input select textarea label".split(" "),t.nodeName&&a.indexOf(t.nodeName.toLowerCase())>=0||(n=!0)),f||(n=!0),doc.activeElement===r&&(n=!0),e.forwardedTouchEvent&&(n=!0),e.cancelable||(n=!0),w.tapHold&&w.tapHoldPreventClicks&&p&&(n=!1),n||(e.stopImmediatePropagation(),e.stopPropagation(),r?(function(e){var t=$(e),a=!0;return(t.is("label")||t.parents("label").length>0)&&(a=!Device.android&&!(!Device.ios||!t.is("input"))),a}(r)||l)&&e.preventDefault():e.preventDefault(),r=null),v=setTimeout(function(){f=!1},Device.ios||Device.androidChrome?100:400),w.tapHold&&(c=setTimeout(function(){p=!1},Device.ios||Device.androidChrome?100:400)),n)}),y.on("touchstart",function(d){var m,g,b=this;if(l=!1,p=!1,d.targetTouches.length>1)return u&&T(),!0;if(d.touches.length>1&&u&&T(),w.tapHold&&(c&&clearTimeout(c),c=setTimeout(function(){d&&d.touches&&d.touches.length>1||(p=!0,d.preventDefault(),$(d.target).trigger("taphold"))},w.tapHoldDelay)),v&&clearTimeout(v),m=d.target,g=$(m),!(f=!("input"===m.nodeName.toLowerCase()&&("file"===m.type||"range"===m.type)||"select"===m.nodeName.toLowerCase()&&Device.android||g.hasClass("no-fastclick")||g.parents(".no-fastclick").length>0||w.fastClicksExclude&&g.closest(w.fastClicksExclude).length>0)))return i=!1,!0;if(Device.ios||Device.android&&"getSelection"in win){var y=win.getSelection();if(y.rangeCount&&y.focusNode!==doc.body&&(!y.isCollapsed||doc.activeElement===y.focusNode))return n=!0,!0;n=!1}return Device.android&&function(e){var t="button input textarea select".split(" ");return!(!doc.activeElement||e===doc.activeElement||doc.activeElement===doc.body||t.indexOf(e.nodeName.toLowerCase())>=0)}(d.target)&&doc.activeElement.blur(),i=!0,r=d.target,a=(new Date).getTime(),e=d.targetTouches[0].pageX,t=d.targetTouches[0].pageY,Device.ios&&(s=void 0,$(r).parents().each(function(){var e=b;e.scrollHeight>e.offsetHeight&&!s&&((s=e).f7ScrollTop=s.scrollTop)})),a-on||Math.abs(o-t)>n)&&(l=!0)}else l=!0;l&&(i=!1,r=null,l=!0,w.tapHold&&clearTimeout(c),w.activeState&&(clearTimeout(h),T()),C&&O())}}),y.on("touchend",function(e){clearTimeout(h),clearTimeout(c);var t=(new Date).getTime();if(!i)return!n&&f&&(Device.android&&!e.cancelable||!e.cancelable||e.preventDefault()),w.activeState&&T(),C&&D(),!0;if(doc.activeElement===e.target)return w.activeState&&T(),C&&D(),!0;if(n||e.preventDefault(),t-o1?(u&&T(),!0):(a.touches.length>1&&u&&T(),w.tapHold&&(c&&clearTimeout(c),c=setTimeout(function(){a&&a.touches&&a.touches.length>1||(p=!0,a.preventDefault(),d=!0,$(a.target).trigger("taphold"))},w.tapHoldDelay)),r=a.target,e=a.targetTouches[0].pageX,t=a.targetTouches[0].pageY,w.activeState&&(k(u=x(r))?h=setTimeout(E,80):E()),C&&P(r),!0)}),y.on("touchmove",function(a){var r,i;if("touchmove"===a.type&&(r=a.targetTouches[0],i=w.touchClicksDistanceThreshold),i&&r){var n=r.pageX,s=r.pageY;(Math.abs(n-e)>i||Math.abs(s-t)>i)&&(l=!0)}else l=!0;l&&(d=!0,w.tapHold&&clearTimeout(c),w.activeState&&(clearTimeout(h),T()),C&&O())}),y.on("touchend",function(e){return clearTimeout(h),clearTimeout(c),doc.activeElement===e.target?(w.activeState&&T(),C&&D(),!0):(w.activeState&&(E(),setTimeout(T,0)),C&&D(),!(w.tapHoldPreventClicks&&p||d)||(e.cancelable&&e.preventDefault(),d=!0,!1))})),doc.addEventListener("touchcancel",function(){i=!1,r=null,clearTimeout(h),clearTimeout(c),w.activeState&&T(),C&&D()},{passive:!0})):w.activeState&&(y.on("touchstart",function(a){x(a.target).addClass("active-state"),"which"in a&&3===a.which&&setTimeout(function(){$(".active-state").removeClass("active-state")},0),C&&(e=a.pageX,t=a.pageY,P(a.target,a.pageX,a.pageY))}),y.on("touchmove",function(){$(".active-state").removeClass("active-state"),C&&O()}),y.on("touchend",function(){$(".active-state").removeClass("active-state"),C&&D()})),doc.addEventListener("contextmenu",function(e){w.disableContextMenu&&(Device.ios||Device.android||Device.cordova)&&e.preventDefault(),C&&(u&&T(),D())})}var TouchModule={name:"touch",params:{touch:{fastClicks:!1,fastClicksDistanceThreshold:10,fastClicksDelayBetweenClicks:50,fastClicksExclude:"",touchClicksDistanceThreshold:5,disableContextMenu:!1,tapHold:!1,tapHoldDelay:750,tapHoldPreventClicks:!0,activeState:!0,activeStateElements:"a, button, label, span, .actions-button, .stepper-button, .stepper-button-plus, .stepper-button-minus, .card-expandable, .menu-item, .link, .item-link",mdTouchRipple:!0,iosTouchRipple:!1,auroraTouchRipple:!1,touchRippleElements:".ripple, .link, .item-link, .list-button, .links-list a, .button, button, .input-clear-button, .dialog-button, .tab-link, .item-radio, .item-checkbox, .actions-button, .searchbar-disable-button, .fab a, .checkbox, .radio, .data-table .sortable-cell:not(.input-cell), .notification-close-button, .stepper-button, .stepper-button-minus, .stepper-button-plus, .menu-item-content"}},instance:{touchEvents:{start:Support.touch?"touchstart":"mousedown",move:Support.touch?"touchmove":"mousemove",end:Support.touch?"touchend":"mouseup"}},on:{init:initTouch}},pathToRegexp_1=pathToRegexp,parse_1=parse,compile_1=compile,tokensToFunction_1=tokensToFunction,tokensToRegExp_1=tokensToRegExp,DEFAULT_DELIMITER="/",PATH_REGEXP=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g");function parse(e,t){for(var a,r=[],i=0,n=0,s="",o=t&&t.delimiter||DEFAULT_DELIMITER,l=t&&t.whitelist||void 0,p=!1;null!==(a=PATH_REGEXP.exec(e));){var c=a[0],d=a[1],u=a.index;if(s+=e.slice(n,u),n=u+c.length,d)s+=d[1],p=!0;else{var h="",f=a[2],v=a[3],m=a[4],g=a[5];if(!p&&s.length){var b=s.length-1,y=s[b];(!l||l.indexOf(y)>-1)&&(h=y,s=s.slice(0,b))}s&&(r.push(s),s="",p=!1);var w="+"===g||"*"===g,C="?"===g||"*"===g,x=v||m,$=h||o;r.push({name:f||i++,prefix:h,delimiter:$,optional:C,repeat:w,pattern:x?escapeGroup(x):"[^"+escapeString($===o?$:$+o)+"]+?"})}}return(s||n=0?a.allowPageChange?a.back({animate:n,pushState:!1}):History.routerQueue.push({action:"back",router:a}):a.allowPageChange?a.navigate(i,{animate:n,pushState:!1}):History.routerQueue.unshift({action:"load",stateUrl:i,router:a}))}})}},initViewState:function(e,t){var a,r=Utils.extend({},History.state||{},((a={})[e]=t,a));History.state=r,win.history.replaceState(r,"")},push:function(e,t,a){var r;if(History.allowChange){History.previousState=History.state;var i=Utils.extend({},History.previousState||{},((r={})[e]=t,r));History.state=i,win.history.pushState(i,"",a)}else History.queue.push(function(){History.push(e,t,a)})},replace:function(e,t,a){var r;if(History.allowChange){History.previousState=History.state;var i=Utils.extend({},History.previousState||{},((r={})[e]=t,r));History.state=i,win.history.replaceState(i,"",a)}else History.queue.push(function(){History.replace(e,t,a)})},go:function(e){History.allowChange=!1,win.history.go(e)},back:function(){History.allowChange=!1,win.history.back()},allowChange:!0,previousState:{},state:win.history.state,blockPopstate:!0,init:function(e){$(win).on("load",function(){setTimeout(function(){History.blockPopstate=!1},0)}),doc.readyState&&"complete"===doc.readyState&&(History.blockPopstate=!1),$(win).on("popstate",History.handle.bind(e))}};function SwipeBack(e){var t,a,r,i,n,s,o,l,p,c=e,d=c.$el,u=c.$navbarsEl,h=c.app,f=c.params,v=!1,m=!1,g={},b=[],y=[],w=!0,C=[],x=[],k=f[h.theme+"SwipeBackAnimateShadow"],E=f[h.theme+"SwipeBackAnimateOpacity"],T=f[h.theme+"SwipeBackActiveArea"],S=f[h.theme+"SwipeBackThreshold"],M=h.rtl?"right center":"left center",P=h.rtl?"calc(100% - var(--f7-navbar-large-title-padding-left) - var(--f7-safe-area-left)) center":"calc(var(--f7-navbar-large-title-padding-left) + var(--f7-safe-area-left)) center";function O(e){void 0===e&&(e={});for(var t=e.progress,a=e.reset,r=e.transition,i=["overflow","transform","transform-origin","opacity"],n=0;n0||$(e.target).closest(".page-master, .page-master-detail").length>0&&f.masterDetailBreakpoint>0&&h.width>=f.masterDetailBreakpoint||(m=!1,v=!0,t=void 0,g.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,g.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,i=Utils.now(),n=c.dynamicNavbar)}function I(e){if(v){var i="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,p="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY;if(void 0===t&&(t=!!(t||Math.abs(p-g.y)>Math.abs(i-g.x))||ig.x&&h.rtl),t||e.f7PreventSwipeBack||h.preventSwipeBack)v=!1;else{if(!m){var w=!1,D=$(e.target),I=D.closest(".swipeout");I.length>0&&(!h.rtl&&I.find(".swipeout-actions-left").length>0&&(w=!0),h.rtl&&I.find(".swipeout-actions-right").length>0&&(w=!0)),((b=D.closest(".page")).hasClass("no-swipeback")||D.closest(".no-swipeback, .card-opened").length>0)&&(w=!0),(y=d.find(".page-previous:not(.stacked)")).length>1&&(y=y.eq(y.length-1));g.x,d.offset().left;if(a=d.width(),(h.rtl?g.xT)&&(w=!0),0!==y.length&&0!==b.length||(w=!0),w)return void(v=!1);k&&0===(s=b.find(".page-shadow-effect")).length&&(s=$('
'),b.append(s)),E&&0===(o=y.find(".page-opacity-effect")).length&&(o=$('
'),y.append(o)),n&&(C=u.find(".navbar-current:not(.stacked)"),(x=u.find(".navbar-previous:not(.stacked)")).length>1&&(x=x.eq(x.length-1)),l=function(){var e,t,a=[],r=h.rtl?-1:1,i=C.hasClass("navbar-large"),n=C.hasClass("navbar-large-collapsed"),s=C.hasClass("navbar-large-transparent"),o=x.hasClass("navbar-large"),l=x.hasClass("navbar-large-collapsed"),p=x.hasClass("navbar-large-transparent"),c=i&&!n,d=o&&!l,u=C.find(".left, .title, .right, .subnavbar, .fading, .title-large, .navbar-bg"),v=x.find(".left, .title, .right, .subnavbar, .fading, .title-large, .navbar-bg");return f.iosAnimateNavbarBackIcon&&(e=C.hasClass("sliding")||C.find(".navbar-inner.sliding").length?C.find(".left").find(".back .icon + span").eq(0):C.find(".left.sliding").find(".back .icon + span").eq(0),t=x.hasClass("sliding")||x.find(".navbar-inner.sliding").length?x.find(".left").find(".back .icon + span").eq(0):x.find(".left.sliding").find(".back .icon + span").eq(0),e.length&&v.each(function(t,a){$(a).hasClass("title")&&(a.f7NavbarLeftOffset+=e.prev(".icon")[0].offsetWidth)})),u.each(function(t,o){var l=$(o),p=l.hasClass("subnavbar"),u=l.hasClass("left"),h=l.hasClass("title"),v=l.hasClass("navbar-bg");if(c||!l.hasClass(".title-large")){var m={el:o};if(c){if(h)return;if(l.hasClass("title-large"))return a.indexOf(m)<0&&a.push(m),m.overflow="visible",void l.find(".title-large-text").each(function(e,t){a.push({el:t,transform:function(e){return"translateX("+100*e*r+"%)"}})})}if(d&&(c||l.hasClass("title-large")&&(a.indexOf(m)<0&&a.push(m),m.opacity=0),u))return a.indexOf(m)<0&&a.push(m),m.opacity=function(e){return 1-Math.pow(e,.33)},void l.find(".back span").each(function(e,t){a.push({el:t,"transform-origin":M,transform:function(e){return"translateX(calc("+e+" * (var(--f7-navbarTitleLargeOffset) - var(--f7-navbarLeftTextOffset)))) translateY(calc("+e+" * (var(--f7-navbar-large-title-height) + var(--f7-navbar-large-title-padding-vertical) / 2))) scale("+(1+1*e)+")"}})});if(v)return a.indexOf(m)<0&&a.push(m),c||d||(n?(s&&(m.className="ios-swipeback-navbar-bg-large"),m.transform=function(e){return"translateX("+100*e*r+"%) translateY(calc(-1 * var(--f7-navbar-large-title-height)))"}):m.transform=function(e){return"translateX("+100*e*r+"%)"}),!c&&d&&(m.className="ios-swipeback-navbar-bg-large",m.transform=function(e){return"translateX("+100*e*r+"%) translateY(calc(-1 * "+(1-e)+" * var(--f7-navbar-large-title-height)))"}),c&&d&&(m.transform=function(e){return"translateX("+100*e*r+"%)"}),void(c&&!d&&(m.transform=function(e){return"translateX("+100*e*r+"%) translateY(calc(-"+e+" * var(--f7-navbar-large-title-height)))"}));if(!l.hasClass("title-large")){var g=l.hasClass("sliding")||l.parents(".navbar-inner.sliding").length;if(a.indexOf(m)<0&&a.push(m),(!p||p&&!g)&&(m.opacity=function(e){return 1-Math.pow(e,.33)}),g){var b=m;if(u&&e.length&&f.iosAnimateNavbarBackIcon){var y={el:e[0]};b=y,a.push(y)}b.transform=function(e){var t=e*b.el.f7NavbarRightOffset;return 1===Device.pixelRatio&&(t=Math.round(t)),p&&i?"translate3d("+t+"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)":"translate3d("+t+"px,0,0)"}}}}}),v.each(function(e,i){var n=$(i),s=n.hasClass("subnavbar"),u=n.hasClass("left"),h=n.hasClass("title"),v=n.hasClass("navbar-bg"),m={el:i};if(d){if(h)return;if(a.indexOf(m)<0&&a.push(m),n.hasClass("title-large"))return m.opacity=1,m.overflow="visible",void n.find(".title-large-text").each(function(e,t){a.push({el:t,"transform-origin":P,opacity:function(e){return Math.pow(e,3)},transform:function(e){return"translateX(calc("+(1-e)+" * (var(--f7-navbarLeftTextOffset) - var(--f7-navbarTitleLargeOffset)))) translateY(calc("+(e-1)+" * var(--f7-navbar-large-title-height) + "+(1-e)+" * var(--f7-navbar-large-title-padding-vertical) / 2)) scale("+(.5+.5*e)+")"}})})}if(v)return a.indexOf(m)<0&&a.push(m),c||d||(l?(p&&(m.className="ios-swipeback-navbar-bg-large"),m.transform=function(e){return"translateX("+(100*e-100)*r+"%) translateY(calc(-1 * var(--f7-navbar-large-title-height)))"}):m.transform=function(e){return"translateX("+(100*e-100)*r+"%)"}),!c&&d&&(m.transform=function(e){return"translateX("+(100*e-100)*r+"%) translateY(calc(-1 * "+(1-e)+" * var(--f7-navbar-large-title-height)))"}),c&&!d&&(m.className="ios-swipeback-navbar-bg-large",m.transform=function(e){return"translateX("+(100*e-100)*r+"%) translateY(calc(-"+e+" * var(--f7-navbar-large-title-height)))"}),void(c&&d&&(m.transform=function(e){return"translateX("+(100*e-100)*r+"%)"}));if(!n.hasClass("title-large")){var g=n.hasClass("sliding")||x.children(".navbar-inner.sliding").length;if(a.indexOf(m)<0&&a.push(m),(!s||s&&!g)&&(m.opacity=function(e){return Math.pow(e,3)}),g){var b=m;if(u&&t.length&&f.iosAnimateNavbarBackIcon){var y={el:t[0]};b=y,a.push(y)}b.transform=function(e){var t=b.el.f7NavbarLeftOffset*(1-e);return 1===Device.pixelRatio&&(t=Math.round(t)),s&&o?"translate3d("+t+"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)":"translate3d("+t+"px,0,0)"}}}}),a}()),$(".sheet.modal-in").length>0&&h.sheet&&h.sheet.close($(".sheet.modal-in"))}e.f7PreventSwipePanel=!0,m=!0,h.preventSwipePanelBySwipeBack=!0,e.preventDefault();var B=h.rtl?-1:1;(r=(i-g.x-S)*B)<0&&(r=0);var R=Math.min(Math.max(r/a,0),1),L={percentage:R,progress:R,currentPageEl:b[0],previousPageEl:y[0],currentNavbarEl:C[0],previousNavbarEl:x[0]};d.trigger("swipeback:move",L),c.emit("swipebackMove",L);var H=r*B,z=(r/5-a/5)*B;h.rtl?(H=Math.max(H,-a),z=Math.max(z,0)):(H=Math.min(H,a),z=Math.min(z,0)),1===Device.pixelRatio&&(H=Math.round(H),z=Math.round(z)),c.swipeBackActive=!0,$([b[0],y[0]]).addClass("page-swipeback-active"),b.transform("translate3d("+H+"px,0,0)"),k&&(s[0].style.opacity=1-1*R),"ios"===h.theme&&y.transform("translate3d("+z+"px,0,0)"),E&&(o[0].style.opacity=1-1*R),n&&O({progress:R})}}}function B(){if(h.preventSwipePanelBySwipeBack=!1,!v||!m)return v=!1,void(m=!1);if(v=!1,m=!1,c.swipeBackActive=!1,$([b[0],y[0]]).removeClass("page-swipeback-active"),0===r)return $([b[0],y[0]]).transform(""),s&&s.length>0&&s.remove(),o&&o.length>0&&o.remove(),void(n&&O({reset:!0}));var e=Utils.now()-i,t=!1;(e<300&&r>10||e>=300&&r>a/2)&&(b.removeClass("page-current").addClass("page-next"+("ios"!==h.theme?" page-next-on-right":"")),y.removeClass("page-previous").addClass("page-current").removeAttr("aria-hidden"),s&&(s[0].style.opacity=""),o&&(o[0].style.opacity=""),n&&(C.removeClass("navbar-current").addClass("navbar-next"),x.removeClass("navbar-previous").addClass("navbar-current").removeAttr("aria-hidden")),t=!0),$([b[0],y[0]]).addClass("page-transitioning page-transitioning-swipeback").transform(""),n&&O({progress:t?1:0,transition:!0}),w=!1,c.allowPageChange=!1;var l={currentPageEl:b[0],previousPageEl:y[0],currentNavbarEl:C[0],previousNavbarEl:x[0]};t?(c.currentRoute=y[0].f7Page.route,c.currentPage=y[0],c.pageCallback("beforeOut",b,C,"current","next",{route:b[0].f7Page.route,swipeBack:!0}),c.pageCallback("beforeIn",y,x,"previous","current",{route:y[0].f7Page.route,swipeBack:!0},b[0]),d.trigger("swipeback:beforechange",l),c.emit("swipebackBeforeChange",l)):(d.trigger("swipeback:beforereset",l),c.emit("swipebackBeforeReset",l)),b.transitionEnd(function(){$([b[0],y[0]]).removeClass("page-transitioning page-transitioning-swipeback"),n&&O({reset:!0,transition:!1}),w=!0,c.allowPageChange=!0,t?(1===c.history.length&&c.history.unshift(c.url),c.history.pop(),c.saveHistory(),f.pushState&&History.back(),c.pageCallback("afterOut",b,C,"current","next",{route:b[0].f7Page.route,swipeBack:!0}),c.pageCallback("afterIn",y,x,"previous","current",{route:y[0].f7Page.route,swipeBack:!0}),f.stackPages&&c.initialPages.indexOf(b[0])>=0?(b.addClass("stacked"),n&&C.addClass("stacked")):(c.pageCallback("beforeRemove",b,C,"next",{swipeBack:!0}),c.removePage(b),n&&c.removeNavbar(C)),d.trigger("swipeback:afterchange",l),c.emit("swipebackAfterChange",l),c.emit("routeChanged",c.currentRoute,c.previousRoute,c),f.preloadPreviousPage&&c.back(c.history[c.history.length-2],{preload:!0})):(d.trigger("swipeback:afterreset",l),c.emit("swipebackAfterReset",l)),s&&s.length>0&&s.remove(),o&&o.length>0&&o.remove()})}p=!("touchstart"!==h.touchEvents.start||!Support.passiveListener)&&{passive:!0,capture:!1},d.on(h.touchEvents.start,D,p),h.on("touchmove:active",I),h.on("touchend:passive",B),c.on("routerDestroy",function(){var e=!("touchstart"!==h.touchEvents.start||!Support.passiveListener)&&{passive:!0,capture:!1};d.off(h.touchEvents.start,D,e),h.off("touchmove:active",I),h.off("touchend:passive",B)})}function redirect(e,t,a){var r=this,i=t.route.redirect;if(a.initial&&r.params.pushState&&(a.replaceState=!0,a.history=!0),"function"==typeof i){r.allowPageChange=!1;var n=i.call(r,t,function(t,i){void 0===i&&(i={}),r.allowPageChange=!0,r[e](t,Utils.extend({},a,i))},function(){r.allowPageChange=!0});return n&&"string"==typeof n?(r.allowPageChange=!0,r[e](n,a)):r}return r[e](i,a)}function processQueue(e,t,a,r,i,n,s){var o=[];Array.isArray(a)?o.push.apply(o,a):a&&"function"==typeof a&&o.push(a),t&&(Array.isArray(t)?o.push.apply(o,t):o.push(t)),function t(){0!==o.length?o.shift().call(e,r,i,function(){t()},function(){s()}):n()}()}function processRouteQueue(e,t,a,r){var i=this;function n(){e&&e.route&&(i.params.routesBeforeEnter||e.route.beforeEnter)?(i.allowPageChange=!1,processQueue(i,i.params.routesBeforeEnter,e.route.beforeEnter,e,t,function(){i.allowPageChange=!0,a()},function(){r()})):a()}t&&t.route&&(i.params.routesBeforeLeave||t.route.beforeLeave)?(i.allowPageChange=!1,processQueue(i,i.params.routesBeforeLeave,t.route.beforeLeave,e,t,function(){i.allowPageChange=!0,n()},function(){r()})):n()}function appRouterCheck(e,t){if(!e.view)throw new Error("Framework7: it is not allowed to use router methods on global app router. Use router methods only on related View, e.g. app.views.main.router."+t+"(...)")}function refreshPage(){return appRouterCheck(this,"refreshPage"),this.navigate(this.currentRoute.url,{ignoreCache:!0,reloadCurrent:!0})}function forward(e,t){void 0===t&&(t={});var a,r,i,n=this,s=$(e),o=n.app,l=n.view,p=Utils.extend(!1,{animate:n.params.animate,pushState:!0,replaceState:!1,history:!0,reloadCurrent:n.params.reloadPages,reloadPrevious:!1,reloadAll:!1,clearPreviousHistory:!1,reloadDetail:n.params.reloadDetail,on:{}},t),c=n.params.masterDetailBreakpoint>0,d=c&&p.route&&p.route.route&&!0===p.route.route.master,u=n.currentRoute.modal;if(u||"popup popover sheet loginScreen actions customModal panel".split(" ").forEach(function(e){n.currentRoute&&n.currentRoute.route&&n.currentRoute.route[e]&&(u=!0,i=e)}),u){var h=n.currentRoute.modal||n.currentRoute.route.modalInstance||o[i].get(),f=n.history[n.history.length-2],v=n.findMatchingRoute(f);!v&&f&&(v={url:f,path:f.split("?")[0],query:Utils.parseUrlQuery(f),route:{path:f.split("?")[0],url:f}}),n.modalRemove(h)}var m,g,b,y,w=n.dynamicNavbar,C=n.$el,x=s,k=p.reloadPrevious||p.reloadCurrent||p.reloadAll;if(n.allowPageChange=!1,0===x.length)return n.allowPageChange=!0,n;x.length&&n.removeThemeElements(x),w&&(b=x.children(".navbar"),g=n.$navbarsEl,0===b.length&&x[0]&&x[0].f7Page&&(b=x[0].f7Page.$navbarEl)),p.route&&p.route.route&&p.route.route.keepAlive&&!p.route.route.keepAliveData&&(p.route.route.keepAliveData={pageEl:s[0]});var E,T,S,M,P=C.children(".page:not(.stacked)").filter(function(e,t){return t!==x[0]});if(w&&(E=g.children(".navbar:not(.stacked)").filter(function(e,t){return t!==b[0]})),p.reloadPrevious&&P.length<2)return n.allowPageChange=!0,n;if(c&&!p.reloadAll){for(var O=0;O=n.params.masterDetailBreakpoint&&a}T&&(M=!r||S||p.reloadAll||p.reloadCurrent);var I="next";if(p.reloadCurrent||p.reloadAll||S?I="current":p.reloadPrevious&&(I="previous"),x.removeClass("page-previous page-current page-next").addClass("page-"+I+(d?" page-master":"")+(T?" page-master-detail":"")+(M?" page-master-detail-root":"")).removeClass("stacked").trigger("page:unstack").trigger("page:position",{position:I}),n.emit("pageUnstack",x[0]),n.emit("pagePosition",x[0],I),(d||T)&&(x.trigger("page:role",{role:d?"master":"detail",root:!!M}),n.emit("pageRole",x[0],{role:d?"master":"detail",detailRoot:!!M})),w&&b.length&&b.removeClass("navbar-previous navbar-current navbar-next").addClass("navbar-"+I+(d?" navbar-master":"")+(T?" navbar-master-detail":"")+(M?" navbar-master-detail-root":"")).removeClass("stacked"),p.reloadCurrent||S)m=P.eq(P.length-1),w&&(y=$(o.navbar.getElByPage(m)));else if(p.reloadPrevious)m=P.eq(P.length-2),w&&(y=$(o.navbar.getElByPage(m)));else if(p.reloadAll)m=P.filter(function(e,t){return t!==x[0]}),w&&(y=E.filter(function(e,t){return t!==b[0]}));else{if(P.length>1){var B=0;for(B=0;B1||S)&&(m=m.filter(function(e,t){return!t.classList.contains("page-master")})),y&&(y.length>1||S)&&(y=y.filter(function(e,t){return!t.classList.contains("navbar-master")}))),n.params.pushState&&(p.pushState||p.replaceState)&&!p.reloadPrevious){var L=n.params.pushStateRoot||"";History[p.reloadCurrent||S&&r||p.reloadAll||p.replaceState?"replace":"push"](l.id,{url:p.route.url},L+n.params.pushStateSeparator+p.route.url)}p.reloadPrevious||(n.currentPageEl=x[0],w&&b.length?n.currentNavbarEl=b[0]:delete n.currentNavbarEl,n.currentRoute=p.route);var H=p.route.url;p.history&&(((p.reloadCurrent||S&&r)&&n.history.length)>0||p.replaceState?n.history[n.history.length-(p.reloadPrevious?2:1)]=H:p.reloadPrevious?n.history[n.history.length-2]=H:p.reloadAll?n.history=[H]:n.history.push(H)),n.saveHistory();var z=x.parents(doc).length>0,A=x[0].f7Component;if(p.reloadPrevious?(A&&!z?A.$mount(function(e){$(e).insertBefore(m)}):x.insertBefore(m),w&&b.length&&(b.find(".title-large").length&&b.addClass("navbar-large"),y.length?b.insertBefore(y):(n.$navbarsEl.parents(doc).length||n.$el.prepend(n.$navbarsEl),g.append(b)))):(m.next(".page")[0]!==x[0]&&(A&&!z?A.$mount(function(e){C.append(e)}):C.append(x[0])),w&&b.length&&(b.find(".title-large").length&&b.addClass("navbar-large"),n.$navbarsEl.parents(doc).length||n.$el.prepend(n.$navbarsEl),g.append(b[0]))),z?p.route&&p.route.route&&p.route.route.keepAlive&&!x[0].f7PageMounted&&(x[0].f7PageMounted=!0,n.pageCallback("mounted",x,b,I,k?I:"current",p,m)):n.pageCallback("mounted",x,b,I,k?I:"current",p,m),(p.reloadCurrent||S)&&m.length>0?n.params.stackPages&&n.initialPages.indexOf(m[0])>=0?(m.addClass("stacked"),m.trigger("page:stack"),n.emit("pageStack",m[0]),w&&y.addClass("stacked")):(n.pageCallback("beforeOut",m,y,"current",void 0,p),n.pageCallback("afterOut",m,y,"current",void 0,p),n.pageCallback("beforeRemove",m,y,"current",void 0,p),n.removePage(m),w&&y&&y.length&&n.removeNavbar(y)):p.reloadAll?m.each(function(e,t){var a=$(t),r=$(o.navbar.getElByPage(a));n.params.stackPages&&n.initialPages.indexOf(a[0])>=0?(a.addClass("stacked"),a.trigger("page:stack"),n.emit("pageStack",a[0]),w&&r.addClass("stacked")):(a.hasClass("page-current")&&(n.pageCallback("beforeOut",m,y,"current",void 0,p),n.pageCallback("afterOut",m,y,"current",void 0,p)),n.pageCallback("beforeRemove",a,y&&y.eq(e),"previous",void 0,p),n.removePage(a),w&&r.length&&n.removeNavbar(r))}):p.reloadPrevious&&(n.params.stackPages&&n.initialPages.indexOf(m[0])>=0?(m.addClass("stacked"),m.trigger("page:stack"),n.emit("pageStack",m[0]),w&&y.addClass("stacked")):(n.pageCallback("beforeRemove",m,y,"previous",void 0,p),n.removePage(m),w&&y&&y.length&&n.removeNavbar(y))),p.route.route.tab&&n.tabLoad(p.route.route.tab,Utils.extend({},p,{history:!1,pushState:!1})),c&&l.checkMasterDetailBreakpoint(),n.pageCallback("init",x,b,I,k?I:"current",p,m),p.reloadCurrent||p.reloadAll||S)return n.allowPageChange=!0,n.pageCallback("beforeIn",x,b,I,"current",p),x.removeAttr("aria-hidden"),w&&b&&b.removeAttr("aria-hidden"),n.pageCallback("afterIn",x,b,I,"current",p),p.reloadCurrent&&p.clearPreviousHistory&&n.clearPreviousHistory(),S&&(a.classList.add("page-previous"),a.classList.remove("page-current"),$(a).trigger("page:position",{position:"previous"}),n.emit("pagePosition",a,"previous"),a.f7Page&&a.f7Page.navbarEl&&(a.f7Page.navbarEl.classList.add("navbar-previous"),a.f7Page.navbarEl.classList.remove("navbar-current"))),n;if(p.reloadPrevious)return n.allowPageChange=!0,n;function U(){var e="page-previous page-current page-next",t="navbar-previous navbar-current navbar-next";x.removeClass(e).addClass("page-current").removeAttr("aria-hidden").trigger("page:position",{position:"current"}),n.emit("pagePosition",x[0],"current"),m.removeClass(e).addClass("page-previous").trigger("page:position",{position:"previous"}),n.emit("pagePosition",m[0],"previous"),m.hasClass("page-master")||m.attr("aria-hidden","true"),w&&(b.removeClass(t).addClass("navbar-current").removeAttr("aria-hidden"),y.removeClass(t).addClass("navbar-previous"),y.hasClass("navbar-master")||y.attr("aria-hidden","true")),n.allowPageChange=!0,n.pageCallback("afterOut",m,y,"current","previous",p),n.pageCallback("afterIn",x,b,"next","current",p);var a=(n.params.preloadPreviousPage||n.params[o.theme+"SwipeBack"])&&!d;a||(x.hasClass("smart-select-page")||x.hasClass("photo-browser-page")||x.hasClass("autocomplete-page")||x.hasClass("color-picker-page"))&&(a=!0),a||(n.params.stackPages?(m.addClass("stacked"),m.trigger("page:stack"),n.emit("pageStack",m[0]),w&&y.addClass("stacked")):x.attr("data-name")&&"smart-select-page"===x.attr("data-name")||(n.pageCallback("beforeRemove",m,y,"previous",void 0,p),n.removePage(m),w&&y.length&&n.removeNavbar(y))),p.clearPreviousHistory&&n.clearPreviousHistory(),n.emit("routeChanged",n.currentRoute,n.previousRoute,n),n.params.pushState&&History.clearRouterQueue()}function N(){var e="page-previous page-current page-next",t="navbar-previous navbar-current navbar-next";m.removeClass(e).addClass("page-current").removeAttr("aria-hidden").trigger("page:position",{position:"current"}),n.emit("pagePosition",m[0],"current"),x.removeClass(e).addClass("page-next").removeAttr("aria-hidden").trigger("page:position",{position:"next"}),n.emit("pagePosition",x[0],"next"),w&&(y.removeClass(t).addClass("navbar-current").removeAttr("aria-hidden"),b.removeClass(t).addClass("navbar-next").removeAttr("aria-hidden"))}if(n.pageCallback("beforeOut",m,y,"current","previous",p),n.pageCallback("beforeIn",x,b,"next","current",p),!p.animate||d&&o.width>=n.params.masterDetailBreakpoint)U();else{var V=n.params[n.app.theme+"PageLoadDelay"];V?setTimeout(function(){N(),n.animate(m,x,y,b,"forward",function(){U()})},V):(N(),n.animate(m,x,y,b,"forward",function(){U()}))}return n}function load(e,t,a){void 0===e&&(e={}),void 0===t&&(t={});var r=this;if(!r.allowPageChange&&!a)return r;var i=e,n=t,s=i.url,o=i.content,l=i.el,p=i.pageName,c=i.template,d=i.templateUrl,u=i.component,h=i.componentUrl;if(!n.reloadCurrent&&n.route&&n.route.route&&n.route.route.parentPath&&r.currentRoute.route&&r.currentRoute.route.parentPath===n.route.route.parentPath){if(n.route.url===r.url)return r.allowPageChange=!0,!1;var f=Object.keys(n.route.params).length===Object.keys(r.currentRoute.params).length;if(f&&Object.keys(n.route.params).forEach(function(e){e in r.currentRoute.params&&r.currentRoute.params[e]===n.route.params[e]||(f=!1)}),f)return!!n.route.route.tab&&r.tabLoad(n.route.route.tab,n);if(!f&&n.route.route.tab&&r.currentRoute.route.tab&&r.currentRoute.parentPath===n.route.parentPath)return r.tabLoad(n.route.route.tab,n)}if(n.route&&n.route.url&&r.url===n.route.url&&!n.reloadCurrent&&!n.reloadPrevious&&!r.params.allowDuplicateUrls)return r.allowPageChange=!0,!1;function v(e,t){return r.forward(e,Utils.extend(n,t))}function m(){return r.allowPageChange=!0,r}if(!n.route&&s&&(n.route=r.parseRouteUrl(s),Utils.extend(n.route,{route:{url:s,path:s}})),(s||d||h)&&(r.allowPageChange=!1),o)r.forward(r.getPageEl(o),n);else if(c||d)try{r.pageTemplateLoader(c,d,n,v,m)}catch(e){throw r.allowPageChange=!0,e}else if(l)r.forward(r.getPageEl(l),n);else if(p)r.forward(r.$el.children('.page[data-name="'+p+'"]').eq(0),n);else if(u||h)try{r.pageComponentLoader(r.el,u,h,n,v,m)}catch(e){throw r.allowPageChange=!0,e}else s&&(r.xhr&&(r.xhr.abort(),r.xhr=!1),r.xhrRequest(s,n).then(function(e){r.forward(r.getPageEl(e),n)}).catch(function(){r.allowPageChange=!0}));return r}function navigate(e,t){void 0===t&&(t={});var a,r,i,n,s,o,l=this;if(l.swipeBackActive)return l;if("string"==typeof e?a=e:(a=e.url,r=e.route,i=e.name,n=e.query,s=e.params),i){if(!(o=l.findRouteByKey("name",i)))throw new Error('Framework7: route with name "'+i+'" not found');if(a=l.constructRouteUrl(o,{params:s,query:n}))return l.navigate(a,t);throw new Error("Framework7: can't construct URL for route with name \""+i+'"')}var p=l.app;if(appRouterCheck(l,"navigate"),"#"===a||""===a)return l;var c=a.replace("./","");if("/"!==c[0]&&0!==c.indexOf("#")){var d=l.currentRoute.parentPath||l.currentRoute.path;c=((d?d+"/":"/")+c).replace("///","/").replace("//","/")}if(!(o=r?Utils.extend(l.parseRouteUrl(c),{route:Utils.extend({},r)}):l.findMatchingRoute(c)))return l;if(o.route&&o.route.viewName){var u=o.route.viewName,h=p.views[u];if(!h)throw new Error('Framework7: There is no View with "'+u+'" name that was specified in this route');if(h!==l.view)return h.router.navigate(e,t)}if(o.route.redirect)return redirect.call(l,"navigate",o,t);var f={};function v(){var e=!1;"popup popover sheet loginScreen actions customModal panel".split(" ").forEach(function(t){o.route[t]&&!e&&(e=!0,l.modalLoad(t,o,f))}),o.route.keepAlive&&o.route.keepAliveData&&(l.load({el:o.route.keepAliveData.pageEl},f,!1),e=!0),"url content component pageName el componentUrl template templateUrl".split(" ").forEach(function(t){var a;o.route[t]&&!e&&(e=!0,l.load(((a={})[t]=o.route[t],a),f,!1))}),e||o.route.async&&(l.allowPageChange=!1,o.route.async.call(l,f.route,l.currentRoute,function(e,t){l.allowPageChange=!1;var a=!1;t&&t.context&&(o.context?o.context=Utils.extend({},o.context,t.context):o.context=t.context,f.route.context=o.context),"popup popover sheet loginScreen actions customModal panel".split(" ").forEach(function(r){if(e[r]){a=!0;var i=Utils.extend({},o,{route:e});l.allowPageChange=!0,l.modalLoad(r,i,Utils.extend(f,t))}}),a||l.load(e,Utils.extend(f,t),!0)},function(){l.allowPageChange=!0}))}function m(){l.allowPageChange=!0}if(o.route.options?Utils.extend(f,o.route.options,t):Utils.extend(f,t),f.route=o,f&&f.context&&(o.context=f.context,f.route.context=f.context),l.params.masterDetailBreakpoint>0&&o.route.masterRoute){var g=!0,b=!1;if(l.currentRoute&&l.currentRoute.route&&(!l.currentRoute.route.master||l.currentRoute.route!==o.route.masterRoute&&l.currentRoute.route.path!==o.route.masterRoute.path||(g=!1),!l.currentRoute.route.masterRoute||l.currentRoute.route.masterRoute!==o.route.masterRoute&&l.currentRoute.route.masterRoute.path!==o.route.masterRoute.path||(g=!1,b=!0)),g||b&&t.reloadAll)return l.navigate(o.route.masterRoute.path,{animate:!1,reloadAll:t.reloadAll,reloadCurrent:t.reloadCurrent,reloadPrevious:t.reloadPrevious,pushState:!t.initial,history:!t.initial,once:{pageAfterIn:function(){l.navigate(e,Utils.extend({},t,{animate:!1,reloadAll:!1,reloadCurrent:!1,reloadPrevious:!1,history:!t.initial,pushState:!t.initial}))}}}),l}return processRouteQueue.call(l,o,l.currentRoute,function(){o.route.modules?p.loadModules(Array.isArray(o.route.modules)?o.route.modules:[o.route.modules]).then(function(){v()}).catch(function(){m()}):v()},function(){m()}),l}function tabLoad(e,t){void 0===t&&(t={});var a,r,i=this,n=Utils.extend({animate:i.params.animate,pushState:!0,history:!0,parentPageEl:null,preload:!1,on:{}},t);n.route&&(n.preload||n.route===i.currentRoute||(r=i.previousRoute,i.currentRoute=n.route),n.preload?(a=n.route,r=i.currentRoute):(a=i.currentRoute,r||(r=i.previousRoute)),i.params.pushState&&n.pushState&&!n.reloadPrevious&&History.replace(i.view.id,{url:n.route.url},(i.params.pushStateRoot||"")+i.params.pushStateSeparator+n.route.url),n.history&&(i.history[Math.max(i.history.length-1,0)]=n.route.url,i.saveHistory()));var s,o=$(n.parentPageEl||i.currentPageEl);s=o.length&&o.find("#"+e.id).length?o.find("#"+e.id).eq(0):i.view.selector?i.view.selector+" #"+e.id:"#"+e.id;var l,p=i.app.tab.show({tabEl:s,animate:n.animate,tabRoute:n.route}),c=p.$newTabEl,d=p.$oldTabEl,u=p.animated,h=p.onTabsChanged;if(c&&c.parents(".page").length>0&&n.route){var f=c.parents(".page")[0].f7Page;f&&n.route&&(f.route=n.route)}if(c[0].f7RouterTabLoaded)return d&&d.length?(u?h(function(){i.emit("routeChanged",i.currentRoute,i.previousRoute,i)}):i.emit("routeChanged",i.currentRoute,i.previousRoute,i),i):i;function v(t,a){var r=t.url,n=t.content,s=t.el,o=t.template,l=t.templateUrl,p=t.component,f=t.componentUrl;function v(t){i.allowPageChange=!0,t&&("string"==typeof t?c.html(t):(c.html(""),t.f7Component?t.f7Component.$mount(function(e){c.append(e)}):c.append(t)),c[0].f7RouterTabLoaded=!0,function(t){i.removeThemeElements(c);var a=c;"string"!=typeof t&&(a=$(t)),a.trigger("tab:init tab:mounted",e),i.emit("tabInit tabMounted",c[0],e),d&&d.length&&(u?h(function(){i.emit("routeChanged",i.currentRoute,i.previousRoute,i),i.params.unloadTabContent&&i.tabRemove(d,c,e)}):(i.emit("routeChanged",i.currentRoute,i.previousRoute,i),i.params.unloadTabContent&&i.tabRemove(d,c,e)))}(t))}function m(){return i.allowPageChange=!0,i}if(n)v(n);else if(o||l)try{i.tabTemplateLoader(o,l,a,v,m)}catch(e){throw i.allowPageChange=!0,e}else if(s)v(s);else if(p||f)try{i.tabComponentLoader(c[0],p,f,a,v,m)}catch(e){throw i.allowPageChange=!0,e}else r&&(i.xhr&&(i.xhr.abort(),i.xhr=!1),i.xhrRequest(r,a).then(function(e){v(e)}).catch(function(){i.allowPageChange=!0}))}return"url content component el componentUrl template templateUrl".split(" ").forEach(function(t){var a;e[t]&&(l=!0,v(((a={})[t]=e[t],a),n))}),e.async?e.async.call(i,a,r,function(e,t){v(e,Utils.extend(n,t))},function(){i.allowPageChange=!0}):l||(i.allowPageChange=!0),i}function tabRemove(e,t,a){var r;e[0]&&(e[0].f7RouterTabLoaded=!1,delete e[0].f7RouterTabLoaded),e.children().each(function(e,t){t.f7Component&&(r=!0,$(t).trigger("tab:beforeremove",a),t.f7Component.$destroy())}),r||e.trigger("tab:beforeremove",a),this.emit("tabBeforeRemove",e[0],t[0],a),this.removeTabContent(e[0],a)}function modalLoad(e,t,a){void 0===a&&(a={});var r,i=this,n=i.app,s="panel"===e,o=s?"panel":"modal",l=Utils.extend({animate:i.params.animate,pushState:!0,history:!0,on:{}},a),p=Utils.extend({},t.route[e]),c=t.route;function d(){var a=n[e].create(p);c.modalInstance=a;var r=a.el;function d(){a.close()}a.on(o+"Open",function(){r||(i.removeThemeElements(a.el),a.$el.trigger(e.toLowerCase()+":init "+e.toLowerCase()+":mounted",t,a),i.emit((s?"":"modalInit")+" "+e+"Init "+e+"Mounted",a.el,t,a)),i.once("swipeBackMove",d)}),a.on(o+"Close",function(){i.off("swipeBackMove",d),a.closeByRouter||i.back()}),a.on(o+"Closed",function(){a.$el.trigger(e.toLowerCase()+":beforeremove",t,a),a.emit((s?"":"modalBeforeRemove ")+e+"BeforeRemove",a.el,t,a);var r=a.el.f7Component;r&&r.$destroy(),Utils.nextTick(function(){(r||p.component)&&i.removeModal(a.el),a.destroy(),delete a.route,delete c.modalInstance})}),l.route&&(i.params.pushState&&l.pushState&&History.push(i.view.id,{url:l.route.url,modal:e},(i.params.pushStateRoot||"")+i.params.pushStateSeparator+l.route.url),l.route!==i.currentRoute&&(a.route=Utils.extend(l.route,{modal:a}),i.currentRoute=a.route),l.history&&(i.history.push(l.route.url),i.saveHistory())),r&&(i.removeThemeElements(a.el),a.$el.trigger(e.toLowerCase()+":init "+e.toLowerCase()+":mounted",t,a),i.emit(o+"Init "+e+"Init "+e+"Mounted",a.el,t,a)),a.open()}function u(e,t){var a=e.url,r=e.content,s=e.template,o=e.templateUrl,l=e.component,c=e.componentUrl;function u(e){e&&("string"==typeof e?p.content=e:e.f7Component?e.f7Component.$mount(function(e){p.el=e,n.root.append(e)}):p.el=e,d())}function h(){return i.allowPageChange=!0,i}if(r)u(r);else if(s||o)try{i.modalTemplateLoader(s,o,t,u,h)}catch(e){throw i.allowPageChange=!0,e}else if(l||c)try{i.modalComponentLoader(n.root[0],l,c,t,u,h)}catch(e){throw i.allowPageChange=!0,e}else a?(i.xhr&&(i.xhr.abort(),i.xhr=!1),i.xhrRequest(a,t).then(function(e){p.content=e,d()}).catch(function(){i.allowPageChange=!0})):d()}return"url content component el componentUrl template templateUrl".split(" ").forEach(function(e){var t;p[e]&&!r&&(r=!0,u(((t={})[e]=p[e],t),l))}),r||"actions"!==e||d(),p.async&&p.async.call(i,l.route,i.currentRoute,function(e,t){u(e,Utils.extend(l,t))},function(){i.allowPageChange=!0}),i}function modalRemove(e){Utils.extend(e,{closeByRouter:!0}),e.close()}function backward(e,t){var a,r,i,n,s,o,l,p,c=this,d=$(e),u=c.app,h=c.view,f=Utils.extend({animate:c.params.animate,pushState:!0,replaceState:!1},t),v=c.params.masterDetailBreakpoint>0,m=v&&f.route&&f.route.route&&!0===f.route.route.master,g=c.dynamicNavbar,b=d,y=c.$el.children(".page-current"),w=v&&y.hasClass("page-master");if(b.length&&c.removeThemeElements(b),g&&(n=b.children(".navbar"),i=c.$navbarsEl,0===n.length&&b[0]&&b[0].f7Page&&(n=b[0].f7Page.$navbarEl),s=i.find(".navbar-current")),c.allowPageChange=!1,0===b.length||0===y.length)return c.allowPageChange=!0,c;if(c.removeThemeElements(b),f.route&&f.route.route&&f.route.route.keepAlive&&!f.route.route.keepAliveData&&(f.route.route.keepAliveData={pageEl:d[0]}),v){for(var C=c.$el.children(".page:not(.stacked)").filter(function(e,t){return t!==b[0]}),x=0;xc.history.indexOf(a.f7Page.route.url))&&!m&&a&&a.f7Page&&f.route.route.masterRoute&&(o=f.route.route.masterRoute.path===a.f7Page.route.route.path)}if(o&&a&&a.f7Page&&(l=c.history.indexOf(f.route.url)-c.history.indexOf(a.f7Page.route.url)==1),b.addClass("page-previous"+(m?" page-master":"")+(o?" page-master-detail":"")+(l?" page-master-detail-root":"")).removeClass("stacked").removeAttr("aria-hidden").trigger("page:unstack").trigger("page:position",{position:"previous"}),c.emit("pageUnstack",b[0]),c.emit("pagePosition",b[0],"previous"),(m||o)&&(b.trigger("page:role",{role:m?"master":"detail",root:!!l}),c.emit("pageRole",b[0],{role:m?"master":"detail",detailRoot:!!l})),g&&n.length>0&&n.addClass("navbar-previous"+(m?" navbar-master":"")+(o?" navbar-master-detail":"")+(l?" navbar-master-detail-root":"")).removeClass("stacked").removeAttr("aria-hidden"),f.force&&(y.prev(".page-previous:not(.stacked)").length>0||0===y.prev(".page-previous").length))if(c.history.indexOf(f.route.url)>=0?(p=c.history.length-c.history.indexOf(f.route.url)-1,c.history=c.history.slice(0,c.history.indexOf(f.route.url)+2),h.history=c.history):c.history[[c.history.length-2]]?c.history[c.history.length-2]=f.route.url:c.history.unshift(c.url),p&&c.params.stackPages)y.prevAll(".page-previous").each(function(e,t){var i,n=$(t);g&&(i=$(u.navbar.getElByPage(n))),n[0]!==b[0]&&n.index()>b.index()&&(c.initialPages.indexOf(n[0])>=0?(n.addClass("stacked"),n.trigger("page:stack"),c.emit("pageStack",n[0]),g&&i.addClass("stacked")):(c.pageCallback("beforeRemove",n,i,"previous",void 0,f),n[0]===a&&(r=!0),c.removePage(n),g&&i.length>0&&c.removeNavbar(i)))});else{var k,E=y.prev(".page-previous:not(.stacked)");g&&(k=$(u.navbar.getElByPage(E))),c.params.stackPages&&c.initialPages.indexOf(E[0])>=0?(E.addClass("stacked"),E.trigger("page:stack"),c.emit("pageStack",E[0]),k.addClass("stacked")):E.length>0&&(c.pageCallback("beforeRemove",E,k,"previous",void 0,f),E[0]===a&&(r=!0),c.removePage(E),g&&k.length&&c.removeNavbar(k))}var T,S,M=b.parents(doc).length>0,P=b[0].f7Component;function O(){0===b.next(y).length&&(!M&&P?P.$mount(function(e){$(e).insertBefore(y)}):b.insertBefore(y)),g&&n.length&&(n.find(".title-large").length&&n.addClass("navbar-large"),n.insertBefore(s),s.length>0?n.insertBefore(s):(c.$navbarsEl.parents(doc).length||c.$el.prepend(c.$navbarsEl),i.append(n))),M?f.route&&f.route.route&&f.route.route.keepAlive&&!b[0].f7PageMounted&&(b[0].f7PageMounted=!0,c.pageCallback("mounted",b,n,"previous","current",f,y)):c.pageCallback("mounted",b,n,"previous","current",f,y)}if(f.preload){O(),f.route.route.tab&&c.tabLoad(f.route.route.tab,Utils.extend({},f,{history:!1,pushState:!1,preload:!0})),m&&(b.removeClass("page-master-stacked").trigger("page:masterunstack"),c.emit("pageMasterUnstack",b[0]),g&&$(u.navbar.getElByPage(b)).removeClass("navbar-master-stacked")),c.pageCallback("init",b,n,"previous","current",f,y);var D=b.prevAll(".page-previous:not(.stacked):not(.page-master)");return D.length>0&&D.each(function(e,t){var a,r=$(t);g&&(a=$(u.navbar.getElByPage(r))),c.params.stackPages&&c.initialPages.indexOf(t)>=0?(r.addClass("stacked"),r.trigger("page:stack"),c.emit("pageStack",r[0]),g&&a.addClass("stacked")):(c.pageCallback("beforeRemove",r,a,"previous",void 0),c.removePage(r),g&&a.length&&c.removeNavbar(a))}),c.allowPageChange=!0,c}if(!(Device.ie||Device.edge||Device.firefox&&!Device.ios)&&c.params.pushState&&f.pushState)if(f.replaceState){var I=c.params.pushStateRoot||"";History.replace(h.id,{url:f.route.url},I+c.params.pushStateSeparator+f.route.url)}else p?History.go(-p):History.back();if(f.replaceState?c.history[c.history.length-1]=f.route.url:(1===c.history.length&&c.history.unshift(c.url),c.history.pop()),c.saveHistory(),c.currentPageEl=b[0],g&&n.length?c.currentNavbarEl=n[0]:delete c.currentNavbarEl,c.currentRoute=f.route,(Device.ie||Device.edge||Device.firefox&&!Device.ios)&&c.params.pushState&&f.pushState)if(f.replaceState){var B=c.params.pushStateRoot||"";History.replace(h.id,{url:f.route.url},B+c.params.pushStateSeparator+f.route.url)}else p?History.go(-p):History.back();function R(){var e="page-previous page-current page-next",t="navbar-previous navbar-current navbar-next";b.removeClass(e).addClass("page-current").removeAttr("aria-hidden").trigger("page:position",{position:"current"}),c.emit("pagePosition",b[0],"current"),y.removeClass(e).addClass("page-next").attr("aria-hidden","true").trigger("page:position",{position:"next"}),c.emit("pagePosition",y[0],"next"),g&&(n.removeClass(t).addClass("navbar-current").removeAttr("aria-hidden"),s.removeClass(t).addClass("navbar-next").attr("aria-hidden","true")),c.pageCallback("afterOut",y,s,"current","next",f),c.pageCallback("afterIn",b,n,"previous","current",f),c.params.stackPages&&c.initialPages.indexOf(y[0])>=0?(y.addClass("stacked"),y.trigger("page:stack"),c.emit("pageStack",y[0]),g&&s.addClass("stacked")):(c.pageCallback("beforeRemove",y,s,"next",void 0,f),c.removePage(y),g&&s.length&&c.removeNavbar(s)),c.allowPageChange=!0,c.emit("routeChanged",c.currentRoute,c.previousRoute,c),(c.params.preloadPreviousPage||c.params[u.theme+"SwipeBack"])&&c.history[c.history.length-2]&&!m&&c.back(c.history[c.history.length-2],{preload:!0}),c.params.pushState&&History.clearRouterQueue()}return O(),f.route.route.tab&&c.tabLoad(f.route.route.tab,Utils.extend({},f,{history:!1,pushState:!1})),v&&(w||r)&&h.checkMasterDetailBreakpoint(!1),c.pageCallback("init",b,n,"previous","current",f,y),c.pageCallback("beforeOut",y,s,"current","next",f),c.pageCallback("beforeIn",b,n,"previous","current",f),!f.animate||w&&u.width>=c.params.masterDetailBreakpoint?R():(T="page-previous page-current page-next",S="navbar-previous navbar-current navbar-next",y.removeClass(T).addClass("page-current").trigger("page:position",{position:"current"}),c.emit("pagePosition",y[0],"current"),b.removeClass(T).addClass("page-previous").removeAttr("aria-hidden").trigger("page:position",{position:"previous"}),c.emit("pagePosition",b[0],"previous"),g&&(s.removeClass(S).addClass("navbar-current"),n.removeClass(S).addClass("navbar-previous").removeAttr("aria-hidden")),c.animate(y,b,s,n,"backward",function(){R()})),c}function loadBack(e,t,a){var r=this;if(!r.allowPageChange&&!a)return r;var i=e,n=t,s=i.url,o=i.content,l=i.el,p=i.pageName,c=i.template,d=i.templateUrl,u=i.component,h=i.componentUrl;if(n.route.url&&r.url===n.route.url&&!n.reloadCurrent&&!n.reloadPrevious&&!r.params.allowDuplicateUrls)return!1;function f(e,t){return r.backward(e,Utils.extend(n,t))}function v(){return r.allowPageChange=!0,r}if(!n.route&&s&&(n.route=r.parseRouteUrl(s)),(s||d||h)&&(r.allowPageChange=!1),o)r.backward(r.getPageEl(o),n);else if(c||d)try{r.pageTemplateLoader(c,d,n,f,v)}catch(e){throw r.allowPageChange=!0,e}else if(l)r.backward(r.getPageEl(l),n);else if(p)r.backward(r.$el.children('.page[data-name="'+p+'"]').eq(0),n);else if(u||h)try{r.pageComponentLoader(r.el,u,h,n,f,v)}catch(e){throw r.allowPageChange=!0,e}else s&&(r.xhr&&(r.xhr.abort(),r.xhr=!1),r.xhrRequest(s,n).then(function(e){r.backward(r.getPageEl(e),n)}).catch(function(){r.allowPageChange=!0}));return r}function back(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,r,i,n=this;if(n.swipeBackActive)return n;"object"==typeof e[0]?r=e[0]||{}:(a=e[0],r=e[1]||{});var s=r.name,o=r.params,l=r.query;if(s){if(!(i=n.findRouteByKey("name",s)))throw new Error('Framework7: route with name "'+s+'" not found');if(a=n.constructRouteUrl(i,{params:o,query:l}))return n.back(a,Utils.extend({},r,{name:null,params:null,query:null}));throw new Error("Framework7: can't construct URL for route with name \""+s+'"')}var p=n.app;appRouterCheck(n,"back");var c,d=n.currentRoute.modal;if(d||"popup popover sheet loginScreen actions customModal panel".split(" ").forEach(function(e){n.currentRoute.route[e]&&(d=!0,c=e)}),d){var u,h=n.currentRoute.modal||n.currentRoute.route.modalInstance||p[c].get(),f=n.history[n.history.length-2];if(h&&h.$el){var v=h.$el.prevAll(".modal-in");v.length&&v[0].f7Modal&&(u=v[0].f7Modal.route)}if(u||(u=n.findMatchingRoute(f)),!u&&f&&(u={url:f,path:f.split("?")[0],query:Utils.parseUrlQuery(f),route:{path:f.split("?")[0],url:f}}),!(a&&0!==a.replace(/[# ]/g,"").trim().length||u&&h))return n;var m=r.force&&u&&a;return u&&h?(n.params.pushState&&!1!==r.pushState&&History.back(),n.currentRoute=u,n.history.pop(),n.saveHistory(),n.modalRemove(h),m&&n.navigate(a,{reloadCurrent:!0})):h&&(n.modalRemove(h),a&&n.navigate(a,{reloadCurrent:!0})),n}var g,b=n.$el.children(".page-current").prevAll(".page-previous:not(.page-master)").eq(0);if(n.params.masterDetailBreakpoint>0){var y=n.$el.children(".page-current").prevAll(".page-master").eq(0);if(y.length){var w=n.history[n.history.length-2],C=n.findMatchingRoute(w);C&&C.route===y[0].f7Page.route.route&&(b=y,r.preload||(g=p.width>=n.params.masterDetailBreakpoint))}}if(!r.force&&b.length&&!g){if(n.params.pushState&&b[0].f7Page&&n.history[n.history.length-2]!==b[0].f7Page.route.url)return n.back(n.history[n.history.length-2],Utils.extend(r,{force:!0})),n;var x=b[0].f7Page.route;return processRouteQueue.call(n,x,n.currentRoute,function(){n.loadBack({el:b},Utils.extend(r,{route:x}))},function(){}),n}if("#"===a&&(a=void 0),a&&"/"!==a[0]&&0!==a.indexOf("#")&&(a=((n.path||"/")+a).replace("//","/")),!a&&n.history.length>1&&(a=n.history[n.history.length-2]),g&&!r.force&&n.history[n.history.length-3])return n.back(n.history[n.history.length-3],Utils.extend({},r||{},{force:!0,animate:!1}));if(g&&!r.force)return n;if((i=n.findMatchingRoute(a))||a&&(i={url:a,path:a.split("?")[0],query:Utils.parseUrlQuery(a),route:{path:a.split("?")[0],url:a}}),!i)return n;if(i.route.redirect)return redirect.call(n,"back",i,r);var $,k={};if(i.route.options?Utils.extend(k,i.route.options,r):Utils.extend(k,r),k.route=i,k&&k.context&&(i.context=k.context,k.route.context=k.context),k.force&&n.params.stackPages&&(n.$el.children(".page-previous.stacked").each(function(e,t){t.f7Page&&t.f7Page.route&&t.f7Page.route.url===i.url&&($=!0,n.loadBack({el:t},k))}),$))return n;function E(){var e=!1;i.route.keepAlive&&i.route.keepAliveData&&(n.loadBack({el:i.route.keepAliveData.pageEl},k),e=!0),"url content component pageName el componentUrl template templateUrl".split(" ").forEach(function(t){var a;i.route[t]&&!e&&(e=!0,n.loadBack(((a={})[t]=i.route[t],a),k))}),e||i.route.async&&(n.allowPageChange=!1,i.route.async.call(n,i,n.currentRoute,function(e,t){n.allowPageChange=!1,t&&t.context&&(i.context?i.context=Utils.extend({},i.context,t.context):i.context=t.context,k.route.context=i.context),n.loadBack(e,Utils.extend(k,t),!0)},function(){n.allowPageChange=!0}))}function T(){n.allowPageChange=!0}return k.preload?E():processRouteQueue.call(n,i,n.currentRoute,function(){i.route.modules?p.loadModules(Array.isArray(i.route.modules)?i.route.modules:[i.route.modules]).then(function(){E()}).catch(function(){T()}):E()},function(){T()}),n}function clearPreviousPages(e){appRouterCheck(e,"clearPreviousPages");var t=e.app,a=e.dynamicNavbar;e.$el.children(".page").filter(function(t,a){return!(!e.currentRoute||!e.currentRoute.modal&&!e.currentRoute.panel)||a!==e.currentPageEl}).each(function(r,i){var n=$(i),s=$(t.navbar.getElByPage(n));e.params.stackPages&&e.initialPages.indexOf(n[0])>=0?(n.addClass("stacked"),a&&s.addClass("stacked")):(e.pageCallback("beforeRemove",n,s,"previous",void 0,{}),e.removePage(n),a&&s.length&&e.removeNavbar(s))})}function clearPreviousHistory(){appRouterCheck(this,"clearPreviousHistory");var e=this.history[this.history.length-1];clearPreviousPages(this),this.history=[e],this.view.history=[e],this.saveHistory()}var Router=function(e){function t(t,a){e.call(this,{},[void 0===a?t:a]);var r=this;r.isAppRouter=void 0===a,r.isAppRouter?Utils.extend(!1,r,{app:t,params:t.params.view,routes:t.routes||[],cache:t.cache}):Utils.extend(!1,r,{app:t,view:a,viewId:a.id,params:a.params,routes:a.routes,$el:a.$el,el:a.el,$navbarsEl:a.$navbarsEl,navbarsEl:a.navbarsEl,history:a.history,scrollHistory:a.scrollHistory,cache:t.cache,dynamicNavbar:"ios"===t.theme&&a.params.iosDynamicNavbar,initialPages:[],initialNavbars:[]}),r.useModules(),r.tempDom=doc.createElement("div"),r.allowPageChange=!0;var i={},n={};return Object.defineProperty(r,"currentRoute",{enumerable:!0,configurable:!0,set:function(e){void 0===e&&(e={}),n=Utils.extend({},i),(i=e)&&(r.url=i.url,r.emit("routeChange",e,n,r))},get:function(){return i}}),Object.defineProperty(r,"previousRoute",{enumerable:!0,configurable:!0,get:function(){return n},set:function(e){n=e}}),r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.animatableNavElements=function(e,t,a,r,i){var n,s,o=this.dynamicNavbar,l=this.params.iosAnimateNavbarBackIcon;function p(e,t){var a,r=e.hasClass("sliding")||t.hasClass("sliding"),i=e.hasClass("subnavbar"),n=!r||!i,s=e.find(".back .icon");return r&&l&&e.hasClass("left")&&s.length>0&&s.next("span").length&&(e=s.next("span"),a=!0),{$el:e,isIconLabel:a,leftOffset:e[0].f7NavbarLeftOffset,rightOffset:e[0].f7NavbarRightOffset,isSliding:r,isSubnavbar:i,needsOpacityTransition:n}}return o&&(n=[],s=[],e.children(".navbar-inner").children(".left, .right, .title, .subnavbar").each(function(t,s){var o=$(s);o.hasClass("left")&&r&&"forward"===i||o.hasClass("title")&&a||n.push(p(o,e.children(".navbar-inner")))}),t.hasClass("navbar-master")&&this.params.masterDetailBreakpoint>0&&this.app.width>=this.params.masterDetailBreakpoint||t.children(".navbar-inner").children(".left, .right, .title, .subnavbar").each(function(e,n){var o=$(n);o.hasClass("left")&&a&&!r&&"forward"===i||o.hasClass("left")&&a&&"backward"===i||o.hasClass("title")&&r||s.push(p(o,t.children(".navbar-inner")))}),[s,n].forEach(function(e){e.forEach(function(t){var a=t,r=t.isSliding,i=t.$el,o=e===s?n:s;r&&i.hasClass("title")&&o&&o.forEach(function(e){if(e.isIconLabel){var t=e.$el[0];a.leftOffset+=t&&t.offsetLeft||0}})})})),{newNavEls:n,oldNavEls:s}},t.prototype.animate=function(e,t,a,r,i,n){var s=this;if(s.params.animateCustom)s.params.animateCustom.apply(s,[e,t,a,r,i,n]);else{var o,l,p,c,d,u,h=s.dynamicNavbar,f="ios"===s.app.theme,v="router-transition-"+i+" router-transition";if(f&&h){s.params.masterDetailBreakpoint>0&&s.app.width>=s.params.masterDetailBreakpoint&&(a.hasClass("navbar-master")&&r.hasClass("navbar-master-detail")||a.hasClass("navbar-master-detail")&&r.hasClass("navbar-master"))||(d=a&&a.hasClass("navbar-large"),u=r&&r.hasClass("navbar-large"),p=d&&!a.hasClass("navbar-large-collapsed"),c=u&&!r.hasClass("navbar-large-collapsed"));var m=s.animatableNavElements(r,a,c,p,i);o=m.newNavEls,l=m.oldNavEls}("forward"===i?t:e).animationEnd(function(){s.dynamicNavbar&&(r&&(r.removeClass("router-navbar-transition-to-large router-navbar-transition-from-large"),r.addClass("navbar-no-title-large-transition"),Utils.nextFrame(function(){r.removeClass("navbar-no-title-large-transition")})),a&&a.removeClass("router-navbar-transition-to-large router-navbar-transition-from-large"),r.hasClass("sliding")?r.find(".title, .left, .right, .left .icon, .subnavbar").transform(""):r.find(".sliding").transform(""),a.hasClass("sliding")?a.find(".title, .left, .right, .left .icon, .subnavbar").transform(""):a.find(".sliding").transform("")),s.$el.removeClass(v),n&&n()}),h?(g(0),Utils.nextFrame(function(){g(1),s.$el.addClass(v)})):s.$el.addClass(v)}function g(e){f&&h&&(1===e&&(c&&(r.addClass("router-navbar-transition-to-large"),a.addClass("router-navbar-transition-to-large")),p&&(r.addClass("router-navbar-transition-from-large"),a.addClass("router-navbar-transition-from-large"))),o.forEach(function(t){var a=t.$el,r="forward"===i?t.rightOffset:t.leftOffset;t.isSliding&&(t.isSubnavbar&&u?a[0].style.setProperty("transform","translate3d("+r*(1-e)+"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)","important"):a.transform("translate3d("+r*(1-e)+"px,0,0)"))}),l.forEach(function(t){var a=t.$el,r="forward"===i?t.leftOffset:t.rightOffset;t.isSliding&&(t.isSubnavbar&&d?a.transform("translate3d("+r*e+"px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)"):a.transform("translate3d("+r*e+"px,0,0)"))}))}},t.prototype.removeModal=function(e){this.removeEl(e)},t.prototype.removeTabContent=function(e){$(e).html("")},t.prototype.removeNavbar=function(e){this.removeEl(e)},t.prototype.removePage=function(e){var t=$(e),a=t&&t[0]&&t[0].f7Page;a&&a.route&&a.route.route&&a.route.route.keepAlive?t.remove():this.removeEl(e)},t.prototype.removeEl=function(e){if(e){var t=$(e);0!==t.length&&(t.find(".tab").each(function(e,t){$(t).children().each(function(e,t){t.f7Component&&($(t).trigger("tab:beforeremove"),t.f7Component.$destroy())})}),t[0].f7Component&&t[0].f7Component.$destroy&&t[0].f7Component.$destroy(),this.params.removeElements&&(this.params.removeElementsWithTimeout?setTimeout(function(){t.remove()},this.params.removeElementsTimeout):t.remove()))}},t.prototype.getPageEl=function(e){if("string"==typeof e)this.tempDom.innerHTML=e;else{if($(e).hasClass("page"))return e;this.tempDom.innerHTML="",$(this.tempDom).append(e)}return this.findElement(".page",this.tempDom)},t.prototype.findElement=function(e,t,a){var r=this.view,i=this.app,n=$(t),s=e;a&&(s+=":not(.stacked)");var o=n.find(s).filter(function(e,t){return 0===$(t).parents(".popup, .dialog, .popover, .actions-modal, .sheet-modal, .login-screen, .page").length});return o.length>1&&("string"==typeof r.selector&&(o=n.find(r.selector+" "+s)),o.length>1&&(o=n.find("."+i.params.viewMainClass+" "+s))),1===o.length?o:(a||(o=this.findElement(s,n,!0)),o&&1===o.length?o:o&&o.length>1?$(o[0]):void 0)},t.prototype.flattenRoutes=function(e){void 0===e&&(e=this.routes);var t=this,a=[];return e.forEach(function(e){var r=!1;if("tabs"in e&&e.tabs){var i=e.tabs.map(function(t){var a=Utils.extend({},e,{path:(e.path+"/"+t.path).replace("///","/").replace("//","/"),parentPath:e.path,tab:t});return delete a.tabs,delete a.routes,a});r=!0,a=a.concat(t.flattenRoutes(i))}if("detailRoutes"in e){var n=e.detailRoutes.map(function(t){var a=Utils.extend({},t);return a.masterRoute=e,a.masterRoutePath=e.path,a});a=a.concat(e,t.flattenRoutes(n))}if("routes"in e){var s=e.routes.map(function(t){var a=Utils.extend({},t);return a.path=(e.path+"/"+a.path).replace("///","/").replace("//","/"),a});a=r?a.concat(t.flattenRoutes(s)):a.concat(e,t.flattenRoutes(s))}"routes"in e||"tabs"in e&&e.tabs||"detailRoutes"in e||a.push(e)}),a},t.prototype.parseRouteUrl=function(e){if(!e)return{};var t=Utils.parseUrlQuery(e),a=e.split("#")[1],r=e.split("#")[0].split("?")[0];return{query:t,hash:a,params:{},url:e,path:r}},t.prototype.constructRouteUrl=function(e,t){void 0===t&&(t={});var a,r=t.params,i=t.query,n=e.path,s=pathToRegexp_1.compile(n);try{a=s(r||{})}catch(e){throw new Error("Framework7: error constructing route URL from passed params:\nRoute: "+n+"\n"+e.toString())}return i&&(a+="string"==typeof i?"?"+i:"?"+Utils.serializeObject(i)),a},t.prototype.findTabRoute=function(e){var t,a=$(e),r=this.currentRoute.route.parentPath,i=a.attr("id");return this.flattenRoutes(this.routes).forEach(function(e){e.parentPath===r&&e.tab&&e.tab.id===i&&(t=e)}),t},t.prototype.findRouteByKey=function(e,t){var a,r=this.routes;return this.flattenRoutes(r).forEach(function(r){a||r[e]===t&&(a=r)}),a},t.prototype.findMatchingRoute=function(e){if(e){var t,a=this.routes,r=this.flattenRoutes(a),i=this.parseRouteUrl(e),n=i.path,s=i.query,o=i.hash,l=i.params;return r.forEach(function(a){if(!t){var r,i,p=[],c=[a.path];if(a.alias&&("string"==typeof a.alias?c.push(a.alias):Array.isArray(a.alias)&&a.alias.forEach(function(e){c.push(e)})),c.forEach(function(e){r||(r=pathToRegexp_1(e,p).exec(n))}),r)p.forEach(function(e,t){if("number"!=typeof e.name){var a=r[t+1];l[e.name]=null==a?a:decodeURIComponent(a)}}),a.parentPath&&(i=n.split("/").slice(0,a.parentPath.split("/").length-1).join("/")),t={query:s,hash:o,params:l,url:e,path:n,parentPath:i,route:a,name:a.name}}}),t}},t.prototype.replaceRequestUrlParams=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var a=e;return"string"==typeof a&&a.indexOf("{{")>=0&&t&&t.route&&t.route.params&&Object.keys(t.route.params).length&&Object.keys(t.route.params).forEach(function(e){var r=new RegExp("{{"+e+"}}","g");a=a.replace(r,t.route.params[e]||"")}),a},t.prototype.removeFromXhrCache=function(e){for(var t=this.cache.xhr,a=!1,r=0;r=0;return r.passRouteQueryToRequest&&t&&t.route&&t.route.query&&Object.keys(t.route.query).length&&(n+=(s?"&":"?")+Utils.serializeObject(t.route.query),s=!0),r.passRouteParamsToRequest&&t&&t.route&&t.route.params&&Object.keys(t.route.params).length&&(n+=(s?"&":"?")+Utils.serializeObject(t.route.params),s=!0),n.indexOf("{{")>=0&&(n=a.replaceRequestUrlParams(n,t)),r.xhrCacheIgnoreGetParameters&&n.indexOf("?")>=0&&(n=n.split("?")[0]),new Promise(function(e,s){if(r.xhrCache&&!i&&n.indexOf("nocache")<0&&r.xhrCacheIgnore.indexOf(n)<0)for(var o=0;o=200&&i.status<300||0===i.status?(r.xhrCache&&""!==i.responseText&&(a.removeFromXhrCache(n),a.cache.xhr.push({url:n,time:Utils.now(),content:i.responseText})),a.emit("routerAjaxSuccess",i,t),e(i.responseText)):(a.emit("routerAjaxError",i,t),s(i))},error:function(e){a.emit("routerAjaxError",e,t),s(e)}})})},t.prototype.removeThemeElements=function(e){var t,a=this.app.theme;"ios"===a?t=".md-only, .aurora-only, .if-md, .if-aurora, .if-not-ios, .not-ios":"md"===a?t=".ios-only, .aurora-only, .if-ios, .if-aurora, .if-not-md, .not-md":"aurora"===a&&(t=".ios-only, .md-only, .if-ios, .if-md, .if-not-aurora, .not-aurora"),$(e).find(t).remove()},t.prototype.getPageData=function(e,t,a,r,i,n){void 0===i&&(i={});var s,o,l=$(e).eq(0),p=$(t).eq(0),c=l[0].f7Page||{};if(("next"===a&&"current"===r||"current"===a&&"previous"===r)&&(s="forward"),("current"===a&&"next"===r||"previous"===a&&"current"===r)&&(s="backward"),c&&!c.fromPage){var d=$(n);d.length&&(o=d[0].f7Page)}(o=c.pageFrom||o)&&o.pageFrom&&(o.pageFrom=null);var u={app:this.app,view:this.view,router:this,$el:l,el:l[0],$pageEl:l,pageEl:l[0],$navbarEl:p,navbarEl:p[0],name:l.attr("data-name"),position:a,from:a,to:r,direction:s,route:c.route?c.route:i,pageFrom:o};return l[0].f7Page=u,u},t.prototype.pageCallback=function(e,t,a,r,i,n,s){if(void 0===n&&(n={}),t){var o=this,l=$(t);if(l.length){var p=$(a),c=n.route,d=o.params.restoreScrollTopOnBack&&!(o.params.masterDetailBreakpoint>0&&l.hasClass("page-master")&&o.app.width>=o.params.masterDetailBreakpoint),u=l[0].f7Page&&l[0].f7Page.route&&l[0].f7Page.route.route&&l[0].f7Page.route.route.keepAlive;"beforeRemove"===e&&u&&(e="beforeUnmount");var h="page"+(e[0].toUpperCase()+e.slice(1,e.length)),f="page:"+e.toLowerCase(),v={};(v="beforeRemove"===e&&l[0].f7Page?Utils.extend(l[0].f7Page,{from:r,to:i,position:r}):o.getPageData(l[0],p[0],r,i,c,s)).swipeBack=!!n.swipeBack;var m=n.route?n.route.route:{},g=m.on;void 0===g&&(g={});var b=m.once;if(void 0===b&&(b={}),n.on&&Utils.extend(g,n.on),n.once&&Utils.extend(b,n.once),"mounted"===e&&C(),"init"===e){if(d&&("previous"===r||!r)&&"current"===i&&o.scrollHistory[v.route.url]&&!l.hasClass("no-restore-scroll")){var y=l.find(".page-content");y.length>0&&(y=y.filter(function(e,t){return 0===$(t).parents(".tab:not(.tab-active)").length&&!$(t).is(".tab:not(.tab-active)")})),y.scrollTop(o.scrollHistory[v.route.url])}if(C(),l[0].f7PageInitialized)return l.trigger("page:reinit",v),void o.emit("pageReinit",v);l[0].f7PageInitialized=!0}if(d&&"beforeOut"===e&&"current"===r&&"previous"===i){var w=l.find(".page-content");w.length>0&&(w=w.filter(function(e,t){return 0===$(t).parents(".tab:not(.tab-active)").length&&!$(t).is(".tab:not(.tab-active)")})),o.scrollHistory[v.route.url]=w.scrollTop()}d&&"beforeOut"===e&&"current"===r&&"next"===i&&delete o.scrollHistory[v.route.url],l.trigger(f,v),o.emit(h,v),"beforeRemove"!==e&&"beforeUnmount"!==e||(l[0].f7RouteEventsAttached&&(l[0].f7RouteEventsOn&&Object.keys(l[0].f7RouteEventsOn).forEach(function(e){l.off(Utils.eventNameToColonCase(e),l[0].f7RouteEventsOn[e])}),l[0].f7RouteEventsOnce&&Object.keys(l[0].f7RouteEventsOnce).forEach(function(e){l.off(Utils.eventNameToColonCase(e),l[0].f7RouteEventsOnce[e])}),l[0].f7RouteEventsAttached=null,l[0].f7RouteEventsOn=null,l[0].f7RouteEventsOnce=null,delete l[0].f7RouteEventsAttached,delete l[0].f7RouteEventsOn,delete l[0].f7RouteEventsOnce),u||(l[0].f7Page&&l[0].f7Page.navbarEl&&delete l[0].f7Page.navbarEl.f7Page,l[0].f7Page=null))}}function C(){l[0].f7RouteEventsAttached||(l[0].f7RouteEventsAttached=!0,g&&Object.keys(g).length>0&&(l[0].f7RouteEventsOn=g,Object.keys(g).forEach(function(e){g[e]=g[e].bind(o),l.on(Utils.eventNameToColonCase(e),g[e])})),b&&Object.keys(b).length>0&&(l[0].f7RouteEventsOnce=b,Object.keys(b).forEach(function(e){b[e]=b[e].bind(o),l.once(Utils.eventNameToColonCase(e),b[e])})))}},t.prototype.saveHistory=function(){this.view.history=this.history,this.params.pushState&&(win.localStorage["f7router-"+this.view.id+"-history"]=JSON.stringify(this.history))},t.prototype.restoreHistory=function(){this.params.pushState&&win.localStorage["f7router-"+this.view.id+"-history"]&&(this.history=JSON.parse(win.localStorage["f7router-"+this.view.id+"-history"]),this.view.history=this.history)},t.prototype.clearHistory=function(){this.history=[],this.view&&(this.view.history=[]),this.saveHistory()},t.prototype.updateCurrentUrl=function(e){appRouterCheck(this,"updateCurrentUrl"),this.history.length?this.history[this.history.length-1]=e:this.history.push(e);var t=this.parseRouteUrl(e),a=t.query,r=t.hash,i=t.params,n=t.url,s=t.path;if(this.currentRoute&&Utils.extend(this.currentRoute,{query:a,hash:r,params:i,url:n,path:s}),this.params.pushState){var o=this.params.pushStateRoot||"";History.replace(this.view.id,{url:e},o+this.params.pushStateSeparator+e)}this.saveHistory(),this.emit("routeUrlUpdate",this.currentRoute,this)},t.prototype.init=function(){var e=this,t=e.app,a=e.view;(a&&e.params.iosSwipeBack&&"ios"===t.theme||a&&e.params.mdSwipeBack&&"md"===t.theme||a&&e.params.auroraSwipeBack&&"aurora"===t.theme)&&SwipeBack(e);var r,i,n,s=e.params.url,o=doc.location.href.split(doc.location.origin)[1],l=e.params,p=l.pushState,c=l.pushStateOnLoad,d=l.pushStateSeparator,u=l.pushStateAnimateOnLoad,h=e.params.pushStateRoot;(win.cordova&&p&&!d&&!h&&doc.location.pathname.indexOf("index.html")&&(console.warn("Framework7: wrong or not complete pushState configuration, trying to guess pushStateRoot"),h=doc.location.pathname.split("index.html")[0]),p&&c?(h&&o.indexOf(h)>=0&&""===(o=o.split(h)[1])&&(o="/"),s=d.length>0&&o.indexOf(d)>=0?o.split(d)[1]:o,e.restoreHistory(),e.history.indexOf(s)>=0?e.history=e.history.slice(0,e.history.indexOf(s)+1):e.params.url===s?e.history=[s]:History.state&&History.state[a.id]&&History.state[a.id].url===e.history[e.history.length-1]?s=e.history[e.history.length-1]:e.history=[o.split(d)[0]||"/",s],e.history.length>1?r=!0:e.history=[],e.saveHistory()):(s||(s=o),doc.location.search&&s.indexOf("?")<0&&(s+=doc.location.search),doc.location.hash&&s.indexOf("#")<0&&(s+=doc.location.hash)),e.history.length>1?(i=e.findMatchingRoute(e.history[0]))||(i=Utils.extend(e.parseRouteUrl(e.history[0]),{route:{url:e.history[0],path:e.history[0].split("?")[0]}})):(i=e.findMatchingRoute(s))||(i=Utils.extend(e.parseRouteUrl(s),{route:{url:s,path:s.split("?")[0]}})),e.params.stackPages&&e.$el.children(".page").each(function(t,a){var r=$(a);e.initialPages.push(r[0]),e.dynamicNavbar&&r.children(".navbar").length>0&&e.initialNavbars.push(r.children(".navbar")[0])}),0===e.$el.children(".page:not(.stacked)").length&&s)?e.navigate(s,{initial:!0,reloadCurrent:!0,pushState:!1}):(e.currentRoute=i,e.$el.children(".page:not(.stacked)").each(function(t,r){var i,s=$(r);s.addClass("page-current"),e.dynamicNavbar&&((i=s.children(".navbar")).length>0?(e.$navbarsEl.parents(doc).length||e.$el.prepend(e.$navbarsEl),i.addClass("navbar-current"),e.$navbarsEl.append(i),i.children(".title-large").length&&i.addClass("navbar-large"),s.children(".navbar").remove()):(e.$navbarsEl.addClass("navbar-hidden"),i.children(".title-large").length&&e.$navbarsEl.addClass("navbar-hidden navbar-large-hidden"))),e.currentRoute&&e.currentRoute.route&&e.currentRoute.route.master&&e.params.masterDetailBreakpoint>0&&(s.addClass("page-master"),s.trigger("page:role",{role:"master"}),i&&i.length&&i.addClass("navbar-master"),a.checkMasterDetailBreakpoint());var o={route:e.currentRoute};e.currentRoute&&e.currentRoute.route&&e.currentRoute.route.options&&Utils.extend(o,e.currentRoute.route.options),e.currentPageEl=s[0],e.dynamicNavbar&&i.length&&(e.currentNavbarEl=i[0]),e.removeThemeElements(s),e.dynamicNavbar&&i.length&&e.removeThemeElements(i),o.route.route.tab&&(n=!0,e.tabLoad(o.route.route.tab,Utils.extend({},o))),e.pageCallback("init",s,i,"current",void 0,o)}),r&&e.navigate(s,{initial:!0,pushState:!1,history:!1,animate:u,once:{pageAfterIn:function(){(e.params.preloadPreviousPage||e.params[t.theme+"SwipeBack"])&&e.history.length>2&&e.back({preload:!0})}}}),r||n||(e.history.push(s),e.saveHistory()));!(s&&p&&c)||History.state&&History.state[a.id]||History.initViewState(a.id,{url:s}),e.emit("local::init routerInit",e)},t.prototype.destroy=function(){var e=this;e.emit("local::destroy routerDestroy",e),Object.keys(e).forEach(function(t){e[t]=null,delete e[t]}),e=null},t}(Framework7Class);Router.prototype.forward=forward,Router.prototype.load=load,Router.prototype.navigate=navigate,Router.prototype.refreshPage=refreshPage,Router.prototype.tabLoad=tabLoad,Router.prototype.tabRemove=tabRemove,Router.prototype.modalLoad=modalLoad,Router.prototype.modalRemove=modalRemove,Router.prototype.backward=backward,Router.prototype.loadBack=loadBack,Router.prototype.back=back,Router.prototype.clearPreviousHistory=clearPreviousHistory;var RouterModule={name:"router",static:{Router:Router},instance:{cache:{xhr:[],templates:[],components:[]}},create:function(){this.app?this.params.router&&(this.router=new Router(this.app,this)):this.router=new Router(this)}},View=function(e){function t(t,a,r){void 0===r&&(r={}),e.call(this,r,[t]);var i,n,s,o=t,l=$(a),p=this;return p.params=Utils.extend({routes:[],routesAdd:[]},o.params.view,r),p.params.routes.length>0?p.routes=p.params.routes:p.routes=[].concat(o.routes,p.params.routesAdd),i="string"==typeof a?a:(l.attr("id")?"#"+l.attr("id"):"")+(l.attr("class")?"."+l.attr("class").replace(/ /g,".").replace(".active",""):""),"ios"===o.theme&&p.params.iosDynamicNavbar&&0===(n=l.children(".navbars").eq(0)).length&&(n=$('')),Utils.extend(!1,p,{app:o,$el:l,el:l[0],name:p.params.name,main:p.params.main||l.hasClass("view-main"),$navbarsEl:n,navbarsEl:n?n[0]:void 0,selector:i,history:[],scrollHistory:{}}),l[0].f7View=p,p.useModules(),o.views.push(p),p.main&&(o.views.main=p),p.name&&(o.views[p.name]=p),p.index=o.views.indexOf(p),s=p.name?"view_"+p.name:p.main?"view_main":"view_"+p.index,p.id=s,o.initialized?p.init():o.on("init",function(){p.init()}),p}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.destroy=function(){var e=this,t=e.app;e.$el.trigger("view:beforedestroy",e),e.emit("local::beforeDestroy viewBeforeDestroy",e),t.off("resize",e.checkMasterDetailBreakpoint),e.main?(t.views.main=null,delete t.views.main):e.name&&(t.views[e.name]=null,delete t.views[e.name]),e.$el[0].f7View=null,delete e.$el[0].f7View,t.views.splice(t.views.indexOf(e),1),e.params.router&&e.router&&e.router.destroy(),e.emit("local::destroy viewDestroy",e),Object.keys(e).forEach(function(t){e[t]=null,delete e[t]}),e=null},t.prototype.checkMasterDetailBreakpoint=function(e){var t=this.app,a=this.$el.hasClass("view-master-detail"),r=t.width>=this.params.masterDetailBreakpoint&&this.$el.children(".page-master").length;void 0===e&&r||!0===e?(this.$el.addClass("view-master-detail"),a||(this.emit("local::masterDetailBreakpoint viewMasterDetailBreakpoint"),this.$el.trigger("view:masterDetailBreakpoint",this))):(this.$el.removeClass("view-master-detail"),a&&(this.emit("local::masterDetailBreakpoint viewMasterDetailBreakpoint"),this.$el.trigger("view:masterDetailBreakpoint",this)))},t.prototype.initMasterDetail=function(){var e=this.app;this.checkMasterDetailBreakpoint=this.checkMasterDetailBreakpoint.bind(this),this.checkMasterDetailBreakpoint(),e.on("resize",this.checkMasterDetailBreakpoint)},t.prototype.init=function(){this.params.router&&(this.params.masterDetailBreakpoint>0&&this.initMasterDetail(),this.router.init(),this.$el.trigger("view:init",this),this.emit("local::init viewInit",this))},t}(Framework7Class);function initClicks(e){e.on("click",function(t){var a=$(t.target),r=a.closest("a"),i=r.length>0,n=i&&r.attr("href");if(i&&(r.is(e.params.clicks.externalLinks)||n&&n.indexOf("javascript:")>=0)){var s=r.attr("target");n&&win.cordova&&win.cordova.InAppBrowser&&("_system"===s||"_blank"===s)&&(t.preventDefault(),win.cordova.InAppBrowser.open(n,s))}else{Object.keys(e.modules).forEach(function(r){var i=e.modules[r].clicks;i&&(t.preventF7Router||Object.keys(i).forEach(function(r){var n=a.closest(r).eq(0);n.length>0&&i[r].call(e,n,n.dataset(),t)}))});var o={};if(i&&(t.preventDefault(),o=r.dataset()),!t.preventF7Router&&!r.hasClass("prevent-router")&&!r.hasClass("router-prevent")&&(n&&n.length>0&&"#"!==n[0]||r.hasClass("back"))){var l;if(o.view?l=$(o.view)[0].f7View:(l=a.parents(".view")[0]&&a.parents(".view")[0].f7View,!r.hasClass("back")&&l&&l.params.linksView&&("string"==typeof l.params.linksView?l=$(l.params.linksView)[0].f7View:l.params.linksView instanceof View&&(l=l.params.linksView))),l||e.views.main&&(l=e.views.main),!l||!l.router)return;if(o.context&&"string"==typeof o.context)try{o.context=JSON.parse(o.context)}catch(e){}r[0].f7RouteProps&&(o.props=r[0].f7RouteProps),r.hasClass("back")?l.router.back(n,o):l.router.navigate(n,o)}}})}View.use(RouterModule);var ClicksModule={name:"clicks",params:{clicks:{externalLinks:".external"}},on:{init:function(){initClicks(this)}}},RouterTemplateLoaderModule={name:"routerTemplateLoader",proto:{templateLoader:function(e,t,a,r,i){var n=this;function s(e){var t,s;try{if("function"==typeof(s=a.context||{}))s=s.call(n);else if("string"==typeof s)try{s=JSON.parse(s)}catch(e){throw i(),e}t="function"==typeof e?e(s):Template7.compile(e)(Utils.extend({},s||{},{$app:n.app,$root:Utils.extend({},n.app.data,n.app.methods),$route:a.route,$f7route:a.route,$router:n,$f7router:n,$theme:{ios:"ios"===n.app.theme,md:"md"===n.app.theme,aurora:"aurora"===n.app.theme}}))}catch(e){throw i(),e}r(t,{context:s})}t?(n.xhr&&(n.xhr.abort(),n.xhr=!1),n.xhrRequest(t,a).then(function(e){s(e)}).catch(function(){i()})):s(e)},modalTemplateLoader:function(e,t,a,r,i){return this.templateLoader(e,t,a,function(e){r(e)},i)},tabTemplateLoader:function(e,t,a,r,i){return this.templateLoader(e,t,a,function(e){r(e)},i)},pageTemplateLoader:function(e,t,a,r,i){var n=this;return n.templateLoader(e,t,a,function(e,t){void 0===t&&(t={}),r(n.getPageEl(e),t)},i)}}},RouterComponentLoaderModule={name:"routerComponentLoader",proto:{componentLoader:function(e,t,a,r,i){void 0===a&&(a={});var n,s=this,o=s.app,l="string"==typeof e?e:t,p=s.replaceRequestUrlParams(l,a);function c(e){var t=a.context||{};if("function"==typeof t)t=t.call(s);else if("string"==typeof t)try{t=JSON.parse(t)}catch(e){throw i(),e}var n=Utils.merge({},t,{$route:a.route,$f7route:a.route,$router:s,$f7router:s,$theme:{ios:"ios"===o.theme,md:"md"===o.theme,aurora:"aurora"===o.theme}});o.component.create(e,n).then(function(e){r(e.el)}).catch(function(e){throw i(),new Error(e)})}p&&s.cache.components.forEach(function(e){e.url===p&&(n=e.component)}),p&&n?c(n):p&&!n?(s.xhr&&(s.xhr.abort(),s.xhr=!1),s.xhrRequest(l,a).then(function(e){var t=o.component.parse(e);s.cache.components.push({url:p,component:t}),c(t)}).catch(function(e){throw i(),e})):c(e)},modalComponentLoader:function(e,t,a,r,i,n){this.componentLoader(t,a,r,function(e){i(e)},n)},tabComponentLoader:function(e,t,a,r,i,n){this.componentLoader(t,a,r,function(e){i(e)},n)},pageComponentLoader:function(e,t,a,r,i,n){this.componentLoader(t,a,r,function(e,t){void 0===t&&(t={}),i(e,t)},n)}}},HistoryModule={name:"history",static:{history:History},on:{init:function(){History.init(this)}}},keyPrefix="f7storage-",Storage={get:function(e){return new Promise(function(t,a){try{t(JSON.parse(win.localStorage.getItem(""+keyPrefix+e)))}catch(e){a(e)}})},set:function(e,t){return new Promise(function(a,r){try{win.localStorage.setItem(""+keyPrefix+e,JSON.stringify(t)),a()}catch(e){r(e)}})},remove:function(e){return new Promise(function(t,a){try{win.localStorage.removeItem(""+keyPrefix+e),t()}catch(e){a(e)}})},clear:function(){},length:function(){},keys:function(){return new Promise(function(e,t){try{e(Object.keys(win.localStorage).filter(function(e){return 0===e.indexOf(keyPrefix)}).map(function(e){return e.replace(keyPrefix,"")}))}catch(e){t(e)}})},forEach:function(e){return new Promise(function(t,a){try{Object.keys(win.localStorage).filter(function(e){return 0===e.indexOf(keyPrefix)}).forEach(function(t,a){var r=t.replace(keyPrefix,"");Storage.get(r).then(function(t){e(r,t,a)})}),t()}catch(e){a(e)}})}},StorageModule={name:"storage",static:{Storage:Storage,storage:Storage}};function vnode(e,t,a,r,i){return{sel:e,data:t,children:a,text:r,elm:i,key:void 0===t?void 0:t.key}}var array=Array.isArray;function primitive(e){return"string"==typeof e||"number"==typeof e}function addNS(e,t,a){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==a&&void 0!==t)for(var r=0;r=0)r.split(".").forEach(function(e,a){if(0!==a||"this"!==e){if(0===a&&"window"===e)return i=win,void(c=!1);if(i||(i=t),!i[e])throw new Error("Framework7: Component doesn't have method \""+r.split(".").slice(0,a+1).join(".")+'"');i=i[e]}});else{if(!t[r])throw new Error("Framework7: Component doesn't have method \""+r+'"');i=t[r]}return c&&(i=i.bind(t)),function(){for(var a=[],r=arguments.length;r--;)a[r]=arguments[r];var c=a[0];o&&l||(n&&c.stopPropagation(),s&&c.preventDefault(),l=!0,e.indexOf("(")<0?p=a:e.split("(")[1].split(")")[0].replace(/'[^']*'|"[^"]*"/g,function(e){return e.replace(/,/g,"<_comma_>")}).split(",").map(function(e){return e.replace(/<_comma_>/g,",")}).forEach(function(e){var a=e.trim();if(isNaN(a))if("true"===a)a=!0;else if("false"===a)a=!1;else if("null"===a)a=null;else if("undefined"===a)a=void 0;else if('"'===a[0])a=a.replace(/"/g,"");else if("'"===a[0])a=a.replace(/'/g,"");else if(a.indexOf(".")>0){var r;a.split(".").forEach(function(e){r||(r=t),r=r[e]}),a=r}else a=t[a];else a=parseFloat(a);p.push(a)}),i.apply(void 0,p))}}function getData(e,t,a,r,i){var n={context:t},s=e.attributes;Array.prototype.forEach.call(s,function(e){var a=e.name,r=e.value;if(propsAttrs.indexOf(a)>=0)n.props||(n.props={}),"readonly"===a&&(a="readOnly"),booleanProps.indexOf(a)>=0?n.props[a]=!1!==r:n.props[a]=r;else if("key"===a)n.key=r;else if(0===a.indexOf("@")){n.on||(n.on={});var s=a.substr(1),o=!1,l=!1,p=!1;s.indexOf(".")>=0&&s.split(".").forEach(function(e,t){0===t?s=e:("stop"===e&&(o=!0),"prevent"===e&&(l=!0),"once"===e&&(p=!0))}),n.on[s]=getEventHandler(r,t,{stop:o,prevent:l,once:p})}else if("style"===a)if(r.indexOf("{")>=0&&r.indexOf("}")>=0)try{n.style=JSON.parse(r)}catch(e){n.attrs||(n.attrs={}),n.attrs.style=r}else n.attrs||(n.attrs={}),n.attrs.style=r;else n.attrs||(n.attrs={}),n.attrs[a]=r,"id"!==a||n.key||i||(n.key=r)});var o=getHooks(n,a,r,i);return o.prepatch=function(e,t){e&&t&&e&&e.data&&e.data.props&&Object.keys(e.data.props).forEach(function(a){booleanProps.indexOf(a)<0||(t.data||(t.data={}),t.data.props||(t.data.props={}),!0!==e.data.props[a]||a in t.data.props||(t.data.props[a]=!1))})},o&&(n.hook=o),n}function getChildren(e,t,a,r){for(var i=[],n=e.childNodes,s=0;s=0?[]:getChildren(e,t,a,r))}function vdom(e,t,a){var r;void 0===e&&(e=""),tempDom.innerHTML=e.trim();for(var i=0;i0?l:o.length,u=c>0?c:o.length,h=-1!==l||-1!==c?o.slice(0,Math.min(d,u)):o,f=e.elm=isDef(r)&&isDef(a=r.ns)?n.createElementNS(a,h):n.createElement(h);for(d0&&f.setAttribute("class",o.slice(u+1).replace(/\./g," ")),a=0;af?c(e,null==a[g+1]?null:a[g+1].elm,a,d,g,r):u(e,t,l,f))}(o,l,d,a):isDef(d)?(isDef(e.text)&&n.setTextContent(o,""),c(o,null,d,0,d.length-1,a)):isDef(l)?u(o,l,0,l.length-1):isDef(e.text)&&n.setTextContent(o,""):e.text!==t.text&&n.setTextContent(o,t.text),isDef(s)&&isDef(r=s.postpatch)&&r(e,t)}}return function(e,t){var a,r,s,l=[];for(a=0;a0;)a[r]=arguments[r+1];handleEvent(t,a,e.vnode)}}function updateEvents(e,t){var a=e.data.on,r=e.listener,i=e.elm,n=t&&t.data.on,s=t&&t.elm;if(a!==n&&(a&&r&&(n?Object.keys(a).forEach(function(e){n[e]||$(i).off(e,r)}):Object.keys(a).forEach(function(e){$(i).off(e,r)})),n)){var o=e.listener||createListener();t.listener=o,o.vnode=t,a?Object.keys(n).forEach(function(e){a[e]||$(s).on(e,o)}):Object.keys(n).forEach(function(e){$(s).on(e,o)})}}var eventListenersModule={create:updateEvents,update:updateEvents,destroy:updateEvents},patch=init([attributesModule,propsModule,styleModule,eventListenersModule]),globalMixins={},Component=function(e,t,a,r){void 0===a&&(a={}),void 0===r&&(r=[]);var i=Utils.id(),n=Utils.merge(this,a,{$:$,$$:$,$dom7:$,$app:e,$f7:e,$options:Utils.extend({id:i},t),$id:t.id||i,$children:r}),s=n.$options;if(s.mixins&&s.mixins.length)for(var o=s.mixins.length-1;o>=0;o-=1){var l=s.mixins[o];"string"==typeof l&&(globalMixins[l]?s.mixins[o]=globalMixins[l]:s.mixins.splice(o,1))}if(Object.defineProperty(n,"$root",{enumerable:!0,configurable:!0,get:function(){var t=Utils.merge({},e.data,e.methods);return win&&win.Proxy&&(t=new win.Proxy(t,{set:function(t,a,r){e.data[a]=r},deleteProperty:function(t,a){delete e.data[a],delete e.methods[a]},has:function(t,a){return a in e.data||a in e.methods}})),t},set:function(){}}),s.render&&(s.render=s.render.bind(n)),s.methods){var p={};s.mixins&&s.mixins.length&&s.mixins.forEach(function(e){e.methods&&Object.assign(p,e.methods)}),s.methods&&Object.assign(p,s.methods),Object.keys(p).forEach(function(e){n[e]=p[e].bind(n)})}return s.on&&Object.keys(s.on).forEach(function(e){s.on[e]=s.on[e].bind(n)}),s.once&&Object.keys(s.once).forEach(function(e){s.once[e]=s.once[e].bind(n)}),new Promise(function(e,t){n.$hook("data",!0).then(function(t){var a={};t.forEach(function(e){Object.assign(a,e||{})}),Utils.extend(n,a),n.$hook("beforeCreate");var r=n.$render();if(n.$options.el)return r=r.trim(),n.$vnode=vdom(r,n,!0),s.style&&(n.$styleEl=doc.createElement("style"),n.$styleEl.innerHTML=s.style,s.styleScoped&&(n.$vnode.data.attrs["data-f7-"+s.id]="")),n.el=n.$options.el,patch(n.el,n.$vnode),n.el=n.$vnode.elm,n.$el=$(n.el),n.$attachEvents(),n.el.f7Component=n,n.$hook("created"),n.$mount(),void e(n);r&&"string"==typeof r?(r=r.trim(),n.$vnode=vdom(r,n,!0),s.style&&s.styleScoped&&(n.$vnode.data.attrs["data-f7-"+s.id]=""),n.el=doc.createElement(n.$vnode.sel||"div"),patch(n.el,n.$vnode),n.$el=$(n.el)):r&&(n.el=r,n.$el=$(n.el),s.style&&s.styleScoped&&n.el.setAttribute("data-f7-"+s.id,"")),s.style&&(n.$styleEl=doc.createElement("style"),n.$styleEl.innerHTML=s.style),n.$attachEvents(),n.el.f7Component=n,n.$hook("created"),e(n)}).catch(function(e){t(e)})})};function registerComponentMixin(e,t){globalMixins[e]=t}function parseComponent(e){var t,a=Utils.id(),r="f7_component_create_callback_"+a,i="f7_component_render_callback_"+a,n=e.match(//),s=n[2]||"t7";n&&(t=e.split(//).filter(function(e,t){return t>0}).join("").filter(function(e,t,a){return t").replace(/{{#raw}}([ \n]*)