p-fe063952.system.entry.js 7.5 KB

1234
  1. var __awaiter=this&&this.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function a(t){try{o(i.next(t))}catch(t){s(t)}}function u(t){try{o(i["throw"](t))}catch(t){s(t)}}function o(t){t.done?n(t.value):r(t.value).then(a,u)}o((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,r,s,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(t){return function(e){return o([t,e])}}function o(u){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(n=0)),n)try{if(i=1,r&&(s=u[0]&2?r["return"]:u[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,u[1])).done)return s;if(r=0,s)u=[u[0]&2,s.value];switch(u[0]){case 0:case 1:s=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;r=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){n.label=u[1];break}if(u[0]===6&&n.label<s[1]){n.label=s[1];s=u;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(u);break}if(s[2])n.ops.pop();n.trys.pop();continue}u=e.call(t,n)}catch(t){u=[6,t];r=0}finally{i=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
  2. /*!
  3. * (C) Ionic http://ionicframework.com - MIT License
  4. */System.register(["./p-f11a9436.system.js","./p-fa3f4b96.system.js","./p-00023f5a.system.js","./p-d382f09c.system.js"],(function(t){"use strict";var e,n,i,r,s,a,u;return{setters:[function(t){e=t.r;n=t.h;i=t.e;r=t.f;s=t.c},function(t){a=t.a},function(t){u=t.d},function(){}],execute:function(){var o=":host(.tab-hidden){display:none !important}";var f=o;var c=t("ion_tab",function(){function t(t){e(this,t);this.loaded=false;this.active=false;this.delegate=undefined;this.tab=undefined;this.component=undefined}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.active)return[3,2];return[4,this.setActive()];case 1:t.sent();t.label=2;case 2:return[2]}}))}))};t.prototype.setActive=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.prepareLazyLoaded()];case 1:t.sent();this.active=true;return[2]}}))}))};t.prototype.changeActive=function(t){if(t){this.prepareLazyLoaded()}};t.prototype.prepareLazyLoaded=function(){if(!this.loaded&&this.component!=null){this.loaded=true;try{return a(this.delegate,this.el,this.component,["ion-page"])}catch(t){u("[ion-tab] - Exception in prepareLazyLoaded:",t)}}return Promise.resolve(undefined)};t.prototype.render=function(){var t=this,e=t.tab,r=t.active,s=t.component;return n(i,{key:"c36c113e74e12b58459df9e3b546ad4856187e90",role:"tabpanel","aria-hidden":!r?"true":null,"aria-labelledby":"tab-button-".concat(e),class:{"ion-page":s===undefined,"tab-hidden":!r}},n("slot",{key:"0d7821dac70ba7a12edfb3331988f3df1566cc1a"}))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{active:["changeActive"]}},enumerable:false,configurable:true});return t}());c.style=f;var h=":host{left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%;contain:layout size style;z-index:0}.tabs-inner{position:relative;-ms-flex:1;flex:1;contain:layout size style}";var d=h;var l=t("ion_tabs",function(){function t(t){var n=this;e(this,t);this.ionNavWillLoad=s(this,"ionNavWillLoad",7);this.ionTabsWillChange=s(this,"ionTabsWillChange",3);this.ionTabsDidChange=s(this,"ionTabsDidChange",3);this.transitioning=false;this.onTabClicked=function(t){var e=t.detail,i=e.href,r=e.tab;if(n.useRouter&&i!==undefined){var s=document.querySelector("ion-router");if(s){s.push(i)}}else{n.select(r)}};this.selectedTab=undefined;this.useRouter=false}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:if(!this.useRouter){this.useRouter=(!!this.el.querySelector("ion-router-outlet")||!!document.querySelector("ion-router"))&&!this.el.closest("[no-router]")}if(!!this.useRouter)return[3,2];t=this.tabs;if(!(t.length>0))return[3,2];return[4,this.select(t[0])];case 1:e.sent();e.label=2;case 2:this.ionNavWillLoad.emit();return[2]}}))}))};t.prototype.componentWillRender=function(){var t=this.el.querySelector("ion-tab-bar");if(t){var e=this.selectedTab?this.selectedTab.tab:undefined;t.selectedTab=e}};t.prototype.select=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:e=b(this.tabs,t);if(!this.shouldSwitch(e)){return[2,false]}return[4,this.setActive(e)];case 1:n.sent();return[4,this.notifyRouter()];case 2:n.sent();this.tabSwitch();return[2,true]}}))}))};t.prototype.getTab=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,b(this.tabs,t)]}))}))};t.prototype.getSelected=function(){return Promise.resolve(this.selectedTab?this.selectedTab.tab:undefined)};t.prototype.setRouteId=function(t){return __awaiter(this,void 0,void 0,(function(){var e;var n=this;return __generator(this,(function(i){switch(i.label){case 0:e=b(this.tabs,t);if(!this.shouldSwitch(e)){return[2,{changed:false,element:this.selectedTab}]}return[4,this.setActive(e)];case 1:i.sent();return[2,{changed:true,element:this.selectedTab,markVisible:function(){return n.tabSwitch()}}]}}))}))};t.prototype.getRouteId=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(n){e=(t=this.selectedTab)===null||t===void 0?void 0:t.tab;return[2,e!==undefined?{id:e,element:this.selectedTab}:undefined]}))}))};t.prototype.setActive=function(t){if(this.transitioning){return Promise.reject("transitioning already happening")}this.transitioning=true;this.leavingTab=this.selectedTab;this.selectedTab=t;this.ionTabsWillChange.emit({tab:t.tab});t.active=true;return Promise.resolve()};t.prototype.tabSwitch=function(){var t=this.selectedTab;var e=this.leavingTab;this.leavingTab=undefined;this.transitioning=false;if(!t){return}if(e!==t){if(e){e.active=false}this.ionTabsDidChange.emit({tab:t.tab})}};t.prototype.notifyRouter=function(){if(this.useRouter){var t=document.querySelector("ion-router");if(t){return t.navChanged("forward")}}return Promise.resolve(false)};t.prototype.shouldSwitch=function(t){var e=this.selectedTab;return t!==undefined&&t!==e&&!this.transitioning};Object.defineProperty(t.prototype,"tabs",{get:function(){return Array.from(this.el.querySelectorAll("ion-tab"))},enumerable:false,configurable:true});t.prototype.render=function(){return n(i,{key:"20b97196d78c1b3f3faf31618a8a2347e087f06b",onIonTabButtonClick:this.onTabClicked},n("slot",{key:"b0823fbae6e47743cfd12c376b365ad7e32cec7c",name:"top"}),n("div",{key:"eaffd7e4d69ab9489a387e3bbb36e3bab72203a0",class:"tabs-inner"},n("slot",{key:"20bb66a2937e3ec473aa59c4075ce581b5411677"})),n("slot",{key:"1529dd361f050f52074f51c73b3982ba827dc3a5",name:"bottom"}))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());var b=function(t,e){var n=typeof e==="string"?t.find((function(t){return t.tab===e})):e;if(!n){u('[ion-tabs] - Tab with id: "'.concat(n,'" does not exist'))}return n};l.style=d}}}));