-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path5798-es5.70fb278cd819e419ccf2.js
1 lines (1 loc) · 24 KB
/
5798-es5.70fb278cd819e419ccf2.js
1
!function(){function e(e,n){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */n=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),s=new P(r||[]);return o(a,"_invoke",{value:T(e,n,s)}),a}function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var f="suspendedStart",d="executing",p="completed",y={};function m(){}function g(){}function w(){}var b={};l(b,s,function(){return this});var k=Object.getPrototypeOf,x=k&&k(k(A([])));x&&x!==r&&i.call(x,s)&&(b=x);var S=w.prototype=m.prototype=Object.create(b);function E(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function C(e,t){function n(r,o,a,s){var u=v(e[r],e,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&i.call(l,"__await")?t.resolve(l.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):t.resolve(l).then(function(e){c.value=e,a(c)},function(e){return n("throw",e,a,s)})}s(u.arg)}var r;o(this,"_invoke",{value:function(e,i){function o(){return new t(function(t,r){n(e,i,t,r)})}return r=r?r.then(o,o):o()}})}function T(t,n,r){var i=f;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=L(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var c=v(t,n,r);if("normal"===c.type){if(i=r.done?p:"suspendedYield",c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=p,r.method="throw",r.arg=c.arg)}}}function L(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=v(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function V(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(V,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,l(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},E(C.prototype),l(C.prototype,u,function(){return this}),t.AsyncIterator=C,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new C(h(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},E(S),l(S,c,"Generator"),l(S,s,function(){return this}),l(S,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(j),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;j(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function r(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)})}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(self.webpackChunkv2x_frontend=self.webpackChunkv2x_frontend||[]).push([[5798],{5798:function(t,r,a){"use strict";a.r(r),a.d(r,{ion_nav:function(){return m},ion_nav_link:function(){return g}});var u=a(1429),c=a(8931),l=a(7572),h=a(1444),v=a(3645),f=a(3409),d=function(){function e(t,n){o(this,e),this.component=t,this.params=n,this.state=1}var t;return s(e,[{key:"init",value:(t=i(n().mark(function e(t){var r;return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.state=2,this.element){e.next=5;break}return r=this.component,e.next=4,(0,f.a)(this.delegate,t,r,["ion-page","ion-page-invisible"],this.params);case 4:this.element=e.sent;case 5:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"_destroy",value:function(){(0,h.n)(3!==this.state,"view state must be ATTACHED");var e=this.element;e&&(this.delegate?this.delegate.removeViewFromDom(e.parentElement,e):e.remove()),this.nav=void 0,this.state=3}}]),e}(),p=function(e,t,n){return!!e&&e.component===t&&(0,h.s)(e.params,n)},y=function(e,t){return e?e instanceof d?e:new d(e,t):null},m=function(){function t(e){o(this,t),(0,u.r)(this,e),this.ionNavWillLoad=(0,u.e)(this,"ionNavWillLoad",7),this.ionNavWillChange=(0,u.e)(this,"ionNavWillChange",3),this.ionNavDidChange=(0,u.e)(this,"ionNavDidChange",3),this.transInstr=[],this.animationEnabled=!0,this.useRouter=!1,this.isTransitioning=!1,this.destroyed=!1,this.views=[],this.animated=!0}var r,f,m,g,w,b,k,x,S;return s(t,[{key:"swipeGestureChanged",value:function(){this.gesture&&this.gesture.enable(!0===this.swipeGesture)}},{key:"rootChanged",value:function(){void 0!==this.root&&(this.useRouter||this.setRoot(this.root,this.rootParams))}},{key:"componentWillLoad",value:function(){if(this.useRouter=null!==document.querySelector("ion-router")&&null===this.el.closest("[no-router]"),void 0===this.swipeGesture){var e=(0,c.b)(this);this.swipeGesture=c.c.getBoolean("swipeBackEnabled","ios"===e)}this.ionNavWillLoad.emit()}},{key:"componentDidLoad",value:(S=i(n().mark(function e(){return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.rootChanged(),e.next=3,a.e(8592).then(a.bind(a,2108));case 3:this.gesture=e.sent.createSwipeBackGesture(this.el,this.canStart.bind(this),this.onStart.bind(this),this.onMove.bind(this),this.onEnd.bind(this)),this.swipeGestureChanged();case 5:case"end":return e.stop()}},e,this)})),function(){return S.apply(this,arguments)})},{key:"connectedCallback",value:function(){this.destroyed=!1}},{key:"disconnectedCallback",value:function(){var t,n=e(this.views);try{for(n.s();!(t=n.n()).done;){var r=t.value;(0,v.l)(r.element,v.d),r._destroy()}}catch(i){n.e(i)}finally{n.f()}this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.transInstr.length=0,this.views.length=0,this.destroyed=!0}},{key:"push",value:function(e,t,n,r){return this.insert(-1,e,t,n,r)}},{key:"insert",value:function(e,t,n,r,i){return this.insertPages(e,[{component:t,componentProps:n}],r,i)}},{key:"insertPages",value:function(e,t,n,r){return this.queueTrns({insertStart:e,insertViews:t,opts:n},r)}},{key:"pop",value:function(e,t){return this.removeIndex(-1,1,e,t)}},{key:"popTo",value:function(e,t,n){var r={removeStart:-1,removeCount:-1,opts:t};return"object"==typeof e&&e.component?(r.removeView=e,r.removeStart=1):"number"==typeof e&&(r.removeStart=e+1),this.queueTrns(r,n)}},{key:"popToRoot",value:function(e,t){return this.removeIndex(1,-1,e,t)}},{key:"removeIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return this.queueTrns({removeStart:e,removeCount:t,opts:n},r)}},{key:"setRoot",value:function(e,t,n,r){return this.setPages([{component:e,componentProps:t}],n,r)}},{key:"setPages",value:function(e,t,n){return null!=t||(t={}),!0!==t.animated&&(t.animated=!1),this.queueTrns({insertStart:0,insertViews:e,removeStart:0,removeCount:-1,opts:t},n)}},{key:"setRouteId",value:function(e,t,r,o){var a,s=this.getActiveSync();if(p(s,e,t))return Promise.resolve({changed:!1,element:s.element});var u,c=new Promise(function(e){return a=e}),l={updateURL:!1,viewIsReady:function(e){var t,r,o=new Promise(function(e){return t=e});return a({changed:!0,element:e,markVisible:(r=i(n().mark(function e(){return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t(),e.next=3,u;case 3:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)})}),o}};if("root"===r)u=this.setRoot(e,t,l);else{var h=this.views.find(function(n){return p(n,e,t)});h?u=this.popTo(h,Object.assign(Object.assign({},l),{direction:"back",animationBuilder:o})):"forward"===r?u=this.push(e,t,Object.assign(Object.assign({},l),{animationBuilder:o})):"back"===r&&(u=this.setRoot(e,t,Object.assign(Object.assign({},l),{direction:"back",animated:!0,animationBuilder:o})))}return c}},{key:"getRouteId",value:(x=i(n().mark(function e(){var t;return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.getActiveSync())){e.next=3;break}return e.abrupt("return",{id:t.element.tagName,params:t.params,element:t.element});case 3:case"end":return e.stop()}},e,this)})),function(){return x.apply(this,arguments)})},{key:"getActive",value:(k=i(n().mark(function e(){return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getActiveSync());case 1:case"end":return e.stop()}},e,this)})),function(){return k.apply(this,arguments)})},{key:"getByIndex",value:(b=i(n().mark(function e(t){return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.views[t]);case 1:case"end":return e.stop()}},e,this)})),function(e){return b.apply(this,arguments)})},{key:"canGoBack",value:(w=i(n().mark(function e(t){return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.canGoBackSync(t));case 1:case"end":return e.stop()}},e,this)})),function(e){return w.apply(this,arguments)})},{key:"getPrevious",value:(g=i(n().mark(function e(t){return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getPreviousSync(t));case 1:case"end":return e.stop()}},e,this)})),function(e){return g.apply(this,arguments)})},{key:"getLength",value:function(){return this.views.length}},{key:"getActiveSync",value:function(){return this.views[this.views.length-1]}},{key:"canGoBackSync",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getActiveSync();return!(!e||!this.getPreviousSync(e))}},{key:"getPreviousSync",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getActiveSync();if(e){var t=this.views,n=t.indexOf(e);return n>0?t[n-1]:void 0}}},{key:"queueTrns",value:(m=i(n().mark(function e(t,r){var i,o,a,s,u;return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isTransitioning||!(null===(i=t.opts)||void 0===i?void 0:i.skipIfBusy)){e.next=2;break}return e.abrupt("return",!1);case 2:if(a=new Promise(function(e,n){t.resolve=e,t.reject=n}),t.done=r,!t.opts||!1===t.opts.updateURL||!this.useRouter){e.next=13;break}if(!(s=document.querySelector("ion-router"))){e.next=13;break}return e.next=8,s.canTransition();case 8:if(!1!==(u=e.sent)){e.next=11;break}return e.abrupt("return",!1);case 11:if("string"!=typeof u){e.next=13;break}return e.abrupt("return",(s.push(u,t.opts.direction||"back"),!1));case 13:return e.abrupt("return",(0===(null===(o=t.insertViews)||void 0===o?void 0:o.length)&&(t.insertViews=void 0),this.transInstr.push(t),this.nextTrns(),a));case 14:case"end":return e.stop()}},e,this)})),function(e,t){return m.apply(this,arguments)})},{key:"success",value:function(e,t){if(this.destroyed)this.fireError("nav controller was destroyed",t);else if(t.done&&t.done(e.hasCompleted,e.requiresTransition,e.enteringView,e.leavingView,e.direction),t.resolve(e.hasCompleted),!1!==t.opts.updateURL&&this.useRouter){var n=document.querySelector("ion-router");n&&n.navChanged("back"===e.direction?"back":"forward")}}},{key:"failed",value:function(e,t){this.destroyed?this.fireError("nav controller was destroyed",t):(this.transInstr.length=0,this.fireError(e,t))}},{key:"fireError",value:function(e,t){t.done&&t.done(!1,!1,e),t.reject&&!this.destroyed?t.reject(e):t.resolve(!1)}},{key:"nextTrns",value:function(){if(this.isTransitioning)return!1;var e=this.transInstr.shift();return!!e&&(this.runTransition(e),!0)}},{key:"runTransition",value:(f=i(n().mark(function e(t){var r,i,o,a;return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.ionNavWillChange.emit(),this.isTransitioning=!0,this.prepareTI(t),r=this.getActiveSync(),i=this.getEnteringView(t,r),r||i){e.next=5;break}throw new Error("no views in the stack to be removed");case 5:if(e.t0=i&&1===i.state,!e.t0){e.next=9;break}return e.next=9,i.init(this.el);case 9:if(this.postViewInit(i,r,t),(o=(t.enteringRequiresTransition||t.leavingRequiresTransition)&&i!==r)&&t.opts&&r&&("back"===t.opts.direction&&(t.opts.animationBuilder=t.opts.animationBuilder||(null==i?void 0:i.animationBuilder)),r.animationBuilder=t.opts.animationBuilder),!o){e.next=18;break}return e.next=15,this.transition(i,r,t);case 15:e.t1=e.sent,e.next=19;break;case 18:e.t1={hasCompleted:!0,requiresTransition:!1};case 19:a=e.t1,this.success(a,t),this.ionNavDidChange.emit(),e.next=27;break;case 24:e.prev=24,e.t2=e.catch(0),this.failed(e.t2,t);case 27:this.isTransitioning=!1,this.nextTrns();case 28:case"end":return e.stop()}},e,this,[[0,24]])})),function(e){return f.apply(this,arguments)})},{key:"prepareTI",value:function(t){var n,r,i,o=this.views.length;if(null!==(n=t.opts)&&void 0!==n||(t.opts={}),null!==(r=(i=t.opts).delegate)&&void 0!==r||(i.delegate=this.delegate),void 0!==t.removeView){(0,h.n)(void 0!==t.removeStart,"removeView needs removeStart"),(0,h.n)(void 0!==t.removeCount,"removeView needs removeCount");var a=this.views.indexOf(t.removeView);if(a<0)throw new Error("removeView was not found");t.removeStart+=a}void 0!==t.removeStart&&(t.removeStart<0&&(t.removeStart=o-1),t.removeCount<0&&(t.removeCount=o-t.removeStart),t.leavingRequiresTransition=t.removeCount>0&&t.removeStart+t.removeCount===o),t.insertViews&&((t.insertStart<0||t.insertStart>o)&&(t.insertStart=o),t.enteringRequiresTransition=t.insertStart===o);var s=t.insertViews;if(s){(0,h.n)(s.length>0,"length can not be zero");var u=s.map(function(e){return e instanceof d?e:"component"in e?y(e.component,null===e.componentProps?void 0:e.componentProps):y(e,void 0)}).filter(function(e){return null!==e});if(0===u.length)throw new Error("invalid views to insert");var c,l=e(u);try{for(l.s();!(c=l.n()).done;){var v=c.value;v.delegate=t.opts.delegate;var f=v.nav;if(f&&f!==this)throw new Error("inserted view was already inserted");if(3===v.state)throw new Error("inserted view was already destroyed")}}catch(p){l.e(p)}finally{l.f()}t.insertViews=u}}},{key:"getEnteringView",value:function(e,t){var n=e.insertViews;if(void 0!==n)return n[n.length-1];var r=e.removeStart;if(void 0!==r)for(var i=this.views,o=r+e.removeCount,a=i.length-1;a>=0;a--){var s=i[a];if((a<r||a>=o)&&s!==t)return s}}},{key:"postViewInit",value:function(t,n,r){var i,o,a;(0,h.n)(n||t,"Both leavingView and enteringView are null"),(0,h.n)(r.resolve,"resolve must be valid"),(0,h.n)(r.reject,"reject must be valid");var s,u=r.opts,c=r.insertViews,l=r.removeStart,f=r.removeCount;if(void 0!==l&&void 0!==f){(0,h.n)(l>=0,"removeStart can not be negative"),(0,h.n)(f>=0,"removeCount can not be negative"),s=[];for(var d=l;d<l+f;d++){var p=this.views[d];void 0!==p&&p!==t&&p!==n&&s.push(p)}null!==(i=u.direction)&&void 0!==i||(u.direction="back")}var y=this.views.length+(null!==(o=null==c?void 0:c.length)&&void 0!==o?o:0)-(null!=f?f:0);if((0,h.n)(y>=0,"final balance can not be negative"),0===y)throw console.warn("You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.",this,this.el),new Error("navigation stack needs at least one root page");if(c){var m,g=r.insertStart,w=e(c);try{for(w.s();!(m=w.n()).done;){var b=m.value;this.insertViewAt(b,g),g++}}catch(L){w.e(L)}finally{w.f()}r.enteringRequiresTransition&&(null!==(a=u.direction)&&void 0!==a||(u.direction="forward"))}if(s&&s.length>0){var k,x=e(s);try{for(x.s();!(k=x.n()).done;){var S=k.value;(0,v.l)(S.element,v.b),(0,v.l)(S.element,v.c),(0,v.l)(S.element,v.d)}}catch(L){x.e(L)}finally{x.f()}var E,C=e(s);try{for(C.s();!(E=C.n()).done;){var T=E.value;this.destroyView(T)}}catch(L){C.e(L)}finally{C.f()}}}},{key:"transition",value:(r=i(n().mark(function e(t,r,i){var o,a,s,u,l,h,f,d,p=this;return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=i.opts,a=o.progressAnimation?function(e){return p.sbAni=e}:void 0,s=(0,c.b)(this),u=t.element,l=r&&r.element,h=Object.assign(Object.assign({mode:s,showGoBack:this.canGoBackSync(t),baseEl:this.el,progressCallback:a,animated:this.animated&&c.c.getBoolean("animated",!0),enteringEl:u,leavingEl:l},o),{animationBuilder:o.animationBuilder||this.animation||c.c.get("navAnimation")}),e.next=8,(0,v.t)(h);case 8:return f=e.sent,d=f.hasCompleted,e.abrupt("return",this.transitionFinish(d,t,r,o));case 11:case"end":return e.stop()}},e,this)})),function(e,t,n){return r.apply(this,arguments)})},{key:"transitionFinish",value:function(e,t,n,r){var i=e?t:n;return i&&this.unmountInactiveViews(i),{hasCompleted:e,requiresTransition:!0,enteringView:t,leavingView:n,direction:r.direction}}},{key:"insertViewAt",value:function(e,t){var n=this.views,r=n.indexOf(e);r>-1?((0,h.n)(e.nav===this,"view is not part of the nav"),n.splice(r,1),n.splice(t,0,e)):((0,h.n)(!e.nav,"nav is used"),e.nav=this,n.splice(t,0,e))}},{key:"removeView",value:function(e){(0,h.n)(2===e.state||3===e.state,"view state should be loaded or destroyed");var t=this.views,n=t.indexOf(e);(0,h.n)(n>-1,"view must be part of the stack"),n>=0&&t.splice(n,1)}},{key:"destroyView",value:function(e){e._destroy(),this.removeView(e)}},{key:"unmountInactiveViews",value:function(e){if(!this.destroyed)for(var t=this.views,n=t.indexOf(e),r=t.length-1;r>=0;r--){var i=t[r],o=i.element;o&&(r>n?((0,v.l)(o,v.d),this.destroyView(i)):r<n&&(0,v.s)(o,!0))}}},{key:"canStart",value:function(){return!!this.swipeGesture&&!this.isTransitioning&&0===this.transInstr.length&&this.animationEnabled&&this.canGoBackSync()}},{key:"onStart",value:function(){this.pop({direction:"back",progressAnimation:!0})}},{key:"onMove",value:function(e){this.sbAni&&this.sbAni.progressStep(e)}},{key:"onEnd",value:function(e,t,n){var r=this;if(this.sbAni){this.animationEnabled=!1,this.sbAni.onFinish(function(){r.animationEnabled=!0},{oneTimeCallback:!0});var i=e?-.001:.001;e?i+=(0,l.g)([0,0],[.32,.72],[0,1],[1,1],t)[0]:(this.sbAni.easing("cubic-bezier(1, 0, 0.68, 0.28)"),i+=(0,l.g)([0,0],[1,0],[.68,.28],[1,1],t)[0]),this.sbAni.progressEnd(e?1:0,i,n)}}},{key:"render",value:function(){return(0,u.h)("slot",null)}},{key:"el",get:function(){return(0,u.i)(this)}}],[{key:"watchers",get:function(){return{swipeGesture:["swipeGestureChanged"],root:["rootChanged"]}}}]),t}();m.style=":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;overflow:hidden;z-index:0}";var g=function(){function e(t){var n=this;o(this,e),(0,u.r)(this,t),this.routerDirection="forward",this.onClick=function(){return function(e,t,r,i,o){var a=n.el.closest("ion-nav");if(a)if("forward"===t){if(void 0!==r)return a.push(r,i,{skipIfBusy:!0,animationBuilder:o})}else if("root"===t){if(void 0!==r)return a.setRoot(r,i,{skipIfBusy:!0,animationBuilder:o})}else if("back"===t)return a.pop({skipIfBusy:!0,animationBuilder:o});return Promise.resolve(!1)}(0,n.routerDirection,n.component,n.componentProps,n.routerAnimation)}}return s(e,[{key:"render",value:function(){return(0,u.h)(u.H,{onClick:this.onClick})}},{key:"el",get:function(){return(0,u.i)(this)}}]),e}()}}])}();