text: (function(global){'use strict';var h=this;function k(a,b){a=a.split(".");var c=h;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
   EventEmitter3
  
   https://www.github.com/primus/eventemitter3
  
   Copyright (c) 2014 Arnout Kazemier
  */
  function n(){this.c=new p;this.J=0}var r="~";function p(){}Object.create&&(p.prototype=Object.create(null),(new p).__proto__||(r=!1));function t(a,b,c){this.g=a;this.context=b;this.once=c||!1}function u(a,b,c,d,f){if("function"!==typeof c)throw new TypeError("The listener must be a function");c=new t(c,d||a,f);b=r?r+b:b;a.c[b]?a.c[b].g?a.c[b]=[a.c[b],c]:a.c[b].push(c):(a.c[b]=c,a.J++);return a}function v(a,b){0===--a.J?a.c=new p:delete a.c[b]}
  n.prototype.l=function(a,b,c,d,f,g){var e=r?r+a:a;if(this.c[e]){e=this.c[e];var m=arguments.length,q;if(e.g){e.once&&w(this,a,e.g);switch(m){case 1:e.g.call(e.context);return;case 2:e.g.call(e.context,b);return;case 3:e.g.call(e.context,b,c);return;case 4:e.g.call(e.context,b,c,d);return;case 5:e.g.call(e.context,b,c,d,f);return;case 6:e.g.call(e.context,b,c,d,f,g);return}var l=1;for(q=Array(m-1);l<m;l++)q[l-1]=arguments[l];e.g.apply(e.context,q)}else{var aa=e.length;for(l=0;l<aa;l++)switch(e[l].once&&
  w(this,a,e[l].g),m){case 1:e[l].g.call(e[l].context);break;case 2:e[l].g.call(e[l].context,b);break;case 3:e[l].g.call(e[l].context,b,c);break;case 4:e[l].g.call(e[l].context,b,c,d);break;default:if(!q){var F=1;for(q=Array(m-1);F<m;F++)q[F-1]=arguments[F]}e[l].g.apply(e[l].context,q)}}}};n.prototype.once=function(a,b,c){return u(this,a,b,c,!0)};
  function w(a,b,c){b=r?r+b:b;if(a.c[b])if(c){var d=a.c[b];if(d.g)d.g!==c||!d.once||v(a,b);else{for(var f=0,g=[],e=d.length;f<e;f++)d[f].g===c&&d[f].once||g.push(d[f]);g.length?a.c[b]=1===g.length?g[0]:g:v(a,b)}}else v(a,b)}function x(a){a.c=new p;a.J=0};const ba=a=>{a%=360;return 0>360*a?a+360:a};const ca=navigator.userAgent.match(/iPhone/i)&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent);
  class da{constructor(a){this.el=a||document.body;this.a=this.A=!1;this.c=0;this.touches=[];this.el.addEventListener("touchstart",this.h.bind(this),!1);this.el.addEventListener("touchmove",this.f.bind(this),!1);this.el.addEventListener("touchend",this.b.bind(this),!1)}h(a){this.a=this.A=!0;this.c=(new Date).getTime();var b=a.changedTouches[0];this.touches=[a.timeStamp,b.pageX,b.pageY]}f(a){var b=this.touches,c=a.changedTouches[0];if(20<Math.abs(c.pageX-b[1])||20<Math.abs(c.pageY-b[2]))this.A=!1;if(this.a)if(b.push(a.timeStamp,
  c.pageX,c.pageY),+new Date>b[0]+100)this.a=!1;else{var d=a.timeStamp;b=b.filter((f,g,e)=>e[g-g%3]>d-250);1>=b.length/3||60>Math.pow(b[1]-b[b.length-2],2)+Math.pow(b[2]-b[b.length-1],2)||(c=ba(180*Math.atan2(b[b.length-1]-b[2],b[b.length-2]-b[1])/Math.PI),b="swipeRight",45<c&&135>c?b="swipeDown":135<c&&225>c?b="swipeLeft":225<c&&315>c&&(b="swipeUp"),(c=document.createEvent("Event"))&&c.initEvent(b,!0,!0),a.target.dispatchEvent(c),this.a=!1)}}b(a){if(this.A){var b=this.touches,c=a.changedTouches[0];
  if(20<Math.abs(c.pageX-b[1])||20<Math.abs(c.pageY-b[2]))this.A=!1;else{var d=(new Date).getTime()-this.c;(b=document.createEvent("Event"))&&b.initEvent(800<d?"longTap":"tap",!0,!0);a=a.target;ca&&(a=document.elementFromPoint(c.pageX-window.pageXOffset,c.pageY-window.pageYOffset));a.dispatchEvent(b)}}}};let ea=Math.floor(2147483648*Math.random());const fa=()=>(ea++).toString(36);const y="blur click mouseover mouseout mousemove mousedown mouseup scroll keyup keypress focus focusin focusout paste input touchstart touchmove touchend tap longtap doubletap press pan swipe swipeTop swipeRight swipeBottom swipeLeft".split(" "),z={blur:1,focus:1,abort:1,canplay:1,canplaythrough:1,durationchange:1,emptied:1,ended:1,error:1,loadeddata:1,loadedmetadata:1,loadstart:1,pause:1,play:1,playing:1,progress:1,ratechange:1,seeked:1,seeking:1,stalled:1,suspend:1,timeupdate:1,volumechange:1,waiting:1},
  ha=new RegExp(`^(${y.join("|")}|${Object.keys(z).join("|")}) (.*)`);function ia(a){const b=a.constructor.prototype;if(!b.o){var c=[],d={};b.events&&(d=b.events);var f=[],g=b;do f.push(...Object.getOwnPropertyNames(g)),g=Object.getPrototypeOf(g);while(g!=A.prototype&&Object.getPrototypeOf(g));f.map(e=>ha.exec(e)).filter(e=>e).forEach(([e,m,q])=>{d[m]=d[m]||{};m in z&&c.push(m);d[m][q]=a[e]});b.H=c;b.o=d}}const ja=(()=>{const a=document.createElement("div");return b=>{a.innerHTML=b.trim();return a.removeChild(a.firstChild)}})();
  function B(){C||(C=new ka);return C}function D(a){y.forEach(b=>document.body.addEventListener(b,a.c.bind(a)));a.I=new da;(new MutationObserver(()=>{for(let b in a.B)a.B[b].render()&&delete a.B[b]})).observe(document.body,{childList:!0,subtree:!0})}function la(a,b){let c=b,d=[],f,g;if(g=c.ca)return g.split(",").forEach(e=>d.push(a.a[e])),d;g=[];do if(f=a.a[c.id])d.push(f),g.push(c.id);while(c=c.parentNode);b.ca=g.join(",");return d}
  function ma(a,b,c,d,f){let g=!0;f.forEach(e=>{c.j.matches&&c.j.matches(e)&&(g=d[e].call(b,c,a.a[c.j.id]))});return g}function na(a){var b=B();delete b.a[a.id];delete b.B[a.id]}
  class ka{constructor(){this.a={};this.B={};this.I=void 0;document.body?D(this):document.addEventListener("DOMContentLoaded",()=>D(this));this.Z=fa;this.createElement=ja}c(a){a.j=a.target;let b=la(this,a.target);var c=!1;do{if(c)break;a.targetEl=a.j;{c=b;var d=a;let f=!1;for(let g=0;g<c.length;g++){let e=c[g],m=(e&&e.o)[d.type];if(!m)continue;let q=Object.keys(m);if(!1===ma(this,e,d,m,q)){f=!0;break}}c=f}}while((a.j=a.j.parentNode)&&a.j!=document.body)}}var C;class A extends n{constructor(a={}){super();this.da=B().Z();this.C=this.a=null;this.s=!1;this.props=a;a=B();a.a[this.id]=this;this.rendered||(a.B[this.id]=this);this.o||ia(this);this.created(this.props);this.createdHooks(this.props)}created(){}createdHooks(){}get id(){return this.da}get el(){let a=this.a;a||(a=this.a=document.getElementById(this.id)||B().createElement(this.toString()));return a}R(){return`$1 id="${this.id}"`}toString(){if(this.C)return this.C;var a=/^(<[^>]+)/,b=this.template(this.props).toString().trim();
  if(!b.match(a))throw Error("Template needs to start with a valid tag.");return this.C=b=b.replace(/\s+/," ").replace(a,this.R())}$$(a){let b=[],c=this.el;c&&(b=[...c.querySelectorAll(a)]);return b}$(a){let b=null,c=this.a;c&&(b=void 0==a?c:c.querySelector(a));return b}render(a,b=Infinity){if(this.s)return!0;this.a=this.el;if(a)if(0>b&&(b=Infinity),a!=this.a.parentElement)a.insertBefore(this.a,a.children[b]);else{let c=0,d=this.a;for(;d=d.previousElementSibling;)c++;c<b&&b++;c==b||b>=a.childElementCount&&
  this.a==a.lastElementChild||a.insertBefore(this.a,a.children[b])}this.s=!0;delete B().B[this.id];this.onAfterRender();this.onAfterRenderHooks();setTimeout(()=>requestAnimationFrame(()=>{}));return!0}get rendered(){if(!this.s){var a=document.getElementById(this.id);a&&(this.a=a,this.s=!0,this.onAfterRender(),this.onAfterRenderHooks())}return this.s}onAfterRender(){}ba(){}onAfterRenderHooks(){this.H.forEach(a=>{this.o[a]&&Object.keys(this.o[a]).forEach(b=>{const c=this.$$(b),d=this.o[a][b].bind(this);
  c.forEach(f=>{f.__ersteEventHandlers=f.__ersteEventHandlers||{};f.__ersteEventHandlers[a]=d;f.addEventListener(a,d)})})})}template(){return"<div></div>"}dispose(){na(this);x(this);this.H.forEach(a=>{this.o[a]&&Object.keys(this.o[a]).forEach(b=>{this.$$(b).forEach(c=>{c.removeEventListener(a,c.__ersteEventHandlers[a])})})});this.a&&this.a.parentNode&&this.a.parentNode.removeChild(this.a);this.a=null}}A.prototype.dispose=A.prototype.dispose;A.prototype.template=A.prototype.template;
  A.prototype.onAfterRenderHooks=A.prototype.onAfterRenderHooks;A.prototype.onAfterRenderAsync=A.prototype.ba;A.prototype.onAfterRender=A.prototype.onAfterRender;A.prototype.render=A.prototype.render;A.prototype.$=A.prototype.$;A.prototype.$$=A.prototype.$$;A.prototype.toString=A.prototype.toString;A.prototype.createdHooks=A.prototype.createdHooks;A.prototype.created=A.prototype.created;A.prototype.events=void 0;A.prototype.events=A.prototype.events;A.prototype.o=void 0;A.prototype.H=void 0;function oa(a,{aa:b,Y:c}){window.requestAnimationFrame(()=>{a.el.style.transitionDuration="0s";a.el.style.transform=`translate3d(${b}px, 0, ${c-1}px)`})}function pa(a,{X:b,boxShadow:c}){window.requestAnimationFrame(()=>{a.el.style.transitionDuration="0s";a.el.style.transform=`translate3d(${b}px, 0, ${a.index}px)`;a.el.style.boxShadow=`0px 0 24px rgba(0, 0, 0, ${c})`})}
  class E extends A{constructor(a={}){super(a)}render(a=document.body,b=0){this.index=b;return super.render(a)}onAfterRender(){super.onAfterRender();this.el.style.zIndex=String(this.index);this.el.style.transform=`translate3d(0, 0, ${this.index}px)`}onActivation(){}K(a){a?(this.el.style.transitionDuration="0s",this.el.style.transform=`translate3d(100%, 0, ${this.index}px)`,requestAnimationFrame(()=>{this.el.style.transitionDuration="0.35s";requestAnimationFrame(()=>{this.el.style.transform=`translate3d(0, 0, ${this.index}px)`;
  this.el.style.boxShadow="0 0 24px black"})})):window.requestAnimationFrame(()=>{this.el.style.transitionDuration="0s";this.el.style.transform="translate3d(-30%,0,0)";window.requestAnimationFrame(()=>{this.el.style.transitionDuration="0.35s";this.el.style.transform=`translate3d(0, 0, ${this.index}px)`})})}L(a){const b=()=>{this.el.style.transitionDuration="0s";this.el.style.transform="translate3d(-100%,-100%,0)";this.el.removeEventListener("transitionend",b)};this.el.addEventListener("transitionend",
  b);a?requestAnimationFrame(()=>{this.el.style.transitionDuration="0.35s";requestAnimationFrame(()=>{this.el.style.transform=`translate3d(-30%, 0, ${this.index}px)`})}):window.requestAnimationFrame(()=>{this.el.style.transitionDuration="0s";window.requestAnimationFrame(()=>{this.el.style.transitionDuration="0.35s";this.el.style.transform=`translate3d(100%, 0, ${this.index}px)`;this.el.style.boxShadow="0 0 0 black"})})}template(){return"\n<view></view>\n"}R(){return`$1 id="${this.id}" view`}static get WIDTH(){if(!G){var a=
  window.getComputedStyle(document.body,null);G=parseInt(a&&a.width||"0",10)}return G}}E.prototype.panOut=E.prototype.L;E.prototype.panIn=E.prototype.K;E.prototype.onActivation=E.prototype.onActivation;var G=null;E.prototype.index=0;E.prototype.index=E.prototype.index;E.prototype.supportsBackGesture=!1;E.prototype.supportsBackGesture=E.prototype.supportsBackGesture;E.prototype.backGestureTouchTargetWidth=50;E.prototype.backGestureTouchTargetWidth=E.prototype.backGestureTouchTargetWidth;
  E.prototype.hasSidebar=!1;E.prototype.hasSidebar=E.prototype.hasSidebar;function H(a){a.i=!0;if(a.l instanceof E){var b=a.l;if(b.rendered)a.f=b.el;else throw Error("View Manager's root is not rendered yet");}else a.f=a.l||document.body;a.f&&(a.f.addEventListener("touchmove",a.C.bind(a),!1),a.f.addEventListener("touchend",a.s.bind(a),!1))}
  function I(a,b){var c=a.currentView,d=document.querySelector("sidebar");requestAnimationFrame(()=>{c.el.style.transitionDuration="0.35s";var f=`${128-E.WIDTH}px`,g="0",e=`${c.index-1}px`;b?d.style.transform=`translate3d(${g}, 0, ${e})`:(f="0",g="100%",e="0",a.m=setTimeout(()=>{a.a==J&&(d.style.transform=`translate3d(${g}, 0, ${e})`)},1E3));c.el.style.transform=`translate3d(${f}, 0, ${c.index}px)`});a.a=b?K:J}
  function qa(a,b){var c=b.changedTouches&&b.changedTouches[0].clientX||0;a.c.push(a.b-c);4==a.c.length&&a.c.shift();b.preventDefault();var d=a.currentView,f=c-a.b-4*E.WIDTH/5;window.requestAnimationFrame(()=>{d.el.style.transitionDuration="0s";d.el.style.transform=`translate3d(${f}px, 0, ${d.index}px)`})}
  function ra(a,b){if(!B().I.A){var c=b.changedTouches&&b.changedTouches[0].clientX||0;a.c.push(a.b-c);4==a.c.length&&a.c.shift();b.preventDefault();var d=document.querySelector("sidebar"),f=a.currentView,g=c-a.b;0<=g||(a.a=L,window.requestAnimationFrame(()=>{d.style.transform=`translate3d(0, 0, ${f.index-1}px)`;d.style.transitionDuration="0s";f.el.style.transitionDuration="0s";f.el.style.transform=`translate3d(${g}px, 0, ${f.index}px)`}))}}
  function sa(a,b){if(a.b){var c=a.history,d=a.getLastViewInHistory(),f=a.currentView,g=b.changedTouches&&b.changedTouches[0].clientX||0,e=.15+(E.WIDTH-g)/E.WIDTH*(.35-.15);window.requestAnimationFrame(()=>{f.el.style.transitionDuration=e+"s";d.el.style.transitionDuration=e+"s";var m="100%",q="0";if(g<E.WIDTH/2){m="0";q="-30%";const l=()=>{d.el.style.transitionDuration="0s";d.el.style.transform="translate3d(-100%,-100%,0)";d.el.removeEventListener("transitionend",l)};d.el.addEventListener("transitionend",
  l)}else a.currentView=a.getLastViewInHistory(),c.pop(),d.onActivation&&d.onActivation(),setTimeout(()=>{f.dispose()},1E3);f.el.style.transform=`translate3d(${m}, 0, ${f.index}px)`;d.el.style.transform=`translate3d(${q}, 0, ${f.index-1}px)`;f.el.style.boxShadow="0px 0 0px black"});a.a=J}}
  class M{constructor(a){this.history=[];this.c=[];this.a=J;this.m=this.currentView=this.f=null;this.b=0;this.i=!1;this.l=void 0;a&&(this.l=a)}getLastViewInHistory(){return this.history[this.history.length-1]||null}pull(a,b){this.i||H(this);!a.rendered&&this.f&&a.render(this.f,this.h+=2);var c=this.currentView;if(!c)return this.setCurrentView(a);if(b)this.history.push(c);else{var d=this.history.slice(0);this.history=[];setTimeout(()=>{c.dispose();d.forEach(f=>f.dispose())},1E3)}a.K(!0);c.L(!0);this.currentView=
  a;this.currentView.onActivation&&this.currentView.onActivation();this.a=J}canGoBack(){return this.history&&0<this.history.length}push(){var a=this.history.pop(),b=this.currentView;a&&(this.i||H(this),a.K(!1),b.L(!1),this.currentView=a,a.onActivation&&a.onActivation(),setTimeout(()=>b.dispose(),1E3),this.a=J)}setCurrentView(a,b){this.i||H(this);!a.rendered&&this.f&&a.render(this.f,this.h+=2);var c=this.currentView;b?c&&(c.el.style.transitionDuration="0s",c.el.style.transform=`translate3d(100%, 0, ${c.index}px)`):
  setTimeout(()=>c&&c.dispose(),1E3);a.index=this.h+=2;this.currentView=a;this.currentView.onActivation&&this.currentView.onActivation();this.history.forEach(d=>d.dispose());this.history=[];b=`translate3d(0, 0, ${a.index}px)`;a.el.style.transitionDuration="0s";this.a==K?(b=`translate3d(${128-E.WIDTH}px, 0, ${a.index}px)`,a.el.style.transform=b,I(this,!1)):(a.el.style.zIndex=String(a.index),a.el.style.transform=b,this.a=J)}toggleSidebar(){this.i||H(this);I(this,this.a==J)}C(a){var b=a.changedTouches&&
  a.changedTouches[0].clientX||0;clearTimeout(this.m);if(this.a==J||this.a==K)this.b=b;this.a==J&&(this.c=[],this.a=N);this.a==N&&(b<=this.currentView.backGestureTouchTargetWidth?this.history.length&&this.currentView&&this.currentView.supportsBackGesture&&(this.a=O):this.currentView&&this.currentView.hasSidebar&&(this.c.push(this.b-b),4==this.c.length&&this.c.shift(),40<this.c[2]-this.c[0]&&(this.a=L)));this.a==K&&(this.a=P);switch(this.a){case O:if(this.history.length){a.preventDefault();b=this.currentView;
  a=(a.changedTouches&&a.changedTouches[0].clientX||0)-this.b;var c=E.WIDTH,d=Math.floor(5*(1+a/(c-this.b)*-1))/5;if(!(0>a)){var f=.3*-c;oa(this.history[this.history.length-1],{aa:Math.floor(f+a/(c-this.b)*-f),Y:b.index});pa(b,{X:a,boxShadow:d})}}break;case P:qa(this,a);break;case L:ra(this,a)}}s(a){switch(this.a){case O:sa(this,a);break;case L:a=!0;3>this.c[2]-this.c[0]&&(a=!1);I(this,a);break;case P:a=!0;-3>this.c[2]-this.c[0]&&(a=!1);I(this,a);break;case K:if(B().I.A)break;I(this,!1);break;default:this.a=
  J}}}M.prototype.toggleSidebar=M.prototype.toggleSidebar;M.prototype.setCurrentView=M.prototype.setCurrentView;M.prototype.push=M.prototype.push;M.prototype.canGoBack=M.prototype.canGoBack;M.prototype.pull=M.prototype.pull;M.prototype.getLastViewInHistory=M.prototype.getLastViewInHistory;var J="default",N="started",P="closingSidebar",L="openingSidebar",K="sidebarOpen",O="going";k("ViewManager$$module$lib$view_manager.State",{u:J,ja:N,fa:P,ha:L,ia:K,ga:O});M.prototype.h=1;
  window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)};var Q={en:{__name:"English"}},R=Q.en;const S=(a,...b)=>(R[a]||a).replace(/{(\d+)}/g,(c,d)=>"undefined"!=typeof b[d]?b[d]:c);var T={setDictionary:(a,b)=>{Q[a]=b},setLanguage:a=>{R=Q[a]},getLocalizedString:S,__:S};class U extends A{constructor(){super();this.vm=null}onSidebarItemTap(a){if(a=a.j&&a.j.getAttribute&&a.j.getAttribute("data-view"))this.l(U.EventType.SWITCH_VIEW,{view:a}),this.vm&&this.vm.toggleSidebar()}template(){return`
  <sidebar>
      <sidebar-items>${this.template_items()}</sidebar-items>
  </sidebar>
  `}template_items(){return""}get b(){return{D:"sidebar-item"}}get events(){return{tap:{[this.b.D]:this.onSidebarItemTap}}}static get EventType(){return{SWITCH_VIEW:"switchView"}}}U.prototype.template_items=U.prototype.template_items;U.prototype.onSidebarItemTap=U.prototype.onSidebarItemTap;class V extends E{constructor(){super();this.vm=null;this.views=[];this.activeItemIndex=null}onAfterRender(){super.onAfterRender();var a=this.$(this.b.W);if(!a)throw Error("TabView template must have <views>");this.vm=new M(a);this.activateItem(0)}onItemTap(a){var b=this.$(this.b.T);b&&b==a.j||(b=this.$(this.b.N),this.activateItem([].indexOf.call(b&&b.children,a.j)))}activateItem(a){if(!(0>a)){this.deactivateActiveItem();var b=this.$$(this.b.D)[a];b&&b.classList.add("active");this.views&&this.views[a]&&
  (this.vm.setCurrentView(this.views[a],!0),this.views[a].el.classList.add("active"));this.activeItemIndex=a}}activateItemByName(a){if(a=this.$(this.b.D+"[data-view="+a+"]")){var b=this.$(this.b.N);this.activateItem([].indexOf.call(b&&b.children,a))}}deactivateActiveItem(){this.$$(this.b.S).forEach(a=>a.classList.remove("active"))}template(){return`
  <tab-view>
      ${this.template_views()}
      <tab-bar>
          <tab-items>
              ${this.template_items()}
          </tab-items>
      </tab-bar>
  </tab-view>
  `}template_views(){return`<views>${this.views.join("")}</views>`}template_items(){return""}get b(){return{D:"tab-item",N:"tab-items",S:".active",T:"tab-items .active",ea:"views .active",W:"views"}}get events(){return{touchend:{[this.b.D]:this.onItemTap}}}}V.prototype.template_items=V.prototype.template_items;V.prototype.template_views=V.prototype.template_views;V.prototype.deactivateActiveItem=V.prototype.deactivateActiveItem;V.prototype.activateItemByName=V.prototype.activateItemByName;
  V.prototype.activateItem=V.prototype.activateItem;V.prototype.onItemTap=V.prototype.onItemTap;class W extends A{constructor(a={hasBackButton:!1,hasMenuButton:!1,title:""}){super();this.vm=null;this.config=a}onBackButtonTap(){this.vm&&this.vm.push()}onMenuButtonTap(){this.vm&&this.vm.toggleSidebar()}template(){var a=this.config,b="",c="";a.hasBackButton&&(b="<back-button></back-button>");a.hasMenuButton&&(c="<menu-button></menu-button>");return`
  <nav-bar>${b}${c}${a.title}</nav-bar>
  `}get b(){return{U:"back-button",V:"menu-button"}}get events(){return{tap:{[this.b.U]:this.onBackButtonTap,[this.b.V]:this.onMenuButtonTap}}}}W.prototype.onMenuButtonTap=W.prototype.onMenuButtonTap;W.prototype.onBackButtonTap=W.prototype.onBackButtonTap;class ta extends n{constructor(){super();this.reset();this.b=this.a.u}reset(){this.b=this.a.u}get a(){return{u:"default",v:"shouldCheck",O:"refreshing"}}get EventType(){return{SHOULD_REFRESH:"refresh"}}};class X extends A{constructor(a){super();this.model=new ta;this.EventType=this.model.EventType;this.m=this.f=this.i=this.b=null;a&&this.register(a);u(this.model,this.model.EventType.SHOULD_REFRESH,this.onShouldRefresh.bind(this),void 0,!1)}onShouldRefresh(){var a=this.$(this.h.P),b=this.$(this.h.G);window.requestAnimationFrame(()=>{this.i.style.transform=`translateY(${this.height}px)`;this.i.style.transition="800ms cubic-bezier(.41,1,.1,1)";a&&(a.style.opacity="1");b&&(b.style.opacity="0");this.l(this.model.EventType.SHOULD_REFRESH)})}onAfterRender(){super.onAfterRender();
  this.b||this.register(this.el.parentElement)}reset(){this.b&&(this.i.style.transform="translateY(0)",this.i.style.transition="300ms ease-out");var a=this.$(this.h.P),b=this.$(this.h.G);a&&(a.style.opacity="0");setTimeout(()=>{b&&(b.style.opacity="1")},500);this.model.reset()}register(a,b){a&&(this.f&&this.b.removeEventListener("scroll",this.f),this.m&&document.body.removeEventListener("touchend",this.m),this.b=a,this.i=b?b:a,this.reset(),this.f=this.M.bind(this),this.m=this.F.bind(this),this.b.addEventListener("scroll",
  this.f),document.body.addEventListener("touchend",this.m))}M(a){var b=this.model;b.b!=b.a.O&&(b.b=b.a.v);b=0;var c=-(a.target&&a.target.scrollTop||0);a=this.arrowOffset+Math.pow(c,.75);var d=this.threshold-60;c>=d&&(b=Math.min(180,3*(c-d)));if(c=this.$(this.h.G))c.style.transform=`translateY(${a}px) rotate(${b}deg)`}F(){if(this.b.scrollTop<-this.threshold){var a=this.model;a.b==a.a.v&&(a.b=a.a.O,a.l(a.EventType.SHOULD_REFRESH))}}template(){return'\n<pull-to-refresh>\n    <pull-to-refresh-arrow></pull-to-refresh-arrow>\n    <div class="spinner"></div>\n</pull-to-refresh>\n'}dispose(){x(this.model);
  this.el&&this.el.removeEventListener("scroll",this.f);document.body.removeEventListener("touchend",this.m);super.dispose()}get h(){return{G:"pull-to-refresh-arrow",P:".spinner"}}}X.prototype.register=X.prototype.register;X.prototype.reset=X.prototype.reset;X.prototype.onShouldRefresh=X.prototype.onShouldRefresh;X.prototype.threshold=135;X.prototype.threshold=X.prototype.threshold;X.prototype.height=96;X.prototype.height=X.prototype.height;X.prototype.arrowOffset=0;X.prototype.arrowOffset=X.prototype.arrowOffset;class ua extends n{constructor(){super();this.b=this.a.u}reset(){this.b=this.a.u}load(){this.b==this.a.v&&(this.b=this.a.LOADING,this.l(this.EventType.SHOULD_LOAD))}get a(){return{u:"default",v:"shouldCheck",LOADING:"loading"}}get EventType(){return{SHOULD_LOAD:"load"}}};/*
   Throttle function
  
   https://remysharp.com/2010/07/21/throttling-function-calls
  
   Copyright (c) 2010 Remy Sharp
  */
  var va=(a,b)=>{var c=0,d;return(...f)=>{var g=+new Date;c&&g<c+100?(clearTimeout(d),d=setTimeout(()=>{c=g;a.apply(b,f)},100+c-g)):(c=g,a.apply(b,f))}};class Y extends A{constructor(a){super();this.model=new ua;this.EventType=this.model.EventType;this.b=this.f=null;this.h="";this.F=va(this.m,this);a&&this.register(a);u(this.model,this.model.EventType.SHOULD_LOAD,this.M.bind(this),void 0,!1)}M(){this.l(this.EventType.SHOULD_LOAD)}render(a,b){a=super.render(a,b);this.el||this.register(this.el.parentElement);return a}reset(){this.model.reset()}register(a){a&&(this.reset(),this.b&&this.b.removeEventListener("scroll",this.f),this.b=a,this.f=this.i.bind(this),
  this.b.addEventListener("scroll",this.f))}i(){this.F()}m(){var a=this.model;a.b!=a.a.LOADING&&(a.b=a.a.v);a=this.model;a.b==a.a.v&&(a=this.b)&&a.scrollHeight>a.offsetHeight&&a.scrollTop>a.scrollHeight-a.offsetHeight-400&&this.model.load()}showSpinner(){this.el.classList.add("spinner");this.el.innerText="";this.reset()}showEndOfList(){this.el.innerText=this.h;this.el.classList.remove("spinner")}template(){return"<inf-scroll></inf-scroll>"}dispose(){x(this.model);this.b.removeEventListener("scroll",
  this.f);super.dispose()}}Y.prototype.showEndOfList=Y.prototype.showEndOfList;Y.prototype.showSpinner=Y.prototype.showSpinner;Y.prototype.register=Y.prototype.register;Y.prototype.reset=Y.prototype.reset;const Z={Component:A,ViewManager:M,View:E,locale:T,Sidebar:U,TabView:V,NavBar:W,PullToRefresh:X,InfiniteScroll:Y,__:T.__};k("erste$$module$index",Z);Z.use=function(a){a.$$register(this)}.bind(Z);Z.use=Z.use;
  const erste = this.$jscompDefaultExport$$module$index;if(typeof define=='function'&&define.amd){define(function(){return erste})}else if(typeof module=='object'&&typeof exports=='object'){module.exports=erste}else{window.erste=erste}}).call(null, {});
  
  //# sourceMappingURL=erste.js.map
  