@simonbackx/vue-app-navigation 1.22.1 → 1.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
module.exports=(()=>{"use strict";var t={929:(t,e,o)=>{o.r(e),o.d(e,{ComponentWithProperties:()=>ComponentWithProperties,ComponentWithPropertiesInstance:()=>l,FramedComponent:()=>y,HistoryManager:()=>n,ModalStackComponent:()=>B,NavigationController:()=>A,NavigationMixin:()=>Z,Popup:()=>I,Sheet:()=>F,SideView:()=>R,SplitViewController:()=>Q,StackComponent:()=>T});const n=new class HistoryManagerStatic{constructor(){this.states=[],this.counter=0,this.active=!1,this.animateHistoryPop=!0,this.isAdjustingState=!1,this.manualStateAction=!1,this.delayedUrlSetting=null}setUrl(t){if(this.active){if(this.manualStateAction)return ComponentWithProperties.debug&&console.log("Setting url, delayed: "+t+", current counter: "+this.counter),void(this.delayedUrlSetting={url:t,counter:this.counter});ComponentWithProperties.debug&&console.log("Set url: "+t+", current counter: "+this.counter),history.replaceState({counter:this.counter},"",t),this.states[this.states.length-1].url=t}}pushState(t,e,o){this.active&&(this.counter++,this.states.push({url:t,index:this.counter,adjustHistory:o,undoAction:e}),o?history.pushState({counter:this.counter},"",t):history.replaceState({counter:this.counter},"",t),ComponentWithProperties.debug&&console.log("Push new state ",this.states[this.states.length-1]))}returnToHistoryIndex(t){if(ComponentWithProperties.debug&&console.log("Did return to history index "+t+", coming from "+this.counter),t<this.counter){this.counter=t;const e=this.states.splice(this.counter+1).filter((t=>t.adjustHistory)).length;e>0&&!this.isAdjustingState&&(this.manualStateAction=!0,ComponentWithProperties.debug&&console.log("Adjusting browser history state: popping "+e+" items"),history.go(-e)),!this.states[this.counter].adjustHistory&&this.states[this.counter].url&&(ComponentWithProperties.debug&&console.log("Setting manual url without history api: "+this.states[this.counter].url),this.setUrl(this.states[this.counter].url))}return this.counter}activate(){window.addEventListener("popstate",(t=>{var e;if(ComponentWithProperties.debug&&console.log("HistoryManager popstate"),this.isAdjustingState)return void console.warn("Duplicate popstate");if(this.manualStateAction)return this.manualStateAction=!1,this.delayedUrlSetting&&this.counter===this.delayedUrlSetting.counter&&this.setUrl(this.delayedUrlSetting.url),void(this.delayedUrlSetting=null);this.isAdjustingState=!0;const o=null===(e=t.state)||void 0===e?void 0:e.counter;if(void 0!==o)if(o>this.counter){const t=o-this.counter;history.go(-t),ComponentWithProperties.debug&&console.log("Not allowed to go forward, going back "+t+" steps")}else{const t=this.counter-o==1&&this.animateHistoryPop;this.counter=o;const e=this.states.splice(this.counter+1);for(const o of e.reverse())o.undoAction&&(ComponentWithProperties.debug&&console.log("Executing undoAction..."),o.undoAction(t))}this.isAdjustingState=!1})),this.active=!0,history.replaceState({counter:this.counter},""),this.states.push({index:this.counter,adjustHistory:!1,url:"/"})}};class ComponentWithProperties{constructor(t,e={}){this.key=null,this.type=null,this.hide=!1,this.vnode=null,this.keepAlive=!1,this.isKeptAlive=!1,this.isMounted=!1,this.modalDisplayStyle="cover",this.animated=!0,this.historyIndex=null,this.isContainerView=!1,this.component=t,this.properties=e,this.key=ComponentWithProperties.keyCounter++}beforeMount(){ComponentWithProperties.debug&&console.log("Before mount: "+this.component.name),this.vnode&&this.isKeptAlive&&(this.isKeptAlive=!1,ComponentWithProperties.keepAliveCounter--,ComponentWithProperties.debug&&console.log("Total components kept alive: "+ComponentWithProperties.keepAliveCounter)),this.isContainerView?null===this.historyIndex&&(this.historyIndex=n.counter):"overlay"!=this.modalDisplayStyle&&this.assignHistoryIndex()}getHistoryIndex(){if(this.component)return this.historyIndex}mounted(){ComponentWithProperties.debug&&console.log("Component mounted: "+this.component.name),this.isMounted=!0,ComponentWithProperties.ignoreActivate=this}onMountedChildComponent(t){this.isContainerView=!0,ComponentWithProperties.debug&&console.log("Container mounted child component: "+this.component.name+" got "+t.component.name)}onActivatedChildComponent(t){this.isContainerView=!0,ComponentWithProperties.debug&&console.log("Container got activated child component: "+this.component.name+" got "+t.component.name)}assignHistoryIndex(){null==this.historyIndex?(ComponentWithProperties.debug&&console.log("Assigned history index: "+this.component.name+" = "+n.counter),this.historyIndex=n.counter):this.historyIndex=n.returnToHistoryIndex(this.historyIndex)}activated(){if(ComponentWithProperties.debug&&console.log("Component activated: "+this.component.name),ComponentWithProperties.ignoreActivate===this)return ComponentWithProperties.debug&&console.log("Ignore component activation: "+this.component.name),void(ComponentWithProperties.ignoreActivate=null);ComponentWithProperties.ignoreActivate=null,this.isContainerView||"overlay"!=this.modalDisplayStyle&&null!==this.historyIndex&&(this.historyIndex=n.returnToHistoryIndex(this.historyIndex))}componentInstance(){var t;return null===(t=this.vnode)||void 0===t?void 0:t.componentInstance}async shouldNavigateAway(){const t=this.componentInstance();if(t&&t.shouldNavigateAway){const e=t.shouldNavigateAway();if("boolean"==typeof e){if(!e)return!1}else if(e.then&&e.catch){if(!(await e))return!1}}return!0}destroy(){var t;if(this.isMounted=!1,this.vnode){if(this.keepAlive)return this.keepAlive=!1,void(this.isKeptAlive||(this.isKeptAlive=!0,ComponentWithProperties.keepAliveCounter++,ComponentWithProperties.debug&&console.log("Kept component alive "+this.component.name),ComponentWithProperties.debug&&console.log("Total components kept alive: "+ComponentWithProperties.keepAliveCounter)));this.isKeptAlive&&(this.isKeptAlive=!1,ComponentWithProperties.keepAliveCounter--,ComponentWithProperties.debug&&console.log("Freed component from alive stack "+this.component.name),ComponentWithProperties.debug&&console.log("Total components kept alive: "+ComponentWithProperties.keepAliveCounter)),ComponentWithProperties.debug&&console.log("Destroyed component "+this.component.name),null===(t=this.vnode.componentInstance)||void 0===t||t.$destroy(),this.vnode=null}}setDisplayStyle(t){return this.modalDisplayStyle=t,this}setAnimated(t){return this.animated=t,this}}ComponentWithProperties.keepAliveCounter=0,ComponentWithProperties.keyCounter=0,ComponentWithProperties.debug=!1,ComponentWithProperties.ignoreActivate=null;const i=require("vue");var s=o.n(i);const r=s().extend({props:{component:ComponentWithProperties},watch:{component(t){throw new Error("Changing component during life is not yet supported")}},created(){this.destroy=!0},beforeMount(){this.component.beforeMount()},activated(){this.component.activated();let t=this.$parent;for(;t;)t instanceof r&&t.component.onActivatedChildComponent(this.component),t=t.$parent},mounted(){this.component.mounted();let t=this.$parent;for(;t;)t instanceof r&&t.component.onMountedChildComponent(this.component),t=t.$parent},destroyed(){this.component.destroy()},render(t){return this.component.vnode?(this.component.vnode.componentInstance.$parent=this,this.$children=[this.component.vnode.componentInstance],this.component.vnode):(this.component.vnode=t(this.component.component,{props:this.component.properties,key:this.component.key}),this.component.vnode.data.keepAlive=!0,this.component.vnode)}}),l=r;var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("div",{ref:"scrollContainer"},[o("ComponentWithPropertiesInstance",{attrs:{component:t.root}})],1)])};a._withStripped=!0;function p(t,e,o,n){var i,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(r=(s<3?i(r):s>3?i(e,o,r):i(e,o))||r);return s>3&&r&&Object.defineProperty(e,o,r),r}const h=require("vue-class-component");var c=o.n(h);var d="undefined"!=typeof Reflect&&void 0!==Reflect.getMetadata;function u(t){return void 0===t&&(t={}),function(e,o){!function(t,e,o){if(d&&!Array.isArray(t)&&"function"!=typeof t&&!t.hasOwnProperty("type")&&void 0===t.type){var n=Reflect.getMetadata("design:type",e,o);n!==Object&&(t.type=n)}}(t,e,o),(0,h.createDecorator)((function(e,o){(e.props||(e.props={}))[o]=t}))(e,o)}}function m(t){return(0,h.createDecorator)((function(e,o){e.computed=e.computed||{},e.computed[o]={cache:!1,get:function(){return this.$refs[t||o]}}}))}let v=class FramedComponent extends(s()){pop(t){this.$emit("pop",t)}push(t){this.$emit("push",t)}};p([u()],v.prototype,"root",void 0),p([m()],v.prototype,"scrollContainer",void 0),v=p([c()({components:{ComponentWithPropertiesInstance:l}})],v);function f(t,e,o,n,i,s,r,l){var a,p="function"==typeof t?t.options:t;if(e&&(p.render=e,p.staticRenderFns=o,p._compiled=!0),n&&(p.functional=!0),s&&(p._scopeId="data-v-"+s),r?(a=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},p._ssrRegister=a):i&&(a=l?function(){i.call(this,(p.functional?this.parent:this).$root.$options.shadowRoot)}:i),a)if(p.functional){p._injectStyles=a;var h=p.render;p.render=function(t,e){return a.call(e),h(t,e)}}else{var c=p.beforeCreate;p.beforeCreate=c?[].concat(c,a):[a]}return{exports:t,options:p}}var g=f(v,a,[],!1,null,null,null);g.options.__file="src/FramedComponent.vue";const y=g.exports;var C=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("NavigationController",{ref:"navigationController",attrs:{"animation-type":"modal",root:t.root},on:{present:t.present}}),t._v(" "),o("StackComponent",{ref:"stackComponent",on:{present:t.present}})],1)};C._withStripped=!0;var w=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"navigation-controller",attrs:{"data-animation-type":t.animationType}},[t.mainComponent?o("transition",{attrs:{css:!1},on:{"before-enter":t.beforeEnter,"before-leave":t.beforeLeave,enter:t.enter,leave:t.leave,"after-leave":t.afterLeave,"after-enter":t.afterEnter,"enter-cancelled":t.enterCancelled}},[o("FramedComponent",{key:t.mainComponent.key,ref:"child",attrs:{root:t.mainComponent,name:t.mainComponent.key},on:{push:t.push,show:t.push,pop:t.pop}})],1):t._e()],1)};w._withStripped=!0;let P=class NavigationController extends(s()){constructor(){super(...arguments),this.components=[],this.mainComponent=null,this.transitionName="none",this.savedScrollPositions=[],this.nextScrollPosition=0,this.previousScrollPosition=0}beforeMount(){this.initialComponents&&this.initialComponents.length>0?(this.mainComponent=this.initialComponents[this.initialComponents.length-1],this.components=this.initialComponents.slice(0),this.initialComponents.splice(0,this.initialComponents.length)):(this.mainComponent=this.root,this.components=[this.root])}freezeSize(){const t=this.$el;t.style.width=t.offsetWidth+"px",t.style.height=t.offsetHeight+"px"}growSize(t,e){const o=this.$el;o.style.height=e+"px",o.style.width=t+"px"}unfreezeSize(){const t=this.$el;t.style.width="",t.style.height=""}getScrollElement(t=null){t||(t=this.$el);const e=window.getComputedStyle(t);return"scroll"==e.overflowY||"scroll"==e.overflow||"auto"==e.overflow||"auto"==e.overflowY?t:t.parentElement?this.getScrollElement(t.parentElement):document.documentElement}shouldAnimate(){return this.getScrollElement().offsetWidth<=900}async push(t){var e,o,i,s,r;if(0==t.components.length)return void console.error("Missing component when pushing");null===(e=document.activeElement)||void 0===e||e.blur();const l=t.components,a=l[l.length-1],p=null===(o=t.destroy)||void 0===o||o,h=null!==(i=t.force)&&void 0!==i&&i,c=!!this.shouldAnimate()&&(void 0===t.animated?a.animated:t.animated);let d=null!==(s=t.replace)&&void 0!==s?s:0;if(d>this.components.length&&(d=this.components.length),ComponentWithProperties.debug&&console.log("Pushing new component on navigation controller: "+a.component.name),d>0&&p&&!h)for(let n=this.components.length-1;n>=this.components.length-d;n--){const t=this.components[n];if(!(await t.shouldNavigateAway()))return}this.transitionName=c?"modal"==this.animationType?"modal-push":t.reverse?"pop":"push":"none";const u=this.getScrollElement(),m=window;let v=u.clientHeight;if(u===document.documentElement&&m.visualViewport&&(v=m.visualViewport.height),this.previousScrollPosition=u.scrollTop,this.savedScrollPositions.push(this.previousScrollPosition+v),this.nextScrollPosition=0,c&&this.freezeSize(),d>0){const t=this.components.splice(this.components.length-d,d,...l);if(!p)for(const e of t)e.keepAlive=!0}else this.components.push(...l);if(this.mainComponent&&(this.mainComponent.keepAlive=!d),this.mainComponent=a,this.$emit("didPush"),0==d&&this)for(let f=0;f<l.length;f++)n.pushState(null==t?void 0:t.url,(t=>{this.pop({animated:c&&t})}),null===(r=null==t?void 0:t.adjustHistory)||void 0===r||r),f<l.length-1&&l[f].assignHistoryIndex()}async shouldNavigateAway(){for(let t=this.components.length-1;t>=0;t--){const e=this.components[t];if(!(await e.shouldNavigateAway()))return!1}return!0}popToRoot(t={}){return t.count=this.components.length-1,this.pop(t)}getPoppableParent(){let t=this,e=this.$parent;for(;e;){if(t.$listeners.pop)return t;t=e,e=e.$parent}return null}async pop(t={}){var e,o,n,i,s,r;null===(e=document.activeElement)||void 0===e||e.blur();const l=!!this.shouldAnimate()&&(null===(o=t.animated)||void 0===o||o),a=null===(n=t.destroy)||void 0===n||n,p=null!==(i=t.count)&&void 0!==i?i:1,h=null!==(s=t.force)&&void 0!==s&&s;if(this.components.length<=p){const e=this.getPoppableParent();return t.count=1,e?void e.$emit("pop",t):(console.error("Tried to pop an empty navigation controller, but couldn't find a parent to pop"),void this.$emit("pop",t))}if(0===p)return;if(a&&!h)for(let v=this.components.length-1;v>=this.components.length-p;v--){const t=this.components[v];if(!(await t.shouldNavigateAway()))return}this.previousScrollPosition=this.getScrollElement().scrollTop,l?(this.transitionName="modal"==this.animationType?"modal-pop":"pop",this.freezeSize()):this.transitionName="none";const c=this.components.splice(this.components.length-p,p);if(!a)for(const v of c)v.keepAlive=!0;const d=this.getScrollElement(),u=window;let m=d.clientHeight;return d===document.documentElement&&u.visualViewport&&(m=u.visualViewport.height),this.nextScrollPosition=Math.max(0,(null!==(r=this.savedScrollPositions.pop())&&void 0!==r?r:0)-m),this.mainComponent=this.components[this.components.length-1],this.$emit("didPop"),c}beforeEnter(t){"none"!=this.transitionName&&(t.className=this.transitionName+"-enter-active "+this.transitionName+"-enter")}beforeLeave(t){this.transitionName}beforeBeforeEnterAnimation(){if(this.mainComponent){const t=this.mainComponent.componentInstance();t&&t.beforeBeforeEnterAnimation&&t.beforeBeforeEnterAnimation()}}finishedEnterAnimation(){if(this.mainComponent){const t=this.mainComponent.componentInstance();t&&t.finishedEnterAnimation&&t.finishedEnterAnimation()}}enter(t,e){if("none"==this.transitionName)return this.getScrollElement().scrollTop=this.nextScrollPosition,void e();if(this.mainComponent){const t=this.mainComponent.componentInstance();t&&t.beforeBeforeEnterAnimation&&t.beforeBeforeEnterAnimation()}const o=this.getScrollElement(),n=t.firstElementChild.firstElementChild.offsetWidth,i=t.firstElementChild.offsetHeight,s=this.getScrollOuterHeight(o);let r=this.nextScrollPosition;r>i-s&&(r=Math.max(0,i-s),this.nextScrollPosition=r);const l=t.firstElementChild;let a=300;"pop"!==this.transitionName&&"modal-pop"!=this.transitionName||(a=250),"push"==this.transitionName||"pop"==this.transitionName?(t.style.willChange="opacity",l.style.willChange="transform"):"modal-push"==this.transitionName&&(t.style.willChange="top"),o.style.willChange="scroll-position",this.growSize(n,i),requestAnimationFrame((()=>{if(o.scrollTop=r,this.mainComponent){const t=this.mainComponent.componentInstance();t&&t.beforeEnterAnimation&&t.beforeEnterAnimation()}requestAnimationFrame((()=>{if(t.className=this.transitionName+"-enter-active "+this.transitionName+"-enter-to",this.mainComponent){const t=this.mainComponent.componentInstance();t&&t.beginEnterAnimation&&t.beginEnterAnimation()}setTimeout((()=>{if(t.style.willChange="",l.style.willChange="",o.style.willChange="",this.mainComponent){const t=this.mainComponent.componentInstance();t&&t.finishedEnterAnimation&&t.finishedEnterAnimation()}e()}),a+25)}))}))}getScrollOuterHeight(t){let e=t.clientHeight;if(t===document.documentElement){const t=window;t.visualViewport&&(e=t.visualViewport.height)}return e}leave(t,e){if("none"==this.transitionName)return void e();const o=this.getScrollElement();let n=this.getScrollOuterHeight(o);const i=t.firstElementChild;"push"==this.transitionName||"pop"==this.transitionName?t.style.willChange="opacity,top":t.style.willChange="top","push"==this.transitionName||"pop"==this.transitionName||"modal-pop"==this.transitionName?i.style.willChange="scroll-position,transform":i.style.willChange="scroll-position";let s=300;"pop"!==this.transitionName&&"modal-pop"!=this.transitionName||(s=250),requestAnimationFrame((()=>{const o=this.previousScrollPosition,r=this.nextScrollPosition,l=n+"px";t.className=this.transitionName+"-leave-active "+this.transitionName+"-leave",t.style.top=r+"px",t.style.height=l,t.style.bottom="auto",t.style.overflow="hidden",i.style.overflow="hidden",i.style.height=n+"px",i.scrollTop=o,requestAnimationFrame((()=>{t.className=this.transitionName+"-leave-active "+this.transitionName+"-leave-to",setTimeout((()=>{t.style.overflow="",t.style.top="",t.style.height="",t.style.bottom="",i.style.overflow="",t.style.willChange="",i.style.willChange="",e()}),s+25)}))}))}afterLeave(t){"none"!=this.transitionName&&(t.className="")}afterEnter(t){"none"!=this.transitionName&&(this.unfreezeSize(),t.className="")}enterCancelled(t){this.unfreezeSize()}destroyed(){for(const t of this.components)t.isKeptAlive&&t.destroy();this.components=[],this.mainComponent=null}};p([u()],P.prototype,"root",void 0),p([u({default:null})],P.prototype,"initialComponents",void 0),p([u({default:"default"})],P.prototype,"animationType",void 0),p([m()],P.prototype,"child",void 0),P=p([c()({components:{FramedComponent:y}})],P);var S=f(P,w,[],!1,null,null,null);S.options.__file="src/NavigationController.vue";const A=S.exports;var k=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("transition",{attrs:{appear:t.shouldAppear,name:"fade",duration:300}},[o("div",{staticClass:"popup",class:{sticky:t.sticky,"push-down":1==t.pushDown,"push-down-full":t.pushDown>1},on:{mousedown:t.dismiss,touchdown:t.dismiss}},[o("div",{on:{mousedown:function(t){t.stopPropagation()},touchdown:function(t){t.stopPropagation()}}},[o("div",{staticClass:"scrollable-container"},[o("ComponentWithPropertiesInstance",{key:t.root.key,attrs:{component:t.root},on:{pop:t.dismiss}})],1)])])])};k._withStripped=!0;let x=class ModalMixin extends(s()){get modalStackComponent(){let t=this.$parent;for(;t;){if(t instanceof B)return t;t=t.$parent}return null}pop(t={}){const e=this.getPoppableParent();e?e.$listeners.pop?e.$emit("pop",t):console.error("Couldn't pop. Failed"):console.warn("No navigation controller to pop")}getPoppableParent(){let t=this,e=this.$parent;for(;e;){if(t.$listeners.pop)return t;t=e,e=e.$parent}return null}};var E;x=p([c()],x);const b=window.visualViewport;let N=E=class Popup extends x{constructor(){super(...arguments),this.sticky=!1}get shouldAppear(){return this.root.animated}get pushDown(){var t,e,o;const n=null!==(o=null===(e=null===(t=this.modalStackComponent)||void 0===t?void 0:t.stackComponent)||void 0===e?void 0:e.components.filter((t=>t.component===E)))&&void 0!==o?o:[];return n.length>0&&n[n.length-1].componentInstance()!==this?n.length>1&&n[n.length-2].componentInstance()===this?1:2:0}get isFocused(){var t,e,o;const n=null!==(o=null===(e=null===(t=this.modalStackComponent)||void 0===t?void 0:t.stackComponent)||void 0===e?void 0:e.components)&&void 0!==o?o:[];return!(n.length>0&&n[n.length-1].componentInstance()!==this)}activated(){document.addEventListener("keydown",this.onKey),this.resize(),b&&b.addEventListener("resize",this.resize)}deactivated(){document.removeEventListener("keydown",this.onKey),b&&b.removeEventListener("resize",this.resize)}async dismiss(t){var e,o,i;if(!(null==t?void 0:t.force)){if(!(await this.shouldNavigateAway()))return!1}const s=null!==(i=null===(o=null===(e=this.modalStackComponent)||void 0===e?void 0:e.stackComponent)||void 0===o?void 0:o.components.filter((t=>"overlay"!==t.modalDisplayStyle)))&&void 0!==i?i:[];if(0===s.length||s[s.length-1].componentInstance()===this){const t=this.root.getHistoryIndex();null!=t&&n.returnToHistoryIndex(t-1)}this.pop(t)}resize(){b&&(document.documentElement.clientHeight-b.height>200?this.sticky=!0:this.sticky=!1)}onKey(t){if(t.defaultPrevented||t.repeat)return;if(!this.isFocused)return;const e=t.key||t.keyCode;"Escape"!==e&&"Esc"!==e&&27!==e||(this.dismiss(),t.preventDefault())}shouldNavigateAway(){return this.root.shouldNavigateAway()}};p([u({required:!0})],N.prototype,"root",void 0),N=E=p([c()({components:{ComponentWithPropertiesInstance:l}})],N);var $=f(N,k,[],!1,null,null,null);$.options.__file="src/Popup.vue";const I=$.exports;var _=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",t._l(t.components,(function(e,n){return o("ComponentWithPropertiesInstance",{key:e.key,ref:"children",refInFor:!0,attrs:{component:e},on:{pop:function(o){return t.removeAt(n,e.key)}}})})),1)};_._withStripped=!0;let W=class StackComponent extends(s()){constructor(){super(...arguments),this.components=[]}show(t){this.components.push(t)}removeAt(t,e){if(!this.components[t])for(const[o,n]of this.components.entries())if(n.key===e){console.warn("Corrected index from "+t+" to "+o),t=o;break}this.components[t].key===e?this.components.splice(t,1):console.warn("Expected component with key "+e+" at index"+t)}beforeDestroy(){this.components=[]}};W=p([c()({components:{ComponentWithPropertiesInstance:l}})],W);var D=f(W,_,[],!1,null,null,null);D.options.__file="src/StackComponent.vue";const T=D.exports;var H=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("transition",{attrs:{appear:t.shouldAppear,name:"fade",duration:300}},[o("div",{staticClass:"sheet",on:{mousedown:t.dismiss,touchdown:t.dismiss}},[o("div",{on:{mousedown:function(t){t.stopPropagation()},touchdown:function(t){t.stopPropagation()}}},[o("ComponentWithPropertiesInstance",{key:t.root.key,attrs:{component:t.root},on:{pop:t.dismiss}})],1)])])};H._withStripped=!0;let z=class Sheet extends x{get shouldAppear(){return this.root.animated}activated(){document.addEventListener("keydown",this.onKey)}deactivated(){document.removeEventListener("keydown",this.onKey)}get isFocused(){var t,e,o;const n=null!==(o=null===(e=null===(t=this.modalStackComponent)||void 0===t?void 0:t.stackComponent)||void 0===e?void 0:e.components)&&void 0!==o?o:[];return!(n.length>0&&n[n.length-1].componentInstance()!==this)}async dismiss(t){var e,o,i;if(!(null==t?void 0:t.force)){if(!(await this.shouldNavigateAway()))return!1}const s=null!==(i=null===(o=null===(e=this.modalStackComponent)||void 0===e?void 0:e.stackComponent)||void 0===o?void 0:o.components.filter((t=>"overlay"!==t.modalDisplayStyle)))&&void 0!==i?i:[];if(0===s.length||s[s.length-1].componentInstance()===this){const t=this.root.getHistoryIndex();null!=t&&n.returnToHistoryIndex(t-1)}this.pop(t)}onKey(t){if(t.defaultPrevented||t.repeat)return;if(!this.isFocused)return;const e=t.key||t.keyCode;"Escape"!==e&&"Esc"!==e&&27!==e||(this.dismiss(),t.preventDefault())}shouldNavigateAway(){return this.root.shouldNavigateAway()}};p([u({required:!0})],z.prototype,"root",void 0),z=p([c()({components:{ComponentWithPropertiesInstance:l}})],z);var M=f(z,H,[],!1,null,null,null);M.options.__file="src/Sheet.vue";const F=M.exports;var j,K=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("transition",{attrs:{appear:t.shouldAppear,name:"fade"}},[o("div",{staticClass:"side-view",class:{"push-down":1==t.pushDown,"push-down-full":t.pushDown>1},on:{mousedown:t.dismiss,touchdown:t.dismiss}},[o("div",{on:{mousedown:function(t){t.stopPropagation()},touchdown:function(t){t.stopPropagation()}}},[o("ComponentWithPropertiesInstance",{key:t.root.key,attrs:{component:t.root},on:{pop:t.dismiss}})],1)])])};K._withStripped=!0;const V=window.visualViewport;let O=j=class SideView extends x{get shouldAppear(){return this.root.animated}get pushDown(){var t,e,o;const n=null!==(o=null===(e=null===(t=this.modalStackComponent)||void 0===t?void 0:t.stackComponent)||void 0===e?void 0:e.components.filter((t=>t.component===j)))&&void 0!==o?o:[];return n.length>0&&n[n.length-1].componentInstance()!==this?n.length>1&&n[n.length-2].componentInstance()===this?1:2:0}get isFocused(){var t,e,o;const n=null!==(o=null===(e=null===(t=this.modalStackComponent)||void 0===t?void 0:t.stackComponent)||void 0===e?void 0:e.components)&&void 0!==o?o:[];return!(n.length>0&&n[n.length-1].componentInstance()!==this)}activated(){document.addEventListener("keydown",this.onKey),this.resize(),V&&V.addEventListener("resize",this.resize)}deactivated(){document.removeEventListener("keydown",this.onKey),V&&V.removeEventListener("resize",this.resize)}async dismiss(t){var e,o,i;if(!(null==t?void 0:t.force)){if(!(await this.shouldNavigateAway()))return!1}const s=null!==(i=null===(o=null===(e=this.modalStackComponent)||void 0===e?void 0:e.stackComponent)||void 0===o?void 0:o.components.filter((t=>"overlay"!==t.modalDisplayStyle)))&&void 0!==i?i:[];if(0===s.length||s[s.length-1].componentInstance()===this){const t=this.root.getHistoryIndex();null!=t&&n.returnToHistoryIndex(t-1)}this.pop(t)}resize(){}onKey(t){if(t.defaultPrevented||t.repeat)return;if(!this.isFocused)return;const e=t.key||t.keyCode;"Escape"!==e&&"Esc"!==e&&27!==e||(this.dismiss(),t.preventDefault())}shouldNavigateAway(){return this.root.shouldNavigateAway()}};p([u({required:!0})],O.prototype,"root",void 0),O=j=p([c()({components:{ComponentWithPropertiesInstance:l}})],O);var L=f(O,K,[],!1,null,null,null);L.options.__file="src/SideView.vue";const R=L.exports;let U=class ModalStackComponent extends(s()){present(t){var e,o,i,s,r;const l=t.components[t.components.length-1];void 0!==t.animated&&(l.animated=t.animated);const a=null!==(o=null!==(e=t.modalDisplayStyle)&&void 0!==e?e:l.modalDisplayStyle)&&void 0!==o?o:"cover";if(l.setDisplayStyle(a),"popup"===a&&this.$el.offsetWidth>800){const e=new ComponentWithProperties(I,{root:l});return n.pushState(null==t?void 0:t.url,(t=>{var o;null===(o=e.componentInstance())||void 0===o||o.pop({animated:t})}),null===(i=null==t?void 0:t.adjustHistory)||void 0===i||i),void this.stackComponent.show(e)}if("sheet"===a&&this.$el.offsetWidth>700){const e=new ComponentWithProperties(F,{root:l});return n.pushState(null==t?void 0:t.url,(t=>{var o;null===(o=e.componentInstance())||void 0===o||o.pop({animated:t})}),null===(s=null==t?void 0:t.adjustHistory)||void 0===s||s),void this.stackComponent.show(e)}if("side-view"===a&&this.$el.offsetWidth>800){const e=new ComponentWithProperties(R,{root:l});return n.pushState(null==t?void 0:t.url,(t=>{var o;null===(o=e.componentInstance())||void 0===o||o.pop({animated:t})}),null===(r=null==t?void 0:t.adjustHistory)||void 0===r||r),void this.stackComponent.show(e)}"overlay"!==a?this.$refs.navigationController.push(t):this.stackComponent.show(l)}replace(t,e=!0){const o=this.$refs.navigationController;o.push({components:[t],animated:e,replace:o.components.length})}};p([u()],U.prototype,"root",void 0),p([m()],U.prototype,"stackComponent",void 0),U=p([c()({components:{NavigationController:A,StackComponent:T}})],U);var q=f(U,C,[],!1,null,null,null);q.options.__file="src/ModalStackComponent.vue";const B=q.exports;var Y=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"split-view-controller",attrs:{"data-has-detail":t.detail?"true":"false"}},[o("div",{ref:"masterElement",staticClass:"master"},[o("NavigationController",{ref:"navigationController",attrs:{root:t.root},on:{showDetail:t.showDetail}})],1),t._v(" "),t.detail?o("div",{staticClass:"detail"},[o("FramedComponent",{key:t.detail.key,ref:"detailFrame",attrs:{root:t.detail}})],1):t._e()])};Y._withStripped=!0;const X=(t,e)=>{let o,n;return function(){const i=this,s=arguments;n?(clearTimeout(o),o=setTimeout((function(){Date.now()-n>=e&&(t.apply(i,s),n=Date.now())}),e-(Date.now()-n))):(t.apply(i,s),n=Date.now())}};let G=class SplitViewController extends(s()){constructor(){super(...arguments),this.detail=null,this.detailKey=null}activated(){this.listener=X(this.onResize,200),window.addEventListener("resize",this.listener,{passive:!0})}mounted(){this.detailWidth&&this.$el.style.setProperty("--split-view-width",this.detailWidth)}deactivated(){window.removeEventListener("resize",this.listener,{passive:!0})}onResize(){this.shouldCollapse()?this.detail&&this.collapse():this.lastIsDetail&&!this.detail&&this.expand()}get lastIsDetail(){var t;return null!=this.detailKey&&(null===(t=this.$refs.navigationController.mainComponent)||void 0===t?void 0:t.key)==this.detailKey}getScrollElement(t=null){t||(t=this.$el);const e=window.getComputedStyle(t);return"scroll"==e.overflowY||"scroll"==e.overflow||"auto"==e.overflow||"auto"==e.overflowY?t:t.parentElement?this.getScrollElement(t.parentElement):document.documentElement}async shouldNavigateAway(){if(this.detail){if(!(await this.detail.shouldNavigateAway()))return!1}return!this.navigationController||await this.navigationController.shouldNavigateAway()}async showDetail(t){const e=t.components[t.components.length-1];if(this.detailKey=e.key,this.shouldCollapse()){if(this.lastIsDetail||this.detail)return console.error("Pusing a detail when a detail is already presented is not allowed"),!1;this.navigationController.push(t)}else{if(this.detail){if(!(await this.detail.shouldNavigateAway()))return!1}this.getScrollElement().scrollTop=0,this.detail=e}return!0}shouldCollapse(){return this.$el.offsetWidth<800}collapse(){if(this.lastIsDetail)return void console.error("Cannot collapse when the detail is already collaped");if(!this.detail)return void console.error("Cannot collapse without detail");this.detail.keepAlive=!0;const t=this.detail;this.detail=null,this.navigationController.push({components:[t],animated:!1})}async expand(){if(this.detail)return void console.error("Cannot expand when detail is already visible");if(!this.lastIsDetail)return void console.error("Cannot expand when there is no detail");const t=await this.navigationController.pop({animated:!1,destroy:!1});t&&0!=t.length&&this.$nextTick((()=>{this.detail=t[0]}))}};p([u()],G.prototype,"root",void 0),p([u()],G.prototype,"detailWidth",void 0),p([m()],G.prototype,"navigationController",void 0),p([m()],G.prototype,"detailKeepAlive",void 0),p([m()],G.prototype,"masterElement",void 0),G=p([c()({components:{NavigationController:A,FramedComponent:y}})],G);var J=f(G,Y,[],!1,null,null,null);J.options.__file="src/SplitViewController.vue";const Q=J.exports;let Z=class NavigationMixin extends(s()){constructor(){super(...arguments),this.canPop=!1,this.canDismiss=!1}emitParents(t,e){let o=this.$parent;for(;o;){if(o.$listeners[t])return void o.$emit(t,e);o=o.$parent}console.warn("No handlers found for event "+t)}show(t){t.components?this.emitParents("show",t):this.emitParents("show",{components:[t]})}present(t){t.components?this.emitParents("present",t):this.emitParents("present",{components:[t]})}showDetail(t){t.components?this.emitParents("showDetail",t):this.emitParents("showDetail",{components:[t]})}pop(t={}){const e=this.getPoppableParent();e?e.$listeners.pop?e.$emit("pop",t):console.error("Couldn't pop. Failed"):console.warn("No navigation controller to pop")}dismiss(t={}){const e=this.modalOrPopup;if(e){if(e instanceof F||e instanceof I||e instanceof R)return void e.dismiss(t);e.pop(t)}else console.warn("Tried to dismiss without being displayed as a modal. Use pop instead"),this.pop(t)}get navigationController(){let t=this.$parent;for(;t;){if(t instanceof A)return t;t=t.$parent}return null}get modalOrPopup(){let t=this.$parent;for(;t;){if(t instanceof A&&"modal"==t.animationType)return t;if(t instanceof F)return t;if(t instanceof I)return t;if(t instanceof R)return t;t=t.$parent}return null}get modalNavigationController(){let t=this.$parent;for(;t;){if(t instanceof A&&"modal"==t.animationType)return t;t=t.$parent}return null}get splitViewController(){let t=this.$parent;for(;t;){if(t instanceof Q)return t;t=t.$parent}return null}getPoppableParent(){let t=this,e=this.$parent;for(;e;){if(t.$listeners.pop)return t;t=e,e=e.$parent}return null}activated(){this.canPop=this.calculateCanPop(),this.canDismiss=this.calculateCanDismiss()}get poppableNavigationController(){let t=this.$parent;for(;t;){if(t instanceof A){if("modal"==t.animationType)return null;if(t.components.length>1)return t}t=t.$parent}return null}isFocused(){const t=this.modalOrPopup;return!(t instanceof I||t instanceof F||t instanceof R)||!!t.isFocused}calculateCanPop(){return null!=this.poppableNavigationController}calculateCanDismiss(){const t=this.modalOrPopup;return null!==t&&!(t instanceof A&&t.components.length<=1)}};Z=p([c()],Z)}},e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={exports:{}};return t[n](i,i.exports,o),i.exports}return o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(929)})();
|
|
1
|
+
module.exports=(()=>{"use strict";var t={929:(t,e,o)=>{o.r(e),o.d(e,{ComponentWithProperties:()=>ComponentWithProperties,ComponentWithPropertiesInstance:()=>l,FramedComponent:()=>y,HistoryManager:()=>n,ModalStackComponent:()=>B,NavigationController:()=>A,NavigationMixin:()=>Z,Popup:()=>I,Sheet:()=>F,SideView:()=>R,SplitViewController:()=>Q,StackComponent:()=>T});const n=new class HistoryManagerStatic{constructor(){this.states=[],this.counter=0,this.active=!1,this.animateHistoryPop=!0,this.isAdjustingState=!1,this.manualStateAction=!1,this.delayedUrlSetting=null}setUrl(t){if(this.active){if(this.manualStateAction)return ComponentWithProperties.debug&&console.log("Setting url, delayed: "+t+", current counter: "+this.counter),void(this.delayedUrlSetting={url:t,counter:this.counter});ComponentWithProperties.debug&&console.log("Set url: "+t+", current counter: "+this.counter),history.replaceState({counter:this.counter},"",t),this.states[this.states.length-1].url=t}}pushState(t,e,o){this.active&&(this.counter++,this.states.push({url:t,index:this.counter,adjustHistory:o,undoAction:e}),o?history.pushState({counter:this.counter},"",t):history.replaceState({counter:this.counter},"",t),ComponentWithProperties.debug&&console.log("Push new state ",this.states[this.states.length-1]))}returnToHistoryIndex(t){if(ComponentWithProperties.debug&&console.log("Did return to history index "+t+", coming from "+this.counter),t<this.counter){this.counter=t;const e=this.states.splice(this.counter+1).filter((t=>t.adjustHistory)).length;e>0&&!this.isAdjustingState&&(this.manualStateAction=!0,ComponentWithProperties.debug&&console.log("Adjusting browser history state: popping "+e+" items"),history.go(-e)),!this.states[this.counter].adjustHistory&&this.states[this.counter].url&&(ComponentWithProperties.debug&&console.log("Setting manual url without history api: "+this.states[this.counter].url),this.setUrl(this.states[this.counter].url))}return this.counter}activate(){window.addEventListener("popstate",(t=>{var e;if(ComponentWithProperties.debug&&console.log("HistoryManager popstate"),this.isAdjustingState)return void console.warn("Duplicate popstate");if(this.manualStateAction)return this.manualStateAction=!1,this.delayedUrlSetting&&this.counter===this.delayedUrlSetting.counter&&this.setUrl(this.delayedUrlSetting.url),void(this.delayedUrlSetting=null);this.isAdjustingState=!0;const o=null===(e=t.state)||void 0===e?void 0:e.counter;if(void 0!==o)if(o>this.counter){const t=o-this.counter;history.go(-t),ComponentWithProperties.debug&&console.log("Not allowed to go forward, going back "+t+" steps")}else{const t=this.counter-o==1&&this.animateHistoryPop;this.counter=o;const e=this.states.splice(this.counter+1);for(const o of e.reverse())o.undoAction&&(ComponentWithProperties.debug&&console.log("Executing undoAction..."),o.undoAction(t))}this.isAdjustingState=!1})),this.active=!0,history.replaceState({counter:this.counter},""),this.states.push({index:this.counter,adjustHistory:!1,url:"/"})}};class ComponentWithProperties{constructor(t,e={}){this.key=null,this.type=null,this.hide=!1,this.vnode=null,this.keepAlive=!1,this.isKeptAlive=!1,this.isMounted=!1,this.modalDisplayStyle="cover",this.animated=!0,this.historyIndex=null,this.isContainerView=!1,this.component=t,this.properties=e,this.key=ComponentWithProperties.keyCounter++}beforeMount(){ComponentWithProperties.debug&&console.log("Before mount: "+this.component.name),this.vnode&&this.isKeptAlive&&(this.isKeptAlive=!1,ComponentWithProperties.keepAliveCounter--,ComponentWithProperties.debug&&console.log("Total components kept alive: "+ComponentWithProperties.keepAliveCounter)),this.isContainerView?null===this.historyIndex&&(this.historyIndex=n.counter):"overlay"!=this.modalDisplayStyle&&this.assignHistoryIndex()}getHistoryIndex(){if(this.component)return this.historyIndex}mounted(){ComponentWithProperties.debug&&console.log("Component mounted: "+this.component.name),this.isMounted=!0,ComponentWithProperties.ignoreActivate=this}onMountedChildComponent(t){this.isContainerView=!0,ComponentWithProperties.debug&&console.log("Container mounted child component: "+this.component.name+" got "+t.component.name)}onActivatedChildComponent(t){this.isContainerView=!0,ComponentWithProperties.debug&&console.log("Container got activated child component: "+this.component.name+" got "+t.component.name)}assignHistoryIndex(){null==this.historyIndex?(ComponentWithProperties.debug&&console.log("Assigned history index: "+this.component.name+" = "+n.counter),this.historyIndex=n.counter):this.historyIndex=n.returnToHistoryIndex(this.historyIndex)}activated(){if(ComponentWithProperties.debug&&console.log("Component activated: "+this.component.name),ComponentWithProperties.ignoreActivate===this)return ComponentWithProperties.debug&&console.log("Ignore component activation: "+this.component.name),void(ComponentWithProperties.ignoreActivate=null);ComponentWithProperties.ignoreActivate=null,this.isContainerView||"overlay"!=this.modalDisplayStyle&&null!==this.historyIndex&&(this.historyIndex=n.returnToHistoryIndex(this.historyIndex))}componentInstance(){var t;return null===(t=this.vnode)||void 0===t?void 0:t.componentInstance}async shouldNavigateAway(){const t=this.componentInstance();if(t&&t.shouldNavigateAway){const e=t.shouldNavigateAway();if("boolean"==typeof e){if(!e)return!1}else if(e.then&&e.catch){if(!(await e))return!1}}return!0}destroy(){var t;if(this.isMounted=!1,this.vnode){if(this.keepAlive)return this.keepAlive=!1,void(this.isKeptAlive||(this.isKeptAlive=!0,ComponentWithProperties.keepAliveCounter++,ComponentWithProperties.debug&&console.log("Kept component alive "+this.component.name),ComponentWithProperties.debug&&console.log("Total components kept alive: "+ComponentWithProperties.keepAliveCounter)));this.isKeptAlive&&(this.isKeptAlive=!1,ComponentWithProperties.keepAliveCounter--,ComponentWithProperties.debug&&console.log("Freed component from alive stack "+this.component.name),ComponentWithProperties.debug&&console.log("Total components kept alive: "+ComponentWithProperties.keepAliveCounter)),ComponentWithProperties.debug&&console.log("Destroyed component "+this.component.name),null===(t=this.vnode.componentInstance)||void 0===t||t.$destroy(),this.vnode=null}}setDisplayStyle(t){return this.modalDisplayStyle=t,this}setAnimated(t){return this.animated=t,this}}ComponentWithProperties.keepAliveCounter=0,ComponentWithProperties.keyCounter=0,ComponentWithProperties.debug=!1,ComponentWithProperties.ignoreActivate=null;const i=require("vue");var s=o.n(i);const r=s().extend({props:{component:ComponentWithProperties},watch:{component(t){throw new Error("Changing component during life is not yet supported")}},created(){this.destroy=!0},beforeMount(){this.component.beforeMount()},activated(){this.component.activated();let t=this.$parent;for(;t;)t instanceof r&&t.component.onActivatedChildComponent(this.component),t=t.$parent},mounted(){this.component.mounted();let t=this.$parent;for(;t;)t instanceof r&&t.component.onMountedChildComponent(this.component),t=t.$parent},destroyed(){this.component.destroy()},render(t){return this.component.vnode?(this.component.vnode.componentInstance.$parent=this,this.$children=[this.component.vnode.componentInstance],this.component.vnode):(this.component.vnode=t(this.component.component,{props:this.component.properties,key:this.component.key}),this.component.vnode.data.keepAlive=!0,this.component.vnode)}}),l=r;var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("div",{ref:"scrollContainer"},[o("ComponentWithPropertiesInstance",{attrs:{component:t.root}})],1)])};a._withStripped=!0;function p(t,e,o,n){var i,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(r=(s<3?i(r):s>3?i(e,o,r):i(e,o))||r);return s>3&&r&&Object.defineProperty(e,o,r),r}const h=require("vue-class-component");var c=o.n(h);var d="undefined"!=typeof Reflect&&void 0!==Reflect.getMetadata;function u(t){return void 0===t&&(t={}),function(e,o){!function(t,e,o){if(d&&!Array.isArray(t)&&"function"!=typeof t&&!t.hasOwnProperty("type")&&void 0===t.type){var n=Reflect.getMetadata("design:type",e,o);n!==Object&&(t.type=n)}}(t,e,o),(0,h.createDecorator)((function(e,o){(e.props||(e.props={}))[o]=t}))(e,o)}}function m(t){return(0,h.createDecorator)((function(e,o){e.computed=e.computed||{},e.computed[o]={cache:!1,get:function(){return this.$refs[t||o]}}}))}let v=class FramedComponent extends(s()){pop(t){this.$emit("pop",t)}push(t){this.$emit("push",t)}};p([u()],v.prototype,"root",void 0),p([m()],v.prototype,"scrollContainer",void 0),v=p([c()({components:{ComponentWithPropertiesInstance:l}})],v);function f(t,e,o,n,i,s,r,l){var a,p="function"==typeof t?t.options:t;if(e&&(p.render=e,p.staticRenderFns=o,p._compiled=!0),n&&(p.functional=!0),s&&(p._scopeId="data-v-"+s),r?(a=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},p._ssrRegister=a):i&&(a=l?function(){i.call(this,(p.functional?this.parent:this).$root.$options.shadowRoot)}:i),a)if(p.functional){p._injectStyles=a;var h=p.render;p.render=function(t,e){return a.call(e),h(t,e)}}else{var c=p.beforeCreate;p.beforeCreate=c?[].concat(c,a):[a]}return{exports:t,options:p}}var g=f(v,a,[],!1,null,null,null);g.options.__file="src/FramedComponent.vue";const y=g.exports;var C=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("NavigationController",{ref:"navigationController",attrs:{"animation-type":"modal",root:t.root},on:{present:t.present}}),t._v(" "),o("StackComponent",{ref:"stackComponent",on:{present:t.present}})],1)};C._withStripped=!0;var w=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"navigation-controller",attrs:{"data-animation-type":t.animationType}},[t.mainComponent?o("transition",{attrs:{css:!1},on:{"before-enter":t.beforeEnter,"before-leave":t.beforeLeave,enter:t.enter,leave:t.leave,"after-leave":t.afterLeave,"after-enter":t.afterEnter,"enter-cancelled":t.enterCancelled}},[o("FramedComponent",{key:t.mainComponent.key,ref:"child",attrs:{root:t.mainComponent,name:t.mainComponent.key},on:{push:t.push,show:t.push,pop:t.pop}})],1):t._e()],1)};w._withStripped=!0;let P=class NavigationController extends(s()){constructor(){super(...arguments),this.components=[],this.mainComponent=null,this.transitionName="none",this.savedScrollPositions=[],this.nextScrollPosition=0,this.previousScrollPosition=0}beforeMount(){this.initialComponents&&this.initialComponents.length>0?(this.mainComponent=this.initialComponents[this.initialComponents.length-1],this.components=this.initialComponents.slice(0),this.initialComponents.splice(0,this.initialComponents.length)):(this.mainComponent=this.root,this.components=[this.root])}freezeSize(){const t=this.$el;t.style.width=t.offsetWidth+"px",t.style.height=t.offsetHeight+"px"}growSize(t,e){const o=this.$el;o.style.height=e+"px",o.style.width=t+"px"}unfreezeSize(){const t=this.$el;t.style.width="",t.style.height=""}getScrollElement(t=null){t||(t=this.$el);const e=window.getComputedStyle(t);return"scroll"==e.overflowY||"scroll"==e.overflow||"auto"==e.overflow||"auto"==e.overflowY?t:t.parentElement?this.getScrollElement(t.parentElement):document.documentElement}shouldAnimate(){return this.getScrollElement().offsetWidth<=900}async push(t){var e,o,i,s,r;if(0==t.components.length)return void console.error("Missing component when pushing");null===(e=document.activeElement)||void 0===e||e.blur();const l=t.components,a=l[l.length-1],p=null===(o=t.destroy)||void 0===o||o,h=null!==(i=t.force)&&void 0!==i&&i,c=!!this.shouldAnimate()&&(void 0===t.animated?a.animated:t.animated);let d=null!==(s=t.replace)&&void 0!==s?s:0;if(d>this.components.length&&(d=this.components.length),ComponentWithProperties.debug&&console.log("Pushing new component on navigation controller: "+a.component.name),d>0&&p&&!h)for(let n=this.components.length-1;n>=this.components.length-d;n--){const t=this.components[n];if(!(await t.shouldNavigateAway()))return}this.transitionName=c?"modal"==this.animationType?"modal-push":t.reverse?"pop":"push":"none";const u=this.getScrollElement(),m=window;let v=u.clientHeight;if(u===document.documentElement&&m.visualViewport&&(v=m.visualViewport.height),this.previousScrollPosition=u.scrollTop,this.savedScrollPositions.push(this.previousScrollPosition+v),this.nextScrollPosition=0,c&&this.freezeSize(),d>0){const t=this.components.splice(this.components.length-d,d,...l);if(!p)for(const e of t)e.keepAlive=!0}else this.components.push(...l);if(this.mainComponent&&(this.mainComponent.keepAlive=!d),this.mainComponent=a,this.$emit("didPush"),0==d&&this)for(let f=0;f<l.length;f++)n.pushState(null==t?void 0:t.url,(t=>{this.pop({animated:c&&t})}),null===(r=null==t?void 0:t.adjustHistory)||void 0===r||r),f<l.length-1&&l[f].assignHistoryIndex()}async shouldNavigateAway(){for(let t=this.components.length-1;t>=0;t--){const e=this.components[t];if(!(await e.shouldNavigateAway()))return!1}return!0}popToRoot(t={}){return t.count=this.components.length-1,this.pop(t)}getPoppableParent(){let t=this,e=this.$parent;for(;e;){if(t.$listeners.pop)return t;t=e,e=e.$parent}return null}async pop(t={}){var e,o,n,i,s,r;null===(e=document.activeElement)||void 0===e||e.blur();const l=!!this.shouldAnimate()&&(null===(o=t.animated)||void 0===o||o),a=null===(n=t.destroy)||void 0===n||n,p=null!==(i=t.count)&&void 0!==i?i:1,h=null!==(s=t.force)&&void 0!==s&&s;if(this.components.length<=p){const e=this.getPoppableParent();return t.count=1,e?void e.$emit("pop",t):(console.error("Tried to pop an empty navigation controller, but couldn't find a parent to pop"),void this.$emit("pop",t))}if(0===p)return;if(a&&!h)for(let v=this.components.length-1;v>=this.components.length-p;v--){const t=this.components[v];if(!(await t.shouldNavigateAway()))return}this.previousScrollPosition=this.getScrollElement().scrollTop,l?(this.transitionName="modal"==this.animationType?"modal-pop":"pop",this.freezeSize()):this.transitionName="none";const c=this.components.splice(this.components.length-p,p);if(!a)for(const v of c)v.keepAlive=!0;const d=this.getScrollElement(),u=window;let m=d.clientHeight;return d===document.documentElement&&u.visualViewport&&(m=u.visualViewport.height),this.nextScrollPosition=Math.max(0,(null!==(r=this.savedScrollPositions.pop())&&void 0!==r?r:0)-m),this.mainComponent=this.components[this.components.length-1],this.$emit("didPop"),c}beforeEnter(t){"none"!=this.transitionName&&(t.className=this.transitionName+"-enter-active "+this.transitionName+"-enter")}beforeLeave(t){this.transitionName}beforeBeforeEnterAnimation(){if(this.mainComponent){const t=this.mainComponent.componentInstance();t&&t.beforeBeforeEnterAnimation&&t.beforeBeforeEnterAnimation()}}finishedEnterAnimation(){if(this.mainComponent){const t=this.mainComponent.componentInstance();t&&t.finishedEnterAnimation&&t.finishedEnterAnimation()}}enter(t,e){if("none"==this.transitionName)return this.getScrollElement().scrollTop=this.nextScrollPosition,void e();if(this.mainComponent){const t=this.mainComponent.componentInstance();t&&t.beforeBeforeEnterAnimation&&t.beforeBeforeEnterAnimation()}const o=this.getScrollElement(),n=t.firstElementChild.firstElementChild.offsetWidth,i=t.firstElementChild.offsetHeight,s=this.getScrollOuterHeight(o);let r=this.nextScrollPosition;r>i-s&&(r=Math.max(0,i-s),this.nextScrollPosition=r);const l=t.firstElementChild;let a=300;"pop"!==this.transitionName&&"modal-pop"!=this.transitionName||(a=250),"push"==this.transitionName||"pop"==this.transitionName?(t.style.willChange="opacity",l.style.willChange="transform"):"modal-push"==this.transitionName&&(t.style.willChange="top"),o.style.willChange="scroll-position",this.growSize(n,i),requestAnimationFrame((()=>{if(o.scrollTop=r,this.mainComponent){const t=this.mainComponent.componentInstance();t&&t.beforeEnterAnimation&&t.beforeEnterAnimation()}requestAnimationFrame((()=>{if(t.className=this.transitionName+"-enter-active "+this.transitionName+"-enter-to",this.mainComponent){const t=this.mainComponent.componentInstance();t&&t.beginEnterAnimation&&t.beginEnterAnimation()}setTimeout((()=>{if(t.style.willChange="",l.style.willChange="",o.style.willChange="",this.mainComponent){const t=this.mainComponent.componentInstance();t&&t.finishedEnterAnimation&&t.finishedEnterAnimation()}e()}),a+25)}))}))}getScrollOuterHeight(t){let e=t.clientHeight;if(t===document.documentElement){const t=window;t.visualViewport&&(e=t.visualViewport.height)}return e}leave(t,e){if("none"==this.transitionName)return void e();const o=this.getScrollElement();let n=this.getScrollOuterHeight(o);const i=t.firstElementChild;"push"==this.transitionName||"pop"==this.transitionName?t.style.willChange="opacity,top":t.style.willChange="top","push"==this.transitionName||"pop"==this.transitionName||"modal-pop"==this.transitionName?i.style.willChange="scroll-position,transform":i.style.willChange="scroll-position";let s=300;"pop"!==this.transitionName&&"modal-pop"!=this.transitionName||(s=250),requestAnimationFrame((()=>{const o=this.previousScrollPosition,r=this.nextScrollPosition,l=n+"px";t.className=this.transitionName+"-leave-active "+this.transitionName+"-leave",t.style.top=r+"px",t.style.height=l,t.style.bottom="auto",t.style.overflow="hidden",i.style.overflow="hidden",i.style.height=n+"px",i.scrollTop=o,requestAnimationFrame((()=>{t.className=this.transitionName+"-leave-active "+this.transitionName+"-leave-to",setTimeout((()=>{t.style.overflow="",t.style.top="",t.style.height="",t.style.bottom="",i.style.overflow="",t.style.willChange="",i.style.willChange="",e()}),s+25)}))}))}afterLeave(t){"none"!=this.transitionName&&(t.className="")}afterEnter(t){"none"!=this.transitionName&&(this.unfreezeSize(),t.className="")}enterCancelled(t){this.unfreezeSize()}destroyed(){for(const t of this.components)t.isKeptAlive&&t.destroy();this.components=[],this.mainComponent=null}};p([u()],P.prototype,"root",void 0),p([u({default:null})],P.prototype,"initialComponents",void 0),p([u({default:"default"})],P.prototype,"animationType",void 0),p([m()],P.prototype,"child",void 0),P=p([c()({components:{FramedComponent:y}})],P);var S=f(P,w,[],!1,null,null,null);S.options.__file="src/NavigationController.vue";const A=S.exports;var k=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("transition",{attrs:{appear:t.shouldAppear,name:"fade",duration:300}},[o("div",{staticClass:"popup",class:{sticky:t.sticky,"push-down":1==t.pushDown,"push-down-full":t.pushDown>1},on:{mousedown:t.dismiss,touchdown:t.dismiss}},[o("div",{on:{mousedown:function(t){t.stopPropagation()},touchdown:function(t){t.stopPropagation()}}},[o("div",{staticClass:"scrollable-container"},[o("ComponentWithPropertiesInstance",{key:t.root.key,attrs:{component:t.root},on:{pop:t.dismiss}})],1)])])])};k._withStripped=!0;let x=class ModalMixin extends(s()){get modalStackComponent(){let t=this.$parent;for(;t;){if(t instanceof B)return t;t=t.$parent}return null}pop(t={}){const e=this.getPoppableParent();e?e.$listeners.pop?e.$emit("pop",t):console.error("Couldn't pop. Failed"):console.warn("No navigation controller to pop")}getPoppableParent(){let t=this,e=this.$parent;for(;e;){if(t.$listeners.pop)return t;t=e,e=e.$parent}return null}};var E;x=p([c()],x);const b=window.visualViewport;let N=E=class Popup extends x{constructor(){super(...arguments),this.sticky=!1}get shouldAppear(){return this.root.animated}get pushDown(){var t,e,o;const n=null!==(o=null===(e=null===(t=this.modalStackComponent)||void 0===t?void 0:t.stackComponent)||void 0===e?void 0:e.components.filter((t=>t.component===E)))&&void 0!==o?o:[];return n.length>0&&n[n.length-1].componentInstance()!==this?n.length>1&&n[n.length-2].componentInstance()===this?1:2:0}get isFocused(){var t,e,o;const n=null!==(o=null===(e=null===(t=this.modalStackComponent)||void 0===t?void 0:t.stackComponent)||void 0===e?void 0:e.components)&&void 0!==o?o:[];return!(n.length>0&&n[n.length-1].componentInstance()!==this)}activated(){document.addEventListener("keydown",this.onKey),this.resize(),b&&b.addEventListener("resize",this.resize)}deactivated(){document.removeEventListener("keydown",this.onKey),b&&b.removeEventListener("resize",this.resize)}async dismiss(t){var e,o,i;if(!(null==t?void 0:t.force)){if(!(await this.shouldNavigateAway()))return!1}const s=null!==(i=null===(o=null===(e=this.modalStackComponent)||void 0===e?void 0:e.stackComponent)||void 0===o?void 0:o.components.filter((t=>"overlay"!==t.modalDisplayStyle)))&&void 0!==i?i:[];if(0===s.length||s[s.length-1].componentInstance()===this){const t=this.root.getHistoryIndex();null!=t&&n.returnToHistoryIndex(t-1)}this.pop(t)}resize(){b&&(document.documentElement.clientHeight-b.height>200?this.sticky=!0:this.sticky=!1)}onKey(t){if(t.defaultPrevented||t.repeat)return;if(!this.isFocused)return;const e=t.key||t.keyCode;"Escape"!==e&&"Esc"!==e&&27!==e||(this.dismiss(),t.preventDefault())}shouldNavigateAway(){return this.root.shouldNavigateAway()}};p([u({required:!0})],N.prototype,"root",void 0),N=E=p([c()({components:{ComponentWithPropertiesInstance:l}})],N);var $=f(N,k,[],!1,null,null,null);$.options.__file="src/Popup.vue";const I=$.exports;var _=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",t._l(t.components,(function(e,n){return o("ComponentWithPropertiesInstance",{key:e.key,ref:"children",refInFor:!0,attrs:{component:e},on:{pop:function(o){return t.removeAt(n,e.key)}}})})),1)};_._withStripped=!0;let W=class StackComponent extends(s()){constructor(){super(...arguments),this.components=[]}show(t){this.components.push(t)}removeAt(t,e){if(!this.components[t])for(const[o,n]of this.components.entries())if(n.key===e){console.warn("Corrected index from "+t+" to "+o),t=o;break}this.components[t].key===e?this.components.splice(t,1):console.warn("Expected component with key "+e+" at index"+t)}beforeDestroy(){this.components=[]}};W=p([c()({components:{ComponentWithPropertiesInstance:l}})],W);var D=f(W,_,[],!1,null,null,null);D.options.__file="src/StackComponent.vue";const T=D.exports;var H=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("transition",{attrs:{appear:t.shouldAppear,name:"fade",duration:300}},[o("div",{staticClass:"sheet",on:{mousedown:t.dismiss,touchdown:t.dismiss}},[o("div",{on:{mousedown:function(t){t.stopPropagation()},touchdown:function(t){t.stopPropagation()}}},[o("ComponentWithPropertiesInstance",{key:t.root.key,attrs:{component:t.root},on:{pop:t.dismiss}})],1)])])};H._withStripped=!0;let z=class Sheet extends x{get shouldAppear(){return this.root.animated}activated(){document.addEventListener("keydown",this.onKey)}deactivated(){document.removeEventListener("keydown",this.onKey)}get isFocused(){var t,e,o;const n=null!==(o=null===(e=null===(t=this.modalStackComponent)||void 0===t?void 0:t.stackComponent)||void 0===e?void 0:e.components)&&void 0!==o?o:[];return!(n.length>0&&n[n.length-1].componentInstance()!==this)}async dismiss(t){var e,o,i;if(!(null==t?void 0:t.force)){if(!(await this.shouldNavigateAway()))return!1}const s=null!==(i=null===(o=null===(e=this.modalStackComponent)||void 0===e?void 0:e.stackComponent)||void 0===o?void 0:o.components.filter((t=>"overlay"!==t.modalDisplayStyle)))&&void 0!==i?i:[];if(0===s.length||s[s.length-1].componentInstance()===this){const t=this.root.getHistoryIndex();null!=t&&n.returnToHistoryIndex(t-1)}this.pop(t)}onKey(t){if(t.defaultPrevented||t.repeat)return;if(!this.isFocused)return;const e=t.key||t.keyCode;"Escape"!==e&&"Esc"!==e&&27!==e||(this.dismiss(),t.preventDefault())}shouldNavigateAway(){return this.root.shouldNavigateAway()}};p([u({required:!0})],z.prototype,"root",void 0),z=p([c()({components:{ComponentWithPropertiesInstance:l}})],z);var M=f(z,H,[],!1,null,null,null);M.options.__file="src/Sheet.vue";const F=M.exports;var j,K=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("transition",{attrs:{appear:t.shouldAppear,name:"fade"}},[o("div",{staticClass:"side-view",class:{"push-down":1==t.pushDown,"push-down-full":t.pushDown>1},on:{mousedown:t.dismiss,touchdown:t.dismiss}},[o("div",{on:{mousedown:function(t){t.stopPropagation()},touchdown:function(t){t.stopPropagation()}}},[o("ComponentWithPropertiesInstance",{key:t.root.key,attrs:{component:t.root},on:{pop:t.dismiss}})],1)])])};K._withStripped=!0;const V=window.visualViewport;let O=j=class SideView extends x{get shouldAppear(){return this.root.animated}get pushDown(){var t,e,o;const n=null!==(o=null===(e=null===(t=this.modalStackComponent)||void 0===t?void 0:t.stackComponent)||void 0===e?void 0:e.components.filter((t=>t.component===j)))&&void 0!==o?o:[];return n.length>0&&n[n.length-1].componentInstance()!==this?n.length>1&&n[n.length-2].componentInstance()===this?1:2:0}get isFocused(){var t,e,o;const n=null!==(o=null===(e=null===(t=this.modalStackComponent)||void 0===t?void 0:t.stackComponent)||void 0===e?void 0:e.components)&&void 0!==o?o:[];return!(n.length>0&&n[n.length-1].componentInstance()!==this)}activated(){document.addEventListener("keydown",this.onKey),this.resize(),V&&V.addEventListener("resize",this.resize)}deactivated(){document.removeEventListener("keydown",this.onKey),V&&V.removeEventListener("resize",this.resize)}async dismiss(t){var e,o,i;if(!(null==t?void 0:t.force)){if(!(await this.shouldNavigateAway()))return!1}const s=null!==(i=null===(o=null===(e=this.modalStackComponent)||void 0===e?void 0:e.stackComponent)||void 0===o?void 0:o.components.filter((t=>"overlay"!==t.modalDisplayStyle)))&&void 0!==i?i:[];if(0===s.length||s[s.length-1].componentInstance()===this){const t=this.root.getHistoryIndex();null!=t&&n.returnToHistoryIndex(t-1)}this.pop(t)}resize(){}onKey(t){if(t.defaultPrevented||t.repeat)return;if(!this.isFocused)return;const e=t.key||t.keyCode;"Escape"!==e&&"Esc"!==e&&27!==e||(this.dismiss(),t.preventDefault())}shouldNavigateAway(){return this.root.shouldNavigateAway()}};p([u({required:!0})],O.prototype,"root",void 0),O=j=p([c()({components:{ComponentWithPropertiesInstance:l}})],O);var L=f(O,K,[],!1,null,null,null);L.options.__file="src/SideView.vue";const R=L.exports;let U=class ModalStackComponent extends(s()){present(t){var e,o,i,s,r;const l=t.components[t.components.length-1];void 0!==t.animated&&(l.animated=t.animated);const a=null!==(o=null!==(e=t.modalDisplayStyle)&&void 0!==e?e:l.modalDisplayStyle)&&void 0!==o?o:"cover";if(l.setDisplayStyle(a),"popup"===a&&this.$el.offsetWidth>800){const e=new ComponentWithProperties(I,{root:l});return n.pushState(null==t?void 0:t.url,(t=>{var o;null===(o=e.componentInstance())||void 0===o||o.pop({animated:t})}),null===(i=null==t?void 0:t.adjustHistory)||void 0===i||i),void this.stackComponent.show(e)}if("sheet"===a&&this.$el.offsetWidth>700){const e=new ComponentWithProperties(F,{root:l});return n.pushState(null==t?void 0:t.url,(t=>{var o;null===(o=e.componentInstance())||void 0===o||o.pop({animated:t})}),null===(s=null==t?void 0:t.adjustHistory)||void 0===s||s),void this.stackComponent.show(e)}if("side-view"===a&&this.$el.offsetWidth>800){const e=new ComponentWithProperties(R,{root:l});return n.pushState(null==t?void 0:t.url,(t=>{var o;null===(o=e.componentInstance())||void 0===o||o.pop({animated:t})}),null===(r=null==t?void 0:t.adjustHistory)||void 0===r||r),void this.stackComponent.show(e)}"overlay"!==a?this.$refs.navigationController.push(t):this.stackComponent.show(l)}replace(t,e=!0){const o=this.$refs.navigationController;o.push({components:[t],animated:e,replace:o.components.length})}};p([u()],U.prototype,"root",void 0),p([m()],U.prototype,"stackComponent",void 0),U=p([c()({components:{NavigationController:A,StackComponent:T}})],U);var q=f(U,C,[],!1,null,null,null);q.options.__file="src/ModalStackComponent.vue";const B=q.exports;var Y=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"split-view-controller",attrs:{"data-has-detail":t.detail?"true":"false"}},[o("div",{ref:"masterElement",staticClass:"master"},[o("NavigationController",{ref:"navigationController",attrs:{root:t.root},on:{showDetail:t.showDetail}})],1),t._v(" "),t.detail?o("div",{staticClass:"detail"},[o("FramedComponent",{key:t.detail.key,ref:"detailFrame",attrs:{root:t.detail}})],1):t._e()])};Y._withStripped=!0;const X=(t,e)=>{let o,n;return function(){const i=this,s=arguments;n?(clearTimeout(o),o=setTimeout((function(){Date.now()-n>=e&&(t.apply(i,s),n=Date.now())}),e-(Date.now()-n))):(t.apply(i,s),n=Date.now())}};let G=class SplitViewController extends(s()){constructor(){super(...arguments),this.detail=null,this.detailKey=null}activated(){this.listener=X(this.onResize,200),window.addEventListener("resize",this.listener,{passive:!0})}mounted(){this.detailWidth&&this.$el.style.setProperty("--split-view-width",this.detailWidth)}deactivated(){window.removeEventListener("resize",this.listener,{passive:!0})}onResize(){this.shouldCollapse()?this.detail&&this.collapse():this.lastIsDetail&&!this.detail&&this.expand()}get lastIsDetail(){var t;return null!=this.detailKey&&(null===(t=this.$refs.navigationController.mainComponent)||void 0===t?void 0:t.key)==this.detailKey}getScrollElement(t=null){t||(t=this.$el);const e=window.getComputedStyle(t);return"scroll"==e.overflowY||"scroll"==e.overflow||"auto"==e.overflow||"auto"==e.overflowY?t:t.parentElement?this.getScrollElement(t.parentElement):document.documentElement}async shouldNavigateAway(){if(this.detail){if(!(await this.detail.shouldNavigateAway()))return!1}return!this.navigationController||await this.navigationController.shouldNavigateAway()}async showDetail(t){const e=t.components[t.components.length-1];if(this.detailKey=e.key,this.shouldCollapse()){if(this.lastIsDetail||this.detail)return console.error("Pusing a detail when a detail is already presented is not allowed"),!1;this.navigationController.push(t)}else{if(this.detail){if(!(await this.detail.shouldNavigateAway()))return!1}this.getScrollElement().scrollTop=0,this.detail=e}return!0}shouldCollapse(){return this.$el.offsetWidth<850}collapse(){if(this.lastIsDetail)return void console.error("Cannot collapse when the detail is already collaped");if(!this.detail)return void console.error("Cannot collapse without detail");this.detail.keepAlive=!0;const t=this.detail;this.detail=null,this.navigationController.push({components:[t],animated:!1})}async expand(){if(this.detail)return void console.error("Cannot expand when detail is already visible");if(!this.lastIsDetail)return void console.error("Cannot expand when there is no detail");const t=await this.navigationController.pop({animated:!1,destroy:!1});t&&0!=t.length&&this.$nextTick((()=>{this.detail=t[0]}))}};p([u()],G.prototype,"root",void 0),p([u()],G.prototype,"detailWidth",void 0),p([m()],G.prototype,"navigationController",void 0),p([m()],G.prototype,"detailKeepAlive",void 0),p([m()],G.prototype,"masterElement",void 0),G=p([c()({components:{NavigationController:A,FramedComponent:y}})],G);var J=f(G,Y,[],!1,null,null,null);J.options.__file="src/SplitViewController.vue";const Q=J.exports;let Z=class NavigationMixin extends(s()){constructor(){super(...arguments),this.canPop=!1,this.canDismiss=!1}emitParents(t,e){let o=this.$parent;for(;o;){if(o.$listeners[t])return void o.$emit(t,e);o=o.$parent}console.warn("No handlers found for event "+t)}show(t){t.components?this.emitParents("show",t):this.emitParents("show",{components:[t]})}present(t){t.components?this.emitParents("present",t):this.emitParents("present",{components:[t]})}showDetail(t){t.components?this.emitParents("showDetail",t):this.emitParents("showDetail",{components:[t]})}pop(t={}){const e=this.getPoppableParent();e?e.$listeners.pop?e.$emit("pop",t):console.error("Couldn't pop. Failed"):console.warn("No navigation controller to pop")}dismiss(t={}){const e=this.modalOrPopup;if(e){if(e instanceof F||e instanceof I||e instanceof R)return void e.dismiss(t);e.pop(t)}else console.warn("Tried to dismiss without being displayed as a modal. Use pop instead"),this.pop(t)}get navigationController(){let t=this.$parent;for(;t;){if(t instanceof A)return t;t=t.$parent}return null}get modalOrPopup(){let t=this.$parent;for(;t;){if(t instanceof A&&"modal"==t.animationType)return t;if(t instanceof F)return t;if(t instanceof I)return t;if(t instanceof R)return t;t=t.$parent}return null}get modalNavigationController(){let t=this.$parent;for(;t;){if(t instanceof A&&"modal"==t.animationType)return t;t=t.$parent}return null}get splitViewController(){let t=this.$parent;for(;t;){if(t instanceof Q)return t;t=t.$parent}return null}getPoppableParent(){let t=this,e=this.$parent;for(;e;){if(t.$listeners.pop)return t;t=e,e=e.$parent}return null}activated(){this.canPop=this.calculateCanPop(),this.canDismiss=this.calculateCanDismiss()}get poppableNavigationController(){let t=this.$parent;for(;t;){if(t instanceof A){if("modal"==t.animationType)return null;if(t.components.length>1)return t}t=t.$parent}return null}isFocused(){const t=this.modalOrPopup;return!(t instanceof I||t instanceof F||t instanceof R)||!!t.isFocused}calculateCanPop(){return null!=this.poppableNavigationController}calculateCanDismiss(){const t=this.modalOrPopup;return null!==t&&!(t instanceof A&&t.components.length<=1)}};Z=p([c()],Z)}},e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={exports:{}};return t[n](i,i.exports,o),i.exports}return o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(929)})();
|
|
2
2
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://@simonbackx/vue-app-navigation/./src/HistoryManager.ts","webpack://@simonbackx/vue-app-navigation/./src/ComponentWithProperties.ts","webpack://@simonbackx/vue-app-navigation/external \"vue\"","webpack://@simonbackx/vue-app-navigation/./src/ComponentWithPropertiesInstance.ts","webpack://@simonbackx/vue-app-navigation/./src/FramedComponent.vue?4f5b","webpack://@simonbackx/vue-app-navigation/./node_modules/tslib/tslib.es6.js","webpack://@simonbackx/vue-app-navigation/external \"vue-class-component\"","webpack://@simonbackx/vue-app-navigation/./node_modules/vue-property-decorator/lib/helpers/metadata.js","webpack://@simonbackx/vue-app-navigation/./node_modules/vue-property-decorator/lib/decorators/Prop.js","webpack://@simonbackx/vue-app-navigation/./node_modules/vue-property-decorator/lib/decorators/Ref.js","webpack://@simonbackx/vue-app-navigation/./src/FramedComponent.vue?2fcd","webpack://@simonbackx/vue-app-navigation/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://@simonbackx/vue-app-navigation/./src/FramedComponent.vue","webpack://@simonbackx/vue-app-navigation/./src/ModalStackComponent.vue?42b1","webpack://@simonbackx/vue-app-navigation/./src/NavigationController.vue?3544","webpack://@simonbackx/vue-app-navigation/./src/NavigationController.vue?4d36","webpack://@simonbackx/vue-app-navigation/./src/NavigationController.vue?6269","webpack://@simonbackx/vue-app-navigation/./src/Popup.vue?dfe1","webpack://@simonbackx/vue-app-navigation/./src/ModalMixin.ts","webpack://@simonbackx/vue-app-navigation/./src/Popup.vue?7e96","webpack://@simonbackx/vue-app-navigation/./src/Popup.vue?11d0","webpack://@simonbackx/vue-app-navigation/./src/StackComponent.vue?fb8e","webpack://@simonbackx/vue-app-navigation/./src/StackComponent.vue?4684","webpack://@simonbackx/vue-app-navigation/./src/StackComponent.vue","webpack://@simonbackx/vue-app-navigation/./src/Sheet.vue?f43c","webpack://@simonbackx/vue-app-navigation/./src/Sheet.vue?8e62","webpack://@simonbackx/vue-app-navigation/./src/Sheet.vue?195d","webpack://@simonbackx/vue-app-navigation/./src/SideView.vue?9ad8","webpack://@simonbackx/vue-app-navigation/./src/SideView.vue?f85a","webpack://@simonbackx/vue-app-navigation/./src/SideView.vue?13f9","webpack://@simonbackx/vue-app-navigation/./src/ModalStackComponent.vue?08f9","webpack://@simonbackx/vue-app-navigation/./src/ModalStackComponent.vue","webpack://@simonbackx/vue-app-navigation/./src/SplitViewController.vue?8f4b","webpack://@simonbackx/vue-app-navigation/./src/SplitViewController.vue?0eca","webpack://@simonbackx/vue-app-navigation/./src/SplitViewController.vue?b1a8","webpack://@simonbackx/vue-app-navigation/./src/NavigationMixin.ts","webpack://@simonbackx/vue-app-navigation/webpack/bootstrap","webpack://@simonbackx/vue-app-navigation/webpack/startup","webpack://@simonbackx/vue-app-navigation/webpack/runtime/compat get default export","webpack://@simonbackx/vue-app-navigation/webpack/runtime/define property getters","webpack://@simonbackx/vue-app-navigation/webpack/runtime/hasOwnProperty shorthand","webpack://@simonbackx/vue-app-navigation/webpack/runtime/make namespace object"],"names":["HistoryManager","HistoryManagerStatic","states","counter","active","animateHistoryPop","isAdjustingState","manualStateAction","delayedUrlSetting","url","this","ComponentWithProperties","debug","console","log","history","replaceState","length","undoAction","adjustHistory","push","index","pushState","adjustHistoryCount","splice","filter","state","go","setUrl","window","addEventListener","event","warn","newCounter","undefined","amount","animate","deletedStates","reverse","component","properties","key","type","hide","vnode","keepAlive","isKeptAlive","isMounted","modalDisplayStyle","animated","historyIndex","isContainerView","keyCounter","name","keepAliveCounter","assignHistoryIndex","ignoreActivate","child","returnToHistoryIndex","componentInstance","instance","shouldNavigateAway","promise","then","catch","$destroy","style","require","ComponentWithPropertiesInstance","props","watch","_val","Error","destroy","beforeMount","activated","start","$parent","onActivatedChildComponent","mounted","onMountedChildComponent","createElement","$children","data","render","_vm","_h","$createElement","_c","_self","ref","attrs","root","_withStripped","__decorate","decorators","target","desc","d","c","arguments","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","reflectMetadataIsSupported","getMetadata","Prop","options","Array","isArray","hasOwnProperty","createDecorator","componentOptions","k","Ref","refKey","computed","cache","get","$refs","FramedComponent","$emit","components","normalizeComponent","scriptExports","staticRenderFns","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","call","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","concat","exports","__file","on","present","_v","staticClass","animationType","mainComponent","css","beforeEnter","beforeLeave","enter","leave","afterLeave","afterEnter","enterCancelled","show","pop","_e","NavigationController","transitionName","savedScrollPositions","nextScrollPosition","previousScrollPosition","initialComponents","slice","el","$el","width","offsetWidth","height","offsetHeight","element","getComputedStyle","overflowY","overflow","parentElement","getScrollElement","document","documentElement","error","activeElement","blur","force","shouldAnimate","replace","scrollElement","w","clientHeight","visualViewport","scrollTop","freezeSize","popped","comp","canAnimate","count","prev","$listeners","getPoppableParent","Math","max","insertedElement","className","_element","beforeBeforeEnterAnimation","finishedEnterAnimation","done","firstElementChild","scrollOuterHeight","getScrollOuterHeight","next","childElement","transitionDuration","willChange","growSize","requestAnimationFrame","beforeEnterAnimation","beginEnterAnimation","setTimeout","current","top","bottom","unfreezeSize","default","appear","shouldAppear","duration","class","sticky","pushDown","mousedown","dismiss","touchdown","$event","stopPropagation","ModalMixin","nav","Popup","popups","modalStackComponent","stackComponent","onKey","resize","removeEventListener","getHistoryIndex","defaultPrevented","repeat","isFocused","keyCode","preventDefault","required","_l","refInFor","removeAt","StackComponent","entries","Sheet","SideView","sideViews","ModalStackComponent","setDisplayStyle","navigationController","detail","showDetail","throttle","func","limit","lastFunc","lastRan","args","clearTimeout","Date","now","apply","SplitViewController","detailKey","listener","onResize","passive","detailWidth","setProperty","shouldCollapse","collapse","lastIsDetail","expand","$nextTick","NavigationMixin","canPop","canDismiss","emitParents","modalNav","modalOrPopup","calculateCanPop","calculateCanDismiss","poppableNavigationController","__webpack_module_cache__","__webpack_require__","moduleId","module","__webpack_modules__","n","getter","__esModule","a","definition","o","enumerable","obj","prop","prototype","Symbol","toStringTag","value"],"mappings":"6WAuMO,MAAMA,EAAiB,IAvL9B,MAAMC,qBAAN,cAGI,KAAAC,OAAyB,GAEzB,KAAAC,QAAU,EACV,KAAAC,QAAS,EACT,KAAAC,mBAAoB,EAEpB,KAAAC,kBAAmB,EACnB,KAAAC,mBAAoB,EAMpB,KAAAC,kBAA6D,KAG7D,OAAOC,GACH,GAAKC,KAAKN,OAAV,CAKA,GAAIM,KAAKH,kBAUL,OAJII,wBAAwBC,OACxBC,QAAQC,IAAI,yBAA2BL,EAAI,sBAAsBC,KAAKP,cAE1EO,KAAKF,kBAAoB,CAAEC,MAAKN,QAASO,KAAKP,UAI9CQ,wBAAwBC,OACxBC,QAAQC,IAAI,YAAcL,EAAI,sBAAsBC,KAAKP,SAG7DY,QAAQC,aAAa,CAAEb,QAASO,KAAKP,SAAW,GAAIM,GACpDC,KAAKR,OAAOQ,KAAKR,OAAOe,OAAS,GAAGR,IAAMA,GAG9C,UAAUA,EAAyBS,EAAwCC,GAClET,KAAKN,SAIVM,KAAKP,UAELO,KAAKR,OAAOkB,KAAK,CACbX,I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,IAAS/N,OAAOgO,UAAUpN,eAAe8B,KAAKoL,EAAKC,GCCjFZ,EAAoBpN,EAAKwD,IACH,oBAAX0K,QAA0BA,OAAOC,aAC1ClO,OAAOK,eAAekD,EAAS0K,OAAOC,YAAa,CAAEC,MAAO,WAE7DnO,OAAOK,eAAekD,EAAS,aAAc,CAAE4K,OAAO,KJFhDhB,EAAoB,M","file":"main.js","sourcesContent":["import { ComponentWithProperties } from \"./ComponentWithProperties\";\n\ntype HistoryState = {\n /// Url of the page, used if the user returns to this page using buttons on the page\n url?: string;\n\n /// Counter at which the state was added.\n index: number;\n\n /// Whether the history pushState was used to create this state (true) or if this is only a virtual state (false).\n adjustHistory: boolean;\n\n /// Action to execute when the user navigates back to the previous state using the browser's back button.\n undoAction?: (animate: boolean) => void;\n}\n\nclass HistoryManagerStatic {\n // undoActions: Map<number, (animate: boolean) => void> = new Map();\n\n states: HistoryState[] = [];\n\n counter = 0;\n active = false;\n animateHistoryPop = true;\n\n isAdjustingState = false;\n manualStateAction = false;\n\n /**\n * Sometimes we need to set an URL when the history api is already popping the state (async!). Then it is not possible\n * to set the URL. To fix this, we need to delay the replaceState until after the state is popped.\n */\n delayedUrlSetting: { url: string; counter: number } | null = null\n\n /// Set the current URL without modifying states\n setUrl(url: string) {\n if (!this.active) {\n return;\n }\n\n // Sometimes, we need to set a count\n if (this.manualStateAction) {\n /*\n Sometimes we need to set an URL when the history api is already popping the state (async!). Then it is not possible\n to set the URL. To fix this, we need to delay the replaceState until after the state is popped.\n */\n\n if (ComponentWithProperties.debug) {\n console.log(\"Setting url, delayed: \" + url+\", current counter: \"+this.counter);\n }\n this.delayedUrlSetting = { url, counter: this.counter }\n return\n }\n\n if (ComponentWithProperties.debug) {\n console.log(\"Set url: \" + url+\", current counter: \"+this.counter);\n }\n\n history.replaceState({ counter: this.counter }, \"\", url);\n this.states[this.states.length - 1].url = url;\n }\n\n pushState(url: string | undefined, undoAction: (animate: boolean) => void, adjustHistory: boolean) {\n if (!this.active) {\n return;\n }\n\n this.counter++;\n\n this.states.push({\n url: url,\n index: this.counter,\n adjustHistory,\n undoAction,\n })\n\n if (adjustHistory) {\n history.pushState({ counter: this.counter }, \"\", url);\n } else {\n history.replaceState({ counter: this.counter }, \"\", url);\n }\n\n if (ComponentWithProperties.debug) {\n console.log(\"Push new state \" , this.states[this.states.length - 1]);\n }\n }\n\n /**\n * Return to a given history point in time, if needed\n */\n returnToHistoryIndex(counter: number) {\n // We'll keep this for debugging and remove it if everything is stable\n if (ComponentWithProperties.debug) {\n console.log(\"Did return to history index \" + counter + \", coming from \" + this.counter);\n }\n if (counter < this.counter) {\n this.counter = counter;\n\n // Delete all future states\n const deletedStates = this.states.splice(this.counter + 1);\n\n // Count how many states we have to delete from the history\n const adjustHistoryCount = deletedStates.filter(state => state.adjustHistory).length;\n\n // Don't need to call undo actions, because the user did go back by itself, and the undo actions are already done manually\n if (adjustHistoryCount > 0 && !this.isAdjustingState) {\n this.manualStateAction = true;\n\n // Note: history.go is async, so all replaceState methods stop working until finished!\n // -> that is why we use delayedUrlSetting\n if (ComponentWithProperties.debug) {\n console.log(\"Adjusting browser history state: popping \" + adjustHistoryCount + \" items\");\n }\n history.go(-adjustHistoryCount); // should be negative\n }\n\n if (!this.states[this.counter].adjustHistory && this.states[this.counter].url) {\n if (ComponentWithProperties.debug) {\n console.log(\"Setting manual url without history api: \" + this.states[this.counter].url);\n }\n\n // Set new url manually again\n this.setUrl(this.states[this.counter].url!);\n }\n }\n\n return this.counter;\n }\n\n activate() {\n // Create push pop listener that will execute undo actions\n window.addEventListener(\"popstate\", (event) => {\n if (ComponentWithProperties.debug) {\n console.log(\"HistoryManager popstate\");\n }\n\n if (this.isAdjustingState) {\n console.warn(\"Duplicate popstate\");\n return;\n }\n if (this.manualStateAction) {\n this.manualStateAction = false;\n\n if (this.delayedUrlSetting && this.counter === this.delayedUrlSetting.counter) {\n this.setUrl(this.delayedUrlSetting.url)\n }\n this.delayedUrlSetting = null\n return;\n }\n this.isAdjustingState = true;\n const newCounter: number | undefined = event.state?.counter;\n\n if (newCounter !== undefined) {\n // Foward or backwards?\n if (newCounter > this.counter) {\n // Not allowed\n const amount = newCounter - this.counter;\n history.go(-amount);\n\n if (ComponentWithProperties.debug) {\n console.log(\"Not allowed to go forward, going back \" + amount + \" steps\");\n }\n } else {\n // Only animate if we only have one undo action and if animations are enabled\n const animate = this.counter - newCounter == 1 && this.animateHistoryPop;\n \n // Set new counter position\n this.counter = newCounter\n \n // Delete all future states\n const deletedStates = this.states.splice(this.counter + 1);\n\n // Execute undo actions in right order\n for (const state of deletedStates.reverse()) {\n if (state.undoAction) {\n if (ComponentWithProperties.debug) {\n console.log(\"Executing undoAction...\");\n }\n state.undoAction(animate);\n }\n }\n }\n }\n this.isAdjustingState = false;\n });\n\n this.active = true;\n\n // Set counter of initial history\n history.replaceState({ counter: this.counter }, \"\");\n\n this.states.push({\n index: this.counter,\n adjustHistory: false,\n url: \"/\"\n })\n }\n}\n\nexport const HistoryManager = new HistoryManagerStatic();\n","import { VNode } from \"vue\";\n\nimport { HistoryManager } from \"./HistoryManager\";\n\nexport type ModalDisplayStyle = \"cover\" | \"popup\" | \"overlay\" | \"sheet\" | \"side-view\"\n\nexport class ComponentWithProperties {\n /// Name of component or component Options. Currently no way to force type\n public component: any;\n public properties: Record<string, any>;\n public key: number | null = null;\n public type: string | null = null;\n public hide = false;\n\n /// Saved vnode of this instance\n public vnode: VNode | null = null;\n\n // Keep the vnode alive when it is removed from the VDOM\n public keepAlive = false;\n public isKeptAlive = false;\n public isMounted = false;\n\n // Counter for debugging. Count of components that are kept alive but are not mounted.\n static keepAliveCounter = 0;\n static keyCounter = 0;\n static debug = false;\n\n /// Cover whole screen. Other style = popup\n public modalDisplayStyle: ModalDisplayStyle = \"cover\"\n\n // If the display animation should be animated\n public animated = true\n\n // Hisotry index\n public historyIndex: number | null = null;\n public isContainerView = false;\n\n private static ignoreActivate: ComponentWithProperties | null = null\n\n constructor(component: any, properties: Record<string, any> = {}) {\n this.component = component;\n this.properties = properties;\n this.key = ComponentWithProperties.keyCounter++;\n }\n\n beforeMount() {\n if (ComponentWithProperties.debug) console.log(\"Before mount: \" + this.component.name);\n\n if (this.vnode) {\n if (this.isKeptAlive) {\n this.isKeptAlive = false;\n ComponentWithProperties.keepAliveCounter--;\n if (ComponentWithProperties.debug) console.log(\"Total components kept alive: \" + ComponentWithProperties.keepAliveCounter);\n }\n }\n\n if (this.isContainerView) {\n // Always make sure it has a saved history index on first mount\n if (this.historyIndex === null) {\n this.historyIndex = HistoryManager.counter;\n }\n return;\n }\n if (this.modalDisplayStyle == \"overlay\") {\n return;\n }\n this.assignHistoryIndex()\n }\n\n getHistoryIndex() {\n if (this.component) return this.historyIndex;\n }\n\n mounted() {\n if (ComponentWithProperties.debug) console.log(\"Component mounted: \" + this.component.name);\n this.isMounted = true;\n\n // We pushed some elements and the history index increased during the mounted lifecycle\n // We now risk that in the next activation cycle (that is only called sometimes, not on all components), the UI will think that it is returning\n // to a previous history state\n // So we ignore the activation of only this instance until some other component got activated first\n ComponentWithProperties.ignoreActivate = this;\n }\n\n onMountedChildComponent(child: ComponentWithProperties) {\n this.isContainerView = true\n if (ComponentWithProperties.debug) console.log(\"Container mounted child component: \" + this.component.name + \" got \"+child.component.name);\n }\n\n onActivatedChildComponent(child: ComponentWithProperties) {\n this.isContainerView = true\n if (ComponentWithProperties.debug) console.log(\"Container got activated child component: \" + this.component.name + \" got \"+child.component.name);\n }\n\n /**\n * Call this method to assign a history index to this component (you should only call this when you want to assign a history index to this component that will not get mounted already)\n */\n assignHistoryIndex() {\n if (this.historyIndex == null) {\n if (ComponentWithProperties.debug) console.log(\"Assigned history index: \" + this.component.name + \" = \" + HistoryManager.counter);\n this.historyIndex = HistoryManager.counter;\n } else {\n // This component was never mounted but already got a history index assigned\n // -> probably pushed on a navigation controller with multiple components at once\n this.historyIndex = HistoryManager.returnToHistoryIndex(this.historyIndex);\n }\n }\n\n activated() {\n if (ComponentWithProperties.debug) console.log(\"Component activated: \" + this.component.name);\n\n if (ComponentWithProperties.ignoreActivate === this) {\n if (ComponentWithProperties.debug) console.log(\"Ignore component activation: \" + this.component.name);\n ComponentWithProperties.ignoreActivate = null\n return\n }\n ComponentWithProperties.ignoreActivate = null\n\n if (this.isContainerView) {\n return;\n }\n if (this.modalDisplayStyle == \"overlay\") {\n return;\n }\n if (this.historyIndex !== null) {\n // Sometimes, a component will get activated just after mounting it. We ignore that activated event once\n this.historyIndex = HistoryManager.returnToHistoryIndex(this.historyIndex);\n }\n }\n\n componentInstance(): Vue | undefined {\n return this.vnode?.componentInstance;\n }\n\n async shouldNavigateAway(): Promise<boolean> {\n const instance = this.componentInstance() as any;\n if (instance && instance.shouldNavigateAway) {\n const promise = instance.shouldNavigateAway();\n if (typeof promise === \"boolean\") {\n if (!promise) {\n return false;\n }\n } else if (promise.then && promise.catch) {\n const r = (await promise) as boolean;\n if (!r) {\n return false;\n }\n }\n }\n return true;\n }\n\n destroy() {\n this.isMounted = false;\n\n if (this.vnode) {\n if (this.keepAlive) {\n this.keepAlive = false;\n\n if (!this.isKeptAlive) {\n this.isKeptAlive = true;\n ComponentWithProperties.keepAliveCounter++;\n if (ComponentWithProperties.debug) console.log(\"Kept component alive \" + this.component.name);\n if (ComponentWithProperties.debug) console.log(\"Total components kept alive: \" + ComponentWithProperties.keepAliveCounter);\n }\n return;\n }\n\n if (this.isKeptAlive) {\n this.isKeptAlive = false;\n ComponentWithProperties.keepAliveCounter--;\n if (ComponentWithProperties.debug) console.log(\"Freed component from alive stack \" + this.component.name);\n if (ComponentWithProperties.debug) console.log(\"Total components kept alive: \" + ComponentWithProperties.keepAliveCounter);\n }\n\n if (ComponentWithProperties.debug) console.log(\"Destroyed component \" + this.component.name);\n this.vnode.componentInstance?.$destroy();\n this.vnode = null;\n }\n }\n\n setDisplayStyle(style: ModalDisplayStyle): ComponentWithProperties {\n this.modalDisplayStyle = style;\n return this;\n }\n\n setAnimated(animated: boolean): ComponentWithProperties {\n this.animated = animated;\n return this;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"vue\");;","/* eslint-disable vue/no-mutating-props */\nimport Vue, { VNode } from \"vue\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\n\nconst ComponentWithPropertiesInstance = Vue.extend({ \n props: {\n component: ComponentWithProperties,\n },\n\n watch: {\n component(_val) {\n throw new Error(\"Changing component during life is not yet supported\");\n },\n },\n\n created() {\n /// Whether the node should be destroyed if it is removed from the dom\n this.destroy = true;\n },\n\n beforeMount() {\n this.component.beforeMount();\n },\n\n activated() {\n this.component.activated();\n\n // Update container views history index\n let start: any = this.$parent;\n while (start) {\n if (start instanceof ComponentWithPropertiesInstance) {\n (start.component as ComponentWithProperties).onActivatedChildComponent(this.component)\n }\n start = start.$parent;\n }\n },\n\n mounted() {\n this.component.mounted();\n\n // Mark all parents as containers\n let start: any = this.$parent;\n while (start) {\n if (start instanceof ComponentWithPropertiesInstance) {\n (start.component as ComponentWithProperties).onMountedChildComponent(this.component)\n }\n start = start.$parent;\n }\n },\n\n destroyed() {\n // This component got removed (with v-if, v-for, ...) in some way.\n // This doesn't mean we want to destroy it\n this.component.destroy();\n },\n\n render(createElement): VNode {\n // Only create the vnode once\n if (this.component.vnode) {\n // We need to update the parent here\n this.component.vnode.componentInstance.$parent = this;\n // Force update children (needed because the new vnode won't restart a lifecycle \n // and vue won't update children because that is not supported out of the box)\n this.$children = [this.component.vnode.componentInstance]\n return this.component.vnode;\n }\n\n this.component.vnode = createElement(this.component.component, {\n props: this.component.properties,\n key: this.component.key,\n });\n\n // Magic trick: we are now responsible for deallocating the component\n this.component.vnode.data.keepAlive = true;\n return this.component.vnode;\n },\n});\n\nexport default ComponentWithPropertiesInstance;\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", [\n _c(\n \"div\",\n { ref: \"scrollContainer\" },\n [\n _c(\"ComponentWithPropertiesInstance\", {\n attrs: { component: _vm.root }\n })\n ],\n 1\n )\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"vue-class-component\");;","/** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */\nvar reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';\nexport function applyMetadata(options, target, key) {\n if (reflectMetadataIsSupported) {\n if (!Array.isArray(options) &&\n typeof options !== 'function' &&\n !options.hasOwnProperty('type') &&\n typeof options.type === 'undefined') {\n var type = Reflect.getMetadata('design:type', target, key);\n if (type !== Object) {\n options.type = type;\n }\n }\n }\n}\n","import { createDecorator } from 'vue-class-component';\nimport { applyMetadata } from '../helpers/metadata';\n/**\n * decorator of a prop\n * @param options the options for the prop\n * @return PropertyDecorator | void\n */\nexport function Prop(options) {\n if (options === void 0) { options = {}; }\n return function (target, key) {\n applyMetadata(options, target, key);\n createDecorator(function (componentOptions, k) {\n ;\n (componentOptions.props || (componentOptions.props = {}))[k] = options;\n })(target, key);\n };\n}\n","import { createDecorator } from 'vue-class-component';\n/**\n * decorator of a ref prop\n * @param refKey the ref key defined in template\n */\nexport function Ref(refKey) {\n return createDecorator(function (options, key) {\n options.computed = options.computed || {};\n options.computed[key] = {\n cache: false,\n get: function () {\n return this.$refs[refKey || key];\n },\n };\n });\n}\n","\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop, Ref,Vue } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport ComponentWithPropertiesInstance from \"./ComponentWithPropertiesInstance\";\n\n@Component({\n components: {\n ComponentWithPropertiesInstance,\n },\n})\nexport default class FramedComponent extends Vue {\n @Prop()\n root!: ComponentWithProperties;\n\n @Ref()\n scrollContainer!: HTMLElement;\n\n pop(data) {\n this.$emit(\"pop\", data);\n }\n\n push(data) {\n this.$emit(\"push\", data);\n }\n}\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./FramedComponent.vue?vue&type=template&id=5c46ef86&\"\nimport script from \"./FramedComponent.vue?vue&type=script&lang=ts&\"\nexport * from \"./FramedComponent.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5c46ef86')) {\n api.createRecord('5c46ef86', component.options)\n } else {\n api.reload('5c46ef86', component.options)\n }\n module.hot.accept(\"./FramedComponent.vue?vue&type=template&id=5c46ef86&\", function () {\n api.rerender('5c46ef86', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/FramedComponent.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n [\n _c(\"NavigationController\", {\n ref: \"navigationController\",\n attrs: { \"animation-type\": \"modal\", root: _vm.root },\n on: { present: _vm.present }\n }),\n _vm._v(\" \"),\n _c(\"StackComponent\", {\n ref: \"stackComponent\",\n on: { present: _vm.present }\n })\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n {\n staticClass: \"navigation-controller\",\n attrs: { \"data-animation-type\": _vm.animationType }\n },\n [\n _vm.mainComponent\n ? _c(\n \"transition\",\n {\n attrs: { css: false },\n on: {\n \"before-enter\": _vm.beforeEnter,\n \"before-leave\": _vm.beforeLeave,\n enter: _vm.enter,\n leave: _vm.leave,\n \"after-leave\": _vm.afterLeave,\n \"after-enter\": _vm.afterEnter,\n \"enter-cancelled\": _vm.enterCancelled\n }\n },\n [\n _c(\"FramedComponent\", {\n key: _vm.mainComponent.key,\n ref: \"child\",\n attrs: { root: _vm.mainComponent, name: _vm.mainComponent.key },\n on: { push: _vm.push, show: _vm.push, pop: _vm.pop }\n })\n ],\n 1\n )\n : _vm._e()\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop, Ref, Vue } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport FramedComponent from \"./FramedComponent.vue\";\nimport { HistoryManager } from \"./HistoryManager\";\nimport { PopOptions } from \"./PopOptions\"\nimport { PushOptions } from \"./PushOptions\";\n\n@Component({\n components: {\n FramedComponent,\n },\n})\nexport default class NavigationController extends Vue {\n components: ComponentWithProperties[] = [];\n mainComponent: ComponentWithProperties | null = null;\n transitionName = \"none\";\n savedScrollPositions: number[] = [];\n nextScrollPosition = 0;\n previousScrollPosition = 0;\n\n @Prop()\n root!: ComponentWithProperties;\n\n @Prop({ default: null })\n initialComponents: ComponentWithProperties[] | null;\n\n @Prop({ default: \"default\" })\n animationType!: string;\n\n @Ref()\n child!: FramedComponent;\n\n beforeMount() {\n if (this.initialComponents && this.initialComponents.length > 0) {\n this.mainComponent = this.initialComponents[this.initialComponents.length - 1];\n this.components = this.initialComponents.slice(0);\n\n // Update property (even if not allowed, we know, but we need to remove the references)\n this.initialComponents.splice(0, this.initialComponents.length);\n } else {\n this.mainComponent = this.root;\n this.components = [this.root];\n }\n }\n\n freezeSize() {\n const el = this.$el as HTMLElement;\n\n el.style.width = el.offsetWidth + \"px\";\n el.style.height = el.offsetHeight + \"px\";\n }\n\n growSize(width: number, height: number) {\n const el = this.$el as HTMLElement;\n\n el.style.height = height+ \"px\";\n el.style.width = width + \"px\";\n }\n\n unfreezeSize() {\n const el = this.$el as HTMLElement;\n el.style.width = \"\";\n el.style.height = \"\";\n }\n\n getScrollElement(element: HTMLElement | null = null): HTMLElement {\n if (!element) {\n element = this.$el as HTMLElement;\n }\n\n const style = window.getComputedStyle(element);\n if (style.overflowY == \"scroll\" || style.overflow == \"scroll\" || style.overflow == \"auto\" || style.overflowY == \"auto\") {\n return element;\n } else {\n if (!element.parentElement) {\n return document.documentElement;\n }\n return this.getScrollElement(element.parentElement);\n }\n }\n\n shouldAnimate() {\n return this.getScrollElement().offsetWidth <= 900;\n }\n\n /**\n * popOptions = how to handle the pop of replace. animated and count are ignored\n * -> should get moved to separate configurations in the future\n */\n async push(options: PushOptions) {\n if (options.components.length == 0) {\n console.error(\"Missing component when pushing\")\n return\n }\n (document.activeElement as any)?.blur()\n const components = options.components\n const component = components[components.length - 1]\n\n // shouldAnimate: boolean | null = null, replace = 0, reverse = false, replaceWith: ComponentWithProperties[] = [], popOptions: PopOptions = {}\n const destroy = options.destroy ?? true\n const force = options.force ?? false\n const animated = this.shouldAnimate() ? (options.animated === undefined ? component.animated : options.animated) : false\n\n let replace = options.replace ?? 0\n if (replace > this.components.length) {\n replace = this.components.length\n }\n\n if (ComponentWithProperties.debug) console.log(\"Pushing new component on navigation controller: \" + component.component.name);\n\n if (replace > 0) {\n // Check if we are allowed to dismiss them all.\n // If one fails, we skip everything.\n if (destroy && !force) {\n for (let index = this.components.length - 1; index >= this.components.length - replace; index--) {\n const component = this.components[index];\n const r = await component.shouldNavigateAway();\n if (!r) {\n return;\n }\n }\n }\n }\n\n if (!animated) {\n this.transitionName = \"none\";\n } else {\n this.transitionName = this.animationType == \"modal\" ? \"modal-push\" : options.reverse ? \"pop\" : \"push\";\n }\n\n // Add the client height from the saved height (check pop method for information)\n const scrollElement = this.getScrollElement();\n const w = window as any;\n\n let clientHeight = scrollElement.clientHeight;\n if (scrollElement === document.documentElement && w.visualViewport) {\n clientHeight = w.visualViewport.height;\n }\n\n // Save scroll position\n this.previousScrollPosition = scrollElement.scrollTop;\n this.savedScrollPositions.push(this.previousScrollPosition + clientHeight);\n this.nextScrollPosition = 0;\n\n // Save width and height\n if (animated) {\n this.freezeSize();\n }\n\n // Make sure the transition name changed, so wait for a rerender\n if (replace > 0) {\n const popped = this.components.splice(this.components.length - replace, replace, ...components);\n \n if (!destroy) {\n // Stop destroy\n for (const comp of popped) {\n comp.keepAlive = true;\n }\n }\n } else {\n this.components.push(...components);\n }\n\n if (this.mainComponent) {\n // Keep the component alive while it is removed from the DOM, unless it is being replaced\n this.mainComponent.keepAlive = !replace;\n }\n\n this.mainComponent = component;\n this.$emit(\"didPush\");\n\n if (replace == 0 && this) {\n //\n for (let index = 0; index < components.length; index++) {\n HistoryManager.pushState(options?.url, (canAnimate: boolean) => {\n // todo: fix reference to this and memory handling here!!\n this.pop({ animated: animated && canAnimate});\n }, options?.adjustHistory ?? true);\n\n if (index < components.length - 1) {\n // This component will not get mounted, but we need to simulate this to assign\n // a history index\n components[index].assignHistoryIndex()\n }\n }\n }\n }\n\n /**\n * Whether user interaction might prevent destructive navigation away from components.\n */\n async shouldNavigateAway(): Promise<boolean> {\n for (let index = this.components.length - 1; index >= 0; index--) {\n const component = this.components[index];\n const r = await component.shouldNavigateAway();\n if (!r) {\n return false;\n }\n }\n return true;\n }\n\n popToRoot(options: PopOptions = {}) {\n options.count = this.components.length - 1\n return this.pop(options);\n }\n\n getPoppableParent(): any | null {\n let prev = this;\n let start: any = this.$parent;\n while (start) {\n if (prev.$listeners[\"pop\"]) {\n return prev;\n }\n\n prev = start;\n start = start.$parent;\n }\n return null;\n }\n\n /**\n * force: whether \"shouldNavigateAway\" of child components is ignored\n */\n async pop(options: PopOptions = {}): Promise<ComponentWithProperties[] | undefined> {\n (document.activeElement as any)?.blur()\n\n const animated = this.shouldAnimate() ? (options.animated ?? true) : false;\n const destroy = options.destroy ?? true;;\n const count = options.count ?? 1;\n const force = options.force ?? false;\n\n if (this.components.length <= count) {\n const parent = this.getPoppableParent()\n\n // Prevent multiple count pop across modal levels\n options.count = 1\n\n if (!parent) {\n console.error(\"Tried to pop an empty navigation controller, but couldn't find a parent to pop\")\n this.$emit(\"pop\", options)\n return;\n }\n parent.$emit(\"pop\", options)\n return;\n }\n\n if (count === 0) {\n return;\n }\n\n if (destroy && !force) {\n for (let index = this.components.length - 1; index >= this.components.length - count; index--) {\n const component = this.components[index];\n const r = await component.shouldNavigateAway();\n if (!r) {\n return;\n }\n }\n }\n\n this.previousScrollPosition = this.getScrollElement().scrollTop;\n\n if (!animated) {\n this.transitionName = \"none\";\n } else {\n this.transitionName = this.animationType == \"modal\" ? \"modal-pop\" : \"pop\";\n this.freezeSize();\n }\n //console.log(\"Prepared previous scroll positoin: \" + this.previousScrollPosition);\n\n const popped = this.components.splice(this.components.length - count, count);\n\n if (!destroy) {\n // Stop destroy\n for (const comp of popped) {\n comp.keepAlive = true;\n }\n }\n\n // Remove the client height from the saved height (since this includes the client height so we can correct any changes in client heigth ahead of time)\n // We need this because when we set the height of the incoming view, we cannot reliably detect the maximum scroll height due some mobile browser glitches\n const scrollElement = this.getScrollElement();\n const w = window as any;\n\n let clientHeight = scrollElement.clientHeight;\n if (scrollElement === document.documentElement && w.visualViewport) {\n clientHeight = w.visualViewport.height;\n }\n\n this.nextScrollPosition = Math.max(0, (this.savedScrollPositions.pop() ?? 0) - clientHeight);\n\n this.mainComponent = this.components[this.components.length - 1];\n this.$emit(\"didPop\");\n return popped;\n }\n\n beforeEnter(insertedElement: HTMLElement) {\n if (this.transitionName == \"none\") {\n return;\n }\n\n // We need to set the class already to hide the incoming element\n insertedElement.className = this.transitionName + \"-enter-active \" + this.transitionName + \"-enter\";\n }\n\n beforeLeave(_element: HTMLElement) {\n if (this.transitionName == \"none\") {\n return;\n }\n // Do nothing here. Is is important to finish the enter transitions first!\n // Do not even set a class! That will cause flickering on Webkit!\n }\n\n beforeBeforeEnterAnimation() {\n if (this.mainComponent) {\n const instance: any = this.mainComponent.componentInstance()\n if (instance && instance.beforeBeforeEnterAnimation) {\n instance.beforeBeforeEnterAnimation()\n }\n }\n }\n\n finishedEnterAnimation() {\n if (this.mainComponent) {\n const instance: any = this.mainComponent.componentInstance()\n if (instance && instance.finishedEnterAnimation) {\n instance.finishedEnterAnimation()\n }\n }\n }\n\n enter(element: HTMLElement, done) {\n if (this.transitionName == \"none\") {\n this.getScrollElement().scrollTop = this.nextScrollPosition;\n done();\n return;\n }\n\n // Allow scrollTop override in a specified handler\n // Call before\n if (this.mainComponent) {\n const instance: any = this.mainComponent.componentInstance()\n if (instance && instance.beforeBeforeEnterAnimation) {\n instance.beforeBeforeEnterAnimation()\n }\n }\n\n const scrollElement = this.getScrollElement();\n\n const w = ((element.firstElementChild as HTMLElement).firstElementChild as HTMLElement).offsetWidth;\n const h = (element.firstElementChild as HTMLElement).offsetHeight;\n\n const scrollOuterHeight = this.getScrollOuterHeight(scrollElement);\n\n // Limit\n\n let next = this.nextScrollPosition;\n\n //console.log(\"Entering element \", h, next, scrollOuterHeight)\n\n if (next > h - scrollOuterHeight) {\n // To much scrolled!\n //console.log(\"Corrected maximum scroll position\")\n next = Math.max(0, h - scrollOuterHeight);\n\n // Also propagate this change to the .leave handler\n this.nextScrollPosition = next\n //console.log(\"corrected! \", h, next, scrollOuterHeight)\n }\n\n // Prepare animation\n const childElement = (element.firstElementChild as HTMLElement)\n\n let transitionDuration = 300\n if (this.transitionName === \"pop\" || this.transitionName == \"modal-pop\") {\n // Pop animations should go faster\n transitionDuration = 250\n }\n\n if (this.transitionName == \"push\" || this.transitionName == \"pop\") {\n element.style.willChange = \"opacity\"\n childElement.style.willChange = \"transform\"\n } else {\n if (this.transitionName == \"modal-push\") {\n element.style.willChange = \"top\"\n }\n }\n scrollElement.style.willChange = \"scroll-position\"\n\n // Lock position if needed\n // This happens before the beforeLeave animation frame!\n this.growSize(w, h);\n\n // Disable scroll during animation (this is to fix overflow elements)\n // We can only allow scroll during transitions when all browser support overflow: clip, which they don't atm\n // This sometimes doesn't work on iOS Safari on body due to a bug\n requestAnimationFrame(() => {\n // Wait and execute immediately after beforeLeave's animation frame\n // Let the OS rerender once so all the positions are okay after dom insertion\n scrollElement.scrollTop = next;\n\n // Allow scrollTop override in a specified handler\n // Call before\n if (this.mainComponent) {\n const instance: any = this.mainComponent.componentInstance()\n if (instance && instance.beforeEnterAnimation) {\n instance.beforeEnterAnimation()\n }\n }\n\n // Start animation in the next frame\n requestAnimationFrame(() => {\n // We've reached our initial positioning and can start our animation\n element.className = this.transitionName + \"-enter-active \" + this.transitionName + \"-enter-to\";\n\n // Call start\n if (this.mainComponent) {\n const instance: any = this.mainComponent.componentInstance()\n if (instance && instance.beginEnterAnimation) {\n instance.beginEnterAnimation()\n }\n }\n\n setTimeout(() => {\n //scrollElement.style.overflow = \"\";\n element.style.willChange = \"\"\n childElement.style.willChange = \"\"\n scrollElement.style.willChange = \"\"\n\n // Call finished\n if (this.mainComponent) {\n const instance: any = this.mainComponent.componentInstance()\n if (instance && instance.finishedEnterAnimation) {\n instance.finishedEnterAnimation()\n }\n }\n done();\n }, transitionDuration + 25);\n });\n });\n }\n\n getScrollOuterHeight(scrollElement: HTMLElement) {\n // we add some extra padding below to fix iOS bug that reports wront clientHeight\n // We need to show some extra area below of the leaving frame, but to do this, we also need\n // to check if there is still content left below the visible client height. So we calculate the area underneath the client height\n // and limit to 300px maximum extra padding\n // const fixPadding = Math.min(300, Math.max(0, element.offsetHeight - current - scrollElement.clientHeight));\n // console.log(\"Fix padding: \" + fixPadding);\n // This fixPadding thing doesn't work on other browsers. Need to recheck when it reappears on iOS\n let h = scrollElement.clientHeight; // + fixPadding;\n if (scrollElement === document.documentElement) {\n // Fix viewport glitch\n const w = window as any;\n if (w.visualViewport) {\n //console.log(\"Used height \" + w.visualViewport.height + \" instead of \" + h);\n h = w.visualViewport.height;\n }\n }\n return h\n }\n\n leave(element: HTMLElement, done) {\n if (this.transitionName == \"none\") {\n done();\n return;\n }\n\n const scrollElement = this.getScrollElement();\n let h = this.getScrollOuterHeight(scrollElement)\n\n // Prepare animation\n const childElement = (element.firstElementChild as HTMLElement)\n if (this.transitionName == \"push\" || this.transitionName == \"pop\") {\n element.style.willChange = \"opacity,top\"\n } else {\n element.style.willChange = \"top\"\n }\n\n if (this.transitionName == \"push\" || this.transitionName == \"pop\" || this.transitionName == \"modal-pop\") {\n childElement.style.willChange = \"scroll-position,transform\"\n } else {\n childElement.style.willChange = \"scroll-position\"\n }\n\n let transitionDuration = 300\n if (this.transitionName === \"pop\" || this.transitionName == \"modal-pop\") {\n // Pop animations should go faster\n transitionDuration = 250\n }\n\n // This animation frame is super important to prevent flickering on Safari and Webkit!\n // This is also one of the reasons why we cannot use the default Vue class additions\n // We do this to improve the timing of the classes and scroll positions\n requestAnimationFrame(() => {\n // Prevent blinking due to slow rerender after scrollTop changes\n // Create a clone and offset the clone first. After that, adjust the scroll position\n const current = this.previousScrollPosition;\n const next = this.nextScrollPosition;\n\n const height = h + \"px\";\n //console.log(\"height\", height);\n\n // Setting the class has to happen in one go.\n // First we need to make our element fixed / absolute positioned, and pinned to all the edges\n // In the same frame, we need to update the scroll position.\n // If we switch the ordering, this won't work!\n element.className = this.transitionName + \"-leave-active \" + this.transitionName + \"-leave\";\n\n element.style.top = next + \"px\";\n element.style.height = height;\n element.style.bottom = \"auto\";\n element.style.overflow = \"hidden\";\n\n // Now scroll!\n childElement.style.overflow = \"hidden\";\n childElement.style.height = h + \"px\";\n\n childElement.scrollTop = current;\n\n requestAnimationFrame(() => {\n // We've reached our initial positioning and can start our animation\n element.className = this.transitionName + \"-leave-active \" + this.transitionName + \"-leave-to\";\n\n setTimeout(() => {\n element.style.overflow = \"\";\n element.style.top = \"\";\n element.style.height = \"\";\n element.style.bottom = \"\";\n childElement.style.overflow = \"\";\n element.style.willChange = \"\"\n childElement.style.willChange = \"\"\n done();\n }, transitionDuration + 25);\n });\n });\n }\n\n afterLeave(element: HTMLElement) {\n if (this.transitionName == \"none\") {\n return;\n }\n\n element.className = \"\";\n }\n\n afterEnter(element: HTMLElement) {\n if (this.transitionName == \"none\") {\n return;\n }\n this.unfreezeSize();\n element.className = \"\";\n }\n\n enterCancelled(_element: HTMLElement) {\n this.unfreezeSize();\n }\n\n destroyed() {\n // console.log(\"Destroyed navigation controller\");\n\n // Prevent memory issues by removing all references and destroying kept alive components\n for (const component of this.components) {\n // Destroy them one by one\n if (component.isKeptAlive) {\n component.destroy();\n }\n }\n\n this.components = [];\n this.mainComponent = null;\n }\n}\n","import { render, staticRenderFns } from \"./NavigationController.vue?vue&type=template&id=250e5c49&\"\nimport script from \"./NavigationController.vue?vue&type=script&lang=ts&\"\nexport * from \"./NavigationController.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./NavigationController.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('250e5c49')) {\n api.createRecord('250e5c49', component.options)\n } else {\n api.reload('250e5c49', component.options)\n }\n module.hot.accept(\"./NavigationController.vue?vue&type=template&id=250e5c49&\", function () {\n api.rerender('250e5c49', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/NavigationController.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"transition\",\n { attrs: { appear: _vm.shouldAppear, name: \"fade\", duration: 300 } },\n [\n _c(\n \"div\",\n {\n staticClass: \"popup\",\n class: {\n sticky: _vm.sticky,\n \"push-down\": _vm.pushDown == 1,\n \"push-down-full\": _vm.pushDown > 1\n },\n on: { mousedown: _vm.dismiss, touchdown: _vm.dismiss }\n },\n [\n _c(\n \"div\",\n {\n on: {\n mousedown: function($event) {\n $event.stopPropagation()\n },\n touchdown: function($event) {\n $event.stopPropagation()\n }\n }\n },\n [\n _c(\n \"div\",\n { staticClass: \"scrollable-container\" },\n [\n _c(\"ComponentWithPropertiesInstance\", {\n key: _vm.root.key,\n attrs: { component: _vm.root },\n on: { pop: _vm.dismiss }\n })\n ],\n 1\n )\n ]\n )\n ]\n )\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import { Component, Vue } from \"vue-property-decorator\";\n\nimport ModalStackComponent from \"./ModalStackComponent.vue\";\nimport { PopOptions } from \"./PopOptions\";\n\n// You can declare mixins as the same style as components.\n@Component\nexport class ModalMixin extends Vue {\n get modalStackComponent(): ModalStackComponent | null {\n let start: any = this.$parent;\n while (start) {\n if (start instanceof ModalStackComponent) {\n return start;\n }\n\n start = start.$parent;\n }\n return null;\n }\n\n /**\n * Call one of the pop listeners of a parent or grandparent. E.g. to go back in a navigation controller.\n * @param options Options that should get applied to the pop of the first parent that listens for the pop event\n */\n pop(options: PopOptions = {}) {\n const nav = this.getPoppableParent();\n if (nav) {\n // Sometimes we need to call the pop event instead (because this adds custom data to the event)\n if (nav.$listeners[\"pop\"]) {\n nav.$emit(\"pop\", options);\n } else {\n console.error(\"Couldn't pop. Failed\");\n }\n } else {\n console.warn(\"No navigation controller to pop\");\n }\n }\n\n /**\n * Return the first child of a parent that listens for the pop event\n */\n getPoppableParent(): any | null {\n let prev = this;\n let start: any = this.$parent;\n while (start) {\n if (prev.$listeners[\"pop\"]) {\n return prev;\n }\n\n prev = start;\n start = start.$parent;\n }\n return null;\n }\n}","\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport ComponentWithPropertiesInstance from \"./ComponentWithPropertiesInstance\";\nimport { PopOptions } from './PopOptions';\nimport { HistoryManager } from './HistoryManager';\nimport { ModalMixin } from './ModalMixin';\n\nconst visualViewport = (window as any).visualViewport\n\n@Component({\n components: {\n ComponentWithPropertiesInstance,\n }\n})\nexport default class Popup extends ModalMixin {\n @Prop({ required: true })\n root!: ComponentWithProperties\n\n sticky = false\n\n get shouldAppear() {\n return this.root.animated\n }\n\n get pushDown() {\n const popups = this.modalStackComponent?.stackComponent?.components.filter(c => c.component === Popup) ?? []\n if (popups.length > 0 && popups[popups.length - 1].componentInstance() !== this) {\n if (popups.length > 1 && popups[popups.length - 2].componentInstance() === this) {\n return 1\n }\n return 2\n }\n return 0\n }\n\n get isFocused() {\n const popups = this.modalStackComponent?.stackComponent?.components ?? []\n if (popups.length > 0 && popups[popups.length - 1].componentInstance() !== this) {\n return false\n }\n return true\n }\n\n activated() {\n document.addEventListener(\"keydown\", this.onKey);\n this.resize();\n\n if (visualViewport) {\n visualViewport.addEventListener('resize', this.resize);\n }\n }\n\n deactivated() {\n document.removeEventListener(\"keydown\", this.onKey);\n\n if (visualViewport) {\n visualViewport.removeEventListener('resize', this.resize);\n }\n }\n\n async dismiss(options?: PopOptions) {\n if (!options?.force) {\n const r = await this.shouldNavigateAway();\n if (!r) {\n return false;\n }\n }\n\n // Check which modal is undernath?\n const popups = this.modalStackComponent?.stackComponent?.components.filter(c => c.modalDisplayStyle !== \"overlay\") ?? []\n if (popups.length === 0 || popups[popups.length - 1].componentInstance() === this) {\n const index = this.root.getHistoryIndex()\n if (index !== null && index !== undefined) {\n HistoryManager.returnToHistoryIndex(index - 1);\n }\n }\n this.pop(options)\n }\n\n resize() {\n if (!visualViewport) {\n return;\n }\n // Check if covered area is more than 200px -> we got a keyboard shown -> switch to sticky mode\n if (document.documentElement.clientHeight - visualViewport.height > 200) {\n this.sticky = true\n } else {\n this.sticky = false\n }\n }\n\n onKey(event) {\n if (event.defaultPrevented || event.repeat) {\n return;\n }\n\n if (!this.isFocused) {\n return;\n }\n\n const key = event.key || event.keyCode;\n\n if (key === \"Escape\" || key === \"Esc\" || key === 27) {\n this.dismiss();\n event.preventDefault();\n }\n }\n\n shouldNavigateAway() {\n return this.root.shouldNavigateAway()\n }\n}\n","import { render, staticRenderFns } from \"./Popup.vue?vue&type=template&id=a782d2fa&\"\nimport script from \"./Popup.vue?vue&type=script&lang=ts&\"\nexport * from \"./Popup.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Popup.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('a782d2fa')) {\n api.createRecord('a782d2fa', component.options)\n } else {\n api.reload('a782d2fa', component.options)\n }\n module.hot.accept(\"./Popup.vue?vue&type=template&id=a782d2fa&\", function () {\n api.rerender('a782d2fa', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/Popup.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n _vm._l(_vm.components, function(component, index) {\n return _c(\"ComponentWithPropertiesInstance\", {\n key: component.key,\n ref: \"children\",\n refInFor: true,\n attrs: { component: component },\n on: {\n pop: function($event) {\n return _vm.removeAt(index, component.key)\n }\n }\n })\n }),\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport ComponentWithPropertiesInstance from \"./ComponentWithPropertiesInstance\";\n\n@Component({\n components: {\n ComponentWithPropertiesInstance,\n },\n})\nexport default class StackComponent extends Vue {\n components: ComponentWithProperties[] = [];\n\n show(component: ComponentWithProperties) {\n this.components.push(component);\n }\n\n removeAt(index, key) {\n if (!this.components[index]) {\n // Manually search for the key (race conditions with slow events in vue)\n for (const [i, comp] of this.components.entries()) {\n if (comp.key === key) {\n console.warn(\"Corrected index from \"+index+\" to \"+i)\n index = i;\n break;\n }\n }\n }\n if (this.components[index].key === key) {\n this.components.splice(index, 1);\n } else {\n console.warn(\"Expected component with key \" + key + \" at index\" + index);\n }\n }\n\n beforeDestroy() {\n this.components = [];\n }\n}\n","import { render, staticRenderFns } from \"./StackComponent.vue?vue&type=template&id=1b21bde4&\"\nimport script from \"./StackComponent.vue?vue&type=script&lang=ts&\"\nexport * from \"./StackComponent.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('1b21bde4')) {\n api.createRecord('1b21bde4', component.options)\n } else {\n api.reload('1b21bde4', component.options)\n }\n module.hot.accept(\"./StackComponent.vue?vue&type=template&id=1b21bde4&\", function () {\n api.rerender('1b21bde4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/StackComponent.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"transition\",\n { attrs: { appear: _vm.shouldAppear, name: \"fade\", duration: 300 } },\n [\n _c(\n \"div\",\n {\n staticClass: \"sheet\",\n on: { mousedown: _vm.dismiss, touchdown: _vm.dismiss }\n },\n [\n _c(\n \"div\",\n {\n on: {\n mousedown: function($event) {\n $event.stopPropagation()\n },\n touchdown: function($event) {\n $event.stopPropagation()\n }\n }\n },\n [\n _c(\"ComponentWithPropertiesInstance\", {\n key: _vm.root.key,\n attrs: { component: _vm.root },\n on: { pop: _vm.dismiss }\n })\n ],\n 1\n )\n ]\n )\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\nimport { Vue, Component, Prop } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport ComponentWithPropertiesInstance from \"./ComponentWithPropertiesInstance\";\nimport { PopOptions } from './PopOptions';\nimport { ModalMixin } from './ModalMixin';\nimport { HistoryManager } from \"./HistoryManager\";\n\n@Component({\n components: {\n ComponentWithPropertiesInstance,\n }\n})\nexport default class Sheet extends ModalMixin {\n @Prop({ required: true })\n root!: ComponentWithProperties\n\n get shouldAppear() {\n return this.root.animated\n }\n \n activated() {\n document.addEventListener(\"keydown\", this.onKey);\n }\n\n deactivated() {\n document.removeEventListener(\"keydown\", this.onKey);\n }\n\n get isFocused() {\n const popups = this.modalStackComponent?.stackComponent?.components ?? []\n if (popups.length > 0 && popups[popups.length - 1].componentInstance() !== this) {\n return false\n }\n return true\n }\n\n async dismiss(options?: PopOptions) {\n if (!options?.force) {\n const r = await this.shouldNavigateAway();\n if (!r) {\n return false;\n }\n }\n\n // Check which modal is undernath?\n const popups = this.modalStackComponent?.stackComponent?.components.filter(c => c.modalDisplayStyle !== \"overlay\") ?? []\n if (popups.length === 0 || popups[popups.length - 1].componentInstance() === this) {\n const index = this.root.getHistoryIndex()\n if (index !== null && index !== undefined) {\n HistoryManager.returnToHistoryIndex(index - 1);\n }\n }\n this.pop(options)\n }\n\n onKey(event) {\n if (event.defaultPrevented || event.repeat) {\n return;\n }\n\n if (!this.isFocused) {\n return;\n }\n\n const key = event.key || event.keyCode;\n\n if (key === \"Escape\" || key === \"Esc\" || key === 27) {\n this.dismiss();\n event.preventDefault();\n }\n }\n\n shouldNavigateAway() {\n return this.root.shouldNavigateAway()\n }\n}\n","import { render, staticRenderFns } from \"./Sheet.vue?vue&type=template&id=30e9f1b6&\"\nimport script from \"./Sheet.vue?vue&type=script&lang=ts&\"\nexport * from \"./Sheet.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Sheet.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('30e9f1b6')) {\n api.createRecord('30e9f1b6', component.options)\n } else {\n api.reload('30e9f1b6', component.options)\n }\n module.hot.accept(\"./Sheet.vue?vue&type=template&id=30e9f1b6&\", function () {\n api.rerender('30e9f1b6', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/Sheet.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"transition\",\n { attrs: { appear: _vm.shouldAppear, name: \"fade\" } },\n [\n _c(\n \"div\",\n {\n staticClass: \"side-view\",\n class: {\n \"push-down\": _vm.pushDown == 1,\n \"push-down-full\": _vm.pushDown > 1\n },\n on: { mousedown: _vm.dismiss, touchdown: _vm.dismiss }\n },\n [\n _c(\n \"div\",\n {\n on: {\n mousedown: function($event) {\n $event.stopPropagation()\n },\n touchdown: function($event) {\n $event.stopPropagation()\n }\n }\n },\n [\n _c(\"ComponentWithPropertiesInstance\", {\n key: _vm.root.key,\n attrs: { component: _vm.root },\n on: { pop: _vm.dismiss }\n })\n ],\n 1\n )\n ]\n )\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport ComponentWithPropertiesInstance from \"./ComponentWithPropertiesInstance\";\nimport { PopOptions } from './PopOptions';\nimport { HistoryManager } from './HistoryManager';\nimport { ModalMixin } from './ModalMixin';\n\nconst visualViewport = (window as any).visualViewport\n\n@Component({\n components: {\n ComponentWithPropertiesInstance,\n }\n})\nexport default class SideView extends ModalMixin {\n @Prop({ required: true })\n root!: ComponentWithProperties\n\n get shouldAppear() {\n return this.root.animated\n }\n\n get pushDown() {\n const sideViews = this.modalStackComponent?.stackComponent?.components.filter(c => c.component === SideView) ?? []\n if (sideViews.length > 0 && sideViews[sideViews.length - 1].componentInstance() !== this) {\n if (sideViews.length > 1 && sideViews[sideViews.length - 2].componentInstance() === this) {\n return 1\n }\n return 2\n }\n return 0\n }\n\n get isFocused() {\n const sideViews = this.modalStackComponent?.stackComponent?.components ?? []\n if (sideViews.length > 0 && sideViews[sideViews.length - 1].componentInstance() !== this) {\n return false\n }\n return true\n }\n\n activated() {\n document.addEventListener(\"keydown\", this.onKey);\n this.resize();\n\n if (visualViewport) {\n visualViewport.addEventListener('resize', this.resize);\n }\n }\n\n deactivated() {\n document.removeEventListener(\"keydown\", this.onKey);\n\n if (visualViewport) {\n visualViewport.removeEventListener('resize', this.resize);\n }\n }\n\n async dismiss(options?: PopOptions) {\n if (!options?.force) {\n const r = await this.shouldNavigateAway();\n if (!r) {\n return false;\n }\n }\n\n // Check which modal is undernath?\n const sideViews = this.modalStackComponent?.stackComponent?.components.filter(c => c.modalDisplayStyle !== \"overlay\") ?? []\n if (sideViews.length === 0 || sideViews[sideViews.length - 1].componentInstance() === this) {\n const index = this.root.getHistoryIndex()\n if (index !== null && index !== undefined) {\n HistoryManager.returnToHistoryIndex(index - 1);\n }\n }\n this.pop(options)\n }\n\n resize() {\n if (!visualViewport) {\n return;\n }\n }\n\n onKey(event) {\n if (event.defaultPrevented || event.repeat) {\n return;\n }\n\n if (!this.isFocused) {\n return;\n }\n\n const key = event.key || event.keyCode;\n\n if (key === \"Escape\" || key === \"Esc\" || key === 27) {\n this.dismiss();\n event.preventDefault();\n }\n }\n\n shouldNavigateAway() {\n return this.root.shouldNavigateAway()\n }\n}\n","import { render, staticRenderFns } from \"./SideView.vue?vue&type=template&id=9ebd30d6&\"\nimport script from \"./SideView.vue?vue&type=script&lang=ts&\"\nexport * from \"./SideView.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./SideView.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9ebd30d6')) {\n api.createRecord('9ebd30d6', component.options)\n } else {\n api.reload('9ebd30d6', component.options)\n }\n module.hot.accept(\"./SideView.vue?vue&type=template&id=9ebd30d6&\", function () {\n api.rerender('9ebd30d6', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/SideView.vue\"\nexport default component.exports","\n\n\n\n\n\n\n\n\nimport { Component, Prop, Ref, Vue } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport NavigationController from \"./NavigationController.vue\";\nimport Popup from \"./Popup.vue\";\nimport StackComponent from \"./StackComponent.vue\";\nimport Sheet from './Sheet.vue';\nimport { HistoryManager } from './HistoryManager';\nimport { PushOptions } from \"./PushOptions\";\nimport SideView from \"./SideView.vue\";\n\n@Component({\n components: {\n NavigationController,\n StackComponent,\n },\n})\nexport default class ModalStackComponent extends Vue {\n @Prop()\n readonly root!: ComponentWithProperties;\n\n @Ref()\n stackComponent!: StackComponent;\n\n present(options: PushOptions) {\n const component = options.components[options.components.length - 1]\n\n if (options.animated !== undefined) {\n component.animated = options.animated\n }\n\n const style = options.modalDisplayStyle ?? component.modalDisplayStyle ?? 'cover'\n component.setDisplayStyle(style)\n\n if (style === \"popup\" && (this.$el as HTMLElement).offsetWidth > 800) {\n const c = new ComponentWithProperties(Popup, { root: component })\n\n HistoryManager.pushState(options?.url, (canAnimate: boolean) => {\n (c.componentInstance() as (Popup | undefined))?.pop({ animated: canAnimate});\n }, options?.adjustHistory ?? true);\n \n this.stackComponent.show(c);\n \n return;\n }\n\n if (style === \"sheet\" && (this.$el as HTMLElement).offsetWidth > 700) {\n const c = new ComponentWithProperties(Sheet, { root: component })\n\n HistoryManager.pushState(options?.url, (canAnimate: boolean) => {\n // todo: fix reference to this and memory handling here!!\n (c.componentInstance() as (Sheet | undefined))?.pop({ animated: canAnimate});\n }, options?.adjustHistory ?? true);\n\n this.stackComponent.show(c);\n return;\n }\n\n if (style === \"side-view\" && (this.$el as HTMLElement).offsetWidth > 800) {\n const c = new ComponentWithProperties(SideView, { root: component })\n\n HistoryManager.pushState(options?.url, (canAnimate: boolean) => {\n // todo: fix reference to this and memory handling here!!\n (c.componentInstance() as (SideView | undefined))?.pop({ animated: canAnimate});\n }, options?.adjustHistory ?? true);\n\n this.stackComponent.show(c);\n return;\n }\n\n if (style === \"overlay\") {\n this.stackComponent.show(component);\n return;\n }\n (this.$refs.navigationController as NavigationController).push(options);\n }\n\n /**\n * @deprecated\n */\n replace(component: ComponentWithProperties, animated = true) {\n const nav = this.$refs.navigationController as NavigationController;\n nav.push({ components: [component], animated, replace: nav.components.length });\n }\n}\n","import { render, staticRenderFns } from \"./ModalStackComponent.vue?vue&type=template&id=c053b00e&\"\nimport script from \"./ModalStackComponent.vue?vue&type=script&lang=ts&\"\nexport * from \"./ModalStackComponent.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('c053b00e')) {\n api.createRecord('c053b00e', component.options)\n } else {\n api.reload('c053b00e', component.options)\n }\n module.hot.accept(\"./ModalStackComponent.vue?vue&type=template&id=c053b00e&\", function () {\n api.rerender('c053b00e', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/ModalStackComponent.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n {\n staticClass: \"split-view-controller\",\n attrs: { \"data-has-detail\": _vm.detail ? \"true\" : \"false\" }\n },\n [\n _c(\n \"div\",\n { ref: \"masterElement\", staticClass: \"master\" },\n [\n _c(\"NavigationController\", {\n ref: \"navigationController\",\n attrs: { root: _vm.root },\n on: { showDetail: _vm.showDetail }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _vm.detail\n ? _c(\n \"div\",\n { staticClass: \"detail\" },\n [\n _c(\"FramedComponent\", {\n key: _vm.detail.key,\n ref: \"detailFrame\",\n attrs: { root: _vm.detail }\n })\n ],\n 1\n )\n : _vm._e()\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop, Ref, Vue } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport FramedComponent from \"./FramedComponent.vue\";\nimport NavigationController from \"./NavigationController.vue\";\nimport { PushOptions } from \"./PushOptions\";\n\n// Credits https://codeburst.io/throttling-and-debouncing-in-javascript-b01cad5c8edf\nconst throttle = (func, limit) => {\n let lastFunc;\n let lastRan;\n return function() {\n const context = this;\n // eslint-disable-next-line prefer-rest-params\n const args = arguments;\n if (!lastRan) {\n func.apply(context, args);\n lastRan = Date.now();\n } else {\n clearTimeout(lastFunc);\n lastFunc = setTimeout(function() {\n if (Date.now() - lastRan >= limit) {\n func.apply(context, args);\n lastRan = Date.now();\n }\n }, limit - (Date.now() - lastRan));\n }\n };\n};\n\n@Component({\n components: {\n NavigationController,\n FramedComponent,\n }\n})\nexport default class SplitViewController extends Vue {\n @Prop()\n root!: ComponentWithProperties;\n detail: ComponentWithProperties | null = null;\n\n @Prop()\n detailWidth?: string;\n\n @Ref()\n navigationController!: NavigationController;\n\n @Ref()\n detailKeepAlive!: Vue; // = KeepAlive internal class\n\n @Ref()\n masterElement!: HTMLElement; // = KeepAlive internal class\n\n detailKey: number | null = null;\n\n activated() {\n (this as any).listener = throttle(this.onResize, 200);\n window.addEventListener(\"resize\", (this as any).listener, { passive: true } as EventListenerOptions);\n }\n\n mounted() {\n if (this.detailWidth) {\n (this.$el as HTMLElement).style.setProperty(\"--split-view-width\", this.detailWidth);\n }\n }\n\n deactivated() {\n window.removeEventListener(\"resize\", (this as any).listener, { passive: true } as EventListenerOptions);\n }\n\n onResize() {\n if (this.shouldCollapse()) {\n if (this.detail) {\n this.collapse();\n }\n } else {\n if (this.lastIsDetail && !this.detail) {\n this.expand();\n }\n }\n }\n\n get lastIsDetail() {\n return this.detailKey != null && (this.$refs.navigationController as NavigationController).mainComponent?.key == this.detailKey;\n }\n\n getScrollElement(element: HTMLElement | null = null): HTMLElement {\n if (!element) {\n element = this.$el as HTMLElement;\n }\n\n const style = window.getComputedStyle(element);\n if (style.overflowY == \"scroll\" || style.overflow == \"scroll\" || style.overflow == \"auto\" || style.overflowY == \"auto\") {\n return element;\n } else {\n if (!element.parentElement) {\n return document.documentElement;\n }\n return this.getScrollElement(element.parentElement);\n }\n }\n\n async shouldNavigateAway(): Promise<boolean> {\n if (this.detail) {\n const r = await this.detail.shouldNavigateAway();\n if (!r) {\n return false;\n }\n }\n\n if (this.navigationController) {\n return await this.navigationController.shouldNavigateAway();\n }\n\n return true;\n }\n\n async showDetail(options: PushOptions): Promise<boolean> {\n const component = options.components[options.components.length - 1]\n this.detailKey = component.key;\n\n if (this.shouldCollapse()) {\n if (this.lastIsDetail || this.detail) {\n console.error(\"Pusing a detail when a detail is already presented is not allowed\");\n return false;\n }\n\n this.navigationController.push(options);\n } else {\n // Replace existing detail component\n // First check if we don't destroy anything\n if (this.detail) {\n const r = await this.detail.shouldNavigateAway();\n if (!r) {\n return false;\n }\n }\n\n this.getScrollElement().scrollTop = 0;\n this.detail = component;\n }\n return true;\n }\n\n shouldCollapse() {\n return (this.$el as HTMLElement).offsetWidth < 800;\n }\n\n collapse() {\n if (this.lastIsDetail) {\n console.error(\"Cannot collapse when the detail is already collaped\");\n return;\n }\n if (!this.detail) {\n console.error(\"Cannot collapse without detail\");\n return;\n }\n this.detail.keepAlive = true;\n const detail = this.detail;\n this.detail = null;\n this.navigationController.push({ components: [detail], animated: false });\n }\n\n async expand() {\n if (this.detail) {\n console.error(\"Cannot expand when detail is already visible\");\n return;\n }\n if (!this.lastIsDetail) {\n console.error(\"Cannot expand when there is no detail\");\n return;\n }\n const popped = await this.navigationController.pop({\n animated: false,\n destroy: false\n });\n if (!popped || popped.length == 0) {\n return;\n }\n\n // We need to wait until it is removed from the vnode\n this.$nextTick(() => {\n this.detail = popped[0];\n });\n }\n}\n","import { render, staticRenderFns } from \"./SplitViewController.vue?vue&type=template&id=e2d6041c&\"\nimport script from \"./SplitViewController.vue?vue&type=script&lang=ts&\"\nexport * from \"./SplitViewController.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./SplitViewController.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('e2d6041c')) {\n api.createRecord('e2d6041c', component.options)\n } else {\n api.reload('e2d6041c', component.options)\n }\n module.hot.accept(\"./SplitViewController.vue?vue&type=template&id=e2d6041c&\", function () {\n api.rerender('e2d6041c', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/SplitViewController.vue\"\nexport default component.exports","// mixins.js\nimport { Component, Vue } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"..\";\nimport NavigationController from \"./NavigationController.vue\";\nimport { PopOptions } from './PopOptions';\nimport Popup from \"./Popup.vue\";\nimport { PushOptions } from \"./PushOptions\";\nimport Sheet from \"./Sheet.vue\";\nimport SideView from \"./SideView.vue\";\nimport SplitViewController from \"./SplitViewController.vue\";\n\n// You can declare mixins as the same style as components.\n@Component\nexport class NavigationMixin extends Vue {\n emitParents(event: string, data: any) {\n let start: any = this.$parent;\n while (start) {\n if (start.$listeners[event]) {\n start.$emit(event, data);\n return;\n } else {\n start = start.$parent;\n }\n }\n console.warn(\"No handlers found for event \" + event);\n }\n\n show(options: PushOptions | ComponentWithProperties) {\n if (!(options as any).components) {\n this.emitParents(\"show\", { components: [options] });\n } else {\n this.emitParents(\"show\", options);\n }\n \n }\n\n present(options: PushOptions | ComponentWithProperties) {\n if (!(options as any).components) {\n this.emitParents(\"present\", { components: [options] });\n } else {\n this.emitParents(\"present\", options);\n }\n }\n\n showDetail(options: PushOptions | ComponentWithProperties) {\n if (!(options as any).components) {\n this.emitParents(\"showDetail\", { components: [options] });\n } else {\n this.emitParents(\"showDetail\", options);\n }\n }\n\n /**\n * Call one of the pop listeners of a parent or grandparent. E.g. to go back in a navigation controller.\n * @param options Options that should get applied to the pop of the first parent that listens for the pop event\n */\n pop(options: PopOptions = {}) {\n const nav = this.getPoppableParent();\n if (nav) {\n // Sometimes we need to call the pop event instead (because this adds custom data to the event)\n if (nav.$listeners[\"pop\"]) {\n nav.$emit(\"pop\", options);\n } else {\n console.error(\"Couldn't pop. Failed\");\n }\n } else {\n console.warn(\"No navigation controller to pop\");\n }\n }\n\n /**\n * Same as pop, but instead dismisses the first parent that was displayed as a modal\n * @param options Options that should get applied to the pop of the first modal navigation controller or popup that listens for the pop event\n */\n dismiss(options: PopOptions = {}) {\n const modalNav = this.modalOrPopup as any;\n if (!modalNav) {\n console.warn(\"Tried to dismiss without being displayed as a modal. Use pop instead\")\n // Chances are this is not displayed as a modal, but on a normal stack\n this.pop(options);\n } else {\n if (modalNav instanceof Sheet || modalNav instanceof Popup || modalNav instanceof SideView) {\n modalNav.dismiss(options);\n return\n }\n modalNav.pop(options);\n }\n }\n\n get navigationController(): NavigationController | null {\n let start: any = this.$parent;\n while (start) {\n if (start instanceof NavigationController) {\n return start;\n }\n\n start = start.$parent;\n }\n return null;\n }\n\n get modalOrPopup(): NavigationController | Popup | Sheet | SideView | null {\n let start: any = this.$parent;\n while (start) {\n if (start instanceof NavigationController) {\n if (start.animationType == \"modal\") return start;\n }\n\n if (start instanceof Sheet) {\n return start;\n }\n\n if (start instanceof Popup) {\n return start;\n }\n\n if (start instanceof SideView) {\n return start;\n }\n\n start = start.$parent;\n }\n return null;\n }\n\n get modalNavigationController(): NavigationController | null {\n let start: any = this.$parent;\n while (start) {\n if (start instanceof NavigationController) {\n if (start.animationType == \"modal\") return start;\n }\n\n start = start.$parent;\n }\n return null;\n }\n\n get splitViewController(): SplitViewController | null {\n let start: any = this.$parent;\n while (start) {\n if (start instanceof SplitViewController) {\n return start;\n }\n\n start = start.$parent;\n }\n return null;\n }\n\n /**\n * Return the first child of a parent that listens for the pop event\n */\n getPoppableParent(): any | null {\n let prev = this;\n let start: any = this.$parent;\n while (start) {\n if (prev.$listeners[\"pop\"]) {\n return prev;\n }\n\n prev = start;\n start = start.$parent;\n }\n return null;\n }\n\n /**\n * Whether the current navivation controller above this component can pop (it has more than one child). Excluding modal view controllers\n */\n canPop = false;\n canDismiss = false;\n\n activated() {\n this.canPop = this.calculateCanPop();\n this.canDismiss = this.calculateCanDismiss();\n }\n\n /**\n * Return the first navigation controller that can get popped, excluding the modal navigation controller and the stack component\n */\n private get poppableNavigationController(): NavigationController | null {\n let start: any = this.$parent;\n while (start) {\n if (start instanceof NavigationController) {\n if (start.animationType == \"modal\") return null;\n\n if (start.components.length > 1) {\n return start;\n }\n }\n\n start = start.$parent;\n }\n return null;\n }\n\n isFocused() {\n const modalOrPopup = this.modalOrPopup\n if ((modalOrPopup instanceof Popup) || (modalOrPopup instanceof Sheet) || (modalOrPopup instanceof SideView)) {\n return !!(modalOrPopup as (any)).isFocused\n }\n\n // todo: detect edge case when this element is deactivated\n return true\n }\n\n calculateCanPop(): boolean {\n return this.poppableNavigationController != null;\n }\n\n calculateCanDismiss(): boolean {\n const modalOrPopup = this.modalOrPopup;\n\n if (modalOrPopup === null) {\n return false\n }\n\n if (modalOrPopup instanceof NavigationController) {\n if ((modalOrPopup as any).components.length <= 1) {\n return false\n }\n }\n\n return true\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(929);\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => module['default'] :\n\t\t() => module;\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://@simonbackx/vue-app-navigation/./src/HistoryManager.ts","webpack://@simonbackx/vue-app-navigation/./src/ComponentWithProperties.ts","webpack://@simonbackx/vue-app-navigation/external \"vue\"","webpack://@simonbackx/vue-app-navigation/./src/ComponentWithPropertiesInstance.ts","webpack://@simonbackx/vue-app-navigation/./src/FramedComponent.vue?4f5b","webpack://@simonbackx/vue-app-navigation/./node_modules/tslib/tslib.es6.js","webpack://@simonbackx/vue-app-navigation/external \"vue-class-component\"","webpack://@simonbackx/vue-app-navigation/./node_modules/vue-property-decorator/lib/helpers/metadata.js","webpack://@simonbackx/vue-app-navigation/./node_modules/vue-property-decorator/lib/decorators/Prop.js","webpack://@simonbackx/vue-app-navigation/./node_modules/vue-property-decorator/lib/decorators/Ref.js","webpack://@simonbackx/vue-app-navigation/./src/FramedComponent.vue?2fcd","webpack://@simonbackx/vue-app-navigation/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://@simonbackx/vue-app-navigation/./src/FramedComponent.vue","webpack://@simonbackx/vue-app-navigation/./src/ModalStackComponent.vue?42b1","webpack://@simonbackx/vue-app-navigation/./src/NavigationController.vue?3544","webpack://@simonbackx/vue-app-navigation/./src/NavigationController.vue?4d36","webpack://@simonbackx/vue-app-navigation/./src/NavigationController.vue?6269","webpack://@simonbackx/vue-app-navigation/./src/Popup.vue?dfe1","webpack://@simonbackx/vue-app-navigation/./src/ModalMixin.ts","webpack://@simonbackx/vue-app-navigation/./src/Popup.vue?7e96","webpack://@simonbackx/vue-app-navigation/./src/Popup.vue?11d0","webpack://@simonbackx/vue-app-navigation/./src/StackComponent.vue?fb8e","webpack://@simonbackx/vue-app-navigation/./src/StackComponent.vue?4684","webpack://@simonbackx/vue-app-navigation/./src/StackComponent.vue","webpack://@simonbackx/vue-app-navigation/./src/Sheet.vue?f43c","webpack://@simonbackx/vue-app-navigation/./src/Sheet.vue?8e62","webpack://@simonbackx/vue-app-navigation/./src/Sheet.vue?195d","webpack://@simonbackx/vue-app-navigation/./src/SideView.vue?9ad8","webpack://@simonbackx/vue-app-navigation/./src/SideView.vue?f85a","webpack://@simonbackx/vue-app-navigation/./src/SideView.vue?13f9","webpack://@simonbackx/vue-app-navigation/./src/ModalStackComponent.vue?08f9","webpack://@simonbackx/vue-app-navigation/./src/ModalStackComponent.vue","webpack://@simonbackx/vue-app-navigation/./src/SplitViewController.vue?8f4b","webpack://@simonbackx/vue-app-navigation/./src/SplitViewController.vue?0eca","webpack://@simonbackx/vue-app-navigation/./src/SplitViewController.vue?b1a8","webpack://@simonbackx/vue-app-navigation/./src/NavigationMixin.ts","webpack://@simonbackx/vue-app-navigation/webpack/bootstrap","webpack://@simonbackx/vue-app-navigation/webpack/startup","webpack://@simonbackx/vue-app-navigation/webpack/runtime/compat get default export","webpack://@simonbackx/vue-app-navigation/webpack/runtime/define property getters","webpack://@simonbackx/vue-app-navigation/webpack/runtime/hasOwnProperty shorthand","webpack://@simonbackx/vue-app-navigation/webpack/runtime/make namespace object"],"names":["HistoryManager","HistoryManagerStatic","states","counter","active","animateHistoryPop","isAdjustingState","manualStateAction","delayedUrlSetting","url","this","ComponentWithProperties","debug","console","log","history","replaceState","length","undoAction","adjustHistory","push","index","pushState","adjustHistoryCount","splice","filter","state","go","setUrl","window","addEventListener","event","warn","newCounter","undefined","amount","animate","deletedStates","reverse","component","properties","key","type","hide","vnode","keepAlive","isKeptAlive","isMounted","modalDisplayStyle","animated","historyIndex","isContainerView","keyCounter","name","keepAliveCounter","assignHistoryIndex","ignoreActivate","child","returnToHistoryIndex","componentInstance","instance","shouldNavigateAway","promise","then","catch","$destroy","style","require","ComponentWithPropertiesInstance","props","watch","_val","Error","destroy","beforeMount","activated","start","$parent","onActivatedChildComponent","mounted","onMountedChildComponent","createElement","$children","data","render","_vm","_h","$createElement","_c","_self","ref","attrs","root","_withStripped","__decorate","decorators","target","desc","d","c","arguments","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","reflectMetadataIsSupported","getMetadata","Prop","options","Array","isArray","hasOwnProperty","createDecorator","componentOptions","k","Ref","refKey","computed","cache","get","$refs","FramedComponent","$emit","components","normalizeComponent","scriptExports","staticRenderFns","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","call","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","concat","exports","__file","on","present","_v","staticClass","animationType","mainComponent","css","beforeEnter","beforeLeave","enter","leave","afterLeave","afterEnter","enterCancelled","show","pop","_e","NavigationController","transitionName","savedScrollPositions","nextScrollPosition","previousScrollPosition","initialComponents","slice","el","$el","width","offsetWidth","height","offsetHeight","element","getComputedStyle","overflowY","overflow","parentElement","getScrollElement","document","documentElement","error","activeElement","blur","force","shouldAnimate","replace","scrollElement","w","clientHeight","visualViewport","scrollTop","freezeSize","popped","comp","canAnimate","count","prev","$listeners","getPoppableParent","Math","max","insertedElement","className","_element","beforeBeforeEnterAnimation","finishedEnterAnimation","done","firstElementChild","scrollOuterHeight","getScrollOuterHeight","next","childElement","transitionDuration","willChange","growSize","requestAnimationFrame","beforeEnterAnimation","beginEnterAnimation","setTimeout","current","top","bottom","unfreezeSize","default","appear","shouldAppear","duration","class","sticky","pushDown","mousedown","dismiss","touchdown","$event","stopPropagation","ModalMixin","nav","Popup","popups","modalStackComponent","stackComponent","onKey","resize","removeEventListener","getHistoryIndex","defaultPrevented","repeat","isFocused","keyCode","preventDefault","required","_l","refInFor","removeAt","StackComponent","entries","Sheet","SideView","sideViews","ModalStackComponent","setDisplayStyle","navigationController","detail","showDetail","throttle","func","limit","lastFunc","lastRan","args","clearTimeout","Date","now","apply","SplitViewController","detailKey","listener","onResize","passive","detailWidth","setProperty","shouldCollapse","collapse","lastIsDetail","expand","$nextTick","NavigationMixin","canPop","canDismiss","emitParents","modalNav","modalOrPopup","calculateCanPop","calculateCanDismiss","poppableNavigationController","__webpack_module_cache__","__webpack_require__","moduleId","module","__webpack_modules__","n","getter","__esModule","a","definition","o","enumerable","obj","prop","prototype","Symbol","toStringTag","value"],"mappings":"6WAuMO,MAAMA,EAAiB,IAvL9B,MAAMC,qBAAN,cAGI,KAAAC,OAAyB,GAEzB,KAAAC,QAAU,EACV,KAAAC,QAAS,EACT,KAAAC,mBAAoB,EAEpB,KAAAC,kBAAmB,EACnB,KAAAC,mBAAoB,EAMpB,KAAAC,kBAA6D,KAG7D,OAAOC,GACH,GAAKC,KAAKN,OAAV,CAKA,GAAIM,KAAKH,kBAUL,OAJII,wBAAwBC,OACxBC,QAAQC,IAAI,yBAA2BL,EAAI,sBAAsBC,KAAKP,cAE1EO,KAAKF,kBAAoB,CAAEC,MAAKN,QAASO,KAAKP,UAI9CQ,wBAAwBC,OACxBC,QAAQC,IAAI,YAAcL,EAAI,sBAAsBC,KAAKP,SAG7DY,QAAQC,aAAa,CAAEb,QAASO,KAAKP,SAAW,GAAIM,GACpDC,KAAKR,OAAOQ,KAAKR,OAAOe,OAAS,GAAGR,IAAMA,GAG9C,UAAUA,EAAyBS,EAAwCC,GAClET,KAAKN,SAIVM,KAAKP,UAELO,KAAKR,OAAOkB,KAAK,CACbX,IAAKA,EACLY,MAAOX,KAAKP,QACZgB,gBACAD,eAGAC,EACAJ,QAAQO,UAAU,CAAEnB,QAASO,KAAKP,SAAW,GAAIM,GAEjDM,QAAQC,aAAa,CAAEb,QAASO,KAAKP,SAAW,GAAIM,GAGpDE,wBAAwBC,OACxBC,QAAQC,IAAI,kBAAoBJ,KAAKR,OAAOQ,K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B,EAAoB,M","file":"main.js","sourcesContent":["import { ComponentWithProperties } from \"./ComponentWithProperties\";\n\ntype HistoryState = {\n /// Url of the page, used if the user returns to this page using buttons on the page\n url?: string;\n\n /// Counter at which the state was added.\n index: number;\n\n /// Whether the history pushState was used to create this state (true) or if this is only a virtual state (false).\n adjustHistory: boolean;\n\n /// Action to execute when the user navigates back to the previous state using the browser's back button.\n undoAction?: (animate: boolean) => void;\n}\n\nclass HistoryManagerStatic {\n // undoActions: Map<number, (animate: boolean) => void> = new Map();\n\n states: HistoryState[] = [];\n\n counter = 0;\n active = false;\n animateHistoryPop = true;\n\n isAdjustingState = false;\n manualStateAction = false;\n\n /**\n * Sometimes we need to set an URL when the history api is already popping the state (async!). Then it is not possible\n * to set the URL. To fix this, we need to delay the replaceState until after the state is popped.\n */\n delayedUrlSetting: { url: string; counter: number } | null = null\n\n /// Set the current URL without modifying states\n setUrl(url: string) {\n if (!this.active) {\n return;\n }\n\n // Sometimes, we need to set a count\n if (this.manualStateAction) {\n /*\n Sometimes we need to set an URL when the history api is already popping the state (async!). Then it is not possible\n to set the URL. To fix this, we need to delay the replaceState until after the state is popped.\n */\n\n if (ComponentWithProperties.debug) {\n console.log(\"Setting url, delayed: \" + url+\", current counter: \"+this.counter);\n }\n this.delayedUrlSetting = { url, counter: this.counter }\n return\n }\n\n if (ComponentWithProperties.debug) {\n console.log(\"Set url: \" + url+\", current counter: \"+this.counter);\n }\n\n history.replaceState({ counter: this.counter }, \"\", url);\n this.states[this.states.length - 1].url = url;\n }\n\n pushState(url: string | undefined, undoAction: (animate: boolean) => void, adjustHistory: boolean) {\n if (!this.active) {\n return;\n }\n\n this.counter++;\n\n this.states.push({\n url: url,\n index: this.counter,\n adjustHistory,\n undoAction,\n })\n\n if (adjustHistory) {\n history.pushState({ counter: this.counter }, \"\", url);\n } else {\n history.replaceState({ counter: this.counter }, \"\", url);\n }\n\n if (ComponentWithProperties.debug) {\n console.log(\"Push new state \" , this.states[this.states.length - 1]);\n }\n }\n\n /**\n * Return to a given history point in time, if needed\n */\n returnToHistoryIndex(counter: number) {\n // We'll keep this for debugging and remove it if everything is stable\n if (ComponentWithProperties.debug) {\n console.log(\"Did return to history index \" + counter + \", coming from \" + this.counter);\n }\n if (counter < this.counter) {\n this.counter = counter;\n\n // Delete all future states\n const deletedStates = this.states.splice(this.counter + 1);\n\n // Count how many states we have to delete from the history\n const adjustHistoryCount = deletedStates.filter(state => state.adjustHistory).length;\n\n // Don't need to call undo actions, because the user did go back by itself, and the undo actions are already done manually\n if (adjustHistoryCount > 0 && !this.isAdjustingState) {\n this.manualStateAction = true;\n\n // Note: history.go is async, so all replaceState methods stop working until finished!\n // -> that is why we use delayedUrlSetting\n if (ComponentWithProperties.debug) {\n console.log(\"Adjusting browser history state: popping \" + adjustHistoryCount + \" items\");\n }\n history.go(-adjustHistoryCount); // should be negative\n }\n\n if (!this.states[this.counter].adjustHistory && this.states[this.counter].url) {\n if (ComponentWithProperties.debug) {\n console.log(\"Setting manual url without history api: \" + this.states[this.counter].url);\n }\n\n // Set new url manually again\n this.setUrl(this.states[this.counter].url!);\n }\n }\n\n return this.counter;\n }\n\n activate() {\n // Create push pop listener that will execute undo actions\n window.addEventListener(\"popstate\", (event) => {\n if (ComponentWithProperties.debug) {\n console.log(\"HistoryManager popstate\");\n }\n\n if (this.isAdjustingState) {\n console.warn(\"Duplicate popstate\");\n return;\n }\n if (this.manualStateAction) {\n this.manualStateAction = false;\n\n if (this.delayedUrlSetting && this.counter === this.delayedUrlSetting.counter) {\n this.setUrl(this.delayedUrlSetting.url)\n }\n this.delayedUrlSetting = null\n return;\n }\n this.isAdjustingState = true;\n const newCounter: number | undefined = event.state?.counter;\n\n if (newCounter !== undefined) {\n // Foward or backwards?\n if (newCounter > this.counter) {\n // Not allowed\n const amount = newCounter - this.counter;\n history.go(-amount);\n\n if (ComponentWithProperties.debug) {\n console.log(\"Not allowed to go forward, going back \" + amount + \" steps\");\n }\n } else {\n // Only animate if we only have one undo action and if animations are enabled\n const animate = this.counter - newCounter == 1 && this.animateHistoryPop;\n \n // Set new counter position\n this.counter = newCounter\n \n // Delete all future states\n const deletedStates = this.states.splice(this.counter + 1);\n\n // Execute undo actions in right order\n for (const state of deletedStates.reverse()) {\n if (state.undoAction) {\n if (ComponentWithProperties.debug) {\n console.log(\"Executing undoAction...\");\n }\n state.undoAction(animate);\n }\n }\n }\n }\n this.isAdjustingState = false;\n });\n\n this.active = true;\n\n // Set counter of initial history\n history.replaceState({ counter: this.counter }, \"\");\n\n this.states.push({\n index: this.counter,\n adjustHistory: false,\n url: \"/\"\n })\n }\n}\n\nexport const HistoryManager = new HistoryManagerStatic();\n","import { VNode } from \"vue\";\n\nimport { HistoryManager } from \"./HistoryManager\";\n\nexport type ModalDisplayStyle = \"cover\" | \"popup\" | \"overlay\" | \"sheet\" | \"side-view\"\n\nexport class ComponentWithProperties {\n /// Name of component or component Options. Currently no way to force type\n public component: any;\n public properties: Record<string, any>;\n public key: number | null = null;\n public type: string | null = null;\n public hide = false;\n\n /// Saved vnode of this instance\n public vnode: VNode | null = null;\n\n // Keep the vnode alive when it is removed from the VDOM\n public keepAlive = false;\n public isKeptAlive = false;\n public isMounted = false;\n\n // Counter for debugging. Count of components that are kept alive but are not mounted.\n static keepAliveCounter = 0;\n static keyCounter = 0;\n static debug = false;\n\n /// Cover whole screen. Other style = popup\n public modalDisplayStyle: ModalDisplayStyle = \"cover\"\n\n // If the display animation should be animated\n public animated = true\n\n // Hisotry index\n public historyIndex: number | null = null;\n public isContainerView = false;\n\n private static ignoreActivate: ComponentWithProperties | null = null\n\n constructor(component: any, properties: Record<string, any> = {}) {\n this.component = component;\n this.properties = properties;\n this.key = ComponentWithProperties.keyCounter++;\n }\n\n beforeMount() {\n if (ComponentWithProperties.debug) console.log(\"Before mount: \" + this.component.name);\n\n if (this.vnode) {\n if (this.isKeptAlive) {\n this.isKeptAlive = false;\n ComponentWithProperties.keepAliveCounter--;\n if (ComponentWithProperties.debug) console.log(\"Total components kept alive: \" + ComponentWithProperties.keepAliveCounter);\n }\n }\n\n if (this.isContainerView) {\n // Always make sure it has a saved history index on first mount\n if (this.historyIndex === null) {\n this.historyIndex = HistoryManager.counter;\n }\n return;\n }\n if (this.modalDisplayStyle == \"overlay\") {\n return;\n }\n this.assignHistoryIndex()\n }\n\n getHistoryIndex() {\n if (this.component) return this.historyIndex;\n }\n\n mounted() {\n if (ComponentWithProperties.debug) console.log(\"Component mounted: \" + this.component.name);\n this.isMounted = true;\n\n // We pushed some elements and the history index increased during the mounted lifecycle\n // We now risk that in the next activation cycle (that is only called sometimes, not on all components), the UI will think that it is returning\n // to a previous history state\n // So we ignore the activation of only this instance until some other component got activated first\n ComponentWithProperties.ignoreActivate = this;\n }\n\n onMountedChildComponent(child: ComponentWithProperties) {\n this.isContainerView = true\n if (ComponentWithProperties.debug) console.log(\"Container mounted child component: \" + this.component.name + \" got \"+child.component.name);\n }\n\n onActivatedChildComponent(child: ComponentWithProperties) {\n this.isContainerView = true\n if (ComponentWithProperties.debug) console.log(\"Container got activated child component: \" + this.component.name + \" got \"+child.component.name);\n }\n\n /**\n * Call this method to assign a history index to this component (you should only call this when you want to assign a history index to this component that will not get mounted already)\n */\n assignHistoryIndex() {\n if (this.historyIndex == null) {\n if (ComponentWithProperties.debug) console.log(\"Assigned history index: \" + this.component.name + \" = \" + HistoryManager.counter);\n this.historyIndex = HistoryManager.counter;\n } else {\n // This component was never mounted but already got a history index assigned\n // -> probably pushed on a navigation controller with multiple components at once\n this.historyIndex = HistoryManager.returnToHistoryIndex(this.historyIndex);\n }\n }\n\n activated() {\n if (ComponentWithProperties.debug) console.log(\"Component activated: \" + this.component.name);\n\n if (ComponentWithProperties.ignoreActivate === this) {\n if (ComponentWithProperties.debug) console.log(\"Ignore component activation: \" + this.component.name);\n ComponentWithProperties.ignoreActivate = null\n return\n }\n ComponentWithProperties.ignoreActivate = null\n\n if (this.isContainerView) {\n return;\n }\n if (this.modalDisplayStyle == \"overlay\") {\n return;\n }\n if (this.historyIndex !== null) {\n // Sometimes, a component will get activated just after mounting it. We ignore that activated event once\n this.historyIndex = HistoryManager.returnToHistoryIndex(this.historyIndex);\n }\n }\n\n componentInstance(): Vue | undefined {\n return this.vnode?.componentInstance;\n }\n\n async shouldNavigateAway(): Promise<boolean> {\n const instance = this.componentInstance() as any;\n if (instance && instance.shouldNavigateAway) {\n const promise = instance.shouldNavigateAway();\n if (typeof promise === \"boolean\") {\n if (!promise) {\n return false;\n }\n } else if (promise.then && promise.catch) {\n const r = (await promise) as boolean;\n if (!r) {\n return false;\n }\n }\n }\n return true;\n }\n\n destroy() {\n this.isMounted = false;\n\n if (this.vnode) {\n if (this.keepAlive) {\n this.keepAlive = false;\n\n if (!this.isKeptAlive) {\n this.isKeptAlive = true;\n ComponentWithProperties.keepAliveCounter++;\n if (ComponentWithProperties.debug) console.log(\"Kept component alive \" + this.component.name);\n if (ComponentWithProperties.debug) console.log(\"Total components kept alive: \" + ComponentWithProperties.keepAliveCounter);\n }\n return;\n }\n\n if (this.isKeptAlive) {\n this.isKeptAlive = false;\n ComponentWithProperties.keepAliveCounter--;\n if (ComponentWithProperties.debug) console.log(\"Freed component from alive stack \" + this.component.name);\n if (ComponentWithProperties.debug) console.log(\"Total components kept alive: \" + ComponentWithProperties.keepAliveCounter);\n }\n\n if (ComponentWithProperties.debug) console.log(\"Destroyed component \" + this.component.name);\n this.vnode.componentInstance?.$destroy();\n this.vnode = null;\n }\n }\n\n setDisplayStyle(style: ModalDisplayStyle): ComponentWithProperties {\n this.modalDisplayStyle = style;\n return this;\n }\n\n setAnimated(animated: boolean): ComponentWithProperties {\n this.animated = animated;\n return this;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"vue\");;","/* eslint-disable vue/no-mutating-props */\nimport Vue, { VNode } from \"vue\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\n\nconst ComponentWithPropertiesInstance = Vue.extend({ \n props: {\n component: ComponentWithProperties,\n },\n\n watch: {\n component(_val) {\n throw new Error(\"Changing component during life is not yet supported\");\n },\n },\n\n created() {\n /// Whether the node should be destroyed if it is removed from the dom\n this.destroy = true;\n },\n\n beforeMount() {\n this.component.beforeMount();\n },\n\n activated() {\n this.component.activated();\n\n // Update container views history index\n let start: any = this.$parent;\n while (start) {\n if (start instanceof ComponentWithPropertiesInstance) {\n (start.component as ComponentWithProperties).onActivatedChildComponent(this.component)\n }\n start = start.$parent;\n }\n },\n\n mounted() {\n this.component.mounted();\n\n // Mark all parents as containers\n let start: any = this.$parent;\n while (start) {\n if (start instanceof ComponentWithPropertiesInstance) {\n (start.component as ComponentWithProperties).onMountedChildComponent(this.component)\n }\n start = start.$parent;\n }\n },\n\n destroyed() {\n // This component got removed (with v-if, v-for, ...) in some way.\n // This doesn't mean we want to destroy it\n this.component.destroy();\n },\n\n render(createElement): VNode {\n // Only create the vnode once\n if (this.component.vnode) {\n // We need to update the parent here\n this.component.vnode.componentInstance.$parent = this;\n // Force update children (needed because the new vnode won't restart a lifecycle \n // and vue won't update children because that is not supported out of the box)\n this.$children = [this.component.vnode.componentInstance]\n return this.component.vnode;\n }\n\n this.component.vnode = createElement(this.component.component, {\n props: this.component.properties,\n key: this.component.key,\n });\n\n // Magic trick: we are now responsible for deallocating the component\n this.component.vnode.data.keepAlive = true;\n return this.component.vnode;\n },\n});\n\nexport default ComponentWithPropertiesInstance;\n","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", [\n _c(\n \"div\",\n { ref: \"scrollContainer\" },\n [\n _c(\"ComponentWithPropertiesInstance\", {\n attrs: { component: _vm.root }\n })\n ],\n 1\n )\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"vue-class-component\");;","/** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */\nvar reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';\nexport function applyMetadata(options, target, key) {\n if (reflectMetadataIsSupported) {\n if (!Array.isArray(options) &&\n typeof options !== 'function' &&\n !options.hasOwnProperty('type') &&\n typeof options.type === 'undefined') {\n var type = Reflect.getMetadata('design:type', target, key);\n if (type !== Object) {\n options.type = type;\n }\n }\n }\n}\n","import { createDecorator } from 'vue-class-component';\nimport { applyMetadata } from '../helpers/metadata';\n/**\n * decorator of a prop\n * @param options the options for the prop\n * @return PropertyDecorator | void\n */\nexport function Prop(options) {\n if (options === void 0) { options = {}; }\n return function (target, key) {\n applyMetadata(options, target, key);\n createDecorator(function (componentOptions, k) {\n ;\n (componentOptions.props || (componentOptions.props = {}))[k] = options;\n })(target, key);\n };\n}\n","import { createDecorator } from 'vue-class-component';\n/**\n * decorator of a ref prop\n * @param refKey the ref key defined in template\n */\nexport function Ref(refKey) {\n return createDecorator(function (options, key) {\n options.computed = options.computed || {};\n options.computed[key] = {\n cache: false,\n get: function () {\n return this.$refs[refKey || key];\n },\n };\n });\n}\n","\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop, Ref,Vue } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport ComponentWithPropertiesInstance from \"./ComponentWithPropertiesInstance\";\n\n@Component({\n components: {\n ComponentWithPropertiesInstance,\n },\n})\nexport default class FramedComponent extends Vue {\n @Prop()\n root!: ComponentWithProperties;\n\n @Ref()\n scrollContainer!: HTMLElement;\n\n pop(data) {\n this.$emit(\"pop\", data);\n }\n\n push(data) {\n this.$emit(\"push\", data);\n }\n}\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","import { render, staticRenderFns } from \"./FramedComponent.vue?vue&type=template&id=5c46ef86&\"\nimport script from \"./FramedComponent.vue?vue&type=script&lang=ts&\"\nexport * from \"./FramedComponent.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('5c46ef86')) {\n api.createRecord('5c46ef86', component.options)\n } else {\n api.reload('5c46ef86', component.options)\n }\n module.hot.accept(\"./FramedComponent.vue?vue&type=template&id=5c46ef86&\", function () {\n api.rerender('5c46ef86', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/FramedComponent.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n [\n _c(\"NavigationController\", {\n ref: \"navigationController\",\n attrs: { \"animation-type\": \"modal\", root: _vm.root },\n on: { present: _vm.present }\n }),\n _vm._v(\" \"),\n _c(\"StackComponent\", {\n ref: \"stackComponent\",\n on: { present: _vm.present }\n })\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n {\n staticClass: \"navigation-controller\",\n attrs: { \"data-animation-type\": _vm.animationType }\n },\n [\n _vm.mainComponent\n ? _c(\n \"transition\",\n {\n attrs: { css: false },\n on: {\n \"before-enter\": _vm.beforeEnter,\n \"before-leave\": _vm.beforeLeave,\n enter: _vm.enter,\n leave: _vm.leave,\n \"after-leave\": _vm.afterLeave,\n \"after-enter\": _vm.afterEnter,\n \"enter-cancelled\": _vm.enterCancelled\n }\n },\n [\n _c(\"FramedComponent\", {\n key: _vm.mainComponent.key,\n ref: \"child\",\n attrs: { root: _vm.mainComponent, name: _vm.mainComponent.key },\n on: { push: _vm.push, show: _vm.push, pop: _vm.pop }\n })\n ],\n 1\n )\n : _vm._e()\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop, Ref, Vue } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport FramedComponent from \"./FramedComponent.vue\";\nimport { HistoryManager } from \"./HistoryManager\";\nimport { PopOptions } from \"./PopOptions\"\nimport { PushOptions } from \"./PushOptions\";\n\n@Component({\n components: {\n FramedComponent,\n },\n})\nexport default class NavigationController extends Vue {\n components: ComponentWithProperties[] = [];\n mainComponent: ComponentWithProperties | null = null;\n transitionName = \"none\";\n savedScrollPositions: number[] = [];\n nextScrollPosition = 0;\n previousScrollPosition = 0;\n\n @Prop()\n root!: ComponentWithProperties;\n\n @Prop({ default: null })\n initialComponents: ComponentWithProperties[] | null;\n\n @Prop({ default: \"default\" })\n animationType!: string;\n\n @Ref()\n child!: FramedComponent;\n\n beforeMount() {\n if (this.initialComponents && this.initialComponents.length > 0) {\n this.mainComponent = this.initialComponents[this.initialComponents.length - 1];\n this.components = this.initialComponents.slice(0);\n\n // Update property (even if not allowed, we know, but we need to remove the references)\n this.initialComponents.splice(0, this.initialComponents.length);\n } else {\n this.mainComponent = this.root;\n this.components = [this.root];\n }\n }\n\n freezeSize() {\n const el = this.$el as HTMLElement;\n\n el.style.width = el.offsetWidth + \"px\";\n el.style.height = el.offsetHeight + \"px\";\n }\n\n growSize(width: number, height: number) {\n const el = this.$el as HTMLElement;\n\n el.style.height = height+ \"px\";\n el.style.width = width + \"px\";\n }\n\n unfreezeSize() {\n const el = this.$el as HTMLElement;\n el.style.width = \"\";\n el.style.height = \"\";\n }\n\n getScrollElement(element: HTMLElement | null = null): HTMLElement {\n if (!element) {\n element = this.$el as HTMLElement;\n }\n\n const style = window.getComputedStyle(element);\n if (style.overflowY == \"scroll\" || style.overflow == \"scroll\" || style.overflow == \"auto\" || style.overflowY == \"auto\") {\n return element;\n } else {\n if (!element.parentElement) {\n return document.documentElement;\n }\n return this.getScrollElement(element.parentElement);\n }\n }\n\n shouldAnimate() {\n return this.getScrollElement().offsetWidth <= 900;\n }\n\n /**\n * popOptions = how to handle the pop of replace. animated and count are ignored\n * -> should get moved to separate configurations in the future\n */\n async push(options: PushOptions) {\n if (options.components.length == 0) {\n console.error(\"Missing component when pushing\")\n return\n }\n (document.activeElement as any)?.blur()\n const components = options.components\n const component = components[components.length - 1]\n\n // shouldAnimate: boolean | null = null, replace = 0, reverse = false, replaceWith: ComponentWithProperties[] = [], popOptions: PopOptions = {}\n const destroy = options.destroy ?? true\n const force = options.force ?? false\n const animated = this.shouldAnimate() ? (options.animated === undefined ? component.animated : options.animated) : false\n\n let replace = options.replace ?? 0\n if (replace > this.components.length) {\n replace = this.components.length\n }\n\n if (ComponentWithProperties.debug) console.log(\"Pushing new component on navigation controller: \" + component.component.name);\n\n if (replace > 0) {\n // Check if we are allowed to dismiss them all.\n // If one fails, we skip everything.\n if (destroy && !force) {\n for (let index = this.components.length - 1; index >= this.components.length - replace; index--) {\n const component = this.components[index];\n const r = await component.shouldNavigateAway();\n if (!r) {\n return;\n }\n }\n }\n }\n\n if (!animated) {\n this.transitionName = \"none\";\n } else {\n this.transitionName = this.animationType == \"modal\" ? \"modal-push\" : options.reverse ? \"pop\" : \"push\";\n }\n\n // Add the client height from the saved height (check pop method for information)\n const scrollElement = this.getScrollElement();\n const w = window as any;\n\n let clientHeight = scrollElement.clientHeight;\n if (scrollElement === document.documentElement && w.visualViewport) {\n clientHeight = w.visualViewport.height;\n }\n\n // Save scroll position\n this.previousScrollPosition = scrollElement.scrollTop;\n this.savedScrollPositions.push(this.previousScrollPosition + clientHeight);\n this.nextScrollPosition = 0;\n\n // Save width and height\n if (animated) {\n this.freezeSize();\n }\n\n // Make sure the transition name changed, so wait for a rerender\n if (replace > 0) {\n const popped = this.components.splice(this.components.length - replace, replace, ...components);\n \n if (!destroy) {\n // Stop destroy\n for (const comp of popped) {\n comp.keepAlive = true;\n }\n }\n } else {\n this.components.push(...components);\n }\n\n if (this.mainComponent) {\n // Keep the component alive while it is removed from the DOM, unless it is being replaced\n this.mainComponent.keepAlive = !replace;\n }\n\n this.mainComponent = component;\n this.$emit(\"didPush\");\n\n if (replace == 0 && this) {\n //\n for (let index = 0; index < components.length; index++) {\n HistoryManager.pushState(options?.url, (canAnimate: boolean) => {\n // todo: fix reference to this and memory handling here!!\n this.pop({ animated: animated && canAnimate});\n }, options?.adjustHistory ?? true);\n\n if (index < components.length - 1) {\n // This component will not get mounted, but we need to simulate this to assign\n // a history index\n components[index].assignHistoryIndex()\n }\n }\n }\n }\n\n /**\n * Whether user interaction might prevent destructive navigation away from components.\n */\n async shouldNavigateAway(): Promise<boolean> {\n for (let index = this.components.length - 1; index >= 0; index--) {\n const component = this.components[index];\n const r = await component.shouldNavigateAway();\n if (!r) {\n return false;\n }\n }\n return true;\n }\n\n popToRoot(options: PopOptions = {}) {\n options.count = this.components.length - 1\n return this.pop(options);\n }\n\n getPoppableParent(): any | null {\n let prev = this;\n let start: any = this.$parent;\n while (start) {\n if (prev.$listeners[\"pop\"]) {\n return prev;\n }\n\n prev = start;\n start = start.$parent;\n }\n return null;\n }\n\n /**\n * force: whether \"shouldNavigateAway\" of child components is ignored\n */\n async pop(options: PopOptions = {}): Promise<ComponentWithProperties[] | undefined> {\n (document.activeElement as any)?.blur()\n\n const animated = this.shouldAnimate() ? (options.animated ?? true) : false;\n const destroy = options.destroy ?? true;;\n const count = options.count ?? 1;\n const force = options.force ?? false;\n\n if (this.components.length <= count) {\n const parent = this.getPoppableParent()\n\n // Prevent multiple count pop across modal levels\n options.count = 1\n\n if (!parent) {\n console.error(\"Tried to pop an empty navigation controller, but couldn't find a parent to pop\")\n this.$emit(\"pop\", options)\n return;\n }\n parent.$emit(\"pop\", options)\n return;\n }\n\n if (count === 0) {\n return;\n }\n\n if (destroy && !force) {\n for (let index = this.components.length - 1; index >= this.components.length - count; index--) {\n const component = this.components[index];\n const r = await component.shouldNavigateAway();\n if (!r) {\n return;\n }\n }\n }\n\n this.previousScrollPosition = this.getScrollElement().scrollTop;\n\n if (!animated) {\n this.transitionName = \"none\";\n } else {\n this.transitionName = this.animationType == \"modal\" ? \"modal-pop\" : \"pop\";\n this.freezeSize();\n }\n //console.log(\"Prepared previous scroll positoin: \" + this.previousScrollPosition);\n\n const popped = this.components.splice(this.components.length - count, count);\n\n if (!destroy) {\n // Stop destroy\n for (const comp of popped) {\n comp.keepAlive = true;\n }\n }\n\n // Remove the client height from the saved height (since this includes the client height so we can correct any changes in client heigth ahead of time)\n // We need this because when we set the height of the incoming view, we cannot reliably detect the maximum scroll height due some mobile browser glitches\n const scrollElement = this.getScrollElement();\n const w = window as any;\n\n let clientHeight = scrollElement.clientHeight;\n if (scrollElement === document.documentElement && w.visualViewport) {\n clientHeight = w.visualViewport.height;\n }\n\n this.nextScrollPosition = Math.max(0, (this.savedScrollPositions.pop() ?? 0) - clientHeight);\n\n this.mainComponent = this.components[this.components.length - 1];\n this.$emit(\"didPop\");\n return popped;\n }\n\n beforeEnter(insertedElement: HTMLElement) {\n if (this.transitionName == \"none\") {\n return;\n }\n\n // We need to set the class already to hide the incoming element\n insertedElement.className = this.transitionName + \"-enter-active \" + this.transitionName + \"-enter\";\n }\n\n beforeLeave(_element: HTMLElement) {\n if (this.transitionName == \"none\") {\n return;\n }\n // Do nothing here. Is is important to finish the enter transitions first!\n // Do not even set a class! That will cause flickering on Webkit!\n }\n\n beforeBeforeEnterAnimation() {\n if (this.mainComponent) {\n const instance: any = this.mainComponent.componentInstance()\n if (instance && instance.beforeBeforeEnterAnimation) {\n instance.beforeBeforeEnterAnimation()\n }\n }\n }\n\n finishedEnterAnimation() {\n if (this.mainComponent) {\n const instance: any = this.mainComponent.componentInstance()\n if (instance && instance.finishedEnterAnimation) {\n instance.finishedEnterAnimation()\n }\n }\n }\n\n enter(element: HTMLElement, done) {\n if (this.transitionName == \"none\") {\n this.getScrollElement().scrollTop = this.nextScrollPosition;\n done();\n return;\n }\n\n // Allow scrollTop override in a specified handler\n // Call before\n if (this.mainComponent) {\n const instance: any = this.mainComponent.componentInstance()\n if (instance && instance.beforeBeforeEnterAnimation) {\n instance.beforeBeforeEnterAnimation()\n }\n }\n\n const scrollElement = this.getScrollElement();\n\n const w = ((element.firstElementChild as HTMLElement).firstElementChild as HTMLElement).offsetWidth;\n const h = (element.firstElementChild as HTMLElement).offsetHeight;\n\n const scrollOuterHeight = this.getScrollOuterHeight(scrollElement);\n\n // Limit\n\n let next = this.nextScrollPosition;\n\n //console.log(\"Entering element \", h, next, scrollOuterHeight)\n\n if (next > h - scrollOuterHeight) {\n // To much scrolled!\n //console.log(\"Corrected maximum scroll position\")\n next = Math.max(0, h - scrollOuterHeight);\n\n // Also propagate this change to the .leave handler\n this.nextScrollPosition = next\n //console.log(\"corrected! \", h, next, scrollOuterHeight)\n }\n\n // Prepare animation\n const childElement = (element.firstElementChild as HTMLElement)\n\n let transitionDuration = 300\n if (this.transitionName === \"pop\" || this.transitionName == \"modal-pop\") {\n // Pop animations should go faster\n transitionDuration = 250\n }\n\n if (this.transitionName == \"push\" || this.transitionName == \"pop\") {\n element.style.willChange = \"opacity\"\n childElement.style.willChange = \"transform\"\n } else {\n if (this.transitionName == \"modal-push\") {\n element.style.willChange = \"top\"\n }\n }\n scrollElement.style.willChange = \"scroll-position\"\n\n // Lock position if needed\n // This happens before the beforeLeave animation frame!\n this.growSize(w, h);\n\n // Disable scroll during animation (this is to fix overflow elements)\n // We can only allow scroll during transitions when all browser support overflow: clip, which they don't atm\n // This sometimes doesn't work on iOS Safari on body due to a bug\n requestAnimationFrame(() => {\n // Wait and execute immediately after beforeLeave's animation frame\n // Let the OS rerender once so all the positions are okay after dom insertion\n scrollElement.scrollTop = next;\n\n // Allow scrollTop override in a specified handler\n // Call before\n if (this.mainComponent) {\n const instance: any = this.mainComponent.componentInstance()\n if (instance && instance.beforeEnterAnimation) {\n instance.beforeEnterAnimation()\n }\n }\n\n // Start animation in the next frame\n requestAnimationFrame(() => {\n // We've reached our initial positioning and can start our animation\n element.className = this.transitionName + \"-enter-active \" + this.transitionName + \"-enter-to\";\n\n // Call start\n if (this.mainComponent) {\n const instance: any = this.mainComponent.componentInstance()\n if (instance && instance.beginEnterAnimation) {\n instance.beginEnterAnimation()\n }\n }\n\n setTimeout(() => {\n //scrollElement.style.overflow = \"\";\n element.style.willChange = \"\"\n childElement.style.willChange = \"\"\n scrollElement.style.willChange = \"\"\n\n // Call finished\n if (this.mainComponent) {\n const instance: any = this.mainComponent.componentInstance()\n if (instance && instance.finishedEnterAnimation) {\n instance.finishedEnterAnimation()\n }\n }\n done();\n }, transitionDuration + 25);\n });\n });\n }\n\n getScrollOuterHeight(scrollElement: HTMLElement) {\n // we add some extra padding below to fix iOS bug that reports wront clientHeight\n // We need to show some extra area below of the leaving frame, but to do this, we also need\n // to check if there is still content left below the visible client height. So we calculate the area underneath the client height\n // and limit to 300px maximum extra padding\n // const fixPadding = Math.min(300, Math.max(0, element.offsetHeight - current - scrollElement.clientHeight));\n // console.log(\"Fix padding: \" + fixPadding);\n // This fixPadding thing doesn't work on other browsers. Need to recheck when it reappears on iOS\n let h = scrollElement.clientHeight; // + fixPadding;\n if (scrollElement === document.documentElement) {\n // Fix viewport glitch\n const w = window as any;\n if (w.visualViewport) {\n //console.log(\"Used height \" + w.visualViewport.height + \" instead of \" + h);\n h = w.visualViewport.height;\n }\n }\n return h\n }\n\n leave(element: HTMLElement, done) {\n if (this.transitionName == \"none\") {\n done();\n return;\n }\n\n const scrollElement = this.getScrollElement();\n let h = this.getScrollOuterHeight(scrollElement)\n\n // Prepare animation\n const childElement = (element.firstElementChild as HTMLElement)\n if (this.transitionName == \"push\" || this.transitionName == \"pop\") {\n element.style.willChange = \"opacity,top\"\n } else {\n element.style.willChange = \"top\"\n }\n\n if (this.transitionName == \"push\" || this.transitionName == \"pop\" || this.transitionName == \"modal-pop\") {\n childElement.style.willChange = \"scroll-position,transform\"\n } else {\n childElement.style.willChange = \"scroll-position\"\n }\n\n let transitionDuration = 300\n if (this.transitionName === \"pop\" || this.transitionName == \"modal-pop\") {\n // Pop animations should go faster\n transitionDuration = 250\n }\n\n // This animation frame is super important to prevent flickering on Safari and Webkit!\n // This is also one of the reasons why we cannot use the default Vue class additions\n // We do this to improve the timing of the classes and scroll positions\n requestAnimationFrame(() => {\n // Prevent blinking due to slow rerender after scrollTop changes\n // Create a clone and offset the clone first. After that, adjust the scroll position\n const current = this.previousScrollPosition;\n const next = this.nextScrollPosition;\n\n const height = h + \"px\";\n //console.log(\"height\", height);\n\n // Setting the class has to happen in one go.\n // First we need to make our element fixed / absolute positioned, and pinned to all the edges\n // In the same frame, we need to update the scroll position.\n // If we switch the ordering, this won't work!\n element.className = this.transitionName + \"-leave-active \" + this.transitionName + \"-leave\";\n\n element.style.top = next + \"px\";\n element.style.height = height;\n element.style.bottom = \"auto\";\n element.style.overflow = \"hidden\";\n\n // Now scroll!\n childElement.style.overflow = \"hidden\";\n childElement.style.height = h + \"px\";\n\n childElement.scrollTop = current;\n\n requestAnimationFrame(() => {\n // We've reached our initial positioning and can start our animation\n element.className = this.transitionName + \"-leave-active \" + this.transitionName + \"-leave-to\";\n\n setTimeout(() => {\n element.style.overflow = \"\";\n element.style.top = \"\";\n element.style.height = \"\";\n element.style.bottom = \"\";\n childElement.style.overflow = \"\";\n element.style.willChange = \"\"\n childElement.style.willChange = \"\"\n done();\n }, transitionDuration + 25);\n });\n });\n }\n\n afterLeave(element: HTMLElement) {\n if (this.transitionName == \"none\") {\n return;\n }\n\n element.className = \"\";\n }\n\n afterEnter(element: HTMLElement) {\n if (this.transitionName == \"none\") {\n return;\n }\n this.unfreezeSize();\n element.className = \"\";\n }\n\n enterCancelled(_element: HTMLElement) {\n this.unfreezeSize();\n }\n\n destroyed() {\n // console.log(\"Destroyed navigation controller\");\n\n // Prevent memory issues by removing all references and destroying kept alive components\n for (const component of this.components) {\n // Destroy them one by one\n if (component.isKeptAlive) {\n component.destroy();\n }\n }\n\n this.components = [];\n this.mainComponent = null;\n }\n}\n","import { render, staticRenderFns } from \"./NavigationController.vue?vue&type=template&id=250e5c49&\"\nimport script from \"./NavigationController.vue?vue&type=script&lang=ts&\"\nexport * from \"./NavigationController.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./NavigationController.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('250e5c49')) {\n api.createRecord('250e5c49', component.options)\n } else {\n api.reload('250e5c49', component.options)\n }\n module.hot.accept(\"./NavigationController.vue?vue&type=template&id=250e5c49&\", function () {\n api.rerender('250e5c49', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/NavigationController.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"transition\",\n { attrs: { appear: _vm.shouldAppear, name: \"fade\", duration: 300 } },\n [\n _c(\n \"div\",\n {\n staticClass: \"popup\",\n class: {\n sticky: _vm.sticky,\n \"push-down\": _vm.pushDown == 1,\n \"push-down-full\": _vm.pushDown > 1\n },\n on: { mousedown: _vm.dismiss, touchdown: _vm.dismiss }\n },\n [\n _c(\n \"div\",\n {\n on: {\n mousedown: function($event) {\n $event.stopPropagation()\n },\n touchdown: function($event) {\n $event.stopPropagation()\n }\n }\n },\n [\n _c(\n \"div\",\n { staticClass: \"scrollable-container\" },\n [\n _c(\"ComponentWithPropertiesInstance\", {\n key: _vm.root.key,\n attrs: { component: _vm.root },\n on: { pop: _vm.dismiss }\n })\n ],\n 1\n )\n ]\n )\n ]\n )\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import { Component, Vue } from \"vue-property-decorator\";\n\nimport ModalStackComponent from \"./ModalStackComponent.vue\";\nimport { PopOptions } from \"./PopOptions\";\n\n// You can declare mixins as the same style as components.\n@Component\nexport class ModalMixin extends Vue {\n get modalStackComponent(): ModalStackComponent | null {\n let start: any = this.$parent;\n while (start) {\n if (start instanceof ModalStackComponent) {\n return start;\n }\n\n start = start.$parent;\n }\n return null;\n }\n\n /**\n * Call one of the pop listeners of a parent or grandparent. E.g. to go back in a navigation controller.\n * @param options Options that should get applied to the pop of the first parent that listens for the pop event\n */\n pop(options: PopOptions = {}) {\n const nav = this.getPoppableParent();\n if (nav) {\n // Sometimes we need to call the pop event instead (because this adds custom data to the event)\n if (nav.$listeners[\"pop\"]) {\n nav.$emit(\"pop\", options);\n } else {\n console.error(\"Couldn't pop. Failed\");\n }\n } else {\n console.warn(\"No navigation controller to pop\");\n }\n }\n\n /**\n * Return the first child of a parent that listens for the pop event\n */\n getPoppableParent(): any | null {\n let prev = this;\n let start: any = this.$parent;\n while (start) {\n if (prev.$listeners[\"pop\"]) {\n return prev;\n }\n\n prev = start;\n start = start.$parent;\n }\n return null;\n }\n}","\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport ComponentWithPropertiesInstance from \"./ComponentWithPropertiesInstance\";\nimport { PopOptions } from './PopOptions';\nimport { HistoryManager } from './HistoryManager';\nimport { ModalMixin } from './ModalMixin';\n\nconst visualViewport = (window as any).visualViewport\n\n@Component({\n components: {\n ComponentWithPropertiesInstance,\n }\n})\nexport default class Popup extends ModalMixin {\n @Prop({ required: true })\n root!: ComponentWithProperties\n\n sticky = false\n\n get shouldAppear() {\n return this.root.animated\n }\n\n get pushDown() {\n const popups = this.modalStackComponent?.stackComponent?.components.filter(c => c.component === Popup) ?? []\n if (popups.length > 0 && popups[popups.length - 1].componentInstance() !== this) {\n if (popups.length > 1 && popups[popups.length - 2].componentInstance() === this) {\n return 1\n }\n return 2\n }\n return 0\n }\n\n get isFocused() {\n const popups = this.modalStackComponent?.stackComponent?.components ?? []\n if (popups.length > 0 && popups[popups.length - 1].componentInstance() !== this) {\n return false\n }\n return true\n }\n\n activated() {\n document.addEventListener(\"keydown\", this.onKey);\n this.resize();\n\n if (visualViewport) {\n visualViewport.addEventListener('resize', this.resize);\n }\n }\n\n deactivated() {\n document.removeEventListener(\"keydown\", this.onKey);\n\n if (visualViewport) {\n visualViewport.removeEventListener('resize', this.resize);\n }\n }\n\n async dismiss(options?: PopOptions) {\n if (!options?.force) {\n const r = await this.shouldNavigateAway();\n if (!r) {\n return false;\n }\n }\n\n // Check which modal is undernath?\n const popups = this.modalStackComponent?.stackComponent?.components.filter(c => c.modalDisplayStyle !== \"overlay\") ?? []\n if (popups.length === 0 || popups[popups.length - 1].componentInstance() === this) {\n const index = this.root.getHistoryIndex()\n if (index !== null && index !== undefined) {\n HistoryManager.returnToHistoryIndex(index - 1);\n }\n }\n this.pop(options)\n }\n\n resize() {\n if (!visualViewport) {\n return;\n }\n // Check if covered area is more than 200px -> we got a keyboard shown -> switch to sticky mode\n if (document.documentElement.clientHeight - visualViewport.height > 200) {\n this.sticky = true\n } else {\n this.sticky = false\n }\n }\n\n onKey(event) {\n if (event.defaultPrevented || event.repeat) {\n return;\n }\n\n if (!this.isFocused) {\n return;\n }\n\n const key = event.key || event.keyCode;\n\n if (key === \"Escape\" || key === \"Esc\" || key === 27) {\n this.dismiss();\n event.preventDefault();\n }\n }\n\n shouldNavigateAway() {\n return this.root.shouldNavigateAway()\n }\n}\n","import { render, staticRenderFns } from \"./Popup.vue?vue&type=template&id=a782d2fa&\"\nimport script from \"./Popup.vue?vue&type=script&lang=ts&\"\nexport * from \"./Popup.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Popup.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('a782d2fa')) {\n api.createRecord('a782d2fa', component.options)\n } else {\n api.reload('a782d2fa', component.options)\n }\n module.hot.accept(\"./Popup.vue?vue&type=template&id=a782d2fa&\", function () {\n api.rerender('a782d2fa', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/Popup.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n _vm._l(_vm.components, function(component, index) {\n return _c(\"ComponentWithPropertiesInstance\", {\n key: component.key,\n ref: \"children\",\n refInFor: true,\n attrs: { component: component },\n on: {\n pop: function($event) {\n return _vm.removeAt(index, component.key)\n }\n }\n })\n }),\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport ComponentWithPropertiesInstance from \"./ComponentWithPropertiesInstance\";\n\n@Component({\n components: {\n ComponentWithPropertiesInstance,\n },\n})\nexport default class StackComponent extends Vue {\n components: ComponentWithProperties[] = [];\n\n show(component: ComponentWithProperties) {\n this.components.push(component);\n }\n\n removeAt(index, key) {\n if (!this.components[index]) {\n // Manually search for the key (race conditions with slow events in vue)\n for (const [i, comp] of this.components.entries()) {\n if (comp.key === key) {\n console.warn(\"Corrected index from \"+index+\" to \"+i)\n index = i;\n break;\n }\n }\n }\n if (this.components[index].key === key) {\n this.components.splice(index, 1);\n } else {\n console.warn(\"Expected component with key \" + key + \" at index\" + index);\n }\n }\n\n beforeDestroy() {\n this.components = [];\n }\n}\n","import { render, staticRenderFns } from \"./StackComponent.vue?vue&type=template&id=1b21bde4&\"\nimport script from \"./StackComponent.vue?vue&type=script&lang=ts&\"\nexport * from \"./StackComponent.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('1b21bde4')) {\n api.createRecord('1b21bde4', component.options)\n } else {\n api.reload('1b21bde4', component.options)\n }\n module.hot.accept(\"./StackComponent.vue?vue&type=template&id=1b21bde4&\", function () {\n api.rerender('1b21bde4', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/StackComponent.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"transition\",\n { attrs: { appear: _vm.shouldAppear, name: \"fade\", duration: 300 } },\n [\n _c(\n \"div\",\n {\n staticClass: \"sheet\",\n on: { mousedown: _vm.dismiss, touchdown: _vm.dismiss }\n },\n [\n _c(\n \"div\",\n {\n on: {\n mousedown: function($event) {\n $event.stopPropagation()\n },\n touchdown: function($event) {\n $event.stopPropagation()\n }\n }\n },\n [\n _c(\"ComponentWithPropertiesInstance\", {\n key: _vm.root.key,\n attrs: { component: _vm.root },\n on: { pop: _vm.dismiss }\n })\n ],\n 1\n )\n ]\n )\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\nimport { Vue, Component, Prop } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport ComponentWithPropertiesInstance from \"./ComponentWithPropertiesInstance\";\nimport { PopOptions } from './PopOptions';\nimport { ModalMixin } from './ModalMixin';\nimport { HistoryManager } from \"./HistoryManager\";\n\n@Component({\n components: {\n ComponentWithPropertiesInstance,\n }\n})\nexport default class Sheet extends ModalMixin {\n @Prop({ required: true })\n root!: ComponentWithProperties\n\n get shouldAppear() {\n return this.root.animated\n }\n \n activated() {\n document.addEventListener(\"keydown\", this.onKey);\n }\n\n deactivated() {\n document.removeEventListener(\"keydown\", this.onKey);\n }\n\n get isFocused() {\n const popups = this.modalStackComponent?.stackComponent?.components ?? []\n if (popups.length > 0 && popups[popups.length - 1].componentInstance() !== this) {\n return false\n }\n return true\n }\n\n async dismiss(options?: PopOptions) {\n if (!options?.force) {\n const r = await this.shouldNavigateAway();\n if (!r) {\n return false;\n }\n }\n\n // Check which modal is undernath?\n const popups = this.modalStackComponent?.stackComponent?.components.filter(c => c.modalDisplayStyle !== \"overlay\") ?? []\n if (popups.length === 0 || popups[popups.length - 1].componentInstance() === this) {\n const index = this.root.getHistoryIndex()\n if (index !== null && index !== undefined) {\n HistoryManager.returnToHistoryIndex(index - 1);\n }\n }\n this.pop(options)\n }\n\n onKey(event) {\n if (event.defaultPrevented || event.repeat) {\n return;\n }\n\n if (!this.isFocused) {\n return;\n }\n\n const key = event.key || event.keyCode;\n\n if (key === \"Escape\" || key === \"Esc\" || key === 27) {\n this.dismiss();\n event.preventDefault();\n }\n }\n\n shouldNavigateAway() {\n return this.root.shouldNavigateAway()\n }\n}\n","import { render, staticRenderFns } from \"./Sheet.vue?vue&type=template&id=30e9f1b6&\"\nimport script from \"./Sheet.vue?vue&type=script&lang=ts&\"\nexport * from \"./Sheet.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Sheet.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('30e9f1b6')) {\n api.createRecord('30e9f1b6', component.options)\n } else {\n api.reload('30e9f1b6', component.options)\n }\n module.hot.accept(\"./Sheet.vue?vue&type=template&id=30e9f1b6&\", function () {\n api.rerender('30e9f1b6', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/Sheet.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"transition\",\n { attrs: { appear: _vm.shouldAppear, name: \"fade\" } },\n [\n _c(\n \"div\",\n {\n staticClass: \"side-view\",\n class: {\n \"push-down\": _vm.pushDown == 1,\n \"push-down-full\": _vm.pushDown > 1\n },\n on: { mousedown: _vm.dismiss, touchdown: _vm.dismiss }\n },\n [\n _c(\n \"div\",\n {\n on: {\n mousedown: function($event) {\n $event.stopPropagation()\n },\n touchdown: function($event) {\n $event.stopPropagation()\n }\n }\n },\n [\n _c(\"ComponentWithPropertiesInstance\", {\n key: _vm.root.key,\n attrs: { component: _vm.root },\n on: { pop: _vm.dismiss }\n })\n ],\n 1\n )\n ]\n )\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport ComponentWithPropertiesInstance from \"./ComponentWithPropertiesInstance\";\nimport { PopOptions } from './PopOptions';\nimport { HistoryManager } from './HistoryManager';\nimport { ModalMixin } from './ModalMixin';\n\nconst visualViewport = (window as any).visualViewport\n\n@Component({\n components: {\n ComponentWithPropertiesInstance,\n }\n})\nexport default class SideView extends ModalMixin {\n @Prop({ required: true })\n root!: ComponentWithProperties\n\n get shouldAppear() {\n return this.root.animated\n }\n\n get pushDown() {\n const sideViews = this.modalStackComponent?.stackComponent?.components.filter(c => c.component === SideView) ?? []\n if (sideViews.length > 0 && sideViews[sideViews.length - 1].componentInstance() !== this) {\n if (sideViews.length > 1 && sideViews[sideViews.length - 2].componentInstance() === this) {\n return 1\n }\n return 2\n }\n return 0\n }\n\n get isFocused() {\n const sideViews = this.modalStackComponent?.stackComponent?.components ?? []\n if (sideViews.length > 0 && sideViews[sideViews.length - 1].componentInstance() !== this) {\n return false\n }\n return true\n }\n\n activated() {\n document.addEventListener(\"keydown\", this.onKey);\n this.resize();\n\n if (visualViewport) {\n visualViewport.addEventListener('resize', this.resize);\n }\n }\n\n deactivated() {\n document.removeEventListener(\"keydown\", this.onKey);\n\n if (visualViewport) {\n visualViewport.removeEventListener('resize', this.resize);\n }\n }\n\n async dismiss(options?: PopOptions) {\n if (!options?.force) {\n const r = await this.shouldNavigateAway();\n if (!r) {\n return false;\n }\n }\n\n // Check which modal is undernath?\n const sideViews = this.modalStackComponent?.stackComponent?.components.filter(c => c.modalDisplayStyle !== \"overlay\") ?? []\n if (sideViews.length === 0 || sideViews[sideViews.length - 1].componentInstance() === this) {\n const index = this.root.getHistoryIndex()\n if (index !== null && index !== undefined) {\n HistoryManager.returnToHistoryIndex(index - 1);\n }\n }\n this.pop(options)\n }\n\n resize() {\n if (!visualViewport) {\n return;\n }\n }\n\n onKey(event) {\n if (event.defaultPrevented || event.repeat) {\n return;\n }\n\n if (!this.isFocused) {\n return;\n }\n\n const key = event.key || event.keyCode;\n\n if (key === \"Escape\" || key === \"Esc\" || key === 27) {\n this.dismiss();\n event.preventDefault();\n }\n }\n\n shouldNavigateAway() {\n return this.root.shouldNavigateAway()\n }\n}\n","import { render, staticRenderFns } from \"./SideView.vue?vue&type=template&id=9ebd30d6&\"\nimport script from \"./SideView.vue?vue&type=script&lang=ts&\"\nexport * from \"./SideView.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./SideView.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('9ebd30d6')) {\n api.createRecord('9ebd30d6', component.options)\n } else {\n api.reload('9ebd30d6', component.options)\n }\n module.hot.accept(\"./SideView.vue?vue&type=template&id=9ebd30d6&\", function () {\n api.rerender('9ebd30d6', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/SideView.vue\"\nexport default component.exports","\n\n\n\n\n\n\n\n\nimport { Component, Prop, Ref, Vue } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport NavigationController from \"./NavigationController.vue\";\nimport Popup from \"./Popup.vue\";\nimport StackComponent from \"./StackComponent.vue\";\nimport Sheet from './Sheet.vue';\nimport { HistoryManager } from './HistoryManager';\nimport { PushOptions } from \"./PushOptions\";\nimport SideView from \"./SideView.vue\";\n\n@Component({\n components: {\n NavigationController,\n StackComponent,\n },\n})\nexport default class ModalStackComponent extends Vue {\n @Prop()\n readonly root!: ComponentWithProperties;\n\n @Ref()\n stackComponent!: StackComponent;\n\n present(options: PushOptions) {\n const component = options.components[options.components.length - 1]\n\n if (options.animated !== undefined) {\n component.animated = options.animated\n }\n\n const style = options.modalDisplayStyle ?? component.modalDisplayStyle ?? 'cover'\n component.setDisplayStyle(style)\n\n if (style === \"popup\" && (this.$el as HTMLElement).offsetWidth > 800) {\n const c = new ComponentWithProperties(Popup, { root: component })\n\n HistoryManager.pushState(options?.url, (canAnimate: boolean) => {\n (c.componentInstance() as (Popup | undefined))?.pop({ animated: canAnimate});\n }, options?.adjustHistory ?? true);\n \n this.stackComponent.show(c);\n \n return;\n }\n\n if (style === \"sheet\" && (this.$el as HTMLElement).offsetWidth > 700) {\n const c = new ComponentWithProperties(Sheet, { root: component })\n\n HistoryManager.pushState(options?.url, (canAnimate: boolean) => {\n // todo: fix reference to this and memory handling here!!\n (c.componentInstance() as (Sheet | undefined))?.pop({ animated: canAnimate});\n }, options?.adjustHistory ?? true);\n\n this.stackComponent.show(c);\n return;\n }\n\n if (style === \"side-view\" && (this.$el as HTMLElement).offsetWidth > 800) {\n const c = new ComponentWithProperties(SideView, { root: component })\n\n HistoryManager.pushState(options?.url, (canAnimate: boolean) => {\n // todo: fix reference to this and memory handling here!!\n (c.componentInstance() as (SideView | undefined))?.pop({ animated: canAnimate});\n }, options?.adjustHistory ?? true);\n\n this.stackComponent.show(c);\n return;\n }\n\n if (style === \"overlay\") {\n this.stackComponent.show(component);\n return;\n }\n (this.$refs.navigationController as NavigationController).push(options);\n }\n\n /**\n * @deprecated\n */\n replace(component: ComponentWithProperties, animated = true) {\n const nav = this.$refs.navigationController as NavigationController;\n nav.push({ components: [component], animated, replace: nav.components.length });\n }\n}\n","import { render, staticRenderFns } from \"./ModalStackComponent.vue?vue&type=template&id=c053b00e&\"\nimport script from \"./ModalStackComponent.vue?vue&type=script&lang=ts&\"\nexport * from \"./ModalStackComponent.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('c053b00e')) {\n api.createRecord('c053b00e', component.options)\n } else {\n api.reload('c053b00e', component.options)\n }\n module.hot.accept(\"./ModalStackComponent.vue?vue&type=template&id=c053b00e&\", function () {\n api.rerender('c053b00e', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/ModalStackComponent.vue\"\nexport default component.exports","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n {\n staticClass: \"split-view-controller\",\n attrs: { \"data-has-detail\": _vm.detail ? \"true\" : \"false\" }\n },\n [\n _c(\n \"div\",\n { ref: \"masterElement\", staticClass: \"master\" },\n [\n _c(\"NavigationController\", {\n ref: \"navigationController\",\n attrs: { root: _vm.root },\n on: { showDetail: _vm.showDetail }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _vm.detail\n ? _c(\n \"div\",\n { staticClass: \"detail\" },\n [\n _c(\"FramedComponent\", {\n key: _vm.detail.key,\n ref: \"detailFrame\",\n attrs: { root: _vm.detail }\n })\n ],\n 1\n )\n : _vm._e()\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop, Ref, Vue } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"./ComponentWithProperties\";\nimport FramedComponent from \"./FramedComponent.vue\";\nimport NavigationController from \"./NavigationController.vue\";\nimport { PushOptions } from \"./PushOptions\";\n\n// Credits https://codeburst.io/throttling-and-debouncing-in-javascript-b01cad5c8edf\nconst throttle = (func, limit) => {\n let lastFunc;\n let lastRan;\n return function() {\n const context = this;\n // eslint-disable-next-line prefer-rest-params\n const args = arguments;\n if (!lastRan) {\n func.apply(context, args);\n lastRan = Date.now();\n } else {\n clearTimeout(lastFunc);\n lastFunc = setTimeout(function() {\n if (Date.now() - lastRan >= limit) {\n func.apply(context, args);\n lastRan = Date.now();\n }\n }, limit - (Date.now() - lastRan));\n }\n };\n};\n\n@Component({\n components: {\n NavigationController,\n FramedComponent,\n }\n})\nexport default class SplitViewController extends Vue {\n @Prop()\n root!: ComponentWithProperties;\n detail: ComponentWithProperties | null = null;\n\n @Prop()\n detailWidth?: string;\n\n @Ref()\n navigationController!: NavigationController;\n\n @Ref()\n detailKeepAlive!: Vue; // = KeepAlive internal class\n\n @Ref()\n masterElement!: HTMLElement; // = KeepAlive internal class\n\n detailKey: number | null = null;\n\n activated() {\n (this as any).listener = throttle(this.onResize, 200);\n window.addEventListener(\"resize\", (this as any).listener, { passive: true } as EventListenerOptions);\n }\n\n mounted() {\n if (this.detailWidth) {\n (this.$el as HTMLElement).style.setProperty(\"--split-view-width\", this.detailWidth);\n }\n }\n\n deactivated() {\n window.removeEventListener(\"resize\", (this as any).listener, { passive: true } as EventListenerOptions);\n }\n\n onResize() {\n if (this.shouldCollapse()) {\n if (this.detail) {\n this.collapse();\n }\n } else {\n if (this.lastIsDetail && !this.detail) {\n this.expand();\n }\n }\n }\n\n get lastIsDetail() {\n return this.detailKey != null && (this.$refs.navigationController as NavigationController).mainComponent?.key == this.detailKey;\n }\n\n getScrollElement(element: HTMLElement | null = null): HTMLElement {\n if (!element) {\n element = this.$el as HTMLElement;\n }\n\n const style = window.getComputedStyle(element);\n if (style.overflowY == \"scroll\" || style.overflow == \"scroll\" || style.overflow == \"auto\" || style.overflowY == \"auto\") {\n return element;\n } else {\n if (!element.parentElement) {\n return document.documentElement;\n }\n return this.getScrollElement(element.parentElement);\n }\n }\n\n async shouldNavigateAway(): Promise<boolean> {\n if (this.detail) {\n const r = await this.detail.shouldNavigateAway();\n if (!r) {\n return false;\n }\n }\n\n if (this.navigationController) {\n return await this.navigationController.shouldNavigateAway();\n }\n\n return true;\n }\n\n async showDetail(options: PushOptions): Promise<boolean> {\n const component = options.components[options.components.length - 1]\n this.detailKey = component.key;\n\n if (this.shouldCollapse()) {\n if (this.lastIsDetail || this.detail) {\n console.error(\"Pusing a detail when a detail is already presented is not allowed\");\n return false;\n }\n\n this.navigationController.push(options);\n } else {\n // Replace existing detail component\n // First check if we don't destroy anything\n if (this.detail) {\n const r = await this.detail.shouldNavigateAway();\n if (!r) {\n return false;\n }\n }\n\n this.getScrollElement().scrollTop = 0;\n this.detail = component;\n }\n return true;\n }\n\n shouldCollapse() {\n return (this.$el as HTMLElement).offsetWidth < 850;\n }\n\n collapse() {\n if (this.lastIsDetail) {\n console.error(\"Cannot collapse when the detail is already collaped\");\n return;\n }\n if (!this.detail) {\n console.error(\"Cannot collapse without detail\");\n return;\n }\n this.detail.keepAlive = true;\n const detail = this.detail;\n this.detail = null;\n this.navigationController.push({ components: [detail], animated: false });\n }\n\n async expand() {\n if (this.detail) {\n console.error(\"Cannot expand when detail is already visible\");\n return;\n }\n if (!this.lastIsDetail) {\n console.error(\"Cannot expand when there is no detail\");\n return;\n }\n const popped = await this.navigationController.pop({\n animated: false,\n destroy: false\n });\n if (!popped || popped.length == 0) {\n return;\n }\n\n // We need to wait until it is removed from the vnode\n this.$nextTick(() => {\n this.detail = popped[0];\n });\n }\n}\n","import { render, staticRenderFns } from \"./SplitViewController.vue?vue&type=template&id=e2d6041c&\"\nimport script from \"./SplitViewController.vue?vue&type=script&lang=ts&\"\nexport * from \"./SplitViewController.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./SplitViewController.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/simon/Documents/Projects/vue-app-navigation/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('e2d6041c')) {\n api.createRecord('e2d6041c', component.options)\n } else {\n api.reload('e2d6041c', component.options)\n }\n module.hot.accept(\"./SplitViewController.vue?vue&type=template&id=e2d6041c&\", function () {\n api.rerender('e2d6041c', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/SplitViewController.vue\"\nexport default component.exports","// mixins.js\nimport { Component, Vue } from \"vue-property-decorator\";\n\nimport { ComponentWithProperties } from \"..\";\nimport NavigationController from \"./NavigationController.vue\";\nimport { PopOptions } from './PopOptions';\nimport Popup from \"./Popup.vue\";\nimport { PushOptions } from \"./PushOptions\";\nimport Sheet from \"./Sheet.vue\";\nimport SideView from \"./SideView.vue\";\nimport SplitViewController from \"./SplitViewController.vue\";\n\n// You can declare mixins as the same style as components.\n@Component\nexport class NavigationMixin extends Vue {\n emitParents(event: string, data: any) {\n let start: any = this.$parent;\n while (start) {\n if (start.$listeners[event]) {\n start.$emit(event, data);\n return;\n } else {\n start = start.$parent;\n }\n }\n console.warn(\"No handlers found for event \" + event);\n }\n\n show(options: PushOptions | ComponentWithProperties) {\n if (!(options as any).components) {\n this.emitParents(\"show\", { components: [options] });\n } else {\n this.emitParents(\"show\", options);\n }\n \n }\n\n present(options: PushOptions | ComponentWithProperties) {\n if (!(options as any).components) {\n this.emitParents(\"present\", { components: [options] });\n } else {\n this.emitParents(\"present\", options);\n }\n }\n\n showDetail(options: PushOptions | ComponentWithProperties) {\n if (!(options as any).components) {\n this.emitParents(\"showDetail\", { components: [options] });\n } else {\n this.emitParents(\"showDetail\", options);\n }\n }\n\n /**\n * Call one of the pop listeners of a parent or grandparent. E.g. to go back in a navigation controller.\n * @param options Options that should get applied to the pop of the first parent that listens for the pop event\n */\n pop(options: PopOptions = {}) {\n const nav = this.getPoppableParent();\n if (nav) {\n // Sometimes we need to call the pop event instead (because this adds custom data to the event)\n if (nav.$listeners[\"pop\"]) {\n nav.$emit(\"pop\", options);\n } else {\n console.error(\"Couldn't pop. Failed\");\n }\n } else {\n console.warn(\"No navigation controller to pop\");\n }\n }\n\n /**\n * Same as pop, but instead dismisses the first parent that was displayed as a modal\n * @param options Options that should get applied to the pop of the first modal navigation controller or popup that listens for the pop event\n */\n dismiss(options: PopOptions = {}) {\n const modalNav = this.modalOrPopup as any;\n if (!modalNav) {\n console.warn(\"Tried to dismiss without being displayed as a modal. Use pop instead\")\n // Chances are this is not displayed as a modal, but on a normal stack\n this.pop(options);\n } else {\n if (modalNav instanceof Sheet || modalNav instanceof Popup || modalNav instanceof SideView) {\n modalNav.dismiss(options);\n return\n }\n modalNav.pop(options);\n }\n }\n\n get navigationController(): NavigationController | null {\n let start: any = this.$parent;\n while (start) {\n if (start instanceof NavigationController) {\n return start;\n }\n\n start = start.$parent;\n }\n return null;\n }\n\n get modalOrPopup(): NavigationController | Popup | Sheet | SideView | null {\n let start: any = this.$parent;\n while (start) {\n if (start instanceof NavigationController) {\n if (start.animationType == \"modal\") return start;\n }\n\n if (start instanceof Sheet) {\n return start;\n }\n\n if (start instanceof Popup) {\n return start;\n }\n\n if (start instanceof SideView) {\n return start;\n }\n\n start = start.$parent;\n }\n return null;\n }\n\n get modalNavigationController(): NavigationController | null {\n let start: any = this.$parent;\n while (start) {\n if (start instanceof NavigationController) {\n if (start.animationType == \"modal\") return start;\n }\n\n start = start.$parent;\n }\n return null;\n }\n\n get splitViewController(): SplitViewController | null {\n let start: any = this.$parent;\n while (start) {\n if (start instanceof SplitViewController) {\n return start;\n }\n\n start = start.$parent;\n }\n return null;\n }\n\n /**\n * Return the first child of a parent that listens for the pop event\n */\n getPoppableParent(): any | null {\n let prev = this;\n let start: any = this.$parent;\n while (start) {\n if (prev.$listeners[\"pop\"]) {\n return prev;\n }\n\n prev = start;\n start = start.$parent;\n }\n return null;\n }\n\n /**\n * Whether the current navivation controller above this component can pop (it has more than one child). Excluding modal view controllers\n */\n canPop = false;\n canDismiss = false;\n\n activated() {\n this.canPop = this.calculateCanPop();\n this.canDismiss = this.calculateCanDismiss();\n }\n\n /**\n * Return the first navigation controller that can get popped, excluding the modal navigation controller and the stack component\n */\n private get poppableNavigationController(): NavigationController | null {\n let start: any = this.$parent;\n while (start) {\n if (start instanceof NavigationController) {\n if (start.animationType == \"modal\") return null;\n\n if (start.components.length > 1) {\n return start;\n }\n }\n\n start = start.$parent;\n }\n return null;\n }\n\n isFocused() {\n const modalOrPopup = this.modalOrPopup\n if ((modalOrPopup instanceof Popup) || (modalOrPopup instanceof Sheet) || (modalOrPopup instanceof SideView)) {\n return !!(modalOrPopup as (any)).isFocused\n }\n\n // todo: detect edge case when this element is deactivated\n return true\n }\n\n calculateCanPop(): boolean {\n return this.poppableNavigationController != null;\n }\n\n calculateCanDismiss(): boolean {\n const modalOrPopup = this.modalOrPopup;\n\n if (modalOrPopup === null) {\n return false\n }\n\n if (modalOrPopup instanceof NavigationController) {\n if ((modalOrPopup as any).components.length <= 1) {\n return false\n }\n }\n\n return true\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(929);\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => module['default'] :\n\t\t() => module;\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"sourceRoot":""}
|