UNPKG

296 kBJavaScriptView Raw
1/* onsenui v2.12.2 - 2022-07-25 */
2!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ons=e()}(this,function(){"use strict";function B(e,t){var n,i=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)),i}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach(function(t){H(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function R(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e,n){return e&&R(t.prototype,e),n&&R(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function H(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&q(t,e)}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function q(t,e){return(q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function z(t,e){if(null==t)return{};var n,i=function(t,e){if(null==t)return{};for(var n,i={},o=Object.keys(t),a=0;a<o.length;a++)n=o[a],0<=e.indexOf(n)||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(t),a=0;a<o.length;a++)n=o[a],0<=e.indexOf(n)||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n]);return i}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(n){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h(n),e=(t=i?(t=h(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}}function p(){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(i)return i=Object.getOwnPropertyDescriptor(i,e),i.get?i.get.call(arguments.length<3?t:n):i.value}).apply(this,arguments)}function m(t){return function(t){if(Array.isArray(t))return F(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return F(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var j,V,W,X,U,Y,$,G,K,n,J,Q,Z,tt,et,nt,it,ot,at,rt=window.HTMLElement,r=new(function(){function t(){l(this,t),this._selectedPlatform=null,this._ignorePlatformSelect=!1}return c(t,[{key:"select",value:function(t){"string"==typeof t&&(this._selectedPlatform=t.trim().toLowerCase())}},{key:"_getSelectedPlatform",value:function(){return this._ignorePlatformSelect?null:this._selectedPlatform}},{key:"_runOnActualPlatform",value:function(t){this._ignorePlatformSelect=!0;t=t();return this._ignorePlatformSelect=!1,t}},{key:"isWebView",value:function(){if("loading"===document.readyState||"uninitialized"==document.readyState)throw new Error("isWebView() method is available after dom contents loaded.");return!!(window.cordova||window.phonegap||window.PhoneGap)}},{key:"isIPhone",value:function(){return/iPhone/i.test(navigator.userAgent)}},{key:"isIPhoneX",value:function(){return this.isIPhone()&&(375===window.screen.width&&812===window.screen.height||812===window.screen.width&&375===window.screen.height||414===window.screen.width&&896===window.screen.height||896===window.screen.width&&414===window.screen.height||390===window.screen.width&&844===window.screen.height||844===window.screen.width&&390===window.screen.height||428===window.screen.width&&926===window.screen.height||926===window.screen.width&&428===window.screen.height)}},{key:"isIPad",value:function(){return/iPad/i.test(navigator.userAgent)||this.isIPadOS()}},{key:"isIPod",value:function(){return/iPod/i.test(navigator.userAgent)}},{key:"isIOS",value:function(t){return!t&&this._getSelectedPlatform()?"ios"===this._getSelectedPlatform():"object"!==("undefined"==typeof device?"undefined":o(device))||/browser/i.test(device.platform)?/iPhone|iPad|iPod/i.test(navigator.userAgent)||this.isIPadOS():/iOS/i.test(device.platform)}},{key:"isIOS7above",value:function(){return"object"!==("undefined"==typeof device?"undefined":o(device))||/browser/i.test(device.platform)?!!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&(t=(navigator.userAgent.match(/\b[0-9]+_[0-9]+(?:_[0-9]+)?\b/)||[""])[0].replace(/_/g,"."),7<=parseInt(t.split(".")[0])):/iOS/i.test(device.platform)&&7<=parseInt(device.version.split(".")[0]);var t}},{key:"isIPadOS",value:function(){return!(!/Macintosh/i.test(navigator.userAgent)||!navigator.maxTouchPoints||5!==navigator.maxTouchPoints)}},{key:"isIOSSafari",value:function(){var t=window.navigator,e=t.userAgent;return!(!this.isIOS()||-1===e.indexOf("Safari")||-1===e.indexOf("Version")||t.standalone)}},{key:"isWKWebView",value:function(){var t=/constructor/i.test(rt);return!(!(this.isIOS()&&window.webkit&&window.webkit.messageHandlers&&window.indexedDB)||t)}},{key:"isAndroidPhone",value:function(){return/Android/i.test(navigator.userAgent)&&/Mobile/i.test(navigator.userAgent)}},{key:"isAndroidTablet",value:function(){return/Android/i.test(navigator.userAgent)&&!/Mobile/i.test(navigator.userAgent)}},{key:"isAndroid",value:function(t){return!t&&this._getSelectedPlatform()?"android"===this._getSelectedPlatform():"object"!==("undefined"==typeof device?"undefined":o(device))||/browser/i.test(device.platform)?/Android/i.test(navigator.userAgent):/Android/i.test(device.platform)}},{key:"isWP",value:function(t){return!t&&this._getSelectedPlatform()?"wp"===this._getSelectedPlatform():"object"!==("undefined"==typeof device?"undefined":o(device))||/browser/i.test(device.platform)?/Windows Phone|IEMobile|WPDesktop/i.test(navigator.userAgent):/Win32NT|WinCE/i.test(device.platform)}},{key:"isBlackBerry",value:function(t){return!t&&this._getSelectedPlatform()?"blackberry"===this._getSelectedPlatform():"object"!==("undefined"==typeof device?"undefined":o(device))||/browser/i.test(device.platform)?/BlackBerry|RIM Tablet OS|BB10/i.test(navigator.userAgent):/BlackBerry/i.test(device.platform)}},{key:"isOpera",value:function(t){return!t&&this._getSelectedPlatform()?"opera"===this._getSelectedPlatform():!!window.opera||0<=navigator.userAgent.indexOf(" OPR/")}},{key:"isFirefox",value:function(t){return!t&&this._getSelectedPlatform()?"firefox"===this._getSelectedPlatform():"undefined"!=typeof InstallTrigger}},{key:"isSafari",value:function(t){return!t&&this._getSelectedPlatform()?"safari"===this._getSelectedPlatform():0<Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")||"[object SafariRemoteNotification]"===(!window.safari||safari.pushNotification).toString()}},{key:"isChrome",value:function(t){return!t&&this._getSelectedPlatform()?"chrome"===this._getSelectedPlatform():!(!window.chrome||window.opera||0<=navigator.userAgent.indexOf(" OPR/")||0<=navigator.userAgent.indexOf(" Edge/"))}},{key:"isIE",value:function(t){return!t&&this._getSelectedPlatform()?"ie"===this._getSelectedPlatform():!!document.documentMode}},{key:"isEdge",value:function(t){return!t&&this._getSelectedPlatform()?"edge"===this._getSelectedPlatform():0<=navigator.userAgent.indexOf(" Edge/")}},{key:"getMobileOS",value:function(){return this.isAndroid()?"android":this.isIOS()?"ios":this.isWP()?"wp":"other"}},{key:"getIOSDevice",value:function(){return this.isIPhone()?"iphone":this.isIPad()?"ipad":this.isIPod()?"ipod":"na"}}]),t}());function st(){U=!1;var t=Y,i=(Y=[],t.sort(function(t,e){return t.uid_-e.uid_}),!1);t.forEach(function(t){var e,n=t.takeRecords();(e=t).nodes_.forEach(function(t){t=j.get(t);t&&t.forEach(function(t){t.observer===e&&t.removeTransientObservers()})}),n.length&&(t.callback_(n,t),i=!0)}),i&&st()}function lt(t,e){for(var n=t;n;n=n.parentNode){var i=j.get(n);if(i)for(var o=0;o<i.length;o++){var a=i[o],r=a.options;n!==t&&!r.subtree||(r=e(r))&&a.enqueue(r)}}}function ct(t){this.callback_=t,this.nodes_=[],this.records_=[],this.uid_=++$}function ut(t,e){this.type=t,this.target=e,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function dt(t,e){return G=new ut(t,e)}function ht(t){return K||((n=new ut((e=G).type,e.target)).addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,(K=n).oldValue=t,K);var e,n}function ft(t,e){return t===e?t:K&&((e=t)===K||e===G)?K:null}function pt(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}function mt(t){return Z[Q]=gt.apply(J,t),Q++}function gt(t){var e=[].slice.call(arguments,1);return function(){"function"==typeof t?t.apply(J,e):new Function(""+t)()}}function vt(t){if(tt)setTimeout(gt(vt,t),0);else{var e=Z[t];if(e){tt=!0;try{e()}finally{_t(t),tt=!1}}}}function _t(t){delete Z[t]}function bt(){function t(t){t.source===n&&"string"==typeof t.data&&0===t.data.indexOf(e)&&vt(+t.data.slice(e.length))}var e="setImmediate$"+Math.random()+"$";n.addEventListener?n.addEventListener("message",t,!1):n.attachEvent("onmessage",t),nt=function(){var t=mt(arguments);return n.postMessage(e+t,"*"),t}}window.customElements&&(window.customElements.forcePolyfill=!0),function(){var o=new function(){},B=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function u(t){var e=B.has(t);return t=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(t),!e&&t}function s(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function r(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function l(t,e,n){n=n||new Set;for(var i=t;i;){if(i.nodeType===Node.ELEMENT_NODE){var o=i,a=(e(o),o.localName);if("link"===a&&"import"===o.getAttribute("rel")){if((i=o.import)instanceof Node&&!n.has(i))for(n.add(i),i=i.firstChild;i;i=i.nextSibling)l(i,e,n);i=r(t,o);continue}if("template"===a){i=r(t,o);continue}if(o=o.__CE_shadowRoot)for(o=o.firstChild;o;o=o.nextSibling)l(o,e,n)}i=i.firstChild||r(t,i)}}function c(t,e,n){t[e]=n}function t(){this.a=new Map,this.f=new Map,this.c=[],this.b=!1}function d(t,e){t.b=!0,t.c.push(e)}function h(e,t){e.b&&l(t,function(t){return a(e,t)})}function a(t,e){if(t.b&&!e.__CE_patched){e.__CE_patched=!0;for(var n=0;n<t.c.length;n++)t.c[n](e)}}function f(t,e){var n=[];for(l(e,function(t){return n.push(t)}),e=0;e<n.length;e++){var i=n[e];1===i.__CE_state?s(i)&&t.connectedCallback(i):g(t,i)}}function p(t,e){var n=[];for(l(e,function(t){return n.push(t)}),e=0;e<n.length;e++){var i=n[e];1===i.__CE_state&&t.disconnectedCallback(i)}}function m(n,t,i){i=i||new Set;var o=[];if(l(t,function(e){var t;"link"===e.localName&&"import"===e.getAttribute("rel")?(t=e.import)instanceof Node&&"complete"===t.readyState?(t.__CE_isImportDocument=!0,t.__CE_hasRegistry=!0):e.addEventListener("load",function(){var t=e.import;t.__CE_documentLoadHandled||(t.__CE_documentLoadHandled=!0,t.__CE_isImportDocument=!0,t.__CE_hasRegistry=!0,i.delete(t),m(n,t,i))}):o.push(e)},i),n.b)for(t=0;t<o.length;t++)a(n,o[t]);for(t=0;t<o.length;t++)g(n,o[t])}function g(t,e){if(void 0===e.__CE_state){var n=t.a.get(e.localName);if(n){n.constructionStack.push(e);var i=n.constructor;try{try{if(new i!==e)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{n.constructionStack.pop()}}catch(t){throw e.__CE_state=2,t}if(e.__CE_state=1,(e.__CE_definition=n).attributeChangedCallback)for(n=n.observedAttributes,i=0;i<n.length;i++){var o=n[i],a=e.getAttribute(o);null!==a&&t.attributeChangedCallback(e,o,null,a,null)}s(e)&&t.connectedCallback(e)}}}function e(t,e){this.c=t,this.a=e,this.b=void 0,m(this.c,this.a),"loading"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function v(t){t.b&&t.b.disconnect()}function R(){var e=this;this.b=this.a=void 0,this.c=new Promise(function(t){e.b=t,e.a&&t(e.a)})}function _(t){if(t.a)throw Error("Already resolved.");t.a=void 0,t.b&&t.b(void 0)}function n(t){this.f=!1,this.a=t,this.h=new Map,this.g=function(t){return t()},this.b=!1,this.c=[],this.l=new e(t,document)}t.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t),t.i=!0},t.prototype.disconnectedCallback=function(t){t.i||this.connectedCallback(t);var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t),t.i=void 0},t.prototype.attributeChangedCallback=function(t,e,n,i,o){var a=t.__CE_definition;a.attributeChangedCallback&&-1<a.observedAttributes.indexOf(e)&&a.attributeChangedCallback.call(t,e,n,i,o)},e.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||v(this),e=0;e<t.length;e++)for(var n=t[e].addedNodes,i=0;i<n.length;i++)m(this.c,n[i])},n.prototype.m=function(t,e){var n,i,o,a,r,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!u(t))throw new SyntaxError("The element name '"+t+"' is not valid.");if(this.a.a.get(t))throw Error("A custom element with name '"+t+"' has already been defined.");if(this.f)throw Error("A custom element is already being defined.");this.f=!0;try{var l=function(t){var e=c[t];if(void 0===e||e instanceof Function)return e;throw Error("The '"+t+"' callback must be a function.")},c=e.prototype;if(!(c instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");n=l("connectedCallback"),i=l("disconnectedCallback"),o=l("adoptedCallback"),a=l("attributeChangedCallback"),r=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}l=this.a,e={localName:t,constructor:e,connectedCallback:n,disconnectedCallback:i,adoptedCallback:o,attributeChangedCallback:a,observedAttributes:r,constructionStack:[]},l.a.set(t,e),l.f.set(e.constructor,e),this.c.push(t),this.b||(this.b=!0,this.g(function(){if(!1!==s.b)for(s.b=!1,m(s.a,document);0<s.c.length;){var t=s.c.shift();(t=s.h.get(t))&&_(t)}}))},n.prototype.get=function(t){if(t=this.a.a.get(t))return t.constructor},n.prototype.s=function(t){if(!u(t))return Promise.reject(new SyntaxError("'"+t+"' is not a valid custom element name."));var e=this.h.get(t);return e||(e=new R,this.h.set(t,e),this.a.a.get(t)&&-1===this.c.indexOf(t)&&_(e)),e.c},n.prototype.o=function(e){v(this.l);var n=this.g;this.g=function(t){return e(function(){return n(t)})}},(window.CustomElementRegistry=n).prototype.define=n.prototype.m,n.prototype.whenDefined=n.prototype.s,n.prototype.polyfillWrapFlushCallback=n.prototype.o;var b=window.Document.prototype.createElement,H=window.Document.prototype.createElementNS,q=window.Document.prototype.importNode,z=window.Document.prototype.prepend,F=window.Document.prototype.append,y=window.Node.prototype.cloneNode,k=window.Node.prototype.appendChild,i=window.Node.prototype.insertBefore,w=window.Node.prototype.removeChild,E=window.Node.prototype.replaceChild,C=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),A=window.Element.prototype.attachShadow,S=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),x=window.Element.prototype.getAttribute,P=window.Element.prototype.setAttribute,j=window.Element.prototype.removeAttribute,L=window.Element.prototype.getAttributeNS,V=window.Element.prototype.setAttributeNS,W=window.Element.prototype.removeAttributeNS,X=window.Element.prototype.insertAdjacentElement,U=window.Element.prototype.prepend,Y=window.Element.prototype.append,$=window.Element.prototype.before,G=window.Element.prototype.after,K=window.Element.prototype.replaceWith,J=window.Element.prototype.remove,Q=window.HTMLElement,O=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),Z=window.HTMLElement.prototype.insertAdjacentElement;function tt(o,t,a){t.prepend=function(t){for(var e=[],n=0;n<arguments.length;++n)e[+n]=arguments[n];n=e.filter(function(t){return t instanceof Node&&s(t)}),a.j.apply(this,e);for(var i=0;i<n.length;i++)p(o,n[i]);if(s(this))for(n=0;n<e.length;n++)(i=e[n])instanceof Element&&f(o,i)},t.append=function(t){for(var e=[],n=0;n<arguments.length;++n)e[+n]=arguments[n];n=e.filter(function(t){return t instanceof Node&&s(t)}),a.append.apply(this,e);for(var i=0;i<n.length;i++)p(o,n[i]);if(s(this))for(n=0;n<e.length;n++)(i=e[n])instanceof Element&&f(o,i)}}function et(){var n,a,t,r=M;function e(t,a){Object.defineProperty(t,"innerHTML",{enumerable:a.enumerable,configurable:!0,get:a.get,set:function(t){var e=this,n=void 0;if(s(this)&&(n=[],l(this,function(t){t!==e&&n.push(t)})),a.set.call(this,t),n)for(var i=0;i<n.length;i++){var o=n[i];1===o.__CE_state&&r.disconnectedCallback(o)}return(this.ownerDocument.__CE_hasRegistry?m:h)(r,this),t}})}function i(t,i){c(t,"insertAdjacentElement",function(t,e){var n=s(e);return t=i.call(this,t,e),n&&p(r,e),s(t)&&f(r,e),t})}A?c(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=t=A.call(this,t)}):console.warn("Custom Elements: `Element#attachShadow` was not patched."),S&&S.get?e(Element.prototype,S):O&&O.get?e(HTMLElement.prototype,O):(n=b.call(document,"div"),d(r,function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return y.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(n.innerHTML=t;0<e.childNodes.length;)w.call(e,e.childNodes[0]);for(;0<n.childNodes.length;)k.call(e,n.childNodes[0])}})})),c(Element.prototype,"setAttribute",function(t,e){if(1!==this.__CE_state)return P.call(this,t,e);var n=x.call(this,t);P.call(this,t,e),e=x.call(this,t),r.attributeChangedCallback(this,t,n,e,null)}),c(Element.prototype,"setAttributeNS",function(t,e,n){if(1!==this.__CE_state)return V.call(this,t,e,n);var i=L.call(this,t,e);V.call(this,t,e,n),n=L.call(this,t,e),r.attributeChangedCallback(this,e,i,n,t)}),c(Element.prototype,"removeAttribute",function(t){if(1!==this.__CE_state)return j.call(this,t);var e=x.call(this,t);j.call(this,t),null!==e&&r.attributeChangedCallback(this,t,e,null,null)}),c(Element.prototype,"removeAttributeNS",function(t,e){if(1!==this.__CE_state)return W.call(this,t,e);var n=L.call(this,t,e),i=(W.call(this,t,e),L.call(this,t,e));n!==i&&r.attributeChangedCallback(this,e,n,i,t)}),Z?i(HTMLElement.prototype,Z):X?i(Element.prototype,X):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),tt(r,Element.prototype,{j:U,append:Y}),a=r,(t=Element.prototype).before=function(t){for(var e=[],n=0;n<arguments.length;++n)e[+n]=arguments[n];n=e.filter(function(t){return t instanceof Node&&s(t)}),$.apply(this,e);for(var i=0;i<n.length;i++)p(a,n[i]);if(s(this))for(n=0;n<e.length;n++)(i=e[n])instanceof Element&&f(a,i)},t.after=function(t){for(var e=[],n=0;n<arguments.length;++n)e[+n]=arguments[n];n=e.filter(function(t){return t instanceof Node&&s(t)}),G.apply(this,e);for(var i=0;i<n.length;i++)p(a,n[i]);if(s(this))for(n=0;n<e.length;n++)(i=e[n])instanceof Element&&f(a,i)},t.replaceWith=function(t){for(var e=[],n=0;n<arguments.length;++n)e[+n]=arguments[n];var n=e.filter(function(t){return t instanceof Node&&s(t)}),i=s(this);K.apply(this,e);for(var o=0;o<n.length;o++)p(a,n[o]);if(i)for(p(a,this),n=0;n<e.length;n++)(i=e[n])instanceof Element&&f(a,i)},t.remove=function(){var t=s(this);J.call(this),t&&p(a,this)}}var M,T,I,D,N=window.customElements;function nt(t,a){Object.defineProperty(t,"textContent",{enumerable:a.enumerable,configurable:!0,get:a.get,set:function(t){if(this.nodeType===Node.TEXT_NODE)a.set.call(this,t);else{var e=void 0;if(this.firstChild){var n=this.childNodes,i=n.length;if(0<i&&s(this))for(var e=Array(i),o=0;o<i;o++)e[o]=n[o]}if(a.set.call(this,t),e)for(t=0;t<e.length;t++)p(T,e[t])}}})}function it(){var t=this.constructor,e=D.f.get(t);if(!e)throw Error("The custom element being constructed was not registered with `customElements`.");var n=e.constructionStack;if(!n.length)return n=b.call(document,e.localName),Object.setPrototypeOf(n,t.prototype),n.__CE_state=1,n.__CE_definition=e,a(D,n),n;var i=n[e=n.length-1];if(i===o)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[e]=o,Object.setPrototypeOf(i,t.prototype),a(D,i),i}N&&!N.forcePolyfill&&"function"==typeof N.define&&"function"==typeof N.get||(M=new t,D=M,window.HTMLElement=(it.prototype=Q.prototype,it),I=M,c(Document.prototype,"createElement",function(t){if(this.__CE_hasRegistry){var e=I.a.get(t);if(e)return new e.constructor}return t=b.call(this,t),a(I,t),t}),c(Document.prototype,"importNode",function(t,e){return t=q.call(this,t,e),(this.__CE_hasRegistry?m:h)(I,t),t}),c(Document.prototype,"createElementNS",function(t,e){if(this.__CE_hasRegistry&&(null===t||"http://www.w3.org/1999/xhtml"===t)){var n=I.a.get(e);if(n)return new n.constructor}return t=H.call(this,t,e),a(I,t),t}),tt(I,Document.prototype,{j:z,append:F}),T=M,c(Node.prototype,"insertBefore",function(t,e){if(t instanceof DocumentFragment){var n=Array.prototype.slice.apply(t.childNodes);if(t=i.call(this,t,e),s(this))for(e=0;e<n.length;e++)f(T,n[e]);return t}return n=s(t),e=i.call(this,t,e),n&&p(T,t),s(this)&&f(T,t),e}),c(Node.prototype,"appendChild",function(t){if(t instanceof DocumentFragment){var e=Array.prototype.slice.apply(t.childNodes);if(t=k.call(this,t),s(this))for(var n=0;n<e.length;n++)f(T,e[n]);return t}return e=s(t),n=k.call(this,t),e&&p(T,t),s(this)&&f(T,t),n}),c(Node.prototype,"cloneNode",function(t){return t=y.call(this,t),(this.ownerDocument.__CE_hasRegistry?m:h)(T,t),t}),c(Node.prototype,"removeChild",function(t){var e=s(t),n=w.call(this,t);return e&&p(T,t),n}),c(Node.prototype,"replaceChild",function(t,e){if(t instanceof DocumentFragment){var n=Array.prototype.slice.apply(t.childNodes);if(t=E.call(this,t,e),s(this))for(p(T,e),e=0;e<n.length;e++)f(T,n[e]);return t}var n=s(t),i=E.call(this,t,e),o=s(this);return o&&p(T,e),n&&p(T,t),o&&f(T,t),i}),C&&C.get?nt(Node.prototype,C):d(T,function(t){nt(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)w.call(this,this.firstChild);k.call(this,document.createTextNode(t))}})}),et(),document.__CE_hasRegistry=!0,N=new n(M),Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:N}))}.call(self),(t=self).JsMutationObserver||(j=new WeakMap,X=/Trident|Edge/.test(navigator.userAgent)?setTimeout:window.setImmediate||(V=[],W=String(Math.random()),window.addEventListener("message",function(t){t.data===W&&(t=V,V=[],t.forEach(function(t){t()}))}),function(t){V.push(t),window.postMessage(W,"*")}),U=!1,Y=[],$=0,ct.prototype={observe:function(t,e){var n;if(n=t,t=window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(n)||n,!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var i,o=j.get(t);o||j.set(t,o=[]);for(var a=0;a<o.length;a++)if(o[a].observer===this){(i=o[a]).removeListeners(),i.options=e;break}i||(i=new pt(this,t,e),o.push(i),this.nodes_.push(t)),i.addListeners()},disconnect:function(){this.nodes_.forEach(function(t){for(var e=j.get(t),n=0;n<e.length;n++){var i=e[n];if(i.observer===this){i.removeListeners(),e.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var t=this.records_;return this.records_=[],t}},pt.prototype={enqueue:function(t){var e=this.observer.records_,n=e.length;if(0<e.length){var i=ft(e[n-1],t);if(i)return void(e[n-1]=i)}else i=this.observer,Y.push(i),U||(U=!0,X(st));e[n]=t},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(t){var e=this.options;e.attributes&&t.addEventListener("DOMAttrModified",this,!0),e.characterData&&t.addEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.addEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(t){var e=this.options;e.attributes&&t.removeEventListener("DOMAttrModified",this,!0),e.characterData&&t.removeEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.removeEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(t){var e;t!==this.target&&(this.addListeners_(t),this.transientObservedNodes.push(t),(e=j.get(t))||j.set(t,e=[]),e.push(this))},removeTransientObservers:function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=j.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}},this)},handleEvent:function(t){switch(t.stopImmediatePropagation(),t.type){case"DOMAttrModified":var e=t.attrName,n=t.relatedNode.namespaceURI,i=t.target,o=((a=new dt("attributes",i)).attributeName=e,a.attributeNamespace=n,t.attrChange===MutationEvent.ADDITION?null:t.prevValue);lt(i,function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(e)||-1!==t.attributeFilter.indexOf(n)))return t.attributeOldValue?ht(o):a});break;case"DOMCharacterDataModified":var a=dt("characterData",i=t.target),o=t.prevValue;lt(i,function(t){if(t.characterData)return t.characterDataOldValue?ht(o):a});break;case"DOMNodeRemoved":this.addTransientObserver(t.target);case"DOMNodeInserted":var r,i=t.target,s="DOMNodeInserted"===t.type?(r=[i],[]):(r=[],[i]),l=i.previousSibling,i=i.nextSibling;(a=dt("childList",t.target.parentNode)).addedNodes=r,a.removedNodes=s,a.previousSibling=l,a.nextSibling=i,lt(t.relatedNode,function(t){if(t.childList)return a})}G=K=void 0}},t.JsMutationObserver=ct,t.MutationObserver||((t.MutationObserver=ct)._isPolyfilled=!0)),(n=self).setImmediate||(Q=1,tt=!(Z={}),et=n.document,t=(t=Object.getPrototypeOf&&Object.getPrototypeOf(n))&&t.setTimeout?t:n,"[object process]"==={}.toString.call(n.process)?nt=function(){var t=mt(arguments);return process.nextTick(gt(vt,t)),t}:!function(){var t,e;if(n.postMessage&&!n.importScripts)return t=!0,e=n.onmessage,n.onmessage=function(){t=!1},n.postMessage("","*"),n.onmessage=e,t}()?nt=n.MessageChannel?((ot=new MessageChannel).port1.onmessage=function(t){vt(t.data)},function(){var t=mt(arguments);return ot.port2.postMessage(t),t}):et&&"onreadystatechange"in et.createElement("script")?(it=et.documentElement,function(){var t=mt(arguments),e=et.createElement("script");return e.onreadystatechange=function(){vt(t),e.onreadystatechange=null,it.removeChild(e),e=null},it.appendChild(e),t}):function(){var t=mt(arguments);return setTimeout(gt(vt,t),0),t}:bt(),t.setImmediate=nt,t.clearImmediate=_t),at={ensureViewportElement:function(){var t=document.querySelector("meta[name=viewport]");return t||((t=document.createElement("meta")).name="viewport",document.head.appendChild(t)),t},setup:function(){var t=at.ensureViewportElement();t&&!t.hasAttribute("content")&&t.setAttribute("content","width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no")}},window.Viewport=at;function yt(){}function u(e,n){return Object.keys(n).forEach(function(t){t in e.style?e.style[t]=n[t]:Pt(t)in e.style?e.style[Pt(t)]=n[t]:b.warn("No such style property: "+t)}),e}function kt(t,e){if(Lt&&!t.hasAttribute("disable-auto-styling")){t=r.getMobileOS();if(Object.prototype.hasOwnProperty.call(Mt,t)&&(Object.prototype.hasOwnProperty.call(Tt,t)||e))return t}return null}function wt(t,e,n){return kt(e,n)?t.split(/\s+/).map(function(t){return Object.prototype.hasOwnProperty.call(Ot,t)?Ot[t]:t}).join(" "):t}function Et(t){return It(t,"{")&&Dt(t,"}")}function Ct(t){return It(t,"[")&&Dt(t,"]")}function At(t){for(var e,n,i,o,a=t=t.trim(),r={},s=!0;0<t.length;)if(n=i,i=qt(t),t=t.slice(i.length,t.length).trim(),":"===i&&(!s||!n||","===n)||","===i&&s||":"!==i&&","!==i&&n&&","!==n&&":"!==n)Rt(i,t,a);else if(":"===i&&s&&n){if(n=Bt(n)?Nt(n):n,o=n,!/^[A-Z_$][A-Z0-9_$]*$/i.test(o))throw new Error("Invalid key token '"+n+"' at position 0 in string: '"+a+"'");e=n,s=!1}else","===i&&!s&&n&&(r[e]=Ht(n,t,a),s=!0);return i&&(r[e]=Ht(i,t,a)),r}function St(t){for(var e,n,i=t=t.trim(),o=[];0<t.length;)e=n,n=qt(t),t=t.slice(n.length,t.length).trim(),","!==n||e&&","!==e?","===n&&o.push(Ht(e,t,i)):Rt(n,t,i);return n&&(","!==n?o.push(Ht(n,t,i)):Rt(n,t,i)),o}yt.prototype={on:function(t,e){this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e)},once:function(e,n){var i=this;this.on(e,function t(){return i.off(e,t),n.apply(null,arguments)})},off:function(t,e){this._events=this._events||{},t in this._events!=!1&&(this._events[t]=this._events[t].filter(function(t){return!!e&&e!==t}))},emit:function(t){if(this._events=this._events||{},t in this._events!=!1)for(var e=0;e<this._events[t].length;e++)this._events[t][e].apply(this,Array.prototype.slice.call(arguments,1))}},yt.mixin=function(t){for(var e=["on","once","off","emit"],n=0;n<e.length;n++)"function"==typeof t?t.prototype[e[n]]=yt.prototype[e[n]]:t[e[n]]=yt.prototype[e[n]]},window.MicroEvent=yt;var xt,i={},Pt=(t=window.getComputedStyle(document.documentElement,""),xt=(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.OLink&&["","o"])[1],function(t){return"-"+xt+"-"+b.hyphenate(t)}),Lt=(u.clear=function(n){for(var i=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:"").split(/\s+/).reduce(function(t,e){return t.concat([b.hyphenate(e),Pt(e)])},[]),o=[],t=n.style.length-1;0<=t;t--)!function(t){var e=n.style[t];0!==i.length&&!i.some(function(t){return 0===e.indexOf(t)})||o.push(e)}(t);o.forEach(function(t){return n.style[t]=""}),""===n.getAttribute("style")&&n.removeAttribute("style")},!0),Ot={quiet:"material--flat",light:"material--flat",outline:"material--flat",cta:"","large--quiet":"material--flat large","large--cta":"large",noborder:"",tappable:""},Mt={android:function(t){var e,n=t.tagName.toLowerCase();b.hasModifier(t,"material")||((e=(t.getAttribute("modifier")||"").trim().split(/\s+/).map(function(t){return Object.prototype.hasOwnProperty.call(Ot,t)?Ot[t]:t})).unshift("material"),t.setAttribute("modifier",e.join(" ").trim()));-1===["ons-alert-dialog-button","ons-toolbar-button","ons-back-button","ons-button","ons-list-item","ons-fab","ons-speed-dial","ons-speed-dial-item","ons-tab"].indexOf(n)||t.hasAttribute("ripple")||t.querySelector("ons-ripple")||("ons-list-item"===n?t.hasAttribute("tappable")&&(t.setAttribute("ripple",""),t.removeAttribute("tappable")):t.setAttribute("ripple",""))},ios:function(t){b.removeModifier(t,"material")&&(b.removeModifier(t,"material--flat")&&b.addModifier(t,b.removeModifier(t,"large")?"large--quiet":"quiet"),t.getAttribute("modifier")||t.removeAttribute("modifier")),t.hasAttribute("ripple")&&("ons-list-item"===t.tagName.toLowerCase()&&t.setAttribute("tappable",""),t.removeAttribute("ripple"))}},Tt={android:!0},g={isEnabled:function(){return Lt},enable:function(){return Lt=!0},disable:function(){return Lt=!1},prepare:function(t,e){e=kt(t,e);e&&Mt[e](t)},mapModifier:wt,getPlatform:kt,restoreModifier:function(t){if("android"===kt(t)){var e=t.getAttribute("modifier")||"",n=wt(e,t);if((n=/(^|\s+)material($|\s+)/i.test(e)?n:"material "+n)!==e)return t.setAttribute("modifier",n.trim()),!0}return!1}},v=function(){function r(){l(this,r)}return c(r,null,[{key:"diff",value:function(n,i){n=e((""+n).trim()),i=e((""+i).trim());var t=Object.keys(n).reduce(function(t,e){return i[e]||t.push(e),t},[]);return{added:Object.keys(i).reduce(function(t,e){return n[e]||t.push(e),t},[]),removed:t};function e(t){var e={};return r.split(t).forEach(function(t){return e[t]=t}),e}}},{key:"applyDiffToClassList",value:function(t,e,n){t.added.map(function(t){return n.replace(/\*/g,t)}).forEach(function(t){return t.split(/\s+/).forEach(function(t){return e.add(t)})}),t.removed.map(function(t){return n.replace(/\*/g,t)}).forEach(function(t){return t.split(/\s+/).forEach(function(t){return e.remove(t)})})}},{key:"applyDiffToElement",value:function(i,o,a){Object.keys(a).forEach(function(t){for(var e=!t||b.match(o,t)?[o]:Array.prototype.filter.call(o.querySelectorAll(t),function(t){return!b.findParent(t,o.tagName,function(t){return t===o})}),n=0;n<e.length;n++)r.applyDiffToClassList(i,e[n].classList,a[t])})}},{key:"onModifierChanged",value:function(t,e,n,i){r.applyDiffToElement(r.diff(t,e),n,i),g.restoreModifier(n)}},{key:"refresh",value:function(t,e){r.applyDiffToElement(r.diff("",t.getAttribute("modifier")||""),t,e)}},{key:"initModifier",value:function(t,e){var n=t.getAttribute("modifier");"string"==typeof n&&r.applyDiffToElement({removed:[],added:r.split(n)},t,e)}},{key:"split",value:function(t){return"string"!=typeof t?[]:t.trim().split(/ +/).filter(function(t){return""!==t})}},{key:"addModifier",value:function(t,e){var n;t.hasAttribute("modifier")?-1==(n=r.split(t.getAttribute("modifier"))).indexOf(e)&&(n.push(e),t.setAttribute("modifier",n.join(" "))):t.setAttribute("modifier",e)}},{key:"removeModifier",value:function(t,e){var n;t.hasAttribute("modifier")&&-1!==(e=(n=r.split(t.getAttribute("modifier"))).indexOf(e))&&(n.splice(e,1),t.setAttribute("modifier",n.join(" ")))}}]),r}(),It=function(t,e){return t.substr(0,e.length)===e},Dt=function(t,e){return t.substr(t.length-e.length,e.length)===e},Nt=function(t){return t.slice(1,-1)},Bt=function(t){return It(t,"'")&&Dt(t,"'")||It(t,'"')&&Dt(t,'"')},Rt=function(t,e,n){throw new Error("Unexpected token '"+t+"' at position "+(n.length-e.length-1)+" in string: '"+n+"'")},Ht=function(t,e,n){return"true"===t||"false"===t?"true"===t:Bt(t)?Nt(t):isNaN(t)?Et(t)?At(Nt(t)):Ct(t)?St(Nt(t)):void Rt(t,e,n):+t},qt=function(t){var e=(t=t.trim()).length;if(":"===t[0]||","===t[0])e=1;else if("{"===t[0]||"["===t[0]){for(var n=t.charCodeAt(0),i=1,o=1;o<t.length;o++)if(t.charCodeAt(o)===n)i++;else if(t.charCodeAt(o)===n+2&&0===--i){e=o+1;break}}else if("'"===t[0]||'"'===t[0]){for(var a=1;a<t.length;a++)if(t[a]===t[0]){e=a+1;break}}else for(var r=1;r<t.length;r++)if(-1!==[" ",",",":"].indexOf(t[r])){e=r;break}return t.slice(0,e)},_={},zt="[Onsen UI]";_.globals={fabOffset:0,errorPrefix:zt,supportsPassive:!1},r._runOnActualPlatform(function(){_.globals.actualMobileOS=r.getMobileOS(),_.globals.isWKWebView=r.isWKWebView()});try{var Ft=Object.defineProperty({},"passive",{get:function(){_.globals.supportsPassive=!0}});window.addEventListener("testPassive",null,Ft),window.removeEventListener("testPassive",null,Ft)}catch(t){}_.addEventListener=function(t,e,n,i,o){t.addEventListener(e,n,_.globals.supportsPassive?i:(i||{}).capture)},_.removeEventListener=function(t,e,n,i,o){t.removeEventListener(e,n,_.globals.supportsPassive?i:(i||{}).capture)},_.prepareQuery=function(e){return e instanceof Function?e:function(t){return _.match(t,e)}},_.match=function(t,e){return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector).call(t,e)},_.findChild=function(t,e){for(var n=_.prepareQuery(e),i=0;i<t.childNodes.length;i++){var o=t.childNodes[i];if(o.nodeType===Node.ELEMENT_NODE&&n(o))return o}return null},_.findParent=function(t,e,n){for(var i=_.prepareQuery(e),o=t.parentNode;;){if(!o||o===document||o instanceof DocumentFragment||n&&n(o))return null;if(i(o))return o;o=o.parentNode}},_.isAttached=function(t){return document.body.contains(t)},_.hasAnyComponentAsParent=function(t){for(;t&&document.documentElement!==t;)if((t=t.parentNode)&&t.nodeName.toLowerCase().match(/(ons-navigator|ons-tabbar|ons-modal)/))return!0;return!1},_.getAllChildNodes=function(t){var e;return(e=[t]).concat.apply(e,m(Array.from(t.children).map(function(t){return _.getAllChildNodes(t)})))},_.isPageControl=function(t){return t.nodeName.match(/^ons-(navigator|splitter|tabbar|page)$/i)},_.propagateAction=function(t,e){for(var n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];i[e]instanceof Function?i[e]():_.propagateAction(i,e)}},_.camelize=function(t){return t.toLowerCase().replace(/-([a-z])/g,function(t,e){return e.toUpperCase()})},_.hyphenate=function(t){return t.replace(/([a-zA-Z])([A-Z])/g,"$1-$2").toLowerCase()},_.create=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=t.split("."),n=document.createElement(t.shift()||"div");return t.length&&(n.className=t.join(" ")),u(n,e),n},_.createElement=function(t){var e=document.createElement("div"),t=(t instanceof DocumentFragment?e.appendChild(document.importNode(t,!0)):e.innerHTML=t.trim(),1<e.children.length&&_.throw("HTML template must contain a single root element"),e.children[0]);return e.children[0].remove(),t},_.createFragment=function(t){var e=document.createElement("template");return e.innerHTML=t,document.importNode(e.content,!0)},_.extend=function(t){for(var e=arguments.length,n=new Array(1<e?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];for(var o=0;o<n.length;o++)if(n[o])for(var a=Object.keys(n[o]),r=0;r<a.length;r++){var s=a[r];t[s]=n[o][s]}return t},_.arrayFrom=function(t){return Array.prototype.slice.apply(t)},_.parseJSONObjectSafely=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};try{var n=JSON.parse(""+t);if("object"===o(n)&&null!==n)return n}catch(t){return e}return e},_.findFromPath=function(t){t=t.split(".");for(var e,n=window;e=t.shift();)n=n[e];return n},_.getTopPage=function(t){return t&&("ons-page"===t.tagName.toLowerCase()?t:t.topPage)||null},_.findToolbarPage=function(t){var e=_.getTopPage(t);if(e){if(e._canAnimateToolbar())return e;for(var n=0;n<e._contentElement.children.length;n++){var i=_.getTopPage(e._contentElement.children[n]);if(i&&!/ons-tabbar/i.test(e._contentElement.children[n].tagName))return _.findToolbarPage(i)}}return null},_.triggerElementEvent=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});return Object.keys(n).forEach(function(t){i[t]=n[t]}),t.dispatchEvent(i),i},_.hasModifier=function(t,e){return!!t.hasAttribute("modifier")&&RegExp("(^|\\s+)".concat(e,"($|\\s+)"),"i").test(t.getAttribute("modifier"))},_.addModifier=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return n.autoStyle&&(e=g.mapModifier(e,t,n.forceAutoStyle)),!_.hasModifier(t,e)&&(t.setAttribute("modifier",((t.getAttribute("modifier")||"")+" "+e).trim()),!0)},_.removeModifier=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(n.autoStyle&&(e=g.mapModifier(e,t,n.forceAutoStyle)),!t.getAttribute("modifier")||!_.hasModifier(t,e))return!1;n=t.getAttribute("modifier").split(/\s+/).filter(function(t){return t&&t!==e});return n.length?t.setAttribute("modifier",n.join(" ")):t.removeAttribute("modifier"),!0},_.toggleModifier=function(){var t=2<arguments.length?arguments.length<=2?void 0:arguments[2]:{},t="boolean"==typeof t?t:t.force;(("boolean"==typeof t?t:!_.hasModifier.apply(_,arguments))?_.addModifier:_.removeModifier).apply(_,arguments)},_.restoreClass=function(e,t,n){t.split(/\s+/).forEach(function(t){return""!==t&&!e.classList.contains(t)&&e.classList.add(t)}),e.hasAttribute("modifier")&&v.refresh(e,n)},_.updateParentPosition=function(t){!t._parentUpdated&&t.parentElement&&("static"===window.getComputedStyle(t.parentElement).getPropertyValue("position")&&(t.parentElement.style.position="relative"),t._parentUpdated=!0)},_.toggleAttribute=function(t,e,n){n?t.setAttribute(e,"boolean"==typeof n?"":n):t.removeAttribute(e)},_.bindListeners=function(n,t){t.forEach(function(t){var e=t.replace(/^_[a-z]/,"_bound"+t[1].toUpperCase());n[e]=n[e]||n[t].bind(n)})},_.each=function(e,n){return Object.keys(e).forEach(function(t){return n(t,e[t])})},_.updateRipple=function(t,e){var n,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=(void 0===e&&(e=t.hasAttribute("ripple")),_.findChild(t,"ons-ripple"));e?o||(n=document.createElement("ons-ripple"),Object.keys(i).forEach(function(t){return n.setAttribute(t,i[t])}),t.insertBefore(n,t.firstChild)):o&&o.remove()},_.animationOptionsParse=function(t){if(t=t.trim(),Et(t))return At(Nt(t));if(Ct(t))return St(Nt(t));throw new Error("Provided string must be object or array like: "+t)},_.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},_.defer=function(){var n={};return n.promise=new Promise(function(t,e){n.resolve=t,n.reject=e}),n},_.warn=function(){if(!k.config.warningsDisabled){for(var t,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];(t=console).warn.apply(t,[zt].concat(n))}},_.throw=function(t){throw new Error("".concat(zt," ").concat(t))},_.throwAbstract=function(){return _.throw("Cannot instantiate abstract class")},_.throwMember=function(){return _.throw("Class member must be implemented")},_.throwPageLoader=function(){return _.throw("First parameter should be an instance of PageLoader")},_.throwAnimator=function(t){return _.throw('"Animator" param must inherit '.concat(t,"Animator"))};function jt(t){return t.cancelable&&t.preventDefault()}function Vt(t){b.throw("In PageAttributeExpression: ".concat(t))}_.iosPreventScroll=function(n){var t;"ios"===_.globals.actualMobileOS&&(t=function t(e){n.off("touchmove",jt),n.off("dragend",t)},n.on("touchmove",jt),n.on("dragend",t))},_.iosPageScrollFix=function(t){"ios"===_.globals.actualMobileOS&&(document.body.classList.toggle("ons-ios-scroll",t),document.body.classList.toggle("ons-ios-scroll-fix",t))},_.isValidGesture=function(t){return void 0!==t.gesture&&(t.gesture.distance<=15||t.gesture.deltaTime<=100)},_.checkMissingImport=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t){i[t]||_.throw("Ons".concat(t," is required but was not imported (Custom Elements)"))})},_.defineBooleanProperties=function(n,t){t.forEach(function(e){var t=_.camelize(e);Object.defineProperty(n.prototype,t,{get:function(){return this.hasAttribute(e)},set:function(t){t?this.setAttribute(e,""):this.removeAttribute(e)},configurable:!0})})},_.defineStringProperties=function(n,t){t.forEach(function(e){var t=_.camelize(e);Object.defineProperty(n.prototype,t,{get:function(){return this.getAttribute(e)},set:function(t){null==t?this.removeAttribute(e):this.setAttribute(e,t)},configurable:!0})})},_.defineListenerProperty=function(e,n){var i,t=_.camelize(n),o="on"+t.charAt(0).toUpperCase()+t.slice(1);return Object.defineProperty(e,o,{get:function(){return i},set:function(t){e.isConnected&&(i&&e.removeEventListener(n,i),e.addEventListener(n,t)),i=t},configurable:!0}),{onConnected:function(){e[o]&&e.addEventListener(n,e[o])},onDisconnected:function(){e[o]&&e.removeEventListener(n,e[o])}}};var Wt,b=_,Xt={_variables:{},defineVariable:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];"string"!=typeof t?Vt("Variable name must be a string"):"string"!=typeof e&&"function"!=typeof e?Vt("Variable value must be a string or a function"):Object.prototype.hasOwnProperty.call(this._variables,t)&&!n&&Vt('"'.concat(t,'" is already defined')),this._variables[t]=e},getVariable:function(t){return Object.prototype.hasOwnProperty.call(this._variables,t)?this._variables[t]:null},removeVariable:function(t){delete this._variables[t]},getAllVariables:function(){return this._variables},_parsePart:function(t){var e=!1,n=0,i=[];0===t.length&&Vt("Unable to parse empty string");for(var o,a=0;a<t.length;a++)"$"===(o=t.charAt(a))&&"{"===t.charAt(a+1)?(e&&Vt("Nested interpolation not supported"),0<t.substring(n,a).length&&i.push(t.substring(n,a)),n=a,e=!0):"}"===o&&(e||Vt("} must be preceeded by ${"),0<t.substring(n,a+1).length&&i.push(t.substring(n,a+1)),n=a+1,e=!1);return e&&Vt("Unterminated interpolation"),i.push(t.substring(n,t.length)),i},_replaceToken:function(t){var e,n=t.match(/^\${(.*?)}$/);return n?(n=n[1].trim(),null!==(e=this.getVariable(n))?"string"==typeof e?e:("string"!=typeof(e=e())&&Vt("Must return a string"),e):void Vt('Variable "'.concat(n,'" does not exist'))):t},_replaceTokens:function(t){return t.map(this._replaceToken.bind(this))},_parseExpression:function(t){return t.split(",").map(function(t){return t.trim()}).map(this._parsePart.bind(this)).map(this._replaceTokens.bind(this)).map(function(t){return t.join("")})},evaluate:function(t){return t?this._parseExpression(t):[]}},y=(Xt.defineVariable("mobileOS",r.getMobileOS()),Xt.defineVariable("iOSDevice",r.getIOSDevice()),Xt.defineVariable("runtime",function(){return r.isWebView()?"cordova":"browser"}),{}),k=(y.config={autoStatusBarFill:!0,animationsDisabled:!1,warningsDisabled:!1},y.nullElement=window.document.createElement("div"),y.isEnabledAutoStatusBarFill=function(){return!!y.config.autoStatusBarFill},y.normalizePageHTML=function(t){return(""+t).trim()},y.waitDOMContentLoaded=function(e){"loading"===window.document.readyState||"uninitialized"==window.document.readyState?window.document.addEventListener("DOMContentLoaded",function t(){e(),window.document.removeEventListener("DOMContentLoaded",t)}):setImmediate(e)},y.autoStatusBarFill=function(t){function e(){y.shouldFillStatusBar()&&t(),document.removeEventListener("deviceready",e)}"object"===("undefined"==typeof device?"undefined":o(device))?document.addEventListener("deviceready",e):-1===["complete","interactive"].indexOf(document.readyState)?y.waitDOMContentLoaded(e):e()},y.shouldFillStatusBar=function(){return y.isEnabledAutoStatusBarFill()&&(r.isWebView()&&(r.isIOS7above()||r.isIPadOS())&&!r.isIPhoneX()||document.body.querySelector(".ons-status-bar-mock.ios"))},y.templateStore={_storage:{},get:function(t){return y.templateStore._storage[t]||null},set:function(t,e){y.templateStore._storage[t]=e}},y.getTemplateHTMLAsync=function(o){return new Promise(function(n,i){y.waitDOMContentLoaded(function(){var t=y.templateStore.get(o);if(t){if(t instanceof DocumentFragment)return n(t);t="string"==typeof t?t:t[1];return n(y.normalizePageHTML(t))}var t=window.document.getElementById(o);if(t)return t=t.textContent||t.content,n(t);var e=new XMLHttpRequest;e.open("GET",o,!0),e.onload=function(){var t=e.responseText;400<=e.status&&e.status<600?i(t):(t=b.createFragment(t),b.arrayFrom(t.querySelectorAll("script")).forEach(function(t){var e=document.createElement("script");e.type=t.type||"text/javascript",e.appendChild(document.createTextNode(t.text||t.textContent||t.innerHTML)),t.parentNode.replaceChild(e,t)}),y.templateStore.set(o,t),n(t))},e.onerror=function(){b.throw("Page template not found: ".concat(o))},e.send(null)})})},y.getPageHTMLAsync=function(t){var n=Xt.evaluate(t);return function e(t){return"string"!=typeof t?Promise.reject("Must specify a page."):y.getTemplateHTMLAsync(t).catch(function(t){return 0===n.length?Promise.reject(t):e(n.shift())})}(n.shift())},y),w=function(){function e(t){l(this,e),this._animators=t.animators,this._baseClass=t.baseClass,this._baseClassName=t.baseClassName||t.baseClass.name,this._animation=t.defaultAnimation||"default",this._animationOptions=t.defaultAnimationOptions||{},this._animators[this._animation]||b.throw("No such animation: "+this._animation)}return c(e,[{key:"setAnimationOptions",value:function(t){this._animationOptions=t}},{key:"newAnimator",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length?arguments[1]:void 0,n=null;if(t.animation instanceof this._baseClass)return t.animation;var i=null;return!(i="string"==typeof t.animation?this._animators[t.animation]:i)&&e?n=e:"function"==typeof(n=new(i=i||this._animators[this._animation])(e=b.extend({},this._animationOptions,t.animationOptions||{},k.config.animationsDisabled?{duration:0,delay:0}:{})))&&(n=new n(e)),n instanceof this._baseClass||b.throw('"animator" is not an instance of '.concat(this._baseClassName)),n}}],[{key:"parseAnimationOptionsString",value:function(e){try{if("string"==typeof e){var t=b.animationOptionsParse(e);if("object"===o(t)&&null!==t)return t;console.error('"animation-options" attribute must be a JSON object string: '+e)}return{}}catch(t){return console.error('"animation-options" attribute must be a JSON object string: '+e),{}}}}]),e}(),Ut={_ready:!1,_domContentLoaded:!1,_onDOMContentLoaded:function(){Ut._domContentLoaded=!0,r.isWebView()?window.document.addEventListener("deviceready",function(){Ut._ready=!0},!1):Ut._ready=!0},addBackButtonListener:function(t){if(!this._domContentLoaded)throw new Error("This method is available after DOMContentLoaded");this._ready?window.document.addEventListener("backbutton",t,!1):window.document.addEventListener("deviceready",function(){window.document.addEventListener("backbutton",t,!1)})},removeBackButtonListener:function(t){if(!this._domContentLoaded)throw new Error("This method is available after DOMContentLoaded");this._ready?window.document.removeEventListener("backbutton",t,!1):window.document.addEventListener("deviceready",function(){window.document.removeEventListener("backbutton",t,!1)})}},E=(window.addEventListener("DOMContentLoaded",function(){return Ut._onDOMContentLoaded()},!1),{_store:{},_genId:(Wt=0,function(){return Wt++}),set:function(t,e){t.dataset.deviceBackButtonHandlerId&&this.remove(t);t=t.dataset.deviceBackButtonHandlerId=E._genId();this._store[t]=e},remove:function(t){t.dataset.deviceBackButtonHandlerId&&(delete this._store[t.dataset.deviceBackButtonHandlerId],delete t.dataset.deviceBackButtonHandlerId)},get:function(t){if(t.dataset.deviceBackButtonHandlerId){t=t.dataset.deviceBackButtonHandlerId;if(this._store[t])return this._store[t];throw new Error}},has:function(t){if(!t.dataset)return!1;t=t.dataset.deviceBackButtonHandlerId;return!!this._store[t]}}),Yt=new(function(){function t(){l(this,t),this._isEnabled=!1,this._boundCallback=this._callback.bind(this)}return c(t,[{key:"enable",value:function(){this._isEnabled||(Ut.addBackButtonListener(this._boundCallback),this._isEnabled=!0)}},{key:"disable",value:function(){this._isEnabled&&(Ut.removeBackButtonListener(this._boundCallback),this._isEnabled=!1)}},{key:"fireDeviceBackButtonEvent",value:function(){var t=document.createEvent("Event");t.initEvent("backbutton",!0,!0),document.dispatchEvent(t)}},{key:"_callback",value:function(){this._dispatchDeviceBackButtonEvent()}},{key:"createHandler",value:function(t,e){if(!(t instanceof HTMLElement))throw new Error("element must be an instance of HTMLElement");if(!(e instanceof Function))throw new Error("callback must be an instance of Function");e={_callback:e,_element:t,disable:function(){E.remove(t)},setListener:function(t){this._callback=t},enable:function(){E.set(t,this)},isEnabled:function(){return E.get(t)===this},destroy:function(){E.remove(t),this._callback=this._element=null}};return e.enable(),e}},{key:"_dispatchDeviceBackButtonEvent",value:function(){var t=this._captureTree(),t=this._findHandlerLeafElement(t),n=E.get(t);n._callback(function e(t){return{_element:t,callParentHandler:function(){for(var t=this._element.parentNode;t;){if(n=E.get(t))return n._callback(e(t));t=t.parentNode}}}}(t))}},{key:"_captureTree",value:function(){return function e(t){var n={element:t,children:Array.prototype.concat.apply([],a(t.children).map(function(t){if("none"===t.style.display||!1===t._isShown)return[];if(0===t.children.length&&!E.has(t))return[];t=e(t);return 0!==t.children.length||E.has(t.element)?[t]:[]}))};if(!E.has(n.element))for(var i=0;i<n.children.length;i++){var o=n.children[i];if(E.has(o.element))return o}return n}(document.body);function a(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e}}},{key:"_findHandlerLeafElement",value:function(t){return function t(e){if(0===e.children.length)return e.element;if(1===e.children.length)return t(e.children[0]);return e.children.map(function(t){return t.element}).reduce(function(t,e){if(!t)return e;var n=parseInt(window.getComputedStyle(t,"").zIndex,10),i=parseInt(window.getComputedStyle(e,"").zIndex,10);if(isNaN(n)||isNaN(i))throw new Error("Capturing backbutton-handler is failure.");return i<n?t:e},null)}(t)}}]),t}());k.AnimatorFactory=w,k.ModifierUtil=v,k.dbbDispatcher=Yt;function C(t,e){if(!(this instanceof C))return new C(t,e);if(t instanceof HTMLElement)this.elements=[t];else{if("[object Array]"!==Object.prototype.toString.call(t))throw new Error("First argument must be an array or an instance of HTMLElement.");this.elements=t}this.defaults=e,this.transitionQueue=[],this.lastStyleAttributeDict=[]}function A(t,e){return new A.Instance(t,e||{})}var $t,Gt,Kt,Jt,S,x,Qt,Zt,te,ee,ne,ie,oe,ae,re,se,P={capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},buildTransitionValue:function(e){return e.property=e.property||"all",e.duration=e.duration||.4,e.timing=e.timing||"linear",e.property.split(/ +/).map(function(t){return t+" "+e.duration+"s "+e.timing}).join(", ")},onceOnTransitionEnd:function(e,n){if(!e)return function(){};function i(){P._transitionEndEvents.forEach(function(t){e.removeEventListener(t,o,!1)})}var o=function(t){e==t.target&&(t.stopPropagation(),i(),n())};return P._transitionEndEvents.forEach(function(t){e.addEventListener(t,o,!1)}),i}},le=(P._transitionEndEvents="ontransitionend"in window?["transitionend"]:"onwebkittransitionend"in window?["webkitTransitionEnd"]:"webkit"===P.vendorPrefix||"o"===P.vendorPrefix||"moz"===P.vendorPrefix||"ms"===P.vendorPrefix?[P.vendorPrefix+"TransitionEnd","transitionend"]:[],P._cssPropertyDict=function(){for(var t=window.getComputedStyle(document.documentElement,""),e={},n="A".charCodeAt(0),i="z".charCodeAt(0),o=function(t){return t.substr(1).toUpperCase()},a=0;a<t.length;a++){var r=t[a].replace(/^[-]+/,"").replace(/[-][a-z]/g,o).replace(/^moz/,"Moz");n<=r.charCodeAt(0)&&i>=r.charCodeAt(0)&&"cssText"!==r&&"parentText"!==r&&(e[r]=!0)}return e}(),P.hasCssProperty=function(t){return t in P._cssPropertyDict},P.vendorPrefix=(t=window.getComputedStyle(document.documentElement,""),(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.OLink&&["","o"])[1]),P.forceLayoutAtOnce=function(t,e){this.batchImmediate(function(){t.forEach(function(t){t.offsetHeight}),e()})},P.batchImmediate=($t=[],function(t){0===$t.length&&setImmediate(function(){var t=$t.slice(0);$t=[],t.forEach(function(t){t()})}),$t.push(t)}),P.batchAnimationFrame=(Gt=[],Kt=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)},function(t){0===Gt.length&&Kt(function(){var t=Gt.slice(0);Gt=[],t.forEach(function(t){t()})}),Gt.push(t)}),P.transitionPropertyName=function(){if(P.hasCssProperty("transitionDuration"))return"transition";if(P.hasCssProperty(P.vendorPrefix+"TransitionDuration"))return P.vendorPrefix+"Transition";throw new Error("Invalid state")}(),C.prototype={transitionQueue:void 0,elements:void 0,defaults:void 0,play:function(e){return"function"==typeof e&&this.transitionQueue.push(function(t){e(),t()}),this.startAnimation(),this},default:function(t,e,n){function i(t,e,n){return void 0!==t.duration&&(e=t.duration),void 0!==t.timing&&(n=t.timing),{css:t.css||t,duration:e,timing:n}}return this.saveStyle().queue(i(t,0,this.defaults.timing)).wait(void 0===n?this.defaults.delay:n).queue(i(e,this.defaults.duration,this.defaults.timing)).restoreStyle()},queue:function(t,e){var n=this.transitionQueue;if(t&&e&&(e.css=t,t=new C.Transition(e)),(t=t instanceof Function||t instanceof C.Transition?t:t.css?new C.Transition(t):new C.Transition({css:t}))instanceof Function)n.push(t);else{if(!(t instanceof C.Transition))throw new Error("Invalid arguments");n.push(t.build())}return this},wait:function(e){return 0<e&&this.transitionQueue.push(function(t){setTimeout(t,1e3*e)}),this},saveStyle:function(){return this.transitionQueue.push(function(t){this.elements.forEach(function(t,e){for(var n=this.lastStyleAttributeDict[e]={},i=0;i<t.style.length;i++)n[t.style[i]]=t.style[t.style[i]]}.bind(this)),t()}.bind(this)),this},restoreStyle:function(a){var r=this;if((a=a||{}).transition&&!a.duration)throw new Error('"options.duration" is required when "options.transition" is enabled.');var s,l=P.transitionPropertyName;return a.transition||a.duration&&0<a.duration?(s=a.transition||"all "+a.duration+"s "+(a.timing||"linear"),this.transitionQueue.push(function(t){function e(){n.forEach(function(t){t.style[l]=""})}var n=this.elements,i=P.onceOnTransitionEnd(n[0],function(){clearTimeout(o),e(),t()}),o=setTimeout(function(){i(),e(),t()},1e3*a.duration*1.4);n.forEach(function(e,t){var n,i=r.lastStyleAttributeDict[t];if(!i)throw new Error("restoreStyle(): The style is not saved. Invoke saveStyle() before.");r.lastStyleAttributeDict[t]=void 0;for(var o=0,a=e.style.length;o<a;o++)n=e.style[o],void 0===i[n]&&(i[n]="");e.style[l]=s,Object.keys(i).forEach(function(t){t!==l&&(e.style[t]=i[t])}),e.style[l]=s})})):this.transitionQueue.push(function(t){r.elements.forEach(function(e,t){e.style[l]="none";var n=r.lastStyleAttributeDict[t];if(!n)throw new Error("restoreStyle(): The style is not saved. Invoke saveStyle() before.");r.lastStyleAttributeDict[t]=void 0;for(var i=0;i<e.style.length;i++)e.style[i],void 0===n[e.style[i]]&&(n[e.style[i]]="");Object.keys(n).forEach(function(t){e.style[t]=n[t]})}),t()}),this},startAnimation:function(){return this._dequeueTransition(),this},_dequeueTransition:function(){var t=this.transitionQueue.shift();if(this._currentTransition)throw new Error("Current transition exists.");this._currentTransition=t;var e=this,n=!1;t&&t.call(this,function(){if(n)throw new Error("Invalid state: This callback is called twice.");n=!0,e._currentTransition=void 0,e._dequeueTransition()})}},C.runAll=function(){for(var t=0;t<arguments.length;t++)arguments[t].play()},(C.Transition=function(t){this.options=t||{},this.options.duration=this.options.duration||0,this.options.timing=this.options.timing||"linear",this.options.css=this.options.css||{},this.options.property=this.options.property||"all"}).prototype={build:function(){if(0===Object.keys(this.options.css).length)throw new Error("options.css is required.");i=this.options.css,o={},Object.keys(i).forEach(function(t){var e,n=i[t];P.hasCssProperty(t)?o[t]=n:(e=P.vendorPrefix+P.capitalize(t),P.hasCssProperty(e)?o[e]=n:(o[e]=n,o[t]=n))});var i,o,a,r,s=o;return 0<this.options.duration?(a=P.buildTransitionValue(this.options),r=this,function(t){var e=this.elements,n=1e3*r.options.duration*1.4,i=P.onceOnTransitionEnd(e[0],function(){clearTimeout(o),t()}),o=setTimeout(function(){i(),t()},n);e.forEach(function(e){e.style[P.transitionPropertyName]=a,Object.keys(s).forEach(function(t){e.style[t]=s[t]})})}):this.options.duration<=0?function(t){var e=this.elements;e.forEach(function(e){e.style[P.transitionPropertyName]="",Object.keys(s).forEach(function(t){e.style[t]=s[t]})}),0<e.length?P.forceLayoutAtOnce(e,function(){P.batchAnimationFrame(t)}):P.batchAnimationFrame(t)}:void 0}},A.defaults={behavior:{touchAction:"pan-y",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},A.DOCUMENT=document,A.HAS_POINTEREVENTS=navigator.pointerEnabled||navigator.msPointerEnabled,A.HAS_TOUCHEVENTS="ontouchstart"in window,A.IS_MOBILE=/mobile|tablet|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent),A.NO_MOUSEEVENTS=A.HAS_TOUCHEVENTS&&A.IS_MOBILE||A.HAS_POINTEREVENTS,A.CALCULATE_INTERVAL=25,{}),ce=A.DIRECTION_DOWN="down",ue=(A.DIRECTION_LEFT="left",A.DIRECTION_UP="up",A.DIRECTION_RIGHT="right",A.POINTER_MOUSE="mouse"),de=A.POINTER_TOUCH="touch",he=A.POINTER_PEN="pen",L=A.EVENT_START="start",fe=A.EVENT_MOVE="move",O=A.EVENT_END="end",pe=A.EVENT_RELEASE="release",me=A.EVENT_TOUCH="touch";function ge(t){re.set(t,!0)}function ve(t){var e=se.get(t,[])||[];se.delete(t),e.forEach(function(t){return t()})}function M(e,t){var n,t=1<arguments.length&&void 0!==t?t:function(){};void 0===re&&(re=new WeakMap,se=new WeakMap),n=e,t=t,se.has(n)||se.set(n,[]),se.get(n).push(t),0<(n=e).childNodes.length&&ge(n),re.has(n)?ve(e):(new MutationObserver(function(t){ge(e),ve(e)}).observe(e,{childList:!0,characterData:!0}),setImmediate(function(){ge(e),ve(e)}))}A.READY=!1,A.plugins=A.plugins||{},A.gestures=A.gestures||{},S=A.utils={extend:function(t,e,n){for(var i in e)!Object.prototype.hasOwnProperty.call(e,i)||void 0!==t[i]&&n||(t[i]=e[i]);return t},on:function(t,e,n,i){b.addEventListener(t,e,n,i,!0)},off:function(t,e,n,i){b.removeEventListener(t,e,n,i,!0)},each:function(t,e,n){var i,o;if("forEach"in t)t.forEach(e,n);else if(void 0!==t.length){for(i=0,o=t.length;i<o;i++)if(!1===e.call(n,t[i],i,t))return}else for(i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&!1===e.call(n,t[i],i,t))return},inStr:function(t,e){return-1<t.indexOf(e)},inArray:function(e,n,t){if(t){for(var i=0,o=e.length;i<o;i++)if(Object.keys(n).every(function(t){return e[i][t]===n[t]}))return i;return-1}if(e.indexOf)return e.indexOf(n);for(i=0,o=e.length;i<o;i++)if(e[i]===n)return i;return-1},toArray:function(t){return Array.prototype.slice.call(t,0)},hasParent:function(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1},getCenter:function(t){var e=[],n=[],i=[],o=[],a=Math.min,r=Math.max;return 1===t.length?{pageX:t[0].pageX,pageY:t[0].pageY,clientX:t[0].clientX,clientY:t[0].clientY}:(S.each(t,function(t){e.push(t.pageX),n.push(t.pageY),i.push(t.clientX),o.push(t.clientY)}),{pageX:(a.apply(Math,e)+r.apply(Math,e))/2,pageY:(a.apply(Math,n)+r.apply(Math,n))/2,clientX:(a.apply(Math,i)+r.apply(Math,i))/2,clientY:(a.apply(Math,o)+r.apply(Math,o))/2})},getVelocity:function(t,e,n){return{x:Math.abs(e/t)||0,y:Math.abs(n/t)||0}},getAngle:function(t,e){var n=e.clientX-t.clientX,e=e.clientY-t.clientY;return 180*Math.atan2(e,n)/Math.PI},getDirection:function(t,e){var n=Math.abs(t.clientX-e.clientX);return Math.abs(t.clientY-e.clientY)<=n?0<t.clientX-e.clientX?"left":"right":0<t.clientY-e.clientY?"up":ce},getDistance:function(t,e){var n=e.clientX-t.clientX,e=e.clientY-t.clientY;return Math.sqrt(n*n+e*e)},getScale:function(t,e){return 2<=t.length&&2<=e.length?this.getDistance(e[0],e[1])/this.getDistance(t[0],t[1]):1},getRotation:function(t,e){return 2<=t.length&&2<=e.length?this.getAngle(e[1],e[0])-this.getAngle(t[1],t[0]):0},isVertical:function(t){return"up"==t||t==ce},setPrefixedCss:function(t,e,n,i){var o=["","Webkit","Moz","O","ms"];e=S.toCamelCase(e);for(var a=0;a<o.length;a++){var r=e;if((r=o[a]?o[a]+r.slice(0,1).toUpperCase()+r.slice(1):r)in t.style){t.style[r]=(null===i||i)&&n||"";break}}},toggleBehavior:function(n,t,i){var e;t&&n&&n.style&&(S.each(t,function(t,e){S.setPrefixedCss(n,e,t,i)}),e=i&&function(){return!1},"none"==t.userSelect&&(n.onselectstart=e),"none"==t.userDrag&&(n.ondragstart=e))},toCamelCase:function(t){return t.replace(/[_-]([a-z])/g,function(t){return t[1].toUpperCase()})}},Jt=A.event={preventMouseEvents:!1,started:!1,shouldDetect:!1,on:function(e,t,n,i,o){t=t.split(" ");S.each(t,function(t){S.on(e,t,n,i),o&&o(t)})},off:function(e,t,n,i,o){t=t.split(" ");S.each(t,function(t){S.off(e,t,n,i),o&&o(t)})},onTouch:function(o,a,r,t){function e(t){var e,n=t.type.toLowerCase(),i=A.HAS_POINTEREVENTS;(n=S.inStr(n,"mouse"))&&s.preventMouseEvents||(n&&a==L&&0===t.button?(s.preventMouseEvents=!1,s.shouldDetect=!0):i&&a==L?s.shouldDetect=1===t.buttons||Qt.matchType(de,t):n||a!=L||(s.preventMouseEvents=!0,s.shouldDetect=!0),i&&a!=O&&Qt.updatePointer(a,t),(e=s.shouldDetect?s.doDetect.call(s,t,a,o,r):e)==O&&(s.preventMouseEvents=!1,s.shouldDetect=!1,Qt.reset()),i&&a==O&&Qt.updatePointer(a,t))}var s=this;return this.on(o,le[a],e,t),e},doDetect:function(t,e,n,i){var o=this.getTouchList(t,e),a=o.length,r=e,s=o.trigger,n=(e==L?s=me:e==O&&(s=pe,a=o.length-(t.changedTouches?t.changedTouches.length:1)),0<a&&this.started&&(r=fe),this.started=!0,this.collectEventData(n,r,o,t));return e!=O&&i.call(x,n),s&&(n.changedLength=a,n.eventType=s,i.call(x,n),n.eventType=r,delete n.changedLength),r==O&&(i.call(x,n),this.started=!1),r},determineEventTypes:function(){var t=A.HAS_POINTEREVENTS?window.PointerEvent?["pointerdown","pointermove","pointerup pointercancel lostpointercapture"]:["MSPointerDown","MSPointerMove","MSPointerUp MSPointerCancel MSLostPointerCapture"]:A.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"];return le[L]=t[0],le[fe]=t[1],le[O]=t[2],le},getTouchList:function(t,e){if(A.HAS_POINTEREVENTS)return Qt.getTouchList();if(t.touches){if(e==fe)return t.touches;var n=[],e=[].concat(S.toArray(t.touches),S.toArray(t.changedTouches)),i=[];return S.each(e,function(t){-1===S.inArray(n,t.identifier)&&i.push(t),n.push(t.identifier)}),i}return t.identifier=1,[t]},collectEventData:function(t,e,n,i){var o=de;return S.inStr(i.type,"mouse")||Qt.matchType(ue,i)?o=ue:Qt.matchType(he,i)&&(o=he),{center:S.getCenter(n),timeStamp:Date.now(),target:i.target,touches:n,eventType:e,pointerType:o,srcEvent:i,preventDefault:function(){var t=this.srcEvent;t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return x.stopDetect()}}}},Qt=A.PointerEvent={pointers:{},getTouchList:function(){var e=[];return S.each(this.pointers,function(t){e.push(t)}),e},updatePointer:function(t,e){t==O||t!=O&&1!==e.buttons?delete this.pointers[e.pointerId]:(e.identifier=e.pointerId,this.pointers[e.pointerId]=e)},matchType:function(t,e){if(!e.pointerType)return!1;var n=e.pointerType,i={};return i[ue]=n===(e.MSPOINTER_TYPE_MOUSE||ue),i[de]=n===(e.MSPOINTER_TYPE_TOUCH||de),i[he]=n===(e.MSPOINTER_TYPE_PEN||he),i[t]},reset:function(){this.pointers={}}},x=A.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(t,e){this.current||(this.stopped=!1,this.current={inst:t,startEvent:S.extend({},e),lastEvent:!1,lastCalcEvent:!1,futureCalcEvent:!1,lastCalcData:{},name:""},this.detect(e))},detect:function(e){var n,i;if(this.current&&!this.stopped)return e=this.extendEventData(e),n=this.current.inst,i=n.options,S.each(this.gestures,function(t){!this.stopped&&n.enabled&&i[t.name]&&t.handler.call(t,e,n)},this),this.current&&(this.current.lastEvent=e),e.eventType==O&&this.stopDetect(),e},stopDetect:function(){this.previous=S.extend({},this.current),this.current=null,this.stopped=!0},getCalculatedData:function(t,e,n,i,o){var a=this.current,r=!1,s=a.lastCalcEvent,l=a.lastCalcData;s&&t.timeStamp-s.timeStamp>A.CALCULATE_INTERVAL&&(e=s.center,n=t.timeStamp-s.timeStamp,i=t.center.clientX-s.center.clientX,o=t.center.clientY-s.center.clientY,r=!0),t.eventType!=me&&t.eventType!=pe||(a.futureCalcEvent=t),a.lastCalcEvent&&!r||(l.velocity=S.getVelocity(n,i,o),l.angle=S.getAngle(e,t.center),l.direction=S.getDirection(e,t.center),a.lastCalcEvent=a.futureCalcEvent||t,a.futureCalcEvent=t),t.velocityX=l.velocity.x,t.velocityY=l.velocity.y,t.interimAngle=l.angle,t.interimDirection=l.direction},extendEventData:function(t){var e=this.current,n=e.startEvent,e=e.lastEvent||n,i=(t.eventType!=me&&t.eventType!=pe||(n.touches=[],S.each(t.touches,function(t){n.touches.push({clientX:t.clientX,clientY:t.clientY})})),t.timeStamp-n.timeStamp),o=t.center.clientX-n.center.clientX,a=t.center.clientY-n.center.clientY;return this.getCalculatedData(t,e.center,i,o,a),S.extend(t,{startEvent:n,deltaTime:i,deltaX:o,deltaY:a,distance:S.getDistance(n.center,t.center),angle:S.getAngle(n.center,t.center),direction:S.getDirection(n.center,t.center),scale:S.getScale(n.touches,t.touches),rotation:S.getRotation(n.touches,t.touches)}),t},register:function(t){var e=t.defaults||{};return void 0===e[t.name]&&(e[t.name]=!0),S.extend(A.defaults,e,!0),t.index=t.index||1e3,this.gestures.push(t),this.gestures.sort(function(t,e){return t.index<e.index?-1:t.index>e.index?1:0}),this.gestures}},(A.Instance=function(t,n){var e,i=this,o=n&&n.passive?{passive:!0}:void 0;e=o,A.READY||(Jt.determineEventTypes(),S.each(A.gestures,function(t){x.register(t)}),Jt.onTouch(A.DOCUMENT,fe,x.detect,e),Jt.onTouch(A.DOCUMENT,O,x.detect,e),A.READY=!0),this.element=t,this.enabled=!0,S.each(n,function(t,e){delete n[e],n[S.toCamelCase(e)]=t}),this.options=S.extend(S.extend({},A.defaults),n||{}),this.options.listenerOptions=o,this.options.behavior&&S.toggleBehavior(this.element,this.options.behavior,!0),this.eventStartHandler=Jt.onTouch(t,L,function(t){i.enabled&&t.eventType==L?x.startDetect(i,t):t.eventType==me&&x.detect(t)},o),this.eventHandlers=[]}).prototype={on:function(t,e,n){var i=this;return Jt.on(i.element,t,e,b.extend({},i.options.listenerOptions,n),function(t){i.eventHandlers.push({gesture:t,handler:e})}),i},off:function(t,e,n){var i=this;return Jt.off(i.element,t,e,b.extend({},i.options.listenerOptions,n),function(t){t=S.inArray(i.eventHandlers,{gesture:t,handler:e},!0);0<=t&&i.eventHandlers.splice(t,1)}),i},trigger:function(t,e){e=e||{};var n=A.DOCUMENT.createEvent("Event"),t=(n.initEvent(t,!0,!0),n.gesture=e,this.element);return(t=S.hasParent(e.target,t)?e.target:t).dispatchEvent(n),this},enable:function(t){return this.enabled=t,this},dispose:function(){var t,e;for(S.toggleBehavior(this.element,this.options.behavior,!1),t=-1;e=this.eventHandlers[++t];)S.off(this.element,e.gesture,e.handler);return this.eventHandlers=[],Jt.off(this.element,le[L],this.eventStartHandler),null}},te=!(Zt="drag"),A.gestures.Drag={name:Zt,index:50,handler:function(t,e){var n=x.current;if(!(0<e.options.dragMaxTouches&&t.touches.length>e.options.dragMaxTouches))switch(t.eventType){case L:te=!1;break;case fe:if(t.distance<e.options.dragMinDistance&&n.name!=Zt)return;var i=n.startEvent.center,i=(n.name!=Zt&&(n.name=Zt,e.options.dragDistanceCorrection&&0<t.distance&&(o=Math.abs(e.options.dragMinDistance/t.distance),i.pageX+=t.deltaX*o,i.pageY+=t.deltaY*o,i.clientX+=t.deltaX*o,i.clientY+=t.deltaY*o,t=x.extendEventData(t))),(n.lastEvent.dragLockToAxis||e.options.dragLockToAxis&&e.options.dragLockMinDistance<=t.distance)&&(t.dragLockToAxis=!0),n.lastEvent.direction),o=(t.dragLockToAxis&&i!==t.direction&&(S.isVertical(i)?t.direction=t.deltaY<0?"up":ce:t.direction=t.deltaX<0?"left":"right"),te||(e.trigger(Zt+"start",t),te=!0),e.trigger(Zt,t),e.trigger(Zt+t.direction,t),S.isVertical(t.direction));(e.options.dragBlockVertical&&o||e.options.dragBlockHorizontal&&!o)&&t.preventDefault();break;case pe:te&&t.changedLength<=e.options.dragMaxTouches&&(e.trigger(Zt+"end",t),te=!1);break;case O:te=!1}},defaults:{dragMinDistance:10,dragDistanceCorrection:!0,dragMaxTouches:1,dragBlockHorizontal:!1,dragBlockVertical:!1,dragLockToAxis:!1,dragLockMinDistance:25}},A.gestures.Gesture={name:"gesture",index:1337,handler:function(t,e){e.trigger(this.name,t)}},ee="hold",A.gestures.Hold={name:ee,index:10,defaults:{holdTimeout:500,holdThreshold:2},handler:function(t,e){var n=e.options,i=x.current;switch(t.eventType){case L:clearTimeout(ne),i.name=ee,ne=setTimeout(function(){i&&i.name==ee&&e.trigger(ee,t)},n.holdTimeout);break;case fe:t.distance>n.holdThreshold&&clearTimeout(ne);break;case pe:clearTimeout(ne)}}},A.gestures.Release={name:"release",index:1/0,handler:function(t,e){t.eventType==pe&&e.trigger(this.name,t)}},A.gestures.Swipe={name:"swipe",index:40,defaults:{swipeMinTouches:1,swipeMaxTouches:1,swipeVelocityX:.6,swipeVelocityY:.6},handler:function(t,e){var n,i;t.eventType!=pe||(n=t.touches.length)<(i=e.options).swipeMinTouches||n>i.swipeMaxTouches||(t.velocityX>i.swipeVelocityX||t.velocityY>i.swipeVelocityY)&&(e.trigger(this.name,t),e.trigger(this.name+t.direction,t))}},ie=!1,A.gestures.Tap={name:"tap",index:100,handler:function(t,e){var n,i,o=e.options,a=x.current,r=x.previous;switch(t.eventType){case L:ie=!1;break;case fe:ie=ie||t.distance>o.tapMaxDistance;break;case O:!S.inStr(t.srcEvent.type,"cancel")&&t.deltaTime<o.tapMaxTime&&!ie&&(n=r&&r.lastEvent&&t.timeStamp-r.lastEvent.timeStamp,i=!1,r&&"tap"==r.name&&n&&n<o.doubleTapInterval&&t.distance<o.doubleTapDistance&&(e.trigger("doubletap",t),i=!0),i&&!o.tapAlways||(a.name="tap",e.trigger(a.name,t)))}},defaults:{tapMaxTime:250,tapMaxDistance:10,tapAlways:!0,doubleTapDistance:20,doubleTapInterval:300}},A.gestures.Touch={name:"touch",index:-1/0,defaults:{preventDefault:!1,preventMouse:!1},handler:function(t,e){e.options.preventMouse&&t.pointerType==ue?t.stopDetect():(e.options.preventDefault&&t.preventDefault(),t.eventType==me&&e.trigger("touch",t))}},ae=!(oe="transform"),A.gestures.Transform={name:oe,index:45,defaults:{transformMinScale:.01,transformMinRotation:1},handler:function(t,e){switch(t.eventType){case L:ae=!1;break;case fe:if(t.touches.length<2)return;var n=Math.abs(1-t.scale),i=Math.abs(t.rotation);if(n<e.options.transformMinScale&&i<e.options.transformMinRotation)return;x.current.name=oe,ae||(e.trigger(oe+"start",t),ae=!0),e.trigger(oe,t),i>e.options.transformMinRotation&&e.trigger("rotate",t),n>e.options.transformMinScale&&(e.trigger("pinch",t),e.trigger("pinch"+(t.scale<1?"in":"out"),t));break;case pe:ae&&t.changedLength<2&&(e.trigger(oe+"end",t),ae=!1)}}};function _e(e,n){["id","class","animation"].forEach(function(t){return Object.prototype.hasOwnProperty.call(n,t)&&e.setAttribute(t,n[t])}),n.modifier&&b.addModifier(e,n.modifier)}function be(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},e=s({},e);return"string"==typeof t?e.message=t:e=t,e&&(e.message||e.messageHTML)||b.throw("Notifications must contain a message"),(Object.prototype.hasOwnProperty.call(e,"buttonLabels")||Object.prototype.hasOwnProperty.call(e,"buttonLabel"))&&(e.buttonLabels=e.buttonLabels||e.buttonLabel,Array.isArray(e.buttonLabels)||(e.buttonLabels=[e.buttonLabels||""])),b.extend({compile:function(t){return t},callback:function(t){return t},animation:"default",cancelable:!1,primaryButtonIndex:(e.buttonLabels||n.buttonLabels||[]).length-1},n,e)}function ye(n){function t(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"Function";b.throw('"options.'.concat(t,'" must be an instance of ').concat(e))}function e(t){return Object.hasOwnProperty.call(n,t)}function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Function;return n[t]instanceof e}var o="buttons",a="callback",r="compile",s="destroy";e(o)&&i(o,Array)||t(o,"Array"),e(a)&&!i(a)&&t(a),e(r)&&!i(r)&&t(r),e(s)&&!i(s)&&t(s)}function ke(){Pe._visible=!0,Pe.emit("show")}function we(){Pe._visible=!1,Pe.emit("hide")}function Ee(){b.warn("ons-keyboard: Cordova Keyboard plugin is not present.")}var Ce,Ae=new(function(){function t(){l(this,t),this.queue=[]}return c(t,[{key:"add",value:function(t,e){var n=this;this.queue.push(t),1===this.queue.length&&setImmediate(this.queue[0]),e.then(function(){n.queue.shift(),0<n.queue.length&&setTimeout(n.queue[0],1e3/30)})}}]),t}()),Se={_createAlertDialog:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Promise(function(n){function i(){r.dialog.onDialogCancel&&r.dialog.removeEventListener("dialogcancel",r.dialog.onDialogCancel),Object.keys(r).forEach(function(t){return delete r[t]}),r=null,o.destroy instanceof Function&&o.destroy()}var o=be.apply(void 0,e),t=(b.checkMissingImport("AlertDialog","AlertDialogButton"),""),a=(o.isPrompt&&(t='\n <input\n class="text-input text-input--underbar"\n type="'.concat(o.inputType||"text",'"\n placeholder="').concat(o.placeholder||"",'"\n value="').concat(o.defaultValue||"",'"\n style="width: 100%; margin-top: 10px;"\n />\n ')),""),r=(o.buttonLabels.forEach(function(t,e){a+='\n <ons-alert-dialog-button\n class="\n '.concat(e===o.primaryButtonIndex?" alert-dialog-button--primal":"","\n ").concat(o.buttonLabels.length<=2?" alert-dialog-button--rowfooter":"",'\n "\n style="position: relative;">\n ').concat(t,"\n </ons-alert-dialog-button>\n ")}),{});r.dialog=document.createElement("ons-alert-dialog"),r.dialog.innerHTML='\n <div class="alert-dialog-mask"\n style="\n '.concat(o.maskColor?"background-color: "+o.maskColor:"",'\n "></div>\n <div class="alert-dialog">\n <div class="alert-dialog-container">\n <div class="alert-dialog-title">\n ').concat(o.title||"",'\n </div>\n <div class="alert-dialog-content">\n ').concat(o.message||o.messageHTML,"\n ").concat(t,'\n </div>\n <div class="\n alert-dialog-footer\n ').concat(o.buttonLabels.length<=2?" alert-dialog-footer--rowfooter":"",'\n ">\n ').concat(a,"\n </div>\n </div>\n </div>\n "),M(r.dialog),_e(r.dialog,o),o.isPrompt&&(r.input=r.dialog.querySelector(".text-input"),o.submitOnEnter&&(r.input.onkeypress=function(t){13===t.keyCode&&r.dialog.hide().then(function(){var t;r&&(t=r.input.value,i(),o.callback(t),n(t))})})),r.footer=r.dialog.querySelector(".alert-dialog-footer"),b.arrayFrom(r.dialog.querySelectorAll(".alert-dialog-button")).forEach(function(t,e){t.onclick=function(){r.dialog.hide().then(function(){var t;r&&(t=e,o.isPrompt&&(t=e===o.primaryButtonIndex?r.input.value:null),r.dialog.remove(),i(),o.callback(t),n(t))})},r.footer.appendChild(t)}),o.cancelable&&(r.dialog.cancelable=!0,r.dialog.onDialogCancel=function(){setImmediate(function(){r.dialog.remove(),i()});var t=o.isPrompt?null:-1;o.callback(t),n(t)},r.dialog.addEventListener("dialogcancel",r.dialog.onDialogCancel,!1)),document.body.appendChild(r.dialog),o.compile(r.dialog),setImmediate(function(){r.dialog.show().then(function(){var t;r.input&&o.isPrompt&&o.autofocus&&(t=r.input.value.length,r.input.focus(),r.input.type&&["text","search","url","tel","password"].includes(r.input.type)&&r.input.setSelectionRange(t,t))})})})},alert:function(t,e){return Se._createAlertDialog(t,e,{buttonLabels:["OK"],title:"Alert"})},confirm:function(t,e){return Se._createAlertDialog(t,e,{buttonLabels:["Cancel","OK"],title:"Confirm"})},prompt:function(t,e){return Se._createAlertDialog(t,e,{buttonLabels:["OK"],title:"Alert",isPrompt:!0,autofocus:!0,submitOnEnter:!0})}},xe=(Se.toast=function(a,r){var s=new Promise(function(e){b.checkMissingImport("Toast"),r=be(a,r,{timeout:0,force:!1});function t(t){i&&o().then(function(){i&&(i.remove(),i=null,r.callback(t),e(t))})}function n(){i.parentElement&&i.show(r).then(function(){r.timeout&&setTimeout(function(){return t(-1)},r.timeout)})}var i=b.createElement("\n <ons-toast>\n ".concat(r.message,"\n ").concat(r.buttonLabels?"<button>".concat(r.buttonLabels[0],"</button>"):"","\n </ons-toast>\n ")),o=(_e(i,r),i.hide.bind(i));r.buttonLabels&&(b.findChild(i._toast,"button").onclick=function(){return t(0)}),i.hide=function(){return t(-1)},document.body.appendChild(i),r.compile(i);setImmediate(function(){return r.force?n():Ae.add(n,s)})});return s},yt.mixin(Ft={_isPortrait:!1,isPortrait:function(){return this._isPortrait()},isLandscape:function(){return!this.isPortrait()},_init:function(){return document.addEventListener("DOMContentLoaded",this._onDOMContentLoaded.bind(this),!1),"orientation"in window?window.addEventListener("orientationchange",this._onOrientationChange.bind(this),!1):window.addEventListener("resize",this._onResize.bind(this),!1),this._isPortrait=function(){return window.innerHeight>window.innerWidth},this},_onDOMContentLoaded:function(){this._installIsPortraitImplementation(),this.emit("change",{isPortrait:this.isPortrait()})},_installIsPortraitImplementation:function(){var t=window.innerWidth<window.innerHeight;"orientation"in window?window.orientation%180==0?this._isPortrait=function(){return 0===Math.abs(window.orientation%180)?t:!t}:this._isPortrait=function(){return 90===Math.abs(window.orientation%180)?t:!t}:this._isPortrait=function(){return window.innerHeight>window.innerWidth}},_onOrientationChange:function(){var n=this,i=this._isPortrait(),o=0,a=setInterval(function(){o++;var t=window.innerWidth,e=window.innerHeight;(i&&t<=e||!i&&e<=t||50===o)&&(n.emit("change",{isPortrait:i}),clearInterval(a))},20)},_onResize:function(){this.emit("change",{isPortrait:this.isPortrait()})}}),Ft._init()),t={add:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return n.forEach(function(t){return b.addModifier(e,t)})},remove:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return n.forEach(function(t){return b.removeModifier(e,t)})},contains:b.hasModifier,toggle:b.toggleModifier},Pe=new yt,Le=(Pe._visible=!1,document.addEventListener("deviceready",function(){("undefined"!=typeof Keyboard?(Keyboard.onshow=ke,Keyboard.onhide=we,Pe.emit("init",{visible:Keyboard.isVisible}),0):void 0===cordova.plugins||void 0===cordova.plugins.Keyboard||(window.addEventListener("native.keyboardshow",ke),window.addEventListener("native.keyboardhide",we),Pe.emit("init",{visible:cordova.plugins.Keyboard.isVisible}),0))&&((document.querySelector("[ons-keyboard-active]")||document.querySelector("[ons-keyboard-inactive]"))&&Ee(),Pe.on=Ee)}),Ce=0,function(){return Ce++}),Oe=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};l(this,e),this._lockList=[],this._waitList=[],this._log=t.log||function(){}}return c(e,[{key:"lock",value:function(){function t(){e._unlock(t)}var e=this;return t.id=Le(),this._lockList.push(t),this._log("lock: "+t.id),t}},{key:"_unlock",value:function(t){var e=this._lockList.indexOf(t);if(-1===e)throw new Error("This function is not registered in the lock list.");this._lockList.splice(e,1),this._log("unlock: "+t.id),this._tryToFreeWaitList()}},{key:"_tryToFreeWaitList",value:function(){for(;!this.isLocked()&&0<this._waitList.length;)this._waitList.shift()()}},{key:"waitUnlock",value:function(t){if(!(t instanceof Function))throw new Error("The callback param must be a function.");this.isLocked()?this._waitList.push(t):t()}},{key:"isLocked",value:function(){return 0<this._lockList.length}}]),e}();function Me(t,e,n){var i=t.page,o=t.parent;t.params,k.getPageHTMLAsync(i).then(function(t){t=b.createElement(t);o.appendChild(t),e(t)}).catch(function(t){return n(t)})}function Te(t){t._destroy instanceof Function?t._destroy():t.remove()}function Ie(t){b.throw("This method must be called ".concat(t?"after":"before"," ons.isReady() is true"))}var De,Ne=function(){function n(t,e){l(this,n),this._loader=t instanceof Function?t:Me,this._unloader=e instanceof Function?e:Te}return c(n,[{key:"internalLoader",get:function(){return this._loader},set:function(t){if(!(t instanceof Function))throw Error("First parameter must be an instance of Function");this._loader=t}},{key:"load",value:function(t,e,n){var i=t.page,o=t.parent,t=t.params;this._loader({page:i,parent:o,params:void 0===t?{}:t},function(t){if(!(t instanceof Element))throw Error("pageElement must be an instance of Element.");e(t)},n)}},{key:"unload",value:function(t){if(!(t instanceof Element))throw Error("pageElement must be an instance of Element.");this._unloader(t)}}]),n}(),Be=new Ne,Re=new Ne(function(t,e){var n=t.page,i=t.parent,t=(t.params,b.createElement(n.trim()));i.appendChild(t),e(t)},Te),T={animit:C,defaultPageLoader:Be,elements:i,GestureDetector:A,modifier:t,notification:Se,orientation:xe,pageAttributeExpression:Xt,PageLoader:Ne,platform:r,softwareKeyboard:Pe,_autoStyle:g,_internal:k,_readyLock:new Oe,_util:b};T.platform.select((window.location.search.match(/platform=([\w-]+)/)||[])[1]),De=T._readyLock.lock(),window.addEventListener("DOMContentLoaded",function(){T.isWebView()?window.document.addEventListener("deviceready",De,{once:!0}):De()},{once:!0});T.isReady=function(){return!T._readyLock.isLocked()},T.isWebView=T.platform.isWebView,T.ready=function(t){T.isReady()?t():T._readyLock.waitUnlock(t)},T.setDefaultDeviceBackButtonListener=function(t){T.isReady()||Ie(!0),T._defaultDeviceBackButtonHandler.setListener(t)},T.disableDeviceBackButtonHandler=function(){T.isReady()||Ie(!0),k.dbbDispatcher.disable()},T.enableDeviceBackButtonHandler=function(){T.isReady()||Ie(!0),k.dbbDispatcher.enable()},T.fireDeviceBackButtonEvent=function(){k.dbbDispatcher.fireDeviceBackButtonEvent()},T.enableAutoStatusBarFill=function(){T.isReady()&&Ie(!1),k.config.autoStatusBarFill=!0},T.disableAutoStatusBarFill=function(){T.isReady()&&Ie(!1),k.config.autoStatusBarFill=!1},T.mockStatusBar=function(){T.isReady()&&Ie(!1);function t(){var t,e,n,i;document.body.children[0]&&document.body.children[0].classList.contains("ons-status-bar-mock")||(i=function(t){return'<i class="'.concat(t.split("-")[0]," ").concat(t,'"></i>')},e=(t=r.isAndroid())?"".concat(i("zmdi-twitter")," ").concat(i("zmdi-google-play")):"No SIM ".concat(i("fa-wifi")),n=t?"":"12:28 PM",i=t?"".concat(i("zmdi-network")," ").concat(i("zmdi-wifi")," ").concat(i("zmdi-battery")," 12:28 PM"):"80% ".concat(i("fa-battery-three-quarters")),document.body.insertBefore(b.createElement('<div class="ons-status-bar-mock '.concat(t?"android":"ios",'">')+"<div>".concat(e,"</div><div>").concat(n,"</div><div>").concat(i,"</div>")+"</div>"),document.body.firstChild))}document.body?t():k.waitDOMContentLoaded(t)},T.disableAnimations=function(){k.config.animationsDisabled=!0},T.enableAnimations=function(){k.config.animationsDisabled=!1},T._disableWarnings=function(){k.config.warningsDisabled=!0},T._enableWarnings=function(){k.config.warningsDisabled=!1},T.disableAutoStyling=g.disable,T.enableAutoStyling=g.enable,T.disableIconAutoPrefix=function(){b.checkMissingImport("Icon"),i.Icon.setAutoPrefix(!1)},T.forcePlatformStyling=function(t){T.enableAutoStyling(),T.platform.select(t||"ios"),T._util.arrayFrom(document.querySelectorAll("*")).forEach(function(t){"ons-if"===t.tagName.toLowerCase()?t._platformUpdate():t.tagName.match(/^ons-/i)&&(g.prepare(t,!0),"ons-tabbar"===t.tagName.toLowerCase()&&t._updatePosition())})},T.preload=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];return Promise.all((t instanceof Array?t:[t]).map(function(t){return"string"!=typeof t&&b.throw("Expected string arguments but got "+o(t)),k.getTemplateHTMLAsync(t)}))},T.createElement=function(t){function e(t){return(t=T._util.createElement(t)).remove(),n.append&&((n.append instanceof HTMLElement?n.append:document.body).insertBefore(t,n.insertBefore||null),n.link instanceof Function&&n.link(t)),t}var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"<"===(t=t.trim()).charAt(0)?e(t):k.getPageHTMLAsync(t).then(e)},T.createPopover=T.createDialog=T.createAlertDialog=function(t){return T.createElement(t,s({append:!0},1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}))},T.openActionSheet=function(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(n){b.checkMissingImport("ActionSheet"),ye(r);function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:-1;o&&(r.destroy&&r.destroy(o),o.removeEventListener("dialogcancel",i,!1),o.remove(),o=null,r.callback&&r.callback(e),n(e))}var o=b.createElement("\n <ons-action-sheet\n ".concat(r.title?'title="'.concat(r.title,'"'):"","\n ").concat(r.cancelable?"cancelable":"","\n ").concat(r.modifier?'modifier="'.concat(r.modifier,'"'):"","\n ").concat(r.maskColor?'mask-color="'.concat(r.maskColor,'"'):"","\n ").concat(r.id?'id="'.concat(r.id,'"'):"","\n ").concat(r.class?'class="'.concat(r.class,'"'):"",'\n >\n <div class="action-sheet"></div>\n </ons-action-sheet>\n ')),a=(o.addEventListener("dialogcancel",i,!1),document.createDocumentFragment());r.buttons.forEach(function(t,e){t="string"==typeof t?{label:t}:s({},t),r.destructive===e&&(t.modifier=(t.modifier||"")+" destructive"),t=b.createElement("\n <ons-action-sheet-button\n ".concat(t.icon?'icon="'.concat(t.icon,'"'):"","\n ").concat(t.modifier?'modifier="'.concat(t.modifier,'"'):"","\n >\n ").concat(t.label,"\n </ons-action-sheet-button>\n "));t.onclick=function(t){return o.hide().then(function(){return i(t,e)})},a.appendChild(t)}),b.findChild(o,".action-sheet").appendChild(a),document.body.appendChild(o),r.compile&&r.compile(el.dialog),setImmediate(function(){return o.show({animation:r.animation,animationOptions:r.animationOptions})})})},T.resolveLoadingPlaceholder=function(e,n){var t=T._util.arrayFrom(window.document.querySelectorAll("[ons-loading-placeholder]"));0===t.length&&b.throw("No ons-loading-placeholder exists"),t.filter(function(t){return!t.getAttribute("page")}).forEach(function(t){t.setAttribute("ons-loading-placeholder",e),T._resolveLoadingPlaceholder(t,e,n)})},T._setupLoadingPlaceHolders=function(){T.ready(function(){T._util.arrayFrom(window.document.querySelectorAll("[ons-loading-placeholder]")).forEach(function(t){var e=t.getAttribute("ons-loading-placeholder");"string"==typeof e&&T._resolveLoadingPlaceholder(t,e)})})},T._resolveLoadingPlaceholder=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(t,e){return e()};t&&T.createElement(t).then(function(t){t.style.display="none",e.appendChild(t),n(t,function(){for(;e.firstChild&&e.firstChild!==t;)e.removeChild(e.firstChild);t.style.display=""})}).catch(function(t){return Promise.reject("Unabled to resolve placeholder: "+t)})};var He="currentScript"in document?function(){return document.currentScript}:function(){return document.scripts[document.scripts.length-1]};function qe(){var t;return"function"!=typeof HTMLElement?((t=function(){}).prototype=document.createElement("div"),t):HTMLElement}T.getScriptPage=function(){return He()&&/ons-page/i.test(He().parentElement.tagName)&&He().parentElement||null};function I(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;return"translate3d(".concat(t,", ").concat(e,", ").concat(n,")")}function ze(t){"ONS-PAGE"!==t.nodeName&&b.throw("Only page elements can be children of navigator")}function Fe(t,e){b.throw('"'.concat(t,'" must be ').concat(e))}function je(t,e,n){return(1-n)*t+n*e}var Ve,e,D=function(){d(e,qe());var t=f(e);function e(){return l(this,e),t.call(this)}return c(e)}(),t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),M(a(t=e.call(this)),function(){if(null!==r._getSelectedPlatform())t._platformUpdate();else if(!t._isAllowedPlatform()){for(;t.childNodes[0];)t.childNodes[0].remove();t._platformUpdate()}}),t._onOrientationChange(),t}return c(n,[{key:"connectedCallback",value:function(){xe.on("change",this._onOrientationChange.bind(this))}},{key:"attributeChangedCallback",value:function(t){"orientation"===t&&this._onOrientationChange()}},{key:"disconnectedCallback",value:function(){xe.off("change",this._onOrientationChange)}},{key:"_platformUpdate",value:function(){this.style.display=this._isAllowedPlatform()?"":"none"}},{key:"_isAllowedPlatform",value:function(){return!this.getAttribute("platform")||0<=this.getAttribute("platform").split(/\s+/).indexOf(r.getMobileOS())}},{key:"_onOrientationChange",value:function(){var t,e;this.hasAttribute("orientation")&&this._isAllowedPlatform()&&(t=this.getAttribute("orientation").toLowerCase(),e=xe.isPortrait()?"portrait":"landscape",this.style.display=t===e?"":"none")}}],[{key:"observedAttributes",get:function(){return["orientation"]}}]),n}(),We=(i.If=t,customElements.define("ons-if",t),function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};l(this,e),this.timing=t.timing||"linear",this.duration=t.duration||0,this.delay=t.delay||0,this.def={timing:this.timing,duration:this.duration,delay:this.delay}}return c(e,null,[{key:"extend",value:function(){function t(){n.apply(this,arguments),b.extend(this,e)}var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=this;return t.prototype=this.prototype,t}}]),e}()),N={isIPhoneXPortraitPatchActive:function(){return null!=document.documentElement.getAttribute("onsflag-iphonex-portrait")&&window.innerWidth<window.innerHeight},isIPhoneXLandscapePatchActive:function(){return null!=document.documentElement.getAttribute("onsflag-iphonex-landscape")&&window.innerWidth>=window.innerHeight},getSafeAreaLengths:function(){var t=N.isIPhoneXPortraitPatchActive()?{top:44,right:0,bottom:34,left:0}:N.isIPhoneXLandscapePatchActive()?{top:0,right:44,bottom:21,left:44}:{top:0,right:0,bottom:0,left:0};return t},getSafeAreaDOMRect:function(){var t=N.isIPhoneXPortraitPatchActive()?{x:0,y:44,width:window.innerWidth,height:window.innerHeight-78}:N.isIPhoneXLandscapePatchActive()?{x:44,y:0,width:window.innerWidth-88,height:window.innerHeight-21}:{x:0,y:0,width:window.innerWidth,height:window.innerHeight};return s(s({},t),{},{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}},Xe=function(){d(o,We);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"linear":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.2:t;return l(this,o),i.call(this,{timing:e,delay:n,duration:t})}return c(o,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),o}(),Ue=function(){d(o,Xe);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"ease":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.4:t;return l(this,o),(e=i.call(this,{timing:e,delay:n,duration:t})).maskTiming="linear",e.maskDuration=.2,e}return c(o,[{key:"show",value:function(t,e){C.runAll(C(t._mask).queue({opacity:0}).wait(this.delay).queue({opacity:1},{duration:this.maskDuration,timing:this.maskTiming}),C(t._sheet,this.def).default({transform:"translate3d(0, 80%, 0)",opacity:0},{transform:"translate3d(0, 0, 0)",opacity:1}).queue(function(t){e&&e(),t()}))}},{key:"hide",value:function(t,e){C.runAll(C(t._mask).queue({opacity:1}).wait(this.delay).queue({opacity:0},{duration:this.maskDuration,timing:this.maskTiming}),C(t._sheet,this.def).default({transform:"translate3d(0, 0, 0)",opacity:1},{transform:"translate3d(0, 80%, 0)",opacity:0}).queue(function(t){e&&e(),t()}))}}]),o}(),Ye=function(){d(o,Xe);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"ease":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.3:t;return l(this,o),(e=i.call(this,{timing:e,delay:n,duration:t})).maskTiming="linear",e.maskDuration=.2,N.isIPhoneXPortraitPatchActive()?e.liftAmount="calc(100% + 48px)":N.isIPhoneXLandscapePatchActive()?e.liftAmount="calc(100% + 33px)":e.liftAmount=document.body.clientHeight/2-1+"px",e}return c(o,[{key:"show",value:function(t,e){C.runAll(C(t._mask).queue({opacity:0}).wait(this.delay).queue({opacity:1},{duration:this.maskDuration,timing:this.maskTiming}),C(t._sheet,this.def).default({transform:"translate3d(0, ".concat(this.liftAmount,", 0)")},{transform:"translate3d(0, 0, 0)"}).queue(function(t){e&&e(),t()}))}},{key:"hide",value:function(t,e){C.runAll(C(t._mask).queue({opacity:1}).wait(this.delay).queue({opacity:0},{duration:this.maskDuration,timing:this.maskTiming}),C(t._sheet,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(0, ".concat(this.liftAmount,", 0)")}).queue(function(t){e&&e(),t()}))}}]),o}(),$e=function(){d(n,D);var t=f(n);function n(){var e;return l(this,n),(e=t.call(this)).constructor===n&&b.throwAbstract(),e._visible=!1,e._doorLock=new Oe,e._cancel=e._cancel.bind(a(e)),e._selfCamelName=b.camelize(e.tagName.slice(4)),e._defaultDBB=function(t){return e.cancelable?e._cancel():t.callParentHandler()},e._animatorFactory=e._updateAnimatorFactory(),e}return c(n,[{key:"_scheme",get:function(){b.throwMember()}},{key:"_updateAnimatorFactory",value:function(){b.throwMember()}},{key:"_toggleStyle",value:function(t){this.style.display=t?"block":"none"}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler},set:function(t){this._backButtonHandler&&this._backButtonHandler.destroy(),this._backButtonCallback=t,this._backButtonHandler=Yt.createHandler(this,t)}},{key:"_cancel",value:function(){var t=this;this.cancelable&&!this._running&&(this._running=!0,this.hide().then(function(){t._running=!1,b.triggerElementEvent(t,"dialogcancel"),b.triggerElementEvent(t,"dialog-cancel")},function(){return t._running=!1}))}},{key:"show",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this._setVisible.apply(this,[!0].concat(n)).then(function(t){return e.visible=!0,t})}},{key:"hide",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this._setVisible.apply(this,[!1].concat(n)).then(function(t){return e.visible=!1,t})}},{key:"toggle",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return this._setVisible.apply(this,[!this.visible].concat(n)).then(function(t){return e.visible=e._visible,t})}},{key:"_setVisible",value:function(i){var t,o=this,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=i?"show":"hide",e=((a=s({},a)).animationOptions=b.extend(a.animationOptions||{},this.animationOptions),!1);return b.triggerElementEvent(this,"pre".concat(r),(H(t={},this._selfCamelName,this),H(t,"cancel",function(){return e=!0}),t)),e?Promise.reject("Canceled in pre".concat(r," event.")):new Promise(function(n){o._doorLock.waitUnlock(function(){var t=o._doorLock.lock(),e=o._animatorFactory.newAnimator(a);i&&o._toggleStyle(!0,a),o._visible=i,b.iosPageScrollFix(i),M(o,function(){e[r](o,function(){i||o._toggleStyle(!1,a),t(),b.propagateAction(o,"_"+r),b.triggerElementEvent(o,"post"+r,H({},o._selfCamelName,o)),a.callback instanceof Function&&a.callback(o),n(o)})})})})}},{key:"maskColor",get:function(){return this.getAttribute("mask-color")},set:function(t){null==t?this.removeAttribute("mask-color"):this.setAttribute("mask-color",t)}},{key:"animationOptions",get:function(){return w.parseAnimationOptionsString(this.getAttribute("animation-options"))},set:function(t){null==t?this.removeAttribute("animation-options"):this.setAttribute("animation-options",JSON.stringify(t))}},{key:"_updateMask",value:function(){var t=this;M(this,function(){t._mask&&(t._mask.style.backgroundColor=t.maskColor)})}},{key:"_updateAnimation",value:function(){this._animatorFactory=this._updateAnimatorFactory()}},{key:"connectedCallback",value:function(){var t=this;"function"==typeof this._backButtonCallback?this.onDeviceBackButton=this._backButtonCallback:"function"==typeof this._defaultDBB&&(this.onDeviceBackButton=this._defaultDBB.bind(this)),M(this,function(){t._mask&&t._mask.addEventListener("click",t._cancel,!1)})}},{key:"disconnectedCallback",value:function(){this._backButtonHandler&&(this._backButtonHandler.destroy(),this._backButtonHandler=null),this._mask&&this._mask.removeEventListener("click",this._cancel,!1)}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"modifier":v.onModifierChanged(e,n,this,this._scheme);break;case"animation":this._updateAnimation();break;case"mask-color":this._updateMask();break;case"visible":this.visible!==this._visible&&(this._updateMask(),this._updateAnimation(),M(this,function(){i._setVisible(i.visible)}))}}}],[{key:"observedAttributes",get:function(){return["modifier","animation","mask-color","visible"]}},{key:"events",get:function(){return["preshow","postshow","prehide","posthide","dialogcancel","dialog-cancel"]}}]),n}(),Ge=(b.defineBooleanProperties($e,["visible","disabled","cancelable"]),{".action-sheet":"action-sheet--*",".action-sheet-mask":"action-sheet-mask--*",".action-sheet-title":"action-sheet-title--*"}),Ke={default:function(){return r.isAndroid()?Ue:Ye},none:Xe},t=function(){d(i,$e);var e=f(i);function i(){var t;return l(this,i),M(a(t=e.call(this)),function(){return t._compile()}),t}return c(i,[{key:"_scheme",get:function(){return Ge}},{key:"_mask",get:function(){return b.findChild(this,".action-sheet-mask")}},{key:"_sheet",get:function(){return b.findChild(this,".action-sheet")}},{key:"_title",get:function(){return this.querySelector(".action-sheet-title")}},{key:"_updateAnimatorFactory",value:function(){return new w({animators:Ke,baseClass:Xe,baseClassName:"ActionSheetAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){if(g.prepare(this),this.style.display="none",this.style.zIndex=10001,!this._sheet){var t=document.createElement("div");for(t.classList.add("action-sheet");this.firstChild;)t.appendChild(this.firstChild);this.appendChild(t)}var e;this._title||((e=document.createElement("div")).classList.add("action-sheet-title"),this.title?e.innerHTML=this.title:e.hidden=!0,this._sheet.insertBefore(e,this._sheet.firstChild)),this._mask||((e=document.createElement("div")).classList.add("action-sheet-mask"),this.insertBefore(e,this.firstChild)),this._sheet.style.zIndex=20001,this._mask.style.zIndex=2e4,v.initModifier(this,this._scheme)}},{key:"_updateTitle",value:function(){this._title&&(this.title?(this._title.innerHTML=this.title,this._title.hidden=!1):this._title.hidden=!0)}},{key:"title",get:function(){return this.getAttribute("title")},set:function(t){null==t?this.removeAttribute("title"):this.setAttribute("title",t)}},{key:"attributeChangedCallback",value:function(t,e,n){"title"===t?this._updateTitle():p(h(i.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(m(p(h(i),"observedAttributes",this)),["title"])}},{key:"registerAnimator",value:function(t,e){e.prototype instanceof Xe||b.throwAnimator("ActionSheet"),Ke[t]=e}},{key:"animators",get:function(){return Ke}},{key:"ActionSheetAnimator",get:function(){return Xe}}]),i}(),Je=(i.ActionSheet=t,customElements.define("ons-action-sheet",t),function(){function t(){l(this,t),this._queue=[],this._index=0}return c(t,[{key:"animate",value:function(i,o){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:200,r=(new Date).getTime(),s={},l=!1,n=!1,c=!1,u=Object.keys(o),d={stop:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=(c&&clearTimeout(c),Math.min(1,((new Date).getTime()-r)/a));return u.forEach(function(t){i.style[t]=(1-e)*s[t]+e*o[t]+("opacity"==t?"":"px")}),i.style.transitionDuration="0s",t.stopNext?n=!1:l||(l=!0,n&&n()),d},then:function(t){return n=t,l&&n&&n(),d},speed:function(t){var e,n;return k.config.animationsDisabled&&(t=0),l||(c&&clearTimeout(c),t=t*(1-(e=((new Date).getTime()-r)/a)),u.forEach(function(t){i.style[t]=(1-e)*s[t]+e*o[t]+("opacity"==t?"":"px")}),n=window.getComputedStyle(i),u.forEach(n.getPropertyValue.bind(n)),i.offsetHeight,r=i.speedUpTime,a=t,i.style.transitionDuration=a/1e3+"s",u.forEach(function(t){i.style[t]=o[t]+("opacity"==t?"":"px")}),c=setTimeout(d.stop,t)),d},finish:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:50,e=((new Date).getTime()-r)/a;return d.speed(t/(1-e)),d}};if(i.hasAttribute("disabled")||l||k.config.animationsDisabled)return d;var h=window.getComputedStyle(i);return u.forEach(function(t){var e=parseFloat(h.getPropertyValue(t));s[t]=isNaN(e)?0:e}),l||(i.style.transitionProperty=u.join(","),i.style.transitionDuration=a/1e3+"s",u.forEach(function(t){i.style[t]=o[t]+("opacity"==t?"":"px")})),c=setTimeout(d.stop,a),this._onStopAnimations(i,d.stop),d}},{key:"_onStopAnimations",value:function(e,n){var i=this._queue,o=this._index++;i[e]=i[e]||[],i[e][o]=function(t){return delete i[e][o],i[e]&&0==i[e].length&&delete i[e],n(t)}}},{key:"stopAnimations",value:function(t){var e=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(Array.isArray(t))return t.forEach(function(t){e.stopAnimations(t,n)});(this._queue[t]||[]).forEach(function(t){t(n||{})})}},{key:"stopAll",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.stopAnimations(Object.keys(this._queue),t)}},{key:"fade",value:function(t){return this.animate(t,{opacity:0},1<arguments.length&&void 0!==arguments[1]?arguments[1]:200)}}]),t}()),Qe={"":"ripple--*",".ripple__wave":"ripple--*__wave",".ripple__background":"ripple--*__background"},t=function(){d(n,D);var t=f(n);function n(){var e;return l(this,n),(e=t.call(this))._onTap=e._onTap.bind(a(e)),e._onHold=e._onHold.bind(a(e)),e._onDragStart=e._onDragStart.bind(a(e)),e._onRelease=e._onRelease.bind(a(e)),M(a(e),function(){return e._compile()}),e._animator=new Je,["color","center","start-radius","background","modifier"].forEach(function(t){e.attributeChangedCallback(t,null,e.getAttribute(t))}),e}return c(n,[{key:"_compile",value:function(){this.classList.add("ripple"),this._wave=this.getElementsByClassName("ripple__wave")[0],this._background=this.getElementsByClassName("ripple__background")[0],this._background&&this._wave||(this._wave=b.create(".ripple__wave"),this._background=b.create(".ripple__background"),this.appendChild(this._wave),this.appendChild(this._background)),v.initModifier(this,Qe)}},{key:"_getEffectSize",value:function(){if(this.hasAttribute("size")){var t=this.getAttribute("size");if(-1!==["cover","contain"].indexOf(t))return t}return"cover"}},{key:"_calculateCoords",value:function(t){function e(){b.throw("Ripple invalid state")}var n,i,o,a=this.getBoundingClientRect(),r=this._getEffectSize();return this._center?(n=a.width/2,i=a.height/2,"cover"===r?o=Math.sqrt(n*n+i*i):"contain"===r?o=Math.min(n,i):e()):(n=("number"==typeof t.clientX?t:t.changedTouches[0]).clientX-a.left,i=("number"==typeof t.clientY?t:t.changedTouches[0]).clientY-a.top,t=Math.max(i,a.height-i),a=Math.max(n,a.width-n),"cover"===r?o=Math.sqrt(t*t+a*a):"contain"===r?o=Math.min(Math.round(t/2),Math.round(a/2)):e()),{x:n,y:i,r:o}}},{key:"_rippleAnimation",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:300,n=this._animator,i=this._wave,o=this._background,a=this._minR,t=this._calculateCoords(t),r=t.x,s=t.y,t=t.r;return n.stopAll({stopNext:1}),n.animate(o,{opacity:1},e),b.extend(i.style,{opacity:1,top:s-a+"px",left:r-a+"px",width:2*a+"px",height:2*a+"px"}),n.animate(i,{top:s-t,left:r-t,height:2*t,width:2*t},e)}},{key:"_updateParent",value:function(){!this._parentUpdated&&this.parentNode&&("static"===window.getComputedStyle(this.parentNode).getPropertyValue("position")&&(this.parentNode.style.position="relative"),this._parentUpdated=!0)}},{key:"_onTap",value:function(t){var e=this;this.disabled||t.ripple||(t.ripple=!0,this._updateParent(),this._rippleAnimation(t.gesture.srcEvent).then(function(){e._animator.fade(e._wave),e._animator.fade(e._background)}))}},{key:"_onHold",value:function(t){this.disabled||t.ripple||(t.ripple=!0,this._updateParent(),this._holding=this._rippleAnimation(t.gesture.srcEvent,2e3),document.addEventListener("release",this._onRelease))}},{key:"_onRelease",value:function(t){var e=this;this._holding&&!t.ripple&&(t.ripple=!0,this._holding.speed(300).then(function(){e._animator.stopAll({stopNext:!0}),e._animator.fade(e._wave),e._animator.fade(e._background)}),this._holding=!1),document.removeEventListener("release",this._onRelease)}},{key:"_onDragStart",value:function(t){if(this._holding)return this._onRelease(t);-1!=["left","right"].indexOf(t.gesture.direction)&&this._onTap(t)}},{key:"connectedCallback",value:function(){this._parentNode=this.parentNode,k.config.animationsDisabled?this.disabled=!0:(this._parentNode.addEventListener("tap",this._onTap),this._parentNode.addEventListener("hold",this._onHold),this._parentNode.addEventListener("dragstart",this._onDragStart))}},{key:"disconnectedCallback",value:function(){var t=this._parentNode||this.parentNode;t.removeEventListener("tap",this._onTap),t.removeEventListener("hold",this._onHold),t.removeEventListener("dragstart",this._onDragStart)}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":b.restoreClass(this,"ripple",Qe);break;case"modifier":v.onModifierChanged(e,n,this,Qe);break;case"start-radius":this._minR=Math.max(0,parseFloat(n)||0);break;case"color":n&&M(this,function(){i._wave.style.background=n,i.hasAttribute("background")||(i._background.style.background=n)});break;case"background":(n||e)&&M(this,"none"===n?function(){i._background.setAttribute("disabled","disabled"),i._background.style.background="transparent"}:function(){i._background.hasAttribute("disabled")&&i._background.removeAttribute("disabled"),i._background.style.background=n});break;case"center":"center"===t&&(this._center=null!=n&&"false"!=n)}}}],[{key:"observedAttributes",get:function(){return["start-radius","color","background","center","class","modifier"]}}]),n}(),Ze=(b.defineBooleanProperties(t,["disabled","center"]),i.Ripple=t,customElements.define("ons-ripple",t),function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this)).constructor===n&&b.throwAbstract(),M(a(t),function(){return t._compile()}),t}return c(n,[{key:"_scheme",get:function(){b.throwMember()}},{key:"_defaultClassName",get:function(){b.throwMember()}},{key:"_rippleOpt",get:function(){return[this]}},{key:"_icon",get:function(){return b.findChild(this,"ons-icon")}},{key:"_hiddenButton",get:function(){return b.findChild(this,"button")}},{key:"_compile",value:function(){var t;g.prepare(this),this.classList.add(this._defaultClassName),!this._icon&&this.hasAttribute("icon")&&(b.checkMissingImport("Icon"),(t=b.createElement('<ons-icon icon="'.concat(this.getAttribute("icon"),'"></ons-icon>'))).classList.add(this._defaultClassName.replace("button","icon")),this.insertBefore(t,this.firstChild)),this._hiddenButton||(t=b.createElement("<button hidden></button>"),this.appendChild(t)),this._updateRipple(),v.initModifier(this,this._scheme)}},{key:"_updateIcon",value:function(){this._icon&&this._icon.setAttribute("icon",this.getAttribute("icon"))}},{key:"_updateRipple",value:function(){this._rippleOpt&&b.updateRipple.apply(b,m(this._rippleOpt))}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":b.restoreClass(this,this._defaultClassName,this._scheme);break;case"modifier":v.onModifierChanged(e,n,this,this._scheme);break;case"icon":this._updateIcon();break;case"ripple":this.classList.contains(this._defaultClassName)&&this._updateRipple()}}}],[{key:"observedAttributes",get:function(){return["modifier","class","icon","ripple"]}}]),n}()),t=(b.defineBooleanProperties(Ze,["ripple","disabled"]),function(){d(e,Ze);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"_scheme",get:function(){return{"":"action-sheet-button--*",".action-sheet-icon":"action-sheet-icon--*"}}},{key:"_defaultClassName",get:function(){return"action-sheet-button"}},{key:"_rippleOpt",get:function(){}}]),e}()),tn=(i.ActionSheetButton=t,customElements.define("ons-action-sheet-button",t),function(){d(o,We);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"linear":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.2:t;return l(this,o),i.call(this,{timing:e,delay:n,duration:t})}return c(o,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),o}()),en=function(){d(o,tn);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"cubic-bezier(.1, .7, .4, 1)":e,n=t.duration,n=void 0===n?.2:n,t=t.delay,t=void 0===t?0:t;return l(this,o),i.call(this,{duration:n,timing:e,delay:t})}return c(o,[{key:"show",value:function(t,e){e=e||function(){},C.runAll(C(t._mask,this.def).default({opacity:0},{opacity:1}),C(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0) scale3d(.9, .9, 1)",opacity:0},{transform:"translate3d(-50%, -50%, 0) scale3d(1, 1, 1)",opacity:1}).queue(function(t){e(),t()}))}},{key:"hide",value:function(t,e){e=e||function(){},C.runAll(C(t._mask,this.def).default({opacity:1},{opacity:0}),C(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0) scale3d(1, 1, 1)",opacity:1},{transform:"translate3d(-50%, -50%, 0) scale3d(.9, .9, 1)",opacity:0}).queue(function(t){e(),t()}))}}]),o}(),nn=function(){d(o,tn);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"cubic-bezier(.1, .7, .4, 1)":e,n=t.duration,n=void 0===n?.2:n,t=t.delay,t=void 0===t?0:t;return l(this,o),i.call(this,{duration:n,timing:e,delay:t})}return c(o,[{key:"show",value:function(t,e){e=e||function(){},C.runAll(C(t._mask,this.def).default({opacity:0},{opacity:1}),C(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0) scale3d(1.3, 1.3, 1)",opacity:0},{transform:"translate3d(-50%, -50%, 0) scale3d(1, 1, 1)",opacity:1}).queue(function(t){e(),t()}))}},{key:"hide",value:function(t,e){e=e||function(){},C.runAll(C(t._mask,this.def).default({opacity:1},{opacity:0}),C(t._dialog,this.def).default({opacity:1},{opacity:0}).queue(function(t){e(),t()}))}}]),o}(),on={".alert-dialog":"alert-dialog--*",".alert-dialog-container":"alert-dialog-container--*",".alert-dialog-title":"alert-dialog-title--*",".alert-dialog-content":"alert-dialog-content--*",".alert-dialog-footer":"alert-dialog-footer--*",".alert-dialog-footer--rowfooter":"alert-dialog-footer--rowfooter--*",".alert-dialog-button--rowfooter":"alert-dialog-button--rowfooter--*",".alert-dialog-button--primal":"alert-dialog-button--primal--*",".alert-dialog-button":"alert-dialog-button--*","ons-alert-dialog-button":"alert-dialog-button--*",".alert-dialog-mask":"alert-dialog-mask--*",".text-input":"text-input--*"},an={none:tn,default:function(){return r.isAndroid()?en:nn},fade:function(){return r.isAndroid()?en:nn}},t=function(){d(n,$e);var e=f(n);function n(){var t;return l(this,n),M(a(t=e.call(this)),function(){return t._compile()}),t}return c(n,[{key:"_scheme",get:function(){return on}},{key:"_mask",get:function(){return b.findChild(this,".alert-dialog-mask")}},{key:"_dialog",get:function(){return b.findChild(this,".alert-dialog")}},{key:"_titleElement",get:function(){return b.findChild(this._dialog.children[0],".alert-dialog-title")}},{key:"_contentElement",get:function(){return b.findChild(this._dialog.children[0],".alert-dialog-content")}},{key:"_updateAnimatorFactory",value:function(){return new w({animators:an,baseClass:tn,baseClassName:"AlertDialogAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){g.prepare(this),this.style.display="none",this.style.zIndex=10001;var t,e=document.createDocumentFragment();if(!this._mask&&!this._dialog)for(;this.firstChild;)e.appendChild(this.firstChild);this._mask||((t=document.createElement("div")).classList.add("alert-dialog-mask"),this.insertBefore(t,this.children[0])),this._dialog||((t=document.createElement("div")).classList.add("alert-dialog"),this.insertBefore(t,null)),b.findChild(this._dialog,".alert-dialog-container")||((t=document.createElement("div")).classList.add("alert-dialog-container"),this._dialog.appendChild(t)),this._dialog.children[0].appendChild(e),this._dialog.style.zIndex=20001,this._mask.style.zIndex=2e4,v.initModifier(this,this._scheme)}}],[{key:"registerAnimator",value:function(t,e){e.prototype instanceof tn||b.throwAnimator("AlertDialog"),an[t]=e}},{key:"animators",get:function(){return an}},{key:"AlertDialogAnimator",get:function(){return tn}}]),n}(),t=(i.AlertDialog=t,customElements.define("ons-alert-dialog",t),function(){d(e,Ze);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"_scheme",get:function(){return{"":"alert-dialog-button--*"}}},{key:"_defaultClassName",get:function(){return"alert-dialog-button"}},{key:"_rippleOpt",get:function(){return[this,void 0,{modifier:"light-gray"}]}}]),e}()),rn=(i.AlertDialogButton=t,customElements.define("ons-alert-dialog-button",t),"back-button"),sn={"":"back-button--*",".back-button__icon":"back-button--*__icon",".back-button__label":"back-button--*__label"},t=function(){d(o,D);var i=f(o);function o(){l(this,o),M(a(t=i.call(this)),function(){t._compile()}),t._options={},t._boundOnClick=t._onClick.bind(a(t));var t,e=b.defineListenerProperty(a(t),"click"),n=e.onConnected,e=e.onDisconnected;return t._connectOnClick=n,t._disconnectOnClick=e,t}return c(o,[{key:"_updateIcon",value:function(){(0<arguments.length&&void 0!==arguments[0]?arguments[0]:b.findChild(this,".back-button__icon")).innerHTML="android"===g.getPlatform(this)||b.hasModifier(this,"material")?'\n <?xml version="1.0" encoding="UTF-8"?>\n <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>md-back-button-icon</title>\n <desc>Created with Sketch.</desc>\n <defs></defs>\n <g id="toolbar-back-button" stroke="none" stroke-width="1" fill-rule="evenodd">\n <g id="android" transform="translate(-32.000000, -32.000000)" fill-rule="nonzero">\n <polygon id="md-back-button-icon" points="48 39 35.83 39 41.42 33.41 40 32 32 40 40 48 41.41 46.59 35.83 41 48 41"></polygon>\n </g>\n </g>\n </svg>\n':'\n <?xml version="1.0" encoding="UTF-8"?>\n <svg width="13px" height="21px" viewBox="0 0 13 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>ios-back-button-icon</title>\n <desc>Created with Sketch.</desc>\n <defs></defs>\n <g id="toolbar-back-button" stroke="none" stroke-width="1" fill-rule="evenodd">\n <g id="ios" transform="translate(-34.000000, -30.000000)">\n <polygon id="ios-back-button-icon" points="34 40.5 44.5 30 46.5 32 38 40.5 46.5 49 44.5 51"></polygon>\n </g>\n </g>\n </svg>\n'}},{key:"_compile",value:function(){if(g.prepare(this),this.classList.add(rn),!b.findChild(this,".back-button__label")){for(var t=b.create("span.back-button__label");this.childNodes[0];)t.appendChild(this.childNodes[0]);this.appendChild(t)}var e;b.findChild(this,".back-button__icon")||(e=b.create("span.back-button__icon"),this._updateIcon(e),this.insertBefore(e,this.children[0])),b.updateRipple(this,void 0,{center:"",size:"contain",background:"transparent"}),v.initModifier(this,sn)}},{key:"options",get:function(){return this._options},set:function(t){this._options=t}},{key:"_onClick",value:function(e){var n=this;setTimeout(function(){var t;e.defaultPrevented||(t=b.findParent(n,"ons-navigator"))&&t.popPage(s(s({},n.options),{},{onsBackButton:!0}))})}},{key:"connectedCallback",value:function(){this.addEventListener("click",this._boundOnClick,!1),this._connectOnClick()}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":b.restoreClass(this,rn,sn);break;case"modifier":v.onModifierChanged(e,n,this,sn)&&this._updateIcon()}}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this._boundOnClick,!1),this._disconnectOnClick()}},{key:"show",value:function(){this.style.display="inline-block"}},{key:"hide",value:function(){this.style.display="none"}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),o}(),ln=(i.BackButton=t,customElements.define("ons-back-button",t),"bottom-bar"),cn={"":"bottom-bar--*"},t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this)).classList.add(ln),v.initModifier(a(t),cn),t}return c(n,[{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":b.restoreClass(this,ln,cn);break;case"modifier":v.onModifierChanged(e,n,this,cn)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(),t=(i.BottomToolbar=t,customElements.define("ons-bottom-toolbar",t),function(){d(e,Ze);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"_scheme",get:function(){return{"":"button--*"}}},{key:"_defaultClassName",get:function(){return"button"}}]),e}()),un=(i.Button=t,customElements.define("ons-button",t),{"":"card--*",".card__title":"card--*__title",".card__content":"card--*__content"}),t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),M(a(t=e.call(this)),function(){t._compile()}),t}return c(n,[{key:"_compile",value:function(){for(var t=0;t<this.children.length;t++){var e=this.children[t];e.classList.contains("title")?e.classList.add("card__title"):e.classList.contains("content")&&e.classList.add("card__content")}g.prepare(this),this.classList.add("card"),v.initModifier(this,un)}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":b.restoreClass(this,"card",un);break;case"modifier":v.onModifierChanged(e,n,this,un)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(),dn=(i.Card=t,customElements.define("ons-card",t),{"":"carousel-item--*"}),t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this)).style.width="100%",v.initModifier(a(t),dn),t}return c(n,[{key:"attributeChangedCallback",value:function(t,e,n){if("modifier"===t)return v.onModifierChanged(e,n,this,dn)}}],[{key:"observedAttributes",get:function(){return["modifier"]}}]),n}(),hn=(i.CarouselItem=t,customElements.define("ons-carousel-item",t),{vertical:{axis:"Y",size:"Height",dir:["up","down"],t3d:["0px, ","px, 0px"]},horizontal:{axis:"X",size:"Width",dir:["left","right"],t3d:["","px, 0px, 0px"]}}),fn=function(){function t(e){function n(){return!1}var i=this;l(this,t);"getInitialIndex getBubbleWidth isVertical isOverScrollable isCentered\n isAutoScrollable refreshHook preChangeHook postChangeHook overScrollHook".split(/\s+/).forEach(function(t){return i[t]=e[t]||n}),this.getElement=e.getElement,this.scrollHook=e.scrollHook,this.itemSize=e.itemSize||"100%",this.getAutoScrollRatio=function(){var t=e.getAutoScrollRatio&&e.getAutoScrollRatio.apply(e,arguments);return((t="number"==typeof t&&t==t?t:.5)<0||1<t)&&b.throw("Invalid auto-scroll-ratio "+t+". Must be between 0 and 1"),t},this.shouldBlock="other"===b.globals.actualMobileOS,this.onDragStart=this.onDragStart.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.onResize=this.onResize.bind(this),this._shouldFixScroll="ios"===b.globals.actualMobileOS}return c(t,[{key:"init",value:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=e.swipeable,e=e.autoRefresh;this.initialized=!0,this.target=this.getElement().children[0],this.blocker=this.getElement().children[1],this.target&&this.blocker||b.throw('Expected "target" and "blocker" elements to exist before initializing Swiper'),this.shouldBlock||(this.blocker.style.display="none"),this.getElement().classList.add("ons-swiper"),this.target.classList.add("ons-swiper-target"),this.blocker.classList.add("ons-swiper-blocker"),this._gestureDetector=new A(this.getElement(),{dragMinDistance:1,dragLockToAxis:!0,passive:!this._shouldFixScroll}),this._mutationObserver=new MutationObserver(function(){return t.refresh()}),this.updateSwipeable(n),this.updateAutoRefresh(e),this._scroll=this._offset=this._lastActiveIndex=0,this._updateLayout(),this._setupInitialIndex(),setImmediate(function(){return t.initialized&&t._setupInitialIndex()}),window===window.parent&&0!==this.offsetHeight||window.requestAnimationFrame(function(){return t.initialized&&t.onResize()})}},{key:"dispose",value:function(){this.initialized=!1,this.updateSwipeable(!1),this.updateAutoRefresh(!1),this._gestureDetector&&this._gestureDetector.dispose(),this.target=this.blocker=this._gestureDetector=this._mutationObserver=null,this.setupResize(!1)}},{key:"onResize",value:function(){var t=this._scroll/this.itemNumSize;this._reset(),this.setActiveIndex(t),this.refresh()}},{key:"itemCount",get:function(){return this.target.children.length}},{key:"itemNumSize",get:function(){return"number"==typeof this._itemNumSize&&this._itemNumSize==this._itemNumSize||(this._itemNumSize=this._calculateItemSize()),this._itemNumSize}},{key:"maxScroll",get:function(){var t=this.itemCount*this.itemNumSize-this.targetSize;return Math.ceil(t<0?0:t)}},{key:"_calculateItemSize",value:function(){var t=this.itemSize.match(/^(\d+)(px|%)/),e=(t||b.throw("Invalid state: swiper's size unit must be '%' or 'px'"),parseInt(t[1],10));return"%"===t[2]?Math.round(e/100*this.targetSize):e}},{key:"_setupInitialIndex",value:function(){this._reset(),this._lastActiveIndex=Math.max(Math.min(Number(this.getInitialIndex()),this.itemCount),0),this._scroll=this._offset+this.itemNumSize*this._lastActiveIndex,this._scrollTo(this._scroll)}},{key:"_setSwiping",value:function(t){this.target.classList.toggle("swiping",t)}},{key:"setActiveIndex",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=(this._setSwiping(!0),t=Math.max(0,Math.min(t,this.itemCount-1)),Math.max(0,Math.min(this.maxScroll,this._offset+this.itemNumSize*t)));return this._changeTo(t,e)}},{key:"getActiveIndex",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this._scroll,e=(t-=this._offset,this.itemCount),n=this.itemNumSize;if(0===this.itemNumSize||!b.isInteger(t))return this._lastActiveIndex;if(t<=0)return 0;for(var i=0;i<e;i++)if(n*i<=t&&t<n*(i+1))return i;return e-1}},{key:"setupResize",value:function(t){window[(t?"add":"remove")+"EventListener"]("resize",this.onResize,!0)}},{key:"show",value:function(){var t=this;this.setupResize(!0),this.onResize(),setTimeout(function(){return t.target&&t.target.classList.add("active")},1e3/60)}},{key:"hide",value:function(){this.setupResize(!1),this.target.classList.remove("active")}},{key:"updateSwipeable",value:function(t){this._gestureDetector&&(this._gestureDetector[t=t?"on":"off"]("drag",this.onDrag),this._gestureDetector[t]("dragstart",this.onDragStart),this._gestureDetector[t]("dragend",this.onDragEnd))}},{key:"updateAutoRefresh",value:function(t){this._mutationObserver&&(t?this._mutationObserver.observe(this.target,{childList:!0}):this._mutationObserver.disconnect())}},{key:"updateItemSize",value:function(t){this.itemSize=t||"100%",this.refresh()}},{key:"toggleBlocker",value:function(t){this.blocker.style.pointerEvents=t?"auto":"none"}},{key:"_canConsumeGesture",value:function(t){var t=t.direction,e=0===this._scroll&&!this.isOverScrollable(),n=this._scroll===this.maxScroll&&!this.isOverScrollable();return this.isVertical()?"down"===t&&!e||"up"===t&&!n:"right"===t&&!e||"left"===t&&!n}},{key:"onDragStart",value:function(t){var e,n,i,o,a=this;this._ignoreDrag=t.consumed||!b.isValidGesture(t),this._ignoreDrag||(e=t.consume,t.consume=function(){e&&e(),a._ignoreDrag=!0},this._canConsumeGesture(t.gesture)&&(n=t.gesture.center&&t.gesture.center.clientX||0,i=this.getBubbleWidth()||0,o=function(){e&&e(),t.consumed=!0,a._started=!0,a.shouldBlock&&a.toggleBlocker(!0),a._setSwiping(!0),b.iosPreventScroll(a._gestureDetector)},n<i||n>this.targetSize-i?setImmediate(function(){return!a._ignoreDrag&&o()}):o()))}},{key:"onDrag",value:function(t){t.gesture&&!this._ignoreDrag&&this._started&&(this._continued=!0,t.stopPropagation(),this._scrollTo(this._scroll-this._getDelta(t),{throttle:!0}))}},{key:"onDragEnd",value:function(t){var e,n;this._started=!1,t.gesture&&!this._ignoreDrag&&this._continued?(this._continued=!1,t.stopPropagation(),(e=this._scroll-this._getDelta(t))===(n=this._normalizeScroll(e))?this._startMomentumScroll(e,t):this._killOverScroll(n),this.shouldBlock&&this.toggleBlocker(!1)):this._ignoreDrag=!0}},{key:"_startMomentumScroll",value:function(t,e){var n=this._getVelocity(e),e=e.gesture.interimDirection===this.dM.dir[this._getDelta(e)<0?0:1],e=this._getAutoScroll(t,n,e),t=Math.abs(e-t)/(n+.01)/1e3,t=Math.min(.25,Math.max(.1,t));this._changeTo(e,{swipe:!0,animationOptions:{duration:t,timing:"cubic-bezier(.4, .7, .5, 1)"}})}},{key:"_killOverScroll",value:function(t){function e(){return n._changeTo(t,{animationOptions:{duration:.4,timing:"cubic-bezier(.1, .4, .1, 1)"}})}var n=this,i=(this._scroll=t,this.dM.dir[Number(0<t)]);this.overScrollHook({direction:i,killOverScroll:e})||e()}},{key:"_changeTo",value:function(t){var e=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i={activeIndex:this.getActiveIndex(t),lastActiveIndex:this._lastActiveIndex,swipe:n.swipe||!1},o=i.activeIndex!==i.lastActiveIndex,a=o&&this.preChangeHook(i);return this._scroll=a?this._offset+i.lastActiveIndex*this.itemNumSize:t,this._lastActiveIndex=a?i.lastActiveIndex:i.activeIndex,this._scrollTo(this._scroll,n).then(function(){if(t!==e._scroll||a){if(n.reject)return e._setSwiping(!1),Promise.reject("Canceled")}else e._setSwiping(!1),o&&e.postChangeHook(i)})}},{key:"_scrollTo",value:function(e){var t,n=this,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=(i.throttle&&(e<0?e=this.isOverScrollable()?Math.round(.35*e):0:(t=this.maxScroll)<e&&(e=this.isOverScrollable()?t+Math.round(.35*(e-t)):t)),"none"===i.animation?{}:i.animationOptions);return this.scrollHook&&0<this.itemNumSize&&this.scrollHook((e/this.itemNumSize).toFixed(2),i.animationOptions||{}),new Promise(function(t){return C(n.target).queue({transform:n._getTransform(e)},o).play(t)})}},{key:"_getAutoScroll",value:function(n,t,e){var i=this.maxScroll,o=this._offset,a=this.itemNumSize;if(!this.isAutoScrollable())return Math.max(0,Math.min(i,n));for(var r=[],s=o;s<i;s+=a)r.push(s);r.push(i);var l=(r=r.sort(function(t,e){return Math.abs(t-n)-Math.abs(e-n)}).filter(function(t,e){return!e||t!==r[e-1]}))[0],o=this._lastActiveIndex*a+o,c=Math.abs(n-o)/a;return c<=this.getAutoScrollRatio(e,t,a)?l=o:c<1&&r[0]===o&&1<r.length&&(l=r[1]),Math.max(0,Math.min(i,l))}},{key:"_reset",value:function(){this._targetSize=this._itemNumSize=void 0}},{key:"_normalizeScroll",value:function(t){return Math.max(Math.min(t,this.maxScroll),0)}},{key:"refresh",value:function(){var t;this._reset(),this._updateLayout(),b.isInteger(this._scroll)?(t=this._normalizeScroll(this._scroll))!==this._scroll?this._killOverScroll(t):this._changeTo(t):this._setupInitialIndex(),this.refreshHook()}},{key:"targetSize",get:function(){return this._targetSize||(this._targetSize=this.target["offset".concat(this.dM.size)]),this._targetSize}},{key:"_getDelta",value:function(t){return t.gesture["delta".concat(this.dM.axis)]}},{key:"_getVelocity",value:function(t){return t.gesture["velocity".concat(this.dM.axis)]}},{key:"_getTransform",value:function(t){return"translate3d(".concat(this.dM.t3d[0]).concat(-t).concat(this.dM.t3d[1],")")}},{key:"_updateLayout",value:function(){this.dM=hn[this.isVertical()?"vertical":"horizontal"],this.target.classList.toggle("ons-swiper-target--vertical",this.isVertical());for(var t=this.target.children[0];t;t=t.nextElementSibling)t.style[this.dM.size.toLowerCase()]=this.itemSize;this.isCentered()&&(this._offset=(this.targetSize-this.itemNumSize)/-2||0)}}]),t}(),t=function(){d(o,D);var i=f(o);function o(){l(this,o),t=i.call(this);var t,e=b.defineListenerProperty(a(t),"swipe"),n=e.onConnected,e=e.onDisconnected;return t._connectOnSwipe=n,t._disconnectOnSwipe=e,M(a(t),function(){return t._compile()}),t}return c(o,[{key:"_compile",value:function(){var t=this.children[0]&&"ONS-CAROUSEL-ITEM"!==this.children[0].tagName&&this.children[0]||document.createElement("div");if(!t.parentNode){for(;this.firstChild;)t.appendChild(this.firstChild);this.appendChild(t)}this.children[1]||this.appendChild(document.createElement("div")),this.appendChild=this.appendChild.bind(t),this.insertBefore=this.insertBefore.bind(t)}},{key:"connectedCallback",value:function(){var n=this;this._swiper||(this._swiper=new fn({getElement:function(){return n},getInitialIndex:function(){return n.getAttribute("active-index")||n.getAttribute("initial-index")},getAutoScrollRatio:function(){return n.autoScrollRatio},isVertical:function(){return n.vertical},isOverScrollable:function(){return n.overscrollable},isCentered:function(){return n.centered},isAutoScrollable:function(){return n.autoScroll},itemSize:this.itemSize,overScrollHook:this._onOverScroll.bind(this),preChangeHook:this._onPreChange.bind(this),postChangeHook:this._onPostChange.bind(this),refreshHook:this._onRefresh.bind(this),scrollHook:function(t,e){return b.triggerElementEvent(n,"swipe",{index:t,options:e})}}),M(this,function(){return n._swiper.init({swipeable:n.hasAttribute("swipeable"),autoRefresh:n.hasAttribute("auto-refresh")})})),this._connectOnSwipe()}},{key:"disconnectedCallback",value:function(){this._swiper&&this._swiper.initialized&&(this._swiper.dispose(),this._swiper=null),this._disconnectOnSwipe()}},{key:"attributeChangedCallback",value:function(t,e,n){if(this._swiper)switch(t){case"swipeable":this._swiper.updateSwipeable(this.hasAttribute("swipeable"));break;case"auto-refresh":this._swiper.updateAutoRefresh(this.hasAttribute("auto-refresh"));break;case"item-height":this.vertical&&this._swiper.updateItemSize(this.itemSize);break;case"item-width":this.vertical||this._swiper.updateItemSize(this.itemSize);break;case"direction":this._swiper.refresh();break;case"active-index":this.getActiveIndex()!==this.activeIndex&&this.setActiveIndex(this.activeIndex)}}},{key:"_show",value:function(){this._swiper.show()}},{key:"_hide",value:function(){this._swiper.hide()}},{key:"_onOverScroll",value:function(t){var e=t.direction,n=t.killOverScroll,i=!1;return b.triggerElementEvent(this,"overscroll",{carousel:this,activeIndex:this.getActiveIndex(),direction:e,waitToReturn:function(t){i=!0,t.then(n)}}),i}},{key:"_onPreChange",value:function(t){var e=t.activeIndex,t=t.lastActiveIndex;b.triggerElementEvent(this,"prechange",{carousel:this,activeIndex:e,lastActiveIndex:t})}},{key:"_onPostChange",value:function(t){var e=t.activeIndex,t=t.lastActiveIndex;this.activeIndex=e,b.triggerElementEvent(this,"postchange",{carousel:this,activeIndex:e,lastActiveIndex:t})}},{key:"_onRefresh",value:function(){b.triggerElementEvent(this,"refresh",{carousel:this})}},{key:"setActiveIndex",value:function(t){var e=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=s({animation:this.getAttribute("animation"),animationOptions:this.animationOptions||{duration:.3,timing:"cubic-bezier(.4, .7, .5, 1)"}},n);return this._swiper.setActiveIndex(t,n).then(function(){return n.callback instanceof Function&&n.callback(e),Promise.resolve(e)})}},{key:"getActiveIndex",value:function(){return this._swiper.getActiveIndex()}},{key:"next",value:function(t){return this.setActiveIndex(this.getActiveIndex()+1,t)}},{key:"prev",value:function(t){return this.setActiveIndex(this.getActiveIndex()-1,t)}},{key:"first",value:function(t){return this.setActiveIndex(0,t)}},{key:"last",value:function(t){this.setActiveIndex(Math.max(this.itemCount-1,0),t)}},{key:"refresh",value:function(){this._swiper.refresh()}},{key:"itemCount",get:function(){return this._swiper.itemCount}},{key:"vertical",get:function(){return"vertical"===this.getAttribute("direction")}},{key:"itemSize",get:function(){var t=(this.getAttribute("item-".concat(this.vertical?"height":"width"))||"").trim();return t.match(/^\d+(px|%)$/)?t:"100%"}},{key:"autoScrollRatio",get:function(){return parseFloat(this.getAttribute("auto-scroll-ratio"))},set:function(t){this.setAttribute("auto-scroll-ratio",t)}},{key:"animationOptions",get:function(){var t=this.getAttribute("animation-options");return t&&b.animationOptionsParse(t)},set:function(t){null==t?this.removeAttribute("animation-options"):this.setAttribute("animation-options",JSON.stringify(t))}},{key:"activeIndex",get:function(){return parseInt(this.getAttribute("active-index"))},set:function(t){null!=t&&this.setAttribute("active-index",t)}}],[{key:"observedAttributes",get:function(){return["swipeable","auto-refresh","direction","item-height","item-width","active-index"]}},{key:"events",get:function(){return["postchange","refresh","overscroll","prechange","swipe"]}}]),o}(),t=(b.defineBooleanProperties(t,["swipeable","disabled","overscrollable","auto-scroll","centered","fullscreen","auto-refresh"]),i.Carousel=t,customElements.define("ons-carousel",t),function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this)).getAttribute("width")&&t._updateWidth(),t}return c(n,[{key:"attributeChangedCallback",value:function(t,e,n){"width"===t&&this._updateWidth()}},{key:"_updateWidth",value:function(){var t=this.getAttribute("width");t?(t=t.trim().match(/^\d+$/)?t+"%":t,u(this,{flex:"0 0 "+t,maxWidth:t})):u.clear(this,"flex maxWidth")}}],[{key:"observedAttributes",get:function(){return["width"]}}]),n}()),pn=(i.Col=t,customElements.define("ons-col",t),function(){d(o,We);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"linear":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.2:t;return l(this,o),i.call(this,{timing:e,delay:n,duration:t})}return c(o,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),o}()),mn=function(){d(o,pn);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"ease-in-out":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.3:t;return l(this,o),i.call(this,{timing:e,delay:n,duration:t})}return c(o,[{key:"show",value:function(t,e){e=e||function(){},C.runAll(C(t._mask,this.def).default({opacity:0},{opacity:1}),C(t._dialog,this.def).default({transform:"translate3d(-50%, -60%, 0)",opacity:0},{transform:"translate3d(-50%, -50%, 0)",opacity:1}).queue(function(t){e(),t()}))}},{key:"hide",value:function(t,e){e=e||function(){},C.runAll(C(t._mask,this.def).default({opacity:1},{opacity:0}),C(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0)",opacity:1},{transform:"translate3d(-50%, -60%, 0)",opacity:0}).queue(function(t){e(),t()}))}}]),o}(),gn=function(){d(o,pn);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"ease-in-out":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.2:t;return l(this,o),(e=i.call(this,{timing:e,delay:n,duration:t})).bodyHeight=document.body.clientHeight,e}return c(o,[{key:"show",value:function(t,e){e=e||function(){},C.runAll(C(t._mask,this.def).default({opacity:0},{opacity:1}),C(t._dialog,this.def).default({transform:"translate3d(-50%, ".concat(this.bodyHeight/2-1,"px, 0)")},{transform:"translate3d(-50%, -50%, 0)"}).queue(function(t){e(),t()}))}},{key:"hide",value:function(t,e){e=e||function(){},C.runAll(C(t._mask,this.def).default({opacity:1},{opacity:0}),C(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0)"},{transform:"translate3d(-50%, ".concat(this.bodyHeight/2-1,"px, 0)")}).queue(function(t){e(),t()}))}}]),o}(),vn={".dialog":"dialog--*",".dialog-container":"dialog-container--*",".dialog-mask":"dialog-mask--*"},_n={default:function(){return r.isAndroid()?mn:gn},slide:function(){d(o,pn);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"cubic-bezier(.1, .7, .4, 1)":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.2:t;return l(this,o),(e=i.call(this,{timing:e,delay:n,duration:t})).bodyHeight=document.body.clientHeight,e}return c(o,[{key:"show",value:function(t,e){e=e||function(){},C.runAll(C(t._mask,this.def).default({opacity:0},{opacity:1}),C(t._dialog,this.def).default({transform:"translate3d(-50%, ".concat(-this.bodyHeight/2+1-t._dialog.clientHeight,"px, 0)")},{transform:"translate3d(-50%, -50%, 0)"}).queue(function(t){e(),t()}))}},{key:"hide",value:function(t,e){e=e||function(){},C.runAll(C(t._mask,this.def).default({opacity:1},{opacity:0}),C(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0)"},{transform:"translate3d(-50%, ".concat(-this.bodyHeight/2+1-t._dialog.clientHeight,"px, 0)")}).queue(function(t){e(),t()}))}}]),o}(),none:pn},t=function(){d(n,$e);var e=f(n);function n(){var t;return l(this,n),M(a(t=e.call(this)),function(){return t._compile()}),t}return c(n,[{key:"_scheme",get:function(){return vn}},{key:"_mask",get:function(){return b.findChild(this,".dialog-mask")}},{key:"_dialog",get:function(){return b.findChild(this,".dialog")}},{key:"_updateAnimatorFactory",value:function(){return new w({animators:_n,baseClass:pn,baseClassName:"DialogAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){if(g.prepare(this),this.style.display="none",this.style.zIndex=10001,!this._dialog){var t=document.createElement("div"),e=(t.classList.add("dialog"),document.createElement("div"));for(e.classList.add("dialog-container");this.firstChild;)e.appendChild(this.firstChild);t.appendChild(e),this.appendChild(t)}this._mask||((t=document.createElement("div")).classList.add("dialog-mask"),this.insertBefore(t,this.firstChild)),this._dialog.style.zIndex=20001,this._mask.style.zIndex=2e4,this.setAttribute("status-bar-fill",""),v.initModifier(this,this._scheme)}}],[{key:"registerAnimator",value:function(t,e){e.prototype instanceof pn||b.throwAnimator("Dialog"),_n[t]=e}},{key:"animators",get:function(){return _n}},{key:"DialogAnimator",get:function(){return pn}}]),n}(),bn=(i.Dialog=t,customElements.define("ons-dialog",t),{"":"fab--*",".fab__icon":"fab--*__icon"}),t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._hide(),t.classList.add("fab"),M(a(t),function(){t._compile()}),t}return c(n,[{key:"_compile",value:function(){var e;g.prepare(this),b.findChild(this,".fab__icon")||((e=document.createElement("span")).classList.add("fab__icon"),b.arrayFrom(this.childNodes).forEach(function(t){t.tagName&&"ons-ripple"===t.tagName.toLowerCase()||e.appendChild(t)}),this.appendChild(e)),this._updateRipple(),v.initModifier(this,bn),this._updatePosition()}},{key:"connectedCallback",value:function(){var t=this;setImmediate(function(){return t._show()})}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":b.restoreClass(this,"fab",bn);break;case"modifier":v.onModifierChanged(e,n,this,bn);break;case"ripple":this._updateRipple();break;case"position":this._updatePosition()}}},{key:"_show",value:function(){this._manuallyHidden||this._toggle(!0)}},{key:"_hide",value:function(){var t=this;setImmediate(function(){return t._toggle(!1)})}},{key:"_updateRipple",value:function(){b.updateRipple(this)}},{key:"_updatePosition",value:function(){var t=this.getAttribute("position");switch(this.classList.remove("fab--top__left","fab--bottom__right","fab--bottom__left","fab--top__right","fab--top__center","fab--bottom__center"),t){case"top right":case"right top":this.classList.add("fab--top__right");break;case"top left":case"left top":this.classList.add("fab--top__left");break;case"bottom right":case"right bottom":this.classList.add("fab--bottom__right");break;case"bottom left":case"left bottom":this.classList.add("fab--bottom__left");break;case"center top":case"top center":this.classList.add("fab--top__center");break;case"center bottom":case"bottom center":this.classList.add("fab--bottom__center")}}},{key:"show",value:function(){this.toggle(!0)}},{key:"hide",value:function(){this.toggle(!1)}},{key:"toggle",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:!this.visible;this._manuallyHidden=!t,this._toggle(t)}},{key:"_toggle",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:!this.visible,e=0<=(this.getAttribute("position")||"").indexOf("bottom")?"translate3d(0px, -".concat(b.globals.fabOffset||0,"px, 0px)"):"";u(this,{transform:"".concat(e," scale(").concat(Number(t),")")})}},{key:"visible",get:function(){return-1===this.style.transform.indexOf("scale(0)")&&"none"!==this.style.display}}],[{key:"observedAttributes",get:function(){return["modifier","ripple","position","class"]}}]),n}(),t=(b.defineBooleanProperties(t,["disabled","ripple"]),i.Fab=t,customElements.define("ons-fab",t),function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._gestureDetector=new A(a(t),{passive:!0}),t}return c(n)}()),yn=(i.GestureDetector=t,customElements.define("ons-gesture-detector",t),"fa"),t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),M(a(t=e.call(this)),function(){t._compile()}),t}return c(n,[{key:"attributeChangedCallback",value:function(t,e,n){this._cleanClassAttribute("icon"===t?e:this.getAttribute("icon"),"modifier"===t?e:void 0),this._update()}},{key:"_compile",value:function(){g.prepare(this),this._update()}},{key:"_update",value:function(){var e=this,t=this._buildClassAndStyle(this._parseAttr("icon"),this._parseAttr("size")),n=t.classList,t=t.style;b.extend(this.style,t),n.forEach(function(t){return e.classList.add(t)})}},{key:"_parseAttr",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.getAttribute("modifier")||"",t=(this.getAttribute(t)||t||"").split(/\s*,\s*/),n=t[0],t=((t=t[1])||"").split(/\s*:\s*/);return(e&&RegExp("(^|\\s+)".concat(t[0],"($|\\s+)"),"i").test(e)?t[1]:n)||""}},{key:"_cleanClassAttribute",value:function(t,e){var n=this,t=this._prefixIcon(this._parseAttr(t,e)),e=t.className,t=t.prefix,t=e!==t?"|".concat(t,"$|").concat(t,"-"):"|".concat(e,"$")||"",i=new RegExp("^(fa$|fa-|ion-|zmdi$|zmdi-|ons-icon--".concat(t,")"));b.arrayFrom(this.classList).filter(function(t){return i.test(t)}).forEach(function(t){return n.classList.remove(t)})}},{key:"_prefixIcon",value:function(t){t=yn+(yn?"-":"")+t;return{className:t,prefix:t.split("-")[0]}}},{key:"_buildClassAndStyle",value:function(t,e){var n,i=["ons-icon"],o={};return 0===t.indexOf("ion-")?(i.push(t),i.push("ons-icon--ion")):0===t.indexOf("fa-")?(i.push(t),this.classList.contains("far")||this.classList.contains("fab")||this.classList.contains("fal")||i.push("fa")):0===t.indexOf("md-")?(i.push("zmdi"),i.push("zmdi-"+t.split(/-(.+)?/)[1])):(n=(t=this._prefixIcon(t)).className,(t=t.prefix)&&i.push(t),n&&i.push(n)),e.match(/^[1-5]x|lg$/)?(i.push("ons-icon--"+e),this.style.removeProperty("font-size")):o.fontSize=e,{classList:i,style:o}}}],[{key:"observedAttributes",get:function(){return["icon","size","modifier","class"]}},{key:"setAutoPrefix",value:function(t){yn=t?"string"==typeof t&&t||"fa":""}}]),n}(),kn=(b.defineBooleanProperties(t,["fixed-width","spin"]),i.Icon=t,customElements.define("ons-icon",t),function(){function n(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;l(this,n),"object"===o(t)&&null!==t||b.throw('"delegate" parameter must be an object'),this._userDelegate=t,e instanceof Element||null===e||b.throw('"templateElement" parameter must be an instance of Element or null'),this._templateElement=e}return c(n,[{key:"itemHeight",get:function(){return this._userDelegate.itemHeight}},{key:"hasRenderFunction",value:function(){return this._userDelegate._render instanceof Function}},{key:"_render",value:function(){this._userDelegate._render.apply(this._userDelegate,arguments)}},{key:"loadItemElement",value:function(t,e){this._userDelegate.loadItemElement instanceof Function?this._userDelegate.loadItemElement(t,e):((t=this._userDelegate.createItemContent(t,this._templateElement))instanceof Element||b.throw('"createItemContent" must return an instance of Element'),e({element:t}))}},{key:"countItems",value:function(){var t=this._userDelegate.countItems();return"number"!=typeof t&&b.throw('"countItems" must return a number'),t}},{key:"updateItem",value:function(t,e){this._userDelegate.updateItemContent instanceof Function&&this._userDelegate.updateItemContent(t,e)}},{key:"calculateItemHeight",value:function(t){return this._userDelegate.calculateItemHeight instanceof Function?("number"!=typeof(t=this._userDelegate.calculateItemHeight(t))&&b.throw('"calculateItemHeight" must return a number'),t):0}},{key:"destroyItem",value:function(t,e){this._userDelegate.destroyItem instanceof Function&&this._userDelegate.destroyItem(t,e)}},{key:"destroy",value:function(){this._userDelegate.destroy instanceof Function&&this._userDelegate.destroy(),this._userDelegate=this._templateElement=null}}]),n}()),wn=function(){function n(t,e){l(this,n),e instanceof kn||b.throw('"delegate" parameter must be an instance of LazyRepeatDelegate'),this._wrapperElement=t,this._delegate=e,this._insertIndex=this._wrapperElement.children[0]&&"ONS-LAZY-REPEAT"===this._wrapperElement.children[0].tagName?1:0,"ons-list"===t.tagName.toLowerCase()&&t.classList.add("lazy-list"),this._pageContent=this._findPageContentElement(t),this._pageContent||b.throw("LazyRepeat must be descendant of a Page element"),this.lastScrollTop=this._pageContent.scrollTop,this.padding=0,this._topPositions=[0],this._renderedItems={},this._delegate.itemHeight||this._delegate.calculateItemHeight(0)||(this._unknownItemHeight=!0),this._addEventListeners(),this._onChange()}return c(n,[{key:"padding",get:function(){return parseInt(this._wrapperElement.style.paddingTop,10)},set:function(t){this._wrapperElement.style.paddingTop=t+"px"}},{key:"_findPageContentElement",value:function(t){var e=b.findParent(t,".page__content");if(e)return e;e=b.findParent(t,"ons-page");if(e){t=b.findChild(e,".content");if(t)return t}return null}},{key:"_checkItemHeight",value:function(n){var i=this;this._delegate.loadItemElement(0,function(t){i._unknownItemHeight||b.throw("Invalid state"),i._wrapperElement.appendChild(t.element);function e(){i._delegate.destroyItem(0,t),t.element&&t.element.remove(),delete i._unknownItemHeight,n()}i._itemHeight=t.element.offsetHeight,0<i._itemHeight?e():(i._wrapperElement.style.visibility="hidden",t.element.style.visibility="hidden",setImmediate(function(){i._itemHeight=t.element.offsetHeight,0==i._itemHeight&&b.throw('Invalid state: "itemHeight" must be greater than zero'),i._wrapperElement.style.visibility="",e()}))})}},{key:"staticItemHeight",get:function(){return this._delegate.itemHeight||this._itemHeight}},{key:"_countItems",value:function(){return this._delegate.countItems()}},{key:"_getItemHeight",value:function(t){return Object.prototype.hasOwnProperty.call(this._renderedItems,t)?(Object.prototype.hasOwnProperty.call(this._renderedItems[t],"height")||(this._renderedItems[t].height=this._renderedItems[t].element.offsetHeight),this._renderedItems[t].height):this._topPositions[t+1]&&this._topPositions[t]?this._topPositions[t+1]-this._topPositions[t]:this.staticItemHeight||this._delegate.calculateItemHeight(t)}},{key:"_calculateRenderedHeight",value:function(){var n=this;return Object.keys(this._renderedItems).reduce(function(t,e){return t+n._getItemHeight(+e)},0)}},{key:"_onChange",value:function(){this._render()}},{key:"_lastItemRendered",value:function(){return Math.max.apply(Math,m(Object.keys(this._renderedItems)))}},{key:"_firstItemRendered",value:function(){return Math.min.apply(Math,m(Object.keys(this._renderedItems)))}},{key:"refresh",value:function(){var t={forceScrollDown:!0},e=this._firstItemRendered();b.isInteger(e)&&(this._wrapperElement.style.height=this._topPositions[e]+this._calculateRenderedHeight()+"px",this.padding=this._topPositions[e],t.forceFirstIndex=e),this._removeAllElements(),this._render(t),this._wrapperElement.style.height="inherit"}},{key:"_render",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=t.forceScrollDown,n=void 0!==n&&n,i=t.forceFirstIndex,t=t.forceLastIndex;if(this._unknownItemHeight)return this._checkItemHeight(this._render.bind(this,arguments[0]));for(var o=!n&&this.lastScrollTop>this._pageContent.scrollTop,a=(this.lastScrollTop=this._pageContent.scrollTop,{}),n=this._wrapperElement.getBoundingClientRect().top,r=4*window.innerHeight-n,s=this._countItems(),l=i||Math.max(0,this._calculateStartIndex(n)-30),c=l,u=this._topPositions[c];c<s&&u<r;c++)c>=this._topPositions.length&&(this._topPositions.length+=100),this._topPositions[c]=u,u+=this._getItemHeight(c);if(this._delegate.hasRenderFunction&&this._delegate.hasRenderFunction())return this._delegate._render(l,c,function(){e.padding=e._topPositions[l]});if(o)for(var d=c-1;l<=d;d--)a[d]=!0,this._renderElement(d,o);else for(var h=t||Math.max.apply(Math,[c-1].concat(m(Object.keys(this._renderedItems)))),f=l;f<=h;f++)a[f]=!0,this._renderElement(f,o);Object.keys(this._renderedItems).forEach(function(t){return a[t]||e._removeElement(t,o)})}},{key:"_renderElement",value:function(e,n){var i=this,t=this._renderedItems[e];t?this._delegate.updateItem(e,t):this._delegate.loadItemElement(e,function(t){n?(i._wrapperElement.insertBefore(t.element,i._wrapperElement.children[i._insertIndex]),i.padding=i._topPositions[e],t.height=i._topPositions[e+1]-i._topPositions[e]):i._wrapperElement.appendChild(t.element),i._renderedItems[e]=t})}},{key:"_removeElement",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=this._renderedItems[t=+t];this._delegate.destroyItem(t,n),e?this._topPositions[t+1]=void 0:this.padding=this.padding+this._getItemHeight(t),n.element.parentElement&&n.element.parentElement.removeChild(n.element),delete this._renderedItems[t]}},{key:"_removeAllElements",value:function(){var e=this;Object.keys(this._renderedItems).forEach(function(t){return e._removeElement(t)})}},{key:"_recalculateTopPositions",value:function(t,e){for(var n=t;n<=e;n++)this._topPositions[n+1]=this._topPositions[n]+this._getItemHeight(n)}},{key:"_calculateStartIndex",value:function(t){for(var e=this._firstItemRendered(),n=this._lastItemRendered(),i=(this._recalculateTopPositions(e,n),0),o=this._countItems()-1;;){var a=Math.floor((i+o)/2),r=t+this._topPositions[a];if(o<i)return 0;if(r<=0&&0<r+this._getItemHeight(a))return a;isNaN(r)||0<=r?o=a-1:i=a+1}}},{key:"_debounce",value:function(i,o,a){var r;return function(){var t=arguments,e=this,n=a&&!r;clearTimeout(r),n?i.apply(this,arguments):r=setTimeout(function(){r=null,i.apply(e,t)},o)}}},{key:"_doubleFireOnTouchend",value:function(){this._render(),this._debounce(this._render.bind(this),100)}},{key:"_addEventListeners",value:function(){b.bindListeners(this,["_onChange","_doubleFireOnTouchend"]),r.isIOS()&&(this._boundOnChange=this._debounce(this._boundOnChange,30)),this._pageContent.addEventListener("scroll",this._boundOnChange,!0),r.isIOS()&&(b.addEventListener(this._pageContent,"touchmove",this._boundOnChange,{capture:!0,passive:!0}),this._pageContent.addEventListener("touchend",this._boundDoubleFireOnTouchend,!0)),window.document.addEventListener("resize",this._boundOnChange,!0)}},{key:"_removeEventListeners",value:function(){this._pageContent.removeEventListener("scroll",this._boundOnChange,!0),r.isIOS()&&(b.removeEventListener(this._pageContent,"touchmove",this._boundOnChange,{capture:!0,passive:!0}),this._pageContent.removeEventListener("touchend",this._boundDoubleFireOnTouchend,!0)),window.document.removeEventListener("resize",this._boundOnChange,!0)}},{key:"destroy",value:function(){this._removeAllElements(),this._delegate.destroy(),this._parentElement=this._delegate=this._renderedItems=null,this._removeEventListeners()}}]),n}(),t=function(){d(e,D);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"connectedCallback",value:function(){this.hasAttribute("delegate")&&(this.delegate=window[this.getAttribute("delegate")])}},{key:"delegate",get:function(){b.throw("No delegate getter")},set:function(t){this._lazyRepeatProvider&&this._lazyRepeatProvider.destroy(),!this._templateElement&&this.children[0]&&(this._templateElement=this.removeChild(this.children[0]));t=new kn(t,this._templateElement||null);this._lazyRepeatProvider=new wn(this.parentElement,t)}},{key:"refresh",value:function(){this._lazyRepeatProvider&&this._lazyRepeatProvider.refresh()}},{key:"attributeChangedCallback",value:function(t,e,n){}},{key:"disconnectedCallback",value:function(){this._lazyRepeatProvider&&(this._lazyRepeatProvider.destroy(),this._lazyRepeatProvider=null)}}]),e}(),En=(k.LazyRepeatDelegate=kn,k.LazyRepeatProvider=wn,i.LazyRepeat=t,customElements.define("ons-lazy-repeat",t),"list-header"),Cn={"":"list-header--*"},t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._compile(),t}return c(n,[{key:"_compile",value:function(){g.prepare(this),this.classList.add(En),v.initModifier(this,Cn)}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":b.restoreClass(this,En,Cn);break;case"modifier":v.onModifierChanged(e,n,this,Cn)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(),An=(i.ListHeader=t,customElements.define("ons-list-header",t),"list-title"),Sn={"":"list-title--*"},t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._compile(),t}return c(n,[{key:"_compile",value:function(){g.prepare(this),this.classList.add(An),v.initModifier(this,Sn)}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":b.restoreClass(this,An,Sn);break;case"modifier":v.onModifierChanged(e,n,this,Sn)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(),xn=(i.ListTitle=t,customElements.define("ons-list-title",t),function(){d(o,We);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"linear":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.2:t;return l(this,o),i.call(this,{timing:e,delay:n,duration:t})}return c(o,[{key:"showExpansion",value:function(t,e){e()}},{key:"hideExpansion",value:function(t,e){e()}}]),o}()),Pn="list-item",Ln={".list-item":"list-item--*",".list-item__left":"list-item--*__left",".list-item__center":"list-item--*__center",".list-item__right":"list-item--*__right",".list-item__label":"list-item--*__label",".list-item__title":"list-item--*__title",".list-item__subtitle":"list-item--*__subtitle",".list-item__thumbnail":"list-item--*__thumbnail",".list-item__icon":"list-item--*__icon"},On={default:function(){d(e,xn);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"showExpansion",value:function(t,e){this._animateExpansion(t,!0,e)}},{key:"hideExpansion",value:function(t,e){this._animateExpansion(t,!1,e)}},{key:"_animateExpansion",value:function(t,e,n){var i=t.expandableContent.style.height,o=t.expandableContent.style.display,a=(t.expandableContent.style.height="auto",t.expandableContent.style.display="block",window.getComputedStyle(t.expandableContent)),a=[{height:0,paddingTop:0,paddingBottom:0},{height:a.height,paddingTop:a.paddingTop,paddingBottom:a.paddingBottom}],r=[{transform:"rotate(45deg)"},{transform:"rotate(225deg)"}];t.expandableContent.style.height=i,(i=C(t.expandableContent,{duration:this.duration,property:"height padding-top padding-bottom"})).default.apply(i,m(e?a:a.reverse())).play(function(){t.expandableContent.style.display=o,n&&n()}),t.expandChevron&&(i=C(t.expandChevron,{duration:this.duration,property:"transform"})).default.apply(i,m(e?r:r.reverse())).play()}}]),e}(),none:xn},t=function(){d(i,D);var n=f(i);function i(){l(this,i),(t=n.call(this))._animatorFactory=t._updateAnimatorFactory();var t,e=/^ons-(?!col$|row$|if$)/i;return t._shouldIgnoreTap=function(t){return t.hasAttribute("prevent-tap")||e.test(t.tagName)},t.show=t.showExpansion,t.hide=t.hideExpansion,M(a(t),function(){t._compile()}),t}return c(i,[{key:"_compile",value:function(){g.prepare(this),this.classList.add(Pn);var e,n,i,o,a,t,r=[],s=(Array.from(this.childNodes).forEach(function(t){t.nodeType!==Node.ELEMENT_NODE?r.push(t):t.classList.contains("top")?e=t:t.classList.contains("expandable-content")?n=t:r.push(t),"ONS-RIPPLE"!==t.nodeName&&t.remove()}),r=e?Array.from(e.childNodes):r,[]);r.forEach(function(t){t.nodeType!==Node.ELEMENT_NODE?s.push(t):t.classList.contains("left")?i=t:t.classList.contains("right")?o=t:t.classList.contains("center")?a=t:s.push(t)}),this.hasAttribute("expandable")?(this.classList.add("list-item--expandable"),e||(e=document.createElement("div")).classList.add("top"),e.classList.add("list-item__top"),this.appendChild(e),this._top=e,n&&(n.classList.add("list-item__expandable-content"),this.appendChild(n)),o||((o=document.createElement("div")).classList.add("list-item__right","right"),(t=document.createElement("span")).classList.add("list-item__expand-chevron"),o.appendChild(t)),this.expanded&&this.classList.add("list-item--expanded")):e=this,a||((a=document.createElement("div")).classList.add("center"),s.forEach(function(t){return a.appendChild(t)})),a.classList.add("list-item__center"),e.appendChild(a),i&&(i.classList.add("list-item__left"),e.appendChild(i)),o&&(o.classList.add("list-item__right"),e.appendChild(o)),b.updateRipple(this),v.initModifier(this,Ln)}},{key:"showExpansion",value:function(){this.expanded=!0}},{key:"hideExpansion",value:function(){this.expanded=!1}},{key:"toggleExpansion",value:function(){this.expanded=!this.expanded}},{key:"_animateExpansion",value:function(){var t,e=this,n=this.expanded&&this.classList.contains("list-item--expanded");!this.hasAttribute("expandable")||this._expanding||n||(this._expanding=!0,n=function(){e._expanding=!1,e.expanded?e.classList.add("list-item--expanded"):e.classList.remove("list-item--expanded")},(t=this._animatorFactory.newAnimator())._animateExpansion?t._animateExpansion(this,this.expanded,n):n())}},{key:"_updateAnimatorFactory",value:function(){return new w({animators:On,baseClass:xn,baseClassName:"ListItemAnimator",defaultAnimation:this.getAttribute("animation")||"default"})}},{key:"expandableContent",get:function(){return this.querySelector(".list-item__expandable-content")}},{key:"expandChevron",get:function(){return this.querySelector(".list-item__expand-chevron")}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":b.restoreClass(this,Pn,Ln);break;case"modifier":v.onModifierChanged(e,n,this,Ln);break;case"ripple":b.updateRipple(this);break;case"animation":this._animatorFactory=this._updateAnimatorFactory();break;case"expanded":M(this,function(){return i._animateExpansion()})}}},{key:"connectedCallback",value:function(){var t=this;M(this,function(){t._setupListeners(!0),t._originalBackgroundColor=t.style.backgroundColor,t.tapped=!1})}},{key:"disconnectedCallback",value:function(){this._setupListeners(!1)}},{key:"_setupListeners",value:function(t){t=(t?"add":"remove")+"EventListener";b[t](this,"touchstart",this._onTouch,{passive:!0}),b[t](this,"touchmove",this._onRelease,{passive:!0}),this[t]("touchcancel",this._onRelease),this[t]("touchend",this._onRelease),this[t]("touchleave",this._onRelease),this[t]("drag",this._onDrag),this[t]("mousedown",this._onTouch),this[t]("mouseup",this._onRelease),this[t]("mouseout",this._onRelease),this._top&&this._top[t]("click",this._onClickTop.bind(this))}},{key:"_onClickTop",value:function(){this._expanding||(this.toggleExpansion(),this.dispatchEvent(new Event("expand")),this.dispatchEvent(new Event("expansion")))}},{key:"_onDrag",value:function(t){t=t.gesture;this.hasAttribute("lock-on-drag")&&-1<["left","right"].indexOf(t.direction)&&t.preventDefault()}},{key:"_onTouch",value:function(t){var e=this;this.tapped||this!==t.target&&(this._shouldIgnoreTap(t.target)||b.findParent(t.target,this._shouldIgnoreTap,function(t){return t===e}))||(this.tapped=!0,t={transition:"background-color 0.0s linear 0.02s, box-shadow 0.0s linear 0.02s"},this.hasAttribute("tappable")&&(this.style.backgroundColor&&(this._originalBackgroundColor=this.style.backgroundColor),t.backgroundColor=this.getAttribute("tap-background-color")||"#d9d9d9",t.boxShadow="0px -1px 0px 0px ".concat(t.backgroundColor)),u(this,t))}},{key:"_onRelease",value:function(){this.tapped=!1,this.style.backgroundColor=this._originalBackgroundColor||"",u.clear(this,"transition boxShadow")}}],[{key:"observedAttributes",get:function(){return["modifier","class","ripple","animation","expanded"]}}]),i}(),Mn=(b.defineBooleanProperties(t,["expanded","expandable","tappable","lock-on-drag"]),b.defineStringProperties(t,["animation","tap-background-color"]),i.ListItem=t,customElements.define("ons-list-item",t),{"":"list--*"}),t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._compile(),t}return c(n,[{key:"_compile",value:function(){g.prepare(this),this.classList.add("list"),v.initModifier(this,Mn)}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":b.restoreClass(this,"list",Mn);break;case"modifier":v.onModifierChanged(e,n,this,Mn)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(),Tn=(i.List=t,customElements.define("ons-list",t),["autocapitalize","autocomplete","autocorrect","autofocus","disabled","inputmode","max","maxlength","min","minlength","name","pattern","placeholder","readonly","required","size","spellcheck","step","validator","value"]),In=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this)).constructor===n&&b.throwAbstract(),M(a(t),function(){return t._compile()}),t._boundDelegateEvent=t._delegateEvent.bind(a(t)),t}return c(n,[{key:"_update",value:function(){}},{key:"_scheme",get:function(){b.throwMember()}},{key:"_template",get:function(){b.throwMember()}},{key:"type",get:function(){b.throwMember()}},{key:"_compile",value:function(){g.prepare(this),this._defaultClassName&&this.classList.add(this._defaultClassName),0===this.children.length&&(this.appendChild(b.createFragment(this._template)),this._setInputId(),this._updateBoundAttributes(),v.initModifier(this,this._scheme))}},{key:"_updateBoundAttributes",value:function(){var e=this;Tn.forEach(function(t){e.hasAttribute(t)?e._input.setAttribute(t,e.getAttribute(t)):e._input.removeAttribute(t)}),this._update()}},{key:"_delegateEvent",value:function(t){t=new CustomEvent(t.type,{bubbles:!1,cancelable:!0});return this.dispatchEvent(t)}},{key:"_setInputId",value:function(){this.hasAttribute("input-id")&&(this._input.id=this.getAttribute("input-id"))}},{key:"_defaultClassName",get:function(){return""}},{key:"_input",get:function(){return this.querySelector("input")}},{key:"value",get:function(){return null===this._input?this.getAttribute("value"):this._input.value},set:function(t){var e=this;M(this,function(){t instanceof Date&&(t=t.toISOString().substring(0,10)),e._input.value=t,e._update()})}},{key:"connectedCallback",value:function(){var t=this;M(this,function(){t._input.addEventListener("focus",t._boundDelegateEvent),t._input.addEventListener("blur",t._boundDelegateEvent)})}},{key:"disconnectedCallback",value:function(){var t=this;M(this,function(){t._input.removeEventListener("focus",t._boundDelegateEvent),t._input.removeEventListener("blur",t._boundDelegateEvent)})}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"modifier":M(this,function(){return v.onModifierChanged(e,n,i,i._scheme)});break;case"input-id":M(this,function(){return i._setInputId()});break;case"class":b.restoreClass(this,this._defaultClassName,this._scheme)}0<=Tn.indexOf(t)&&M(this,function(){return i._updateBoundAttributes()})}},{key:"blur",value:function(){this._input.blur()}},{key:"focus",value:function(){this._input.focus()}}],[{key:"observedAttributes",get:function(){return["modifier","input-id","class"].concat(Tn)}}]),n}(),Dn=(b.defineBooleanProperties(In,["disabled"]),{".text-input":"text-input--*",".text-input__label":"text-input--*__label"}),t=function(){d(o,In);var e=f(o);function o(){var t;return l(this,o),(t=e.call(this))._boundOnInput=t._update.bind(a(t)),t._boundOnFocusin=t._update.bind(a(t)),t}return c(o,[{key:"_update",value:function(){this._updateLabel(),this._updateLabelClass()}},{key:"_scheme",get:function(){return Dn}},{key:"_template",get:function(){return'\n <input type="'.concat(this.type,'" class="text-input">\n <span class="text-input__label"></span>\n ')}},{key:"type",get:function(){var t=this.getAttribute("type");return["checkbox","radio"].indexOf(t)<0&&t||"text"},set:function(t){this.setAttribute("type",t)}},{key:"_updateLabel",value:function(){var t=this.getAttribute("placeholder")||"";void 0!==this._helper.textContent?this._helper.textContent=t:this._helper.innerText=t}},{key:"_updateLabelClass",value:function(){""===this.value?this._helper.classList.remove("text-input--material__label--active"):this._helper.classList.add("text-input--material__label--active")}},{key:"_helper",get:function(){return this.querySelector("span")}},{key:"connectedCallback",value:function(){var t=this,e=(p(h(o.prototype),"connectedCallback",this).call(this),M(this,function(){t._input.addEventListener("input",t._boundOnInput),t._input.addEventListener("focusin",t._boundOnFocusin)}),this.getAttribute("type"));0<=["checkbox","radio"].indexOf(e)&&b.warn('Warn: <ons-input type="'.concat(e,'"> is deprecated since v2.4.0. Use <ons-').concat(e,"> instead."))}},{key:"disconnectedCallback",value:function(){var t=this;p(h(o.prototype),"disconnectedCallback",this).call(this),M(this,function(){t._input.removeEventListener("input",t._boundOnInput),t._input.removeEventListener("focusin",t._boundOnFocusin)})}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;"type"===t?M(this,function(){return i._input.setAttribute("type",i.type)}):p(h(o.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(m(p(h(o),"observedAttributes",this)),["type"])}}]),o}(),Nn=(b.defineBooleanProperties(t,["float"]),i.Input=t,customElements.define("ons-input",t),function(){d(i,In);var e=f(i);function i(){var t;return l(this,i),(t=e.call(this)).constructor===i&&util.throwAbstract(),M(a(t),function(){t.attributeChangedCallback("checked",null,t.getAttribute("checked"))}),t}return c(i,[{key:"_template",get:function(){return'\n <input type="'.concat(this.type,'" class="').concat(this._defaultClassName,'__input">\n <span class="').concat(this._defaultClassName,'__checkmark"></span>\n ')}},{key:"_helper",get:function(){return this.querySelector("span")}},{key:"checked",get:function(){return this._input.checked},set:function(t){var e=this;M(this,function(){e._input.checked=t})}},{key:"attributeChangedCallback",value:function(t,e,n){"checked"===t?this.checked=null!==n:p(h(i.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(m(p(h(i),"observedAttributes",this)),["checked"])}}]),i}()),Bn={".checkbox":"checkbox--*",".checkbox__input":"checkbox--*__input",".checkbox__checkmark":"checkbox--*__checkmark"},t=function(){d(e,Nn);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"_scheme",get:function(){return Bn}},{key:"_defaultClassName",get:function(){return"checkbox"}},{key:"type",get:function(){return"checkbox"}}]),e}(),Rn=(i.Checkbox=t,customElements.define("ons-checkbox",t),{".radio-button":"radio-button--*",".radio-button__input":"radio-button--*__input",".radio-button__checkmark":"radio-button--*__checkmark"}),t=function(){d(e,Nn);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"_scheme",get:function(){return Rn}},{key:"_defaultClassName",get:function(){return"radio-button"}},{key:"type",get:function(){return"radio"}}]),e}(),Hn=(i.Radio=t,customElements.define("ons-radio",t),{".search-input":"search-input--*"}),t=function(){d(e,In);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"_scheme",get:function(){return Hn}},{key:"_template",get:function(){return'\n <input type="'.concat(this.type,'" class="search-input">\n ')}},{key:"type",get:function(){return"search"}}]),e}(),qn=(i.SearchInput=t,customElements.define("ons-search-input",t),function(){d(o,We);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"linear":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.2:t;return l(this,o),i.call(this,{timing:e,delay:n,duration:t})}return c(o,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),o}()),zn={"":"modal--*",modal__content:"modal--*__content"},Fn={default:qn,fade:function(){d(o,qn);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"linear":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.3:t;return l(this,o),i.call(this,{timing:e,delay:n,duration:t})}return c(o,[{key:"show",value:function(t,e){e=e||function(){},C(t,this.def).default({opacity:0},{opacity:1}).queue(function(t){e(),t()}).play()}},{key:"hide",value:function(t,e){e=e||function(){},C(t,this.def).default({opacity:1},{opacity:0}).queue(function(t){e(),t()}).play()}}]),o}(),lift:function(){d(o,qn);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"cubic-bezier( .1, .7, .1, 1)":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.4:t;return l(this,o),i.call(this,{timing:e,delay:n,duration:t})}return c(o,[{key:"show",value:function(t,e){e=e||function(){},C(t,this.def).default({transform:"translate3d(0, 100%, 0)"},{transform:"translate3d(0, 0, 0)"}).queue(function(t){e(),t()}).play()}},{key:"hide",value:function(t,e){e=e||function(){},C(t,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(0, 100%, 0)"}).queue(function(t){e(),t()}).play()}}]),o}(),none:qn},t=function(){d(i,$e);var e=f(i);function i(){var t;return l(this,i),(t=e.call(this))._defaultDBB=function(){},M(a(t),function(){return t._compile()}),t}return c(i,[{key:"_scheme",get:function(){return zn}},{key:"_updateAnimatorFactory",value:function(){return new w({animators:Fn,baseClass:qn,baseClassName:"ModalAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){if(this.style.display="none",this.style.zIndex=10001,this.classList.add("modal"),!b.findChild(this,".modal__content")){var t=document.createElement("div");for(t.classList.add("modal__content");this.childNodes[0];){var e=this.childNodes[0];this.removeChild(e),t.insertBefore(e,null)}this.appendChild(t)}v.initModifier(this,this._scheme)}},{key:"_toggleStyle",value:function(t){this.style.display=t?"table":"none"}},{key:"connectedCallback",value:function(){p(h(i.prototype),"connectedCallback",this).call(this)}},{key:"disconnectedCallback",value:function(){p(h(i.prototype),"disconnectedCallback",this).call(this)}},{key:"attributeChangedCallback",value:function(t,e,n){"class"===t?b.restoreClass(this,"modal",zn):p(h(i.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(m(p(h(i),"observedAttributes",this)),["class"])}},{key:"registerAnimator",value:function(t,e){e.prototype instanceof qn||b.throwAnimator("Modal"),Fn[t]=e}},{key:"animators",get:function(){return Fn}},{key:"ModalAnimator",get:function(){return qn}}]),i}(),jn=(i.Modal=t,customElements.define("ons-modal",t),function(){function t(e){var n=this;l(this,t),"element ignoreSwipe isInitialState onDragCallback swipeMax swipeMin swipeMid".split(/\s+/).forEach(function(t){return n[t]=e[t]}),this.elementHandler=e.elementHandler||e.element,this.getThreshold=e.getThreshold||function(){return.5},this.getSide=e.getSide||function(){return"left"},this.handleGesture=this.handleGesture.bind(this),this._shouldFixScroll="ios"===b.globals.actualMobileOS}return c(t,[{key:"update",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.element.hasAttribute("swipeable"),t=(this.gestureDetector||(this.gestureDetector=new A(this.elementHandler,{dragMinDistance:1,passive:!this._shouldFixScroll})),t?"on":"off");this.gestureDetector[t]("drag dragstart dragend",this.handleGesture)}},{key:"handleGesture",value:function(t){t.gesture&&("dragstart"===t.type?this.onDragStart(t):this._ignoreDrag||("dragend"===t.type?this.onDragEnd(t):this.onDrag(t)))}},{key:"onDragStart",value:function(t){var e=this;this._ignoreDrag=t.consumed||!b.isValidGesture(t)||this.ignoreSwipe(t,"left"===e.getSide()?t.gesture.center.clientX:window.innerWidth-t.gesture.center.clientX),this._ignoreDrag||(t.consume&&t.consume(),t.consumed=!0,this._width=(e=this.element.style.width||"100%",e=[parseInt(e,10),/px/.test(e)],t=e[0],e[1]?t:Math.round(document.body.offsetWidth*t/100)),this._startDistance=this._distance=this.isInitialState instanceof Function&&!this.isInitialState()?this._width:0,b.iosPreventScroll(this.gestureDetector))}},{key:"onDrag",value:function(t){t.stopPropagation();t="left"===this.getSide()?t.gesture.deltaX:-t.gesture.deltaX,t=Math.max(0,Math.min(this._width,this._startDistance+t));t!==this._distance&&(this._distance=t,this.swipeMid(this._distance,this._width))}},{key:"onDragEnd",value:function(t){t.stopPropagation();t=t.gesture.interimDirection;this.getSide()!==t&&this._distance>this._width*this.getThreshold()?this.swipeMax():this.swipeMin()}},{key:"dispose",value:function(){this.gestureDetector&&this.gestureDetector.dispose(),this.gestureDetector=this.element=this.elementHandler=null}}]),t}()),Vn=function(){d(n,We);var e=f(n);function n(t){return l(this,n),t=b.extend({timing:"linear",duration:"0.4",delay:"0"},t||{}),e.call(this,t)}return c(n,[{key:"push",value:function(t,e,n){n()}},{key:"pop",value:function(t,e,n){n()}},{key:"block",value:function(t){var e=b.createElement('\n <div style="position: absolute; background-color: transparent; width: 100%; height: 100%; z-index: 100000"></div>\n ');return t.parentNode.appendChild(e),function(){return e.remove()}}}]),n}(),Wn=["durationRestore","durationSwipe","timingSwipe"],Xn=function(){d(a,Vn);var o=f(a);function a(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.durationRestore,e=void 0===e?.1:e,n=t.durationSwipe,n=void 0===n?.15:n,i=t.timingSwipe,i=void 0===i?"linear":i,t=z(t,Wn);return l(this,a),(t=o.call(this,s({},t))).constructor===a&&b.throwAbstract(),t.durationRestore=e,t.durationSwipe=n,t.timingSwipe=i,t.optSwipe={timing:i,duration:n},t.optRestore={timing:i,duration:e},t.swipeShadow=b.createElement('<div style="position: absolute; height: 100%; width: 12px; right: 100%; top: 0; bottom: 0; z-index: -1;background: linear-gradient(to right, transparent 0, rgba(0,0,0,.04) 40%, rgba(0,0,0,.12) 80%, rgba(0,0,0,.16) 100%);"></div>'),t.isDragStart=!0,t}return c(a,[{key:"_decompose",value:function(){b.throwMember()}},{key:"_shouldAnimateToolbar",value:function(){b.throwMember()}},{key:"_calculateDelta",value:function(){b.throwMember()}},{key:"_dragStartSetup",value:function(t,e){this.isDragStart=!1,this.unblock=p(h(a.prototype),"block",this).call(this,e),t.parentElement.insertBefore(this.backgroundMask,t),this.target={enter:b.findToolbarPage(t)||t,leave:b.findToolbarPage(e)||e},this.decomp={enter:this._decompose(this.target.enter),leave:this._decompose(this.target.leave)},this.delta=this._calculateDelta(e,this.decomp.leave),this.shouldAnimateToolbar=this._shouldAnimateToolbar(this.target.enter,this.target.leave),this.shouldAnimateToolbar?(this.swipeShadow.style.top=this.decomp.leave.toolbar.offsetHeight+"px",this.target.leave.appendChild(this.swipeShadow),this._saveStyle(this.target.enter,this.target.leave)):(e.appendChild(this.swipeShadow),this._saveStyle(t,e)),e.classList.add("overflow-visible"),this.overflowElement=e,this.decomp.leave.content.classList.add("content-swiping")}},{key:"translate",value:function(t,e,n,i){this.isSwiping=!0,"none"===n.style.display&&(n.style.display=""),this.isDragStart&&(this.maxWidth=e,this._dragStartSetup(n,i));e=(t-e)/e;this.shouldAnimateToolbar?C.runAll(C([this.decomp.enter.content,this.decomp.enter.bottomToolbar,this.decomp.enter.background]).queue({transform:"translate3d(".concat(25*e,"%, 0, 0)"),opacity:1+10*e/100}),C(this.decomp.enter.toolbarCenter).queue({transform:"translate3d(".concat(this.delta.title*e,"px, 0, 0)"),opacity:1+e}),C(this.decomp.enter.backButtonLabel).queue({opacity:1+10*e/100,transform:"translate3d(".concat(this.delta.label*e,"px, 0, 0)")}),C(this.decomp.enter.other).queue({opacity:1+e}),C([this.decomp.leave.content,this.decomp.leave.bottomToolbar,this.decomp.leave.background,this.swipeShadow]).queue({transform:"translate3d(".concat(t,"px, 0, 0)")}),C(this.decomp.leave.toolbar).queue({opacity:-1*e}),C(this.decomp.leave.toolbarCenter).queue({transform:"translate3d(".concat(125*(1+e),"%, 0, 0)")}),C(this.decomp.leave.backButtonLabel).queue({opacity:-1*e,transform:"translate3d(".concat(this.delta.title*(1+e),"px, 0, 0)")}),C(this.swipeShadow).queue({opacity:-1*e})):C.runAll(C(i).queue({transform:"translate3d(".concat(t,"px, 0, 0)")}),C(n).queue({transform:"translate3d(".concat(25*e,"%, 0, 0)"),opacity:1+10*e/100}),C(this.swipeShadow).queue({opacity:-1*e}))}},{key:"restore",value:function(e,n,i){var o=this;this.isDragStart||(this.shouldAnimateToolbar?C.runAll(C([this.decomp.enter.content,this.decomp.enter.bottomToolbar,this.decomp.enter.background]).queue({transform:"translate3d(-25%, 0, 0)",opacity:.9},this.optRestore),C(this.decomp.enter.toolbarCenter).queue({transform:"translate3d(-".concat(this.delta.title,"px, 0, 0)"),transition:"opacity ".concat(this.durationRestore,"s linear, transform ").concat(this.durationRestore,"s ").concat(this.timingSwipe),opacity:0}),C(this.decomp.enter.backButtonLabel).queue({transform:"translate3d(-".concat(this.delta.label,"px, 0, 0)")},this.optRestore),C(this.decomp.enter.other).queue({opacity:0},this.optRestore),C([this.decomp.leave.content,this.decomp.leave.bottomToolbar,this.decomp.leave.background,this.swipeShadow]).queue({transform:"translate3d(0, 0, 0)"},this.optRestore),C(this.decomp.leave.toolbar).queue({opacity:1},this.optRestore),C(this.decomp.leave.toolbarCenter).queue({transform:"translate3d(0, 0, 0)"},this.optRestore),C(this.decomp.leave.backButtonLabel).queue({opacity:1,transform:"translate3d(0, 0, 0)",transition:"opacity ".concat(this.durationRestore,"s linear, transform ").concat(this.durationRestore,"s ").concat(this.timingSwipe)}),C(this.swipeShadow).queue({opacity:0},this.optRestore).queue(function(t){o._reset(o.target.enter,o.target.leave),e.style.display="none",i&&i(),t()})):C.runAll(C(e).queue({transform:"translate3D(-25%, 0, 0)",opacity:.9},this.optRestore),C(n).queue({transform:"translate3D(0, 0, 0)"},this.optRestore).queue(function(t){o._reset(e,n),e.style.display="none",i&&i(),t()})))}},{key:"popSwipe",value:function(e,n,i){var o=this;this.isDragStart||(this.shouldAnimateToolbar?C.runAll(C([this.decomp.enter.content,this.decomp.enter.bottomToolbar,this.decomp.enter.background]).queue({transform:"translate3d(0, 0, 0)",opacity:1},this.optSwipe),C(this.decomp.enter.toolbarCenter).queue({transform:"translate3d(0, 0, 0)",transition:"opacity ".concat(this.durationSwipe,"s linear, transform ").concat(this.durationSwipe,"s ").concat(this.timingSwipe),opacity:1}),C(this.decomp.enter.backButtonLabel).queue({transform:"translate3d(0, 0, 0)"},this.optSwipe),C(this.decomp.enter.other).queue({opacity:1},this.optSwipe),C([this.decomp.leave.content,this.decomp.leave.bottomToolbar,this.decomp.leave.background]).queue({transform:"translate3d(100%, 0, 0)"},this.optSwipe),C(this.decomp.leave.toolbar).queue({opacity:0},this.optSwipe),C(this.decomp.leave.toolbarCenter).queue({transform:"translate3d(125%, 0, 0)"},this.optSwipe),C(this.decomp.leave.backButtonLabel).queue({opacity:0,transform:"translate3d(".concat(this.delta.title,"px, 0, 0)"),transition:"opacity ".concat(this.durationSwipe,"s linear, transform ").concat(this.durationSwipe,"s ").concat(this.timingSwipe)}),C(this.swipeShadow).queue({opacity:0,transform:"translate3d(".concat(this.maxWidth,"px, 0, 0)")},this.optSwipe).queue(function(t){o._reset(o.target.enter,o.target.leave),i&&i(),t()})):C.runAll(C(e).queue({transform:"translate3D(0, 0, 0)",opacity:1},this.optSwipe),C(n).queue({transform:"translate3D(100%, 0, 0)"},this.optSwipe).queue(function(t){o._reset(e,n),i&&i(),t()})))}},{key:"_saveStyle",value:function(){for(var n=this,i=(this._savedStyle=new WeakMap,function(t){return n._savedStyle.set(t,t.getAttribute("style"))}),t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];e.forEach(i),Object.keys(this.decomp).forEach(function(e){Object.keys(n.decomp[e]).forEach(function(t){(n.decomp[e][t]instanceof Array?n.decomp[e][t]:[n.decomp[e][t]]).forEach(i)})})}},{key:"_restoreStyle",value:function(){for(var n=this,i=function(t){null===n._savedStyle.get(t)?t.removeAttribute("style"):t.setAttribute("style",n._savedStyle.get(t)),n._savedStyle.delete(t)},t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];e.forEach(i),Object.keys(this.decomp).forEach(function(e){Object.keys(n.decomp[e]).forEach(function(t){(n.decomp[e][t]instanceof Array?n.decomp[e][t]:[n.decomp[e][t]]).forEach(i)})})}},{key:"_reset",value:function(){this.isSwiping=!1,this._savedStyle&&this._restoreStyle.apply(this,arguments),this.unblock&&this.unblock(),this.swipeShadow.remove(),this.backgroundMask.remove(),this.overflowElement.classList.remove("overflow-visible"),this.decomp.leave.content.classList.remove("content-swiping"),this.decomp=this.target=this.overflowElement=this._savedStyle=null,this.isDragStart=!0}}],[{key:"swipeable",get:function(){return!0}}]),a}(),Un=["timing","delay","duration"],Yn=function(){d(u,Xn);var o=f(u);function u(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"cubic-bezier(0.3, .4, 0, .9)":e,n=t.delay,n=void 0===n?0:n,i=t.duration,i=void 0===i?.4:i,t=z(t,Un);return l(this,u),(e=o.call(this,s({timing:e,delay:n,duration:i},t))).backgroundMask=b.createElement('<div style="position: absolute; width: 100%; height: 100%;background-color: black; z-index: 2"></div>'),e}return c(u,[{key:"_decompose",value:function(t){function e(t){for(var e=[],n=0;n<t.length;n++)"ons-back-button"!==t[n].nodeName.toLowerCase()&&e.push(t[n]);return e}var n=t._getToolbarElement(),i=n._getToolbarLeftItemsElement(),o=n._getToolbarRightItemsElement(),i=[].concat(0===i.children.length?i:e(i.children)).concat(0===o.children.length?o:e(o.children));return{toolbarCenter:n._getToolbarCenterItemsElement(),backButtonIcon:n._getToolbarBackButtonIconElement(),backButtonLabel:n._getToolbarBackButtonLabelElement(),other:i,content:t._getContentElement(),background:t._getBackgroundElement(),toolbar:n,bottomToolbar:t._getBottomToolbarElement()}}},{key:"_shouldAnimateToolbar",value:function(t,e){var n=t._canAnimateToolbar()&&e._canAnimateToolbar(),t=t._getToolbarElement(),e=e._getToolbarElement(),i=t.hasAttribute("static")||e.hasAttribute("static"),o=b.hasModifier(t,"material")||b.hasModifier(e,"material"),t=b.hasModifier(t,"transparent")||b.hasModifier(e,"transparent");return n&&!i&&!o&&!t}},{key:"_calculateDelta",value:function(t,e){var n,i,t=t.getBoundingClientRect();return{title:e.backButtonLabel.classList.contains("back-button__label")?(i=e.backButtonLabel.getBoundingClientRect(),Math.round(t.width/2-i.width/2-i.left)):Math.round(t.width/2*.6),label:n=e.backButtonIcon.classList.contains("back-button__icon")?e.backButtonIcon.getBoundingClientRect().right-2:n}}},{key:"push",value:function(a,r,s){var l=this,c=(this.backgroundMask.remove(),r.parentNode.insertBefore(this.backgroundMask,r),p(h(u.prototype),"block",this).call(this,a));M(a,function(){var t=b.findToolbarPage(a)||a,e=b.findToolbarPage(r)||r,n=l._decompose(t),i=l._decompose(e),o=l._calculateDelta(r,n);l._shouldAnimateToolbar(t,e)?C.runAll(C([n.content,n.bottomToolbar,n.background],l.def).default({transform:I("100%")},{transform:I()}),C(n.toolbar,l.def).default({opacity:0},{opacity:1}),C(n.toolbarCenter,l.def).default({transform:I("125%"),opacity:1},{transform:I(),opacity:1}),C(n.backButtonLabel,l.def).default({transform:I("".concat(o.title,"px")),opacity:0},{transform:I(),opacity:1,transition:"opacity ".concat(l.duration,"s linear, transform ").concat(l.duration,"s ").concat(l.timing)}),C(n.other,l.def).default({opacity:0},{css:{opacity:1},timing:"linear"}),C([i.content,i.bottomToolbar,i.background],l.def).default({transform:I(),opacity:1},{transform:I("-25%"),opacity:.9}).queue(function(t){l.backgroundMask.remove(),c(),s(),t()}),C(i.toolbarCenter,l.def).default({transform:I(),opacity:1},{transform:I("-".concat(o.title,"px")),opacity:0,transition:"opacity ".concat(l.duration,"s linear, transform ").concat(l.duration,"s ").concat(l.timing)}),C(i.backButtonLabel,l.def).default({transform:I(),opacity:1},{transform:I("-".concat(o.label,"px")),opacity:0}),C(i.other,l.def).default({opacity:1},{css:{opacity:0},timing:"linear"})):C.runAll(C(a,l.def).default({transform:I("100%")},{transform:I()}),C(r,l.def).default({transform:I(),opacity:1},{transform:I("-25%"),opacity:.9}).queue(function(t){l.backgroundMask.remove(),c(),s(),t()}))})}},{key:"pop",value:function(t,e,n){var i=this;if(this.isSwiping)return this.popSwipe(t,e,n);this.backgroundMask.remove(),t.parentNode.insertBefore(this.backgroundMask,t);var o=p(h(u.prototype),"block",this).call(this,t),a=b.findToolbarPage(t)||t,r=b.findToolbarPage(e)||e,s=this._decompose(a),l=this._decompose(r),c=this._calculateDelta(e,l);this._shouldAnimateToolbar(a,r)?C.runAll(C([s.content,s.bottomToolbar,s.background],this.def).default({transform:I("-25%"),opacity:.9},{transform:I(),opacity:1}),C(s.toolbarCenter,this.def).default({transform:I("-".concat(c.title,"px")),opacity:0},{transform:I(),opacity:1,transition:"opacity ".concat(this.duration,"s linear, transform ").concat(this.duration,"s ").concat(this.timing)}),C(s.backButtonLabel,this.def).default({transform:I("-".concat(c.label,"px"))},{transform:I()}),C(s.other,this.def).default({opacity:0},{css:{opacity:1},timing:"linear"}),C([l.content,l.bottomToolbar,l.background],this.def).default({transform:I()},{transform:I("100%")}).wait(0).queue(function(t){i.backgroundMask.remove(),o(),n(),t()}),C(l.toolbar,this.def).default({opacity:1},{opacity:0}),C(l.toolbarCenter,this.def).default({transform:I()},{transform:I("125%")}),C(l.backButtonLabel,this.def).default({transform:I(),opacity:1},{transform:I("".concat(c.title,"px")),opacity:0,transition:"opacity ".concat(this.duration,"s linear, transform ").concat(this.duration,"s ").concat(this.timing)})):C.runAll(C(t,this.def).default({transform:I("-25%"),opacity:.9},{transform:I(),opacity:1}),C(e,this.def).default({transform:I()},{transform:I("100%")}).queue(function(t){i.backgroundMask.remove(),o(),n(),t()}))}}]),u}(),$n=function(){d(a,Vn);var i=f(a);function a(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"cubic-bezier(.1, .7, .1, 1)":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.4:t;return l(this,a),(e=i.call(this,{timing:e,delay:n,duration:t})).backgroundMask=b.createElement('<div style="position: absolute; width: 100%; height: 100%;background: linear-gradient(black, white);"></div>'),e}return c(a,[{key:"push",value:function(t,e,n){var i=this,o=(this.backgroundMask.remove(),e.parentNode.insertBefore(this.backgroundMask,e),p(h(a.prototype),"block",this).call(this,t));C.runAll(C(t,this.def).default({transform:"translate3D(0, 100%, 0)"},{transform:"translate3D(0, 0, 0)"}),C(e,this.def).default({transform:"translate3D(0, 0, 0)",opacity:1},{transform:"translate3D(0, -10%, 0)",opacity:.9}).queue(function(t){i.backgroundMask.remove(),o(),n(),t()}))}},{key:"pop",value:function(t,e,n){var i=this,o=(this.backgroundMask.remove(),t.parentNode.insertBefore(this.backgroundMask,t),p(h(a.prototype),"block",this).call(this,t));C.runAll(C(t,this.def).default({transform:"translate3D(0, -43px, 0)",opacity:.9},{transform:"translate3D(0, 0, 0)",opacity:1}).queue(function(t){i.backgroundMask.remove(),o(),n(),t()}),C(e,this.def).default({transform:"translate3D(0, 0, 0)"},{transform:"translate3D(0, 100%, 0)"}))}}]),a}(),Gn="translate3d(0, 0, 0)",Kn=function(){d(o,Vn);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"linear":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.4:t;return l(this,o),i.call(this,{timing:e,delay:n,duration:t})}return c(o,[{key:"push",value:function(t,e,n){var i=p(h(o.prototype),"block",this).call(this,t);C.runAll(C(t,this.def).default({transform:Gn,opacity:0},{transform:Gn,opacity:1}).queue(function(t){i(),n(),t()}))}},{key:"pop",value:function(t,e,n){var i=p(h(o.prototype),"block",this).call(this,t);C.runAll(C(e,this.def).default({transform:Gn,opacity:1},{transform:Gn,opacity:0}).queue(function(t){i(),n(),t()}))}}]),o}(),Jn=function(){d(a,Vn);var i=f(a);function a(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"cubic-bezier(.1, .7, .4, 1)":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.3:t;return l(this,a),(e=i.call(this,{timing:e,delay:n,duration:t})).blackMaskOpacity=.4,e.backgroundMask=b.createElement('<div style="position: absolute; width: 100%; height: 100%; z-index: 2;background-color: black; opacity: 0;"></div>'),e}return c(a,[{key:"push",value:function(t,e,n){var i=this,o=(this.backgroundMask.remove(),e.parentElement.insertBefore(this.backgroundMask,e.nextSibling),p(h(a.prototype),"block",this).call(this,t));C.runAll(C(this.backgroundMask,this.def).default({transform:"translate3d(0, 0, 0)",opacity:0},{opacity:this.blackMaskOpacity}).queue(function(t){i.backgroundMask.remove(),t()}),C(t,this.def).default({transform:"translate3d(100%, 0, 0)"},{transform:"translate3d(0, 0, 0)"}),C(e,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(-45%, 0, 0)"}).queue(function(t){o(),n(),t()}))}},{key:"pop",value:function(t,e,n){var i=this,o=(this.backgroundMask.remove(),t.parentNode.insertBefore(this.backgroundMask,t.nextSibling),p(h(a.prototype),"block",this).call(this,t));C.runAll(C(this.backgroundMask,this.def).default({transform:"translate3d(0, 0, 0)",opacity:this.blackMaskOpacity},{opacity:0}).queue(function(t){i.backgroundMask.remove(),t()}),C(t,this.def).default({transform:"translate3d(-45%, 0, 0)",opacity:.9},{transform:"translate3d(0, 0, 0)",opacity:1}),C(e,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(100%, 0, 0)"}).queue(function(t){o(),n(),t()}))}}]),a}(),Qn=function(){d(r,Vn);var i=f(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"cubic-bezier(.1, .7, .1, 1)":e,n=t.delay,n=void 0===n?.05:n,t=t.duration,t=void 0===t?.4:t;return l(this,r),(e=i.call(this,{timing:e,delay:n,duration:t})).backgroundMask=b.createElement('<div style="position: absolute; width: 100%; height: 100%;background-color: black;"></div>'),e}return c(r,[{key:"push",value:function(t,e,n){var i=this,o=(this.backgroundMask.remove(),e.parentNode.insertBefore(this.backgroundMask,e),p(h(r.prototype),"block",this).call(this,t)),a=C(this.backgroundMask).wait(this.delay+this.duration).queue(function(t){i.backgroundMask.remove(),t()});C.runAll(a,C(t,this.def).default({transform:"translate3d(0, 100%, 0)"},{transform:"translate3d(0, 0, 0)"}),C(e,this.def).default({opacity:1},{opacity:.4}).queue(function(t){o(),n(),t()}))}},{key:"pop",value:function(t,e,n){var i=this,o=(this.backgroundMask.remove(),t.parentNode.insertBefore(this.backgroundMask,t),p(h(r.prototype),"block",this).call(this,t));C.runAll(C(this.backgroundMask).wait(this.delay+this.duration).queue(function(t){i.backgroundMask.remove(),t()}),C(t,this.def).default({opacity:.4},{opacity:1}).queue(function(t){o(),n(),t()}),C(e,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(0, 100%, 0)"}))}}]),r}(),Zn=function(){d(a,Vn);var o=f(a);function a(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"cubic-bezier(0.4, 0, 0.2, 1)":e,n=t.timingPop,n=void 0===n?"cubic-bezier(0.4, 0, 1, 1)":n,i=t.delay,i=void 0===i?0:i,t=t.duration,t=void 0===t?.2:t;return l(this,a),(e=o.call(this,{timing:e,delay:i,duration:t})).timingPop=n,e}return c(a,[{key:"push",value:function(t,e,n){var i=p(h(a.prototype),"block",this).call(this,t);C.runAll(C(t,this.def).default({transform:"translate3D(0, 42px, 0)",opacity:0},{transform:"translate3D(0, 0, 0)",opacity:1}).queue(function(t){i(),n(),t()}))}},{key:"pop",value:function(t,e,n){var i=p(h(a.prototype),"block",this).call(this,t);C.runAll(C(e,this.def).default({transform:"translate3D(0, 0, 0)",opacity:1},{css:{transform:"translate3D(0, 38px, 0)",opacity:0},timing:this.timingPop}).queue(function(t){i(),n(),t()}))}}]),a}(),ti={default:function(){return r.isAndroid()?Zn:Yn},slide:function(){return r.isAndroid()?Jn:Yn},lift:function(){return r.isAndroid()?Qn:$n},fade:function(){return r.isAndroid()?Zn:Kn},"slide-ios":Yn,"slide-md":Jn,"lift-ios":$n,"lift-md":Qn,"fade-ios":Kn,"fade-md":Zn,none:function(){d(n,Vn);var e=f(n);function n(t){return l(this,n),e.call(this,t)}return c(n,[{key:"push",value:function(t,e,n){n()}},{key:"pop",value:function(t,e,n){n()}}]),n}()},ei={ready:function(t,e){e()}},t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._isRunning=!1,t._initialized=!1,t._pageLoader=Be,t._pageMap=new WeakMap,t._updateAnimatorFactory(),t}return c(n,[{key:"animatorFactory",get:function(){return this._animatorFactory}},{key:"pageLoader",get:function(){return this._pageLoader},set:function(t){t instanceof Ne||b.throwPageLoader(),this._pageLoader=t}},{key:"_getPageTarget",value:function(){return this._page||this.getAttribute("page")}},{key:"page",get:function(){return this._page},set:function(t){this._page=t}},{key:"connectedCallback",value:function(){var i,o,a=this;this.onDeviceBackButton=this._onDeviceBackButton.bind(this),r.isAndroid()&&"force"!==this.getAttribute("swipeable")||(this._swipe=new jn({element:this,getThreshold:function(){return Math.max(.2,parseFloat(a.getAttribute("swipe-threshold"))||0)},swipeMax:function(){var t={duration:i.durationSwipe,timing:i.timingSwipe};a._onSwipe&&a._onSwipe(1,t),b.triggerElementEvent(a,"swipe",{ratio:1,animationOptions:t}),a[a.swipeMax?"swipeMax":"popPage"]({animator:i,swipeToPop:!0}),i=null},swipeMid:function(t,e){var n=t/e;a._onSwipe&&a._onSwipe(n),b.triggerElementEvent(a,"swipe",{ratio:n}),i.translate(t,e,a.topPage.previousElementSibling,a.topPage)},swipeMin:function(){var t={duration:i.durationRestore,timing:i.timingSwipe};a._onSwipe&&a._onSwipe(0,t),b.triggerElementEvent(a,"swipe",{ratio:0,animationOptions:t}),i.restore(a.topPage.previousElementSibling,a.topPage),i=null},ignoreSwipe:function(t,e){if(!a._isRunning&&1<a.children.length){var n=parseInt(a.getAttribute("swipe-target-width")||25,10);if("right"===t.gesture.direction&&e<n){e=function(t){return/ons-back-button/i.test(t.tagName)};if(!e(t.target)&&!b.findParent(t.target,e,function(t){return/ons-page/i.test(t.tagName)})){n=(a.topPage.pushedOptions||{}).animation||a.animatorFactory._animation,t=ti[n]instanceof Function?ti[n].call():ti[n];if(void 0!==t&&t.swipeable)return i=new t,!1}}}return!0}}),this.attributeChangedCallback("swipeable")),this._initialized||(this._initialized=!0,o=b.defer(),this.loaded=o.promise,ei.ready(this,function(){var t=!b.hasAnyComponentAsParent(a),e={animation:"none",show:t};if(0===a.pages.length&&a._getPageTarget())a.pushPage(a._getPageTarget(),e).then(function(){return o.resolve()});else if(0<a.pages.length){for(var n=0;n<a.pages.length;n++)ze(a.pages[n]);a.topPage&&M(a.topPage,function(){return setTimeout(function(){o.resolve(),t&&a.topPage._show(),a._updateLastPageBackButton()},0)})}else M(a,function(){0===a.pages.length&&a._getPageTarget()?a.pushPage(a._getPageTarget(),e).then(function(){return o.resolve()}):o.resolve()})}))}},{key:"_updateAnimatorFactory",value:function(){this._animatorFactory=new w({animators:ti,baseClass:Vn,baseClassName:"NavigatorAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"disconnectedCallback",value:function(){this._backButtonHandler.destroy(),this._backButtonHandler=null,this._swipe&&this._swipe.dispose(),this._swipe=null}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"animation":this._updateAnimatorFactory();break;case"swipeable":this._swipe&&this._swipe.update()}}},{key:"popPage",value:function(){var e=this,t=this._preparePageAndOptions(null,0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).options;b.isInteger(t.times)&&1<t.times&&this._removePages(t.times);return this._popPage(t,function(){return new Promise(function(t){e._pageLoader.unload(e.pages[e.pages.length-1]),t()})})}},{key:"_popPage",value:function(i){var o=this,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){return Promise.resolve()};if(this._isRunning)return Promise.reject("popPage is already running.");if(this.pages.length<=1)return Promise.reject("ons-navigator's page stack is empty.");if(this._emitPrePopEvent())return Promise.reject("Canceled in prepop event.");var r=this.pages.length;return this._isRunning=!0,this.pages[r-2].updateBackButton(0<r-2),new Promise(function(t){var e=o.pages[r-1],n=o.pages[r-2];(i=b.extend({},o.options||{},i)).data&&(n.data=b.extend({},n.data||{},i.data||{}));e._hide(),n.style.display="",(i.animator||o._animatorFactory.newAnimator(i)).pop(o.pages[r-2],o.pages[r-1],function(){a().then(function(){o._isRunning=!1,n._show(),b.triggerElementEvent(o,"postpop",{leavePage:e,enterPage:n,navigator:o,swipeToPop:!!i.swipeToPop,onsBackButton:!!i.onsBackButton}),i.callback&&i.callback(n),t(n)})})}).catch(function(){return o._isRunning=!1})}},{key:"pushPage",value:function(n){function i(t){ze(t),o._pageMap.set(t,n),(t=b.extend(t,{data:a.data})).style.visibility="hidden"}var o=this,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=this._preparePageAndOptions(n,a);n=t.page,a=t.options;return a.pageHTML?this._pushPage(a,function(){return new Promise(function(e){Re.load({page:a.pageHTML,parent:o,params:a.data},function(t){i(t),e()})})}):this._pushPage(a,function(){return new Promise(function(e){o._pageLoader.load({page:n,parent:o,params:a.data},function(t){i(t),e()},function(t){throw o._isRunning=!1,t})})})}},{key:"_pushPage",value:function(){var o=this,a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){return Promise.resolve()};if(this._isRunning)return Promise.reject("pushPage is already running.");if(this._emitPrePushEvent())return Promise.reject("Canceled in prepush event.");this._isRunning=!0;var e=this.animationOptions,a=b.extend({},this.options||{},{animationOptions:e},a),r=this._animatorFactory.newAnimator(a);return t().then(function(){var t=o.pages.length,n=o.pages[t-1],i=a.leavePage||o.pages[t-2];return ze(n),n.updateBackButton(t>(a._replacePage?2:1)),n.pushedOptions=b.extend({},n.pushedOptions||{},a||{}),n.data=b.extend({},n.data||{},a.data||{}),n.unload=n.unload||a.unload,new Promise(function(t){function e(){(o._isRunning=!1)!==a.show&&setImmediate(function(){return n._show()}),b.triggerElementEvent(o,"postpush",{leavePage:i,enterPage:n,navigator:o}),i&&(i.style.display="none"),a.callback&&a.callback(n),t(n)}n.style.visibility="",i?(i._hide(),r.push(n,i,e)):e()})}).catch(function(t){throw o._isRunning=!1,t})}},{key:"replacePage",value:function(t){var e=this;return this.pushPage(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).then(function(t){return 1<e.pages.length&&e._pageLoader.unload(e.pages[e.pages.length-2]),e._updateLastPageBackButton(),Promise.resolve(t)})}},{key:"insertPage",value:function(n,i){var o=this,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},t=this._preparePageAndOptions(i,a);if(i=t.page,a=t.options,(n=this._normalizeIndex(n))>=this.pages.length)return this.pushPage(i,a);i="string"==typeof a.pageHTML?a.pageHTML:i;var r="string"==typeof a.pageHTML?Re:this._pageLoader;return new Promise(function(e){r.load({page:i,parent:o},function(t){ze(t),o._pageMap.set(t,i),t=b.extend(t,{data:a.data,pushedOptions:a}),a.animationOptions=b.extend({},o.animationOptions,a.animationOptions||{}),t.style.display="none",o.insertBefore(t,o.pages[n]),o.topPage.updateBackButton(!0),setTimeout(function(){t=null,e(o.pages[n])},1e3/60)})})}},{key:"removePage",value:function(i){var o=this,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return(i=this._normalizeIndex(i))<this.pages.length-1?new Promise(function(t){var e=o.pages[i],n=o.topPage;o._pageMap.delete(e),o._pageLoader.unload(e),1===o.pages.length&&o.topPage.updateBackButton(!1),t(n)}):this.popPage(t)}},{key:"resetToPage",value:function(t){var e=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=this._preparePageAndOptions(t,n);if(t=i.page,(n=i.options).animator||n.animation||n.pop||(n.animation="none"),n.page||n.pageHTML||!this._getPageTarget()||(t=n.page=this._getPageTarget()),n.pop)return this._removePages(),this.insertPage(0,t,{data:n.data}).then(function(){return e.popPage(n)});var o=n.callback;return n.callback=function(t){e._removePages(),t.updateBackButton(!1),o&&o(t)},this.pushPage(t,n)}},{key:"bringPageTop",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=(-1===["number","string"].indexOf(o(t))&&b.throw("First argument must be a page name or the index of an existing page. You supplied "+t),"number"==typeof t?this._normalizeIndex(t):this._lastIndexOfPage(t)),i=this.pages[n];if(n<0)return this.pushPage(t,e);e=this._preparePageAndOptions(i,e).options;return n===this.pages.length-1?Promise.resolve(i):(i||b.throw("Failed to find item "+t),this._isRunning?Promise.reject("pushPage is already running."):this._emitPrePushEvent()?Promise.reject("Canceled in prepush event."):(i.style.display="",i.style.visibility="hidden",i.parentNode.appendChild(i),this._pushPage(e)))}},{key:"_preparePageAndOptions",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"object"!=o(e)&&b.throw("options must be an object. You supplied "+e),{page:t=null==t&&e.page?e.page:t,options:e=b.extend({},this.options||{},e,{page:t})}}},{key:"_removePages",value:function(t){for(var e=this.pages,n=(n=void 0===t?0:e.length-t)<0?1:n,i=e.length-2;n<=i;i--)this._pageMap.delete(e[i]),this._pageLoader.unload(e[i])}},{key:"_updateLastPageBackButton",value:function(){var t=this.pages.length-1;0<=t&&this.pages[t].updateBackButton(0<t)}},{key:"_normalizeIndex",value:function(t){return 0<=t?t:Math.abs(this.pages.length+t)%this.pages.length}},{key:"_onDeviceBackButton",value:function(t){1<this.pages.length?this.popPage():t.callParentHandler()}},{key:"_lastIndexOfPage",value:function(t){for(var e=this.pages.length-1;0<=e&&t!==this._pageMap.get(this.pages[e]);e--);return e}},{key:"_emitPreEvent",value:function(t){var e=!1;return b.triggerElementEvent(this,"pre"+t,b.extend({navigator:this,currentPage:this.pages[this.pages.length-1],cancel:function(){return e=!0}},1<arguments.length&&void 0!==arguments[1]?arguments[1]:{})),e}},{key:"_emitPrePushEvent",value:function(){return this._emitPreEvent("push")}},{key:"_emitPrePopEvent",value:function(){var t=this.pages.length;return this._emitPreEvent("pop",{leavePage:this.pages[t-1],enterPage:this.pages[t-2]})}},{key:"_createPageElement",value:function(t){t=b.createElement(k.normalizePageHTML(t));return ze(t),t}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler},set:function(t){this._backButtonHandler&&this._backButtonHandler.destroy(),this._backButtonHandler=Yt.createHandler(this,t)}},{key:"topPage",get:function(){for(var t=this.lastElementChild;t&&"ONS-PAGE"!==t.tagName;)t=t.previousElementSibling;return t}},{key:"pages",get:function(){return b.arrayFrom(this.children).filter(function(t){return"ONS-PAGE"===t.tagName})}},{key:"onSwipe",get:function(){return this._onSwipe},set:function(t){!t||t instanceof Function||b.throw('"onSwipe" must be a function'),this._onSwipe=t}},{key:"options",get:function(){return this._options},set:function(t){this._options=t}},{key:"animationOptions",get:function(){return this.hasAttribute("animation-options")?w.parseAnimationOptionsString(this.getAttribute("animation-options")):{}},set:function(t){null==t?this.removeAttribute("animation-options"):this.setAttribute("animation-options",JSON.stringify(t))}},{key:"_isRunning",get:function(){return JSON.parse(this.getAttribute("_is-running"))},set:function(t){this.setAttribute("_is-running",t?"true":"false")}},{key:"_show",value:function(){var t=this;this.loaded.then(function(){return t.topPage&&t.topPage._show()})}},{key:"_hide",value:function(){this.topPage&&this.topPage._hide()}},{key:"_destroy",value:function(){for(var t=this.pages.length-1;0<=t;t--)this._pageLoader.unload(this.pages[t]);this.remove()}}],[{key:"observedAttributes",get:function(){return["animation","swipeable"]}},{key:"registerAnimator",value:function(t,e){e.prototype instanceof Vn||b.throwAnimator("Navigator"),ti[t]=e}},{key:"animators",get:function(){return ti}},{key:"NavigatorAnimator",get:function(){return Vn}},{key:"events",get:function(){return["prepush","postpush","prepop","postpop","swipe"]}},{key:"rewritables",get:function(){return ei}}]),n}(),ni=(i.Navigator=t,customElements.define("ons-navigator",t),"toolbar"),ii={"":"toolbar--*",".toolbar__left":"toolbar--*__left",".toolbar__center":"toolbar--*__center",".toolbar__right":"toolbar--*__right"},t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._visible=!0,M(a(t),function(){t._compile()}),t}return c(n,[{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":b.restoreClass(this,ni,ii);break;case"modifier":v.onModifierChanged(e,n,this,ii)}}},{key:"setVisibility",value:function(e){var n=this;M(this,function(){var t;n._visible=e,n.style.display=e?"":"none",n.parentNode&&((t=b.findChild(n.parentNode,".page__background"))&&(t.style.top=e?null:0),(t=b.findChild(n.parentNode,".page__content"))&&(t.style.top=e?null:0))})}},{key:"show",value:function(){this.setVisibility(!0)}},{key:"hide",value:function(){this.setVisibility(!1)}},{key:"visible",get:function(){return this._visible},set:function(t){this.setVisibility(t)}},{key:"_getToolbarLeftItemsElement",value:function(){return this.querySelector(".left")||k.nullElement}},{key:"_getToolbarCenterItemsElement",value:function(){return this.querySelector(".center")||k.nullElement}},{key:"_getToolbarRightItemsElement",value:function(){return this.querySelector(".right")||k.nullElement}},{key:"_getToolbarBackButtonLabelElement",value:function(){return this.querySelector("ons-back-button .back-button__label")||k.nullElement}},{key:"_getToolbarBackButtonIconElement",value:function(){return this.querySelector("ons-back-button .back-button__icon")||k.nullElement}},{key:"_compile",value:function(){g.prepare(this),this.classList.add(ni),this._ensureToolbarItemElements(),v.initModifier(this,ii)}},{key:"_ensureToolbarItemElements",value:function(){for(var t=this.childNodes.length-1;0<=t;t--)1!=this.childNodes[t].nodeType&&this.removeChild(this.childNodes[t]);var e,n,i=this._ensureToolbarElement("center");i.classList.add("toolbar__title"),1===this.children.length&&this.children[0].classList.contains("center")||(e=this._ensureToolbarElement("left"),n=this._ensureToolbarElement("right"),this.children[0]===e&&this.children[1]===i&&this.children[2]===n||(this.appendChild(e),this.appendChild(i),this.appendChild(n)))}},{key:"_ensureToolbarElement",value:function(t){if(b.findChild(this,".toolbar__"+t))return(e=b.findChild(this,".toolbar__"+t)).classList.add(t),e;var e=b.findChild(this,"."+t)||b.create("."+t);return e.classList.add("toolbar__"+t),e}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(),oi=(b.defineBooleanProperties(t,["static"]),i.Toolbar=t,customElements.define("ons-toolbar",t),{"":"page--*",".page__content":"page--*__content",".page__background":"page--*__background"}),t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._deriveHooks(),t._defaultClassName="page",t.classList.add("page"),t._initialized=!1,M(a(t),function(){t._compile(),t._isShown=!1,t._contentElement=t._getContentElement(),t._backgroundElement=t._getBackgroundElement()}),t}return c(n,[{key:"_compile",value:function(){var e=this,t=(g.prepare(this),b.findChild(this,"ons-toolbar")),n=b.findChild(this,".page__background")||b.findChild(this,".background")||document.createElement("div"),i=(n.classList.add("page__background"),this.insertBefore(n,!t&&this.firstChild||t&&t.nextSibling),b.findChild(this,".page__content")||b.findChild(this,".content")||document.createElement("div"));i.classList.add("page__content"),i.parentElement||b.arrayFrom(this.childNodes).forEach(function(t){1===t.nodeType&&!e._elementShouldBeMoved(t)||i.appendChild(t)}),this._tryToFillStatusBar(i),this.insertBefore(i,n.nextSibling),t&&b.hasModifier(t,"transparent")||1!==i.children.length||!b.isPageControl(i.children[0])||(this._defaultClassName+=" page--wrapper",this.attributeChangedCallback("class")),b.findChild(this,"ons-bottom-toolbar")&&(this._defaultClassName+=" page-with-bottom-toolbar",this.attributeChangedCallback("class")),v.initModifier(this,oi)}},{key:"_elementShouldBeMoved",value:function(t){if(t.classList.contains("page__background"))return!1;var e=t.tagName.toLowerCase();if("ons-fab"===e)return!t.hasAttribute("position");return t.hasAttribute("inline")||-1===["script","ons-toolbar","ons-bottom-toolbar","ons-modal","ons-speed-dial","ons-dialog","ons-alert-dialog","ons-popover","ons-action-sheet"].indexOf(e)}},{key:"_tryToFillStatusBar",value:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this._contentElement;k.autoStatusBarFill(function(){b.toggleAttribute(t,"status-bar-fill",!b.findParent(t,function(t){return t.hasAttribute("status-bar-fill")})&&(t._canAnimateToolbar(e)||!b.findChild(e,b.isPageControl)))})}},{key:"_canAnimateToolbar",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this._contentElement;return!!b.findChild(this,"ons-toolbar")||!!b.findChild(t,function(t){return b.match(t,"ons-toolbar")&&!t.hasAttribute("inline")})}},{key:"connectedCallback",value:function(){var t=this;b.isAttached(this)&&M(this,function(){t._tryToFillStatusBar(),t.hasAttribute("on-infinite-scroll")&&t.attributeChangedCallback("on-infinite-scroll",null,t.getAttribute("on-infinite-scroll")),t._initialized||(t._initialized=!0,setImmediate(function(){t.onInit&&t.onInit(),b.triggerElementEvent(t,"init")}),b.hasAnyComponentAsParent(t)||setImmediate(function(){return t._show()}))})}},{key:"updateBackButton",value:function(t){this.backButton&&(t?this.backButton.show():this.backButton.hide())}},{key:"name",get:function(){return this.getAttribute("name")},set:function(t){this.setAttribute("name",t)}},{key:"backButton",get:function(){return this.querySelector("ons-back-button")}},{key:"onInfiniteScroll",get:function(){return this._onInfiniteScroll},set:function(t){var e=this;!t||t instanceof Function||b.throw('"onInfiniteScroll" must be function or null'),M(this,function(){t?e._onInfiniteScroll||(e._infiniteScrollLimit=.9,e._boundOnScroll=e._onScroll.bind(e),setImmediate(function(){return e._contentElement.addEventListener("scroll",e._boundOnScroll)})):e._contentElement.removeEventListener("scroll",e._boundOnScroll),e._onInfiniteScroll=t})}},{key:"_onScroll",value:function(){var t=this,e=this._contentElement,e=(e.scrollTop+e.clientHeight)/e.scrollHeight>=this._infiniteScrollLimit;this._onInfiniteScroll&&!this._loadingContent&&e&&(this._loadingContent=!0,this._onInfiniteScroll(function(){return t._loadingContent=!1}))}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler},set:function(t){this._backButtonHandler&&this._backButtonHandler.destroy(),this._backButtonHandler=Yt.createHandler(this,t)}},{key:"scrollTop",get:function(){return this._contentElement.scrollTop},set:function(t){this._contentElement.scrollTop=t}},{key:"_getContentElement",value:function(){var t=b.findChild(this,".page__content");if(t)return t;b.throw('Fail to get ".page__content" element')}},{key:"_getBackgroundElement",value:function(){var t=b.findChild(this,".page__background");if(t)return t;b.throw('Fail to get ".page__background" element')}},{key:"_getBottomToolbarElement",value:function(){return b.findChild(this,"ons-bottom-toolbar")||k.nullElement}},{key:"_getToolbarElement",value:function(){return b.findChild(this,"ons-toolbar")||document.createElement("ons-toolbar")}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":b.restoreClass(this,this._defaultClassName,oi);break;case"modifier":v.onModifierChanged(e,n,this,oi);break;case"on-infinite-scroll":this.onInfiniteScroll=null===n?null:function(t){var e=b.findFromPath(n);(i.onInfiniteScroll=e)(t)}}}},{key:"_show",value:function(){!this._isShown&&b.isAttached(this)&&(this._isShown=!0,this.setAttribute("shown",""),this.onShow&&this.onShow(),b.triggerElementEvent(this,"show"),b.propagateAction(this,"_show"))}},{key:"_hide",value:function(){this._isShown&&(this._isShown=!1,this.removeAttribute("shown"),this.onHide&&this.onHide(),b.triggerElementEvent(this,"hide"),b.propagateAction(this,"_hide"))}},{key:"_destroy",value:function(){this._hide(),this.onDestroy&&this.onDestroy(),b.triggerElementEvent(this,"destroy"),this.onDeviceBackButton&&this.onDeviceBackButton.destroy(),b.propagateAction(this,"_destroy"),this.remove()}},{key:"_deriveHooks",value:function(){var n=this;this.constructor.events.forEach(function(t){var e="on"+t.charAt(0).toUpperCase()+t.slice(1);Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){return n["_".concat(e)]},set:function(t){t instanceof Function||b.throw('"'.concat(e,'" hook must be a function')),n["_".concat(e)]=t.bind(n)}})})}}],[{key:"observedAttributes",get:function(){return["modifier","on-infinite-scroll","class"]}},{key:"events",get:function(){return["init","show","hide","destroy"]}}]),n}(),ai=(i.Page=t,customElements.define("ons-page",t),function(){d(o,We);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"cubic-bezier(.1, .7, .4, 1)":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.2:t;return l(this,o),i.call(this,{timing:e,delay:n,duration:t})}return c(o,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}},{key:"_animate",value:function(t,e){var n=e.from,i=e.to,o=e.options,a=e.callback,r=e.restore,r=void 0!==r&&r,e=e.animation;b.extend({},this.options,o);return e&&(n=e.from,i=e.to),e=C(t),e=(e=r?e.saveStyle():e).queue(n).wait(this.delay).queue({css:i,duration:this.duration,timing:this.timing}),r&&(e=e.restoreStyle()),e=a?e.queue(function(t){a(),t()}):e}},{key:"_animateAll",value:function(e,n){var i=this;Object.keys(n).forEach(function(t){return i._animate(e[t],n[t]).play()})}}]),o}()),ri={out:{from:{opacity:1},to:{opacity:0}},in:{from:{opacity:0},to:{opacity:1}}},si=function(){d(e,ai);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"show",value:function(t,e){this._animateAll(t,{_mask:ri.in,_popover:{animation:ri.in,restore:!0,callback:e}})}},{key:"hide",value:function(t,e){this._animateAll(t,{_mask:ri.out,_popover:{animation:ri.out,restore:!0,callback:e}})}}]),e}(),li=function(){d(e,si);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"show",value:function(t,e){this._animateAll(t,{_mask:ri.in,_popover:{from:{transform:"scale3d(1.3, 1.3, 1.0)",opacity:0},to:{transform:"scale3d(1.0, 1.0, 1.0)",opacity:1},restore:!0,callback:e}})}}]),e}(),ci={".popover":"popover--*",".popover-mask":"popover-mask--*",".popover__content":"popover--*__content",".popover__arrow":"popover--*__arrow"},ui={default:function(){return r.isAndroid()?si:li},none:ai,"fade-ios":li,"fade-md":si},di={up:"bottom",left:"right",down:"top",right:"left"},t=function(){d(i,$e);var e=f(i);function i(){var t;return l(this,i),(t=e.call(this))._boundOnChange=t._onChange.bind(a(t)),M(a(t),function(){t._compile(),t.style.display="none"}),t}return c(i,[{key:"_scheme",get:function(){return ci}},{key:"_mask",get:function(){return b.findChild(this,".popover-mask")}},{key:"_popover",get:function(){return b.findChild(this,".popover")}},{key:"_content",get:function(){return b.findChild(this._popover,".popover__content")}},{key:"_arrow",get:function(){return b.findChild(this._popover,".popover__arrow")}},{key:"_updateAnimatorFactory",value:function(){return new w({animators:ui,baseClass:ai,baseClassName:"PopoverAnimator",defaultAnimation:this.getAttribute("animation")||"default"})}},{key:"_toggleStyle",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};t?(this.style.display="block",this._currentTarget=e.target,this._positionPopover(e.target)):(this.style.display="none",this._clearStyles())}},{key:"_positionPopover",value:function(t){var e=this._radius,n=this._content,i=this._margin,o=N.getSafeAreaLengths(),a=N.getSafeAreaDOMRect(),t=t.getBoundingClientRect(),r=b.hasModifier(this,"material"),s=r&&this.hasAttribute("cover-target"),l=(b.findParent(this,"ons-page")||document.body).getBoundingClientRect(),c=Math.max(l.top,a.top),u=Math.max(l.left,a.left),d=Math.min(l.bottom,a.bottom),l=Math.min(l.right,a.right),a={top:t.top-(c+i),left:t.left-(u+i),bottom:d-i-t.bottom,right:l-i-t.right},c={top:t.top+Math.round(t.height/2)-(c+i),left:t.left+Math.round(t.width/2)-(u+i),bottom:d-i-t.bottom+Math.round(t.height/2),right:l-i-t.right+Math.round(t.width/2)},u=this._calculateDirections(a),d=u.vertical,l=u.primary,u=u.secondary,h=(this._currentDirection=l,b.addModifier(this,l),d?"width":"height"),n=(n=window.getComputedStyle(n),{width:parseInt(n.getPropertyValue("width"),10),height:parseInt(n.getPropertyValue("height"),10)}),s=s?0:(d?t.height:t.width)+(r?0:14),d=Math.max(o[l]+i,o[l]+i+a[l]+s),t=Math.max(o[u]+i,o[u]+i+c[u]-n[h]/2);this._popover.style[l]=d+"px",this._popover.style[u]=t+"px",this._arrow.style[u]=Math.max(e,o[u]+i+c[u]-t)+"px"}},{key:"_calculateDirections",value:function(n){var t=(this.getAttribute("direction")||"up down left right").split(/\s+/).map(function(t){return di[t]}).sort(function(t,e){return n[t]-n[e]})[0],e="top"==t||"bottom"==t,i=e?n.left<n.right?"left":"right":n.top<n.bottom?"top":"bottom";return{vertical:e,primary:t,secondary:i}}},{key:"_clearStyles",value:function(){var e=this;this._currentDirection=null,["top","bottom","left","right"].forEach(function(t){e._arrow.style[t]=e._content.style[t]=e._popover.style[t]="",b.removeModifier(e,t)})}},{key:"_onChange",value:function(){var t=this;setImmediate(function(){t._currentTarget&&t._positionPopover(t._currentTarget)})}},{key:"_compile",value:function(){if(g.prepare(this),!this._popover||!this._mask){if(this._popover&&this._content)this._mask||((t=document.createElement("div")).classList.add("popover-mask"),this.insertBefore(t,this.firstChild)),this._arrow||((t=document.createElement("div")).classList.add("popover__arrow"),this._popover.appendChild(t));else{for(var t=b.createFragment('\n <div class="popover-mask"></div>\n <div class="popover">\n <div class="popover__content"></div>\n <div class="popover__arrow"></div>\n </div>\n '),e=t.querySelector(".popover__content");this.childNodes[0];)e.appendChild(this.childNodes[0]);this.appendChild(t)}this.hasAttribute("style")&&(this._popover.setAttribute("style",this.getAttribute("style")),this.removeAttribute("style")),v.initModifier(this,this._scheme)}}},{key:"show",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof(e=!t||"object"!==o(t)||t instanceof Event||t instanceof HTMLElement?s(s({},e),{},{target:t}):s({},t)).target?e.target=document.querySelector(e.target):e.target instanceof Event&&(e.target=e.target.target),e.target instanceof HTMLElement||b.throw("Invalid target type or undefined"),p(h(i.prototype),"show",this).call(this,e)}},{key:"connectedCallback",value:function(){var t=this;p(h(i.prototype),"connectedCallback",this).call(this),window.addEventListener("resize",this._boundOnChange,!1),this._margin=this._margin||parseInt(window.getComputedStyle(this).getPropertyValue("top")),this._margin=this._margin||6,M(this,function(){t._radius=parseInt(window.getComputedStyle(t._content).getPropertyValue("border-top-left-radius"))})}},{key:"disconnectedCallback",value:function(){p(h(i.prototype),"disconnectedCallback",this).call(this),window.removeEventListener("resize",this._boundOnChange,!1)}},{key:"attributeChangedCallback",value:function(t,e,n){if("direction"===t)return this._boundOnChange();"modifier"===t&&this._currentDirection&&b.addModifier(this,this._currentDirection),p(h(i.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(m(p(h(i),"observedAttributes",this)),["direction"])}},{key:"registerAnimator",value:function(t,e){e.prototype instanceof ai||b.throwAnimator("Popover"),ui[t]=e}},{key:"animators",get:function(){return ui}},{key:"PopoverAnimator",get:function(){return ai}}]),i}(),hi=(b.defineBooleanProperties(t,["cover-target"]),i.Popover=t,customElements.define("ons-popover",t),{".progress-bar":"progress-bar--*",".progress-bar__primary":"progress-bar--*__primary",".progress-bar__secondary":"progress-bar--*__secondary"}),fi=b.createElement('\n <div class="progress-bar">\n <div class="progress-bar__secondary"></div>\n <div class="progress-bar__primary"></div>\n </div>\n'),pi="indeterminate",t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),M(a(t=e.call(this)),function(){return t._compile()}),t}return c(n,[{key:"_compile",value:function(){this._isCompiled()?this._template=b.findChild(this,".progress-bar"):this._template=fi.cloneNode(!0),this._primary=b.findChild(this._template,".progress-bar__primary"),this._secondary=b.findChild(this._template,".progress-bar__secondary"),this._updateDeterminate(),this._updateValue(),this.appendChild(this._template),g.prepare(this),v.initModifier(this,hi)}},{key:"_isCompiled",value:function(){if(!b.findChild(this,".progress-bar"))return!1;var t=b.findChild(this,".progress-bar");return!!b.findChild(t,".progress-bar__secondary")&&!!b.findChild(t,".progress-bar__primary")}},{key:"attributeChangedCallback",value:function(t,e,n){"modifier"===t?(v.onModifierChanged(e,n,this,hi),this.hasAttribute(pi)&&this._updateDeterminate()):"value"===t||"secondary-value"===t?this._updateValue():t===pi&&this._updateDeterminate()}},{key:"_updateDeterminate",value:function(){var t=this;M(this,function(){return b.toggleModifier(t,pi,{force:t.hasAttribute(pi)})})}},{key:"_updateValue",value:function(){var t=this;M(this,function(){t._primary.style.width=t.hasAttribute("value")?t.getAttribute("value")+"%":"0%",t._secondary.style.width=t.hasAttribute("secondary-value")?t.getAttribute("secondary-value")+"%":"0%"})}},{key:"value",get:function(){return parseInt(this.getAttribute("value")||"0")},set:function(t){("number"!=typeof t||t<0||100<t)&&b.throw("Invalid value"),this.setAttribute("value",Math.floor(t))}},{key:"secondaryValue",get:function(){return parseInt(this.getAttribute("secondary-value")||"0")},set:function(t){("number"!=typeof t||t<0||100<t)&&b.throw("Invalid value"),this.setAttribute("secondary-value",Math.floor(t))}},{key:"indeterminate",get:function(){return this.hasAttribute(pi)},set:function(t){t?this.setAttribute(pi,""):this.removeAttribute(pi)}}],[{key:"observedAttributes",get:function(){return["modifier","value","secondary-value",pi]}}]),n}(),mi=(i.ProgressBar=t,customElements.define("ons-progress-bar",t),{".progress-circular":"progress-circular--*",".progress-circular__background":"progress-circular--*__background",".progress-circular__primary":"progress-circular--*__primary",".progress-circular__secondary":"progress-circular--*__secondary"}),gi=b.createElement('\n <svg class="progress-circular">\n <circle class="progress-circular__background" />\n <circle class="progress-circular__secondary" cx="50%" cy="50%" r="40%" />\n <circle class="progress-circular__primary" cx="50%" cy="50%" r="40%" />\n </svg>\n'),vi="indeterminate",t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),M(a(t=e.call(this)),function(){return t._compile()}),t}return c(n,[{key:"attributeChangedCallback",value:function(t,e,n){"modifier"===t?(v.onModifierChanged(e,n,this,mi),this.hasAttribute(vi)&&this._updateDeterminate()):"value"===t||"secondary-value"===t?this._updateValue():t===vi&&this._updateDeterminate()}},{key:"_updateDeterminate",value:function(){var t=this;M(this,function(){return b.toggleModifier(t,vi,{force:t.hasAttribute(vi)})})}},{key:"_updateValue",value:function(){var e=this;this.hasAttribute("value")&&M(this,function(){var t=Math.ceil(251.32*e.getAttribute("value")*.01);e._primary.style["stroke-dasharray"]=t+"%, 251.32%"}),this.hasAttribute("secondary-value")?M(this,function(){var t=Math.ceil(251.32*e.getAttribute("secondary-value")*.01);e._secondary.style.display=null,e._secondary.style["stroke-dasharray"]=t+"%, 251.32%"}):M(this,function(){e._secondary.style.display="none"})}},{key:"value",get:function(){return parseInt(this.getAttribute("value")||"0")},set:function(t){("number"!=typeof t||t<0||100<t)&&b.throw("Invalid value"),this.setAttribute("value",Math.floor(t))}},{key:"secondaryValue",get:function(){return parseInt(this.getAttribute("secondary-value")||"0")},set:function(t){("number"!=typeof t||t<0||100<t)&&b.throw("Invalid value"),this.setAttribute("secondary-value",Math.floor(t))}},{key:"indeterminate",get:function(){return this.hasAttribute(vi)},set:function(t){t?this.setAttribute(vi,""):this.removeAttribute(vi)}},{key:"_compile",value:function(){this._isCompiled()?this._template=b.findChild(this,".progress-circular"):this._template=gi.cloneNode(!0),this._primary=b.findChild(this._template,".progress-circular__primary"),this._secondary=b.findChild(this._template,".progress-circular__secondary"),this._updateDeterminate(),this._updateValue(),this.appendChild(this._template),g.prepare(this),v.initModifier(this,mi)}},{key:"_isCompiled",value:function(){if(!b.findChild(this,".progress-circular"))return!1;var t=b.findChild(this,".progress-circular");return!!b.findChild(t,".progress-circular__secondary")&&!!b.findChild(t,".progress-circular__primary")}}],[{key:"observedAttributes",get:function(){return["modifier","value","secondary-value",vi]}}]),n}(),_i=(i.ProgressCircular=t,customElements.define("ons-progress-circular",t),"initial"),t=function(){d(o,D);var i=f(o);function o(){l(this,o),(t=i.call(this))._onDrag=t._onDrag.bind(a(t)),t._onDragStart=t._onDragStart.bind(a(t)),t._onDragEnd=t._onDragEnd.bind(a(t)),t._onScroll=t._onScroll.bind(a(t)),t._setState(_i,!0),t._hide();var t,e=b.defineListenerProperty(a(t),"pull"),n=e.onConnected,e=e.onDisconnected;return t._connectOnPull=n,t._disconnectOnPull=e,t}return c(o,[{key:"_setStyle",value:function(){var t=this.height+"px";u(this,{height:t,lineHeight:t}),""===this.style.display&&this._show()}},{key:"_onScroll",value:function(t){var e=this._pageElement;e.scrollTop<0&&(e.scrollTop=0)}},{key:"_canConsumeGesture",value:function(t){return"up"===t.direction||"down"===t.direction}},{key:"_onDragStart",value:function(t){var e,n,i,o=this;t.gesture&&!this.disabled&&(e=t.gesture.center.clientY+this._pageElement.scrollTop,n=window.innerHeight,this._ignoreDrag=t.consumed||+n<e,this._ignoreDrag||(i=t.consume,t.consume=function(){i&&i(),o._ignoreDrag=!0,o._hide()},this._canConsumeGesture(t.gesture)&&(i&&i(),t.consumed=!0,this._show())),this._startScroll=this._pageElement.scrollTop)}},{key:"_onDrag",value:function(t){var e,n,i=this;t.gesture&&!this.disabled&&!this._ignoreDrag&&this._canConsumeGesture(t.gesture)&&("none"===this.style.display&&this._show(),t.stopPropagation(),t.gesture.center.clientY,this._pageElement.scrollTop,(e=Math.max(t.gesture.deltaY-this._startScroll,0))!==this._currentTranslation&&(0<(n=this.thresholdHeight)&&n<=e?(t.gesture.stopDetect(),setImmediate(function(){return i._finish()})):e>=this.height?this._setState("preaction"):this._setState(_i),this._translateTo(e)))}},{key:"_onDragEnd",value:function(t){!t.gesture||this.disabled||this._ignoreDrag||(t.stopPropagation(),0<this._currentTranslation&&(this._currentTranslation>this.height?this._finish():this._translateTo(0,{animate:!0})))}},{key:"onAction",get:function(){return this._onAction},set:function(t){!t||t instanceof Function||Fe("onAction","function or null"),this._onAction=t}},{key:"_finish",value:function(){var t=this;this._setState("action"),this._translateTo(this.height,{animate:!0}),(this.onAction||function(t){return t()})(function(){t._translateTo(0,{animate:!0}),t._setState(_i)})}},{key:"height",get:function(){return parseInt(this.getAttribute("height")||"64",10)},set:function(t){b.isInteger(t)||Fe("height","integer"),this.setAttribute("height","".concat(t,"px"))}},{key:"thresholdHeight",get:function(){return parseInt(this.getAttribute("threshold-height")||"96",10)},set:function(t){b.isInteger(t)||Fe("thresholdHeight","integer"),this.setAttribute("threshold-height","".concat(t,"px"))}},{key:"_setState",value:function(t,e){var n=this.state;this.setAttribute("state",t),e||n===this.state||b.triggerElementEvent(this,"changestate",{pullHook:this,state:t,lastState:n})}},{key:"state",get:function(){return this.getAttribute("state")}},{key:"pullDistance",get:function(){return this._currentTranslation}},{key:"_show",value:function(){var t=this;setImmediate(function(){t.style.display="",t._pageElement&&(t._pageElement.style.marginTop="-".concat(t.height,"px"))})}},{key:"_hide",value:function(){this.style.display="none",this._pageElement&&(this._pageElement.style.marginTop="")}},{key:"_translateTo",value:function(t){var e,n,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};0==this._currentTranslation&&0==t||(this._currentTranslation=t,e=i.animate?{duration:.3,timing:"cubic-bezier(.1, .7, .1, 1)"}:{},b.triggerElementEvent(this,"pull",{ratio:(t/this.height).toFixed(2),animationOptions:e}),n=this.hasAttribute("fixed-content")?this:this._pageElement,C(n).queue({transform:"translate3d(0px, ".concat(t,"px, 0px)")},e).play(function(){0===t&&u.clear(n,"transition transform"),i.callback instanceof Function&&i.callback()}))}},{key:"_disableDragLock",value:function(){this._dragLockDisabled=!0,this._setupListeners(!0)}},{key:"_setupListeners",value:function(t){function e(t){i._pageElement["".concat(t,"EventListener")]("scroll",i._onScroll,!1)}function n(t){var e={passive:!0};i._gestureDetector[t]("drag",i._onDrag,e),i._gestureDetector[t]("dragstart",i._onDragStart,e),i._gestureDetector[t]("dragend",i._onDragEnd,e)}var i=this;this._gestureDetector&&(n("off"),this._gestureDetector.dispose(),this._gestureDetector=null),e("remove"),t&&(this._gestureDetector=new A(this._pageElement,{dragMinDistance:1,dragDistanceCorrection:!1,dragLockToAxis:!this._dragLockDisabled,passive:!0}),n("on"),e("add"))}},{key:"connectedCallback",value:function(){this._currentTranslation=0,this._pageElement=this.parentNode,this._setupListeners(!0),this._setStyle(),this._connectOnPull()}},{key:"disconnectedCallback",value:function(){this._hide(),this._setupListeners(!1),this._disconnectOnPull()}},{key:"attributeChangedCallback",value:function(t,e,n){"height"===t&&this._pageElement&&this._setStyle()}}],[{key:"observedAttributes",get:function(){return["height"]}},{key:"events",get:function(){return["changestate","pull"]}}]),o}(),bi=(b.defineBooleanProperties(t,["disabled","fixed-content"]),i.PullHook=t,customElements.define("ons-pull-hook",t),{"":"range--*",".range__input":"range--*__input",".range__focus-ring":"range--*__focus-ring"}),yi="range__input--active",t=function(){d(i,In);var e=f(i);function i(){var t;return l(this,i),(t=e.call(this))._onMouseDown=t._onMouseDown.bind(a(t)),t._onMouseUp=t._onMouseUp.bind(a(t)),t._onTouchStart=t._onTouchStart.bind(a(t)),t._onTouchEnd=t._onTouchEnd.bind(a(t)),t._onInput=t._update.bind(a(t)),t._onDragstart=t._onDragstart.bind(a(t)),t._onDragend=t._onDragend.bind(a(t)),t}return c(i,[{key:"_compile",value:function(){p(h(i.prototype),"_compile",this).call(this),this._updateDisabled(this.hasAttribute("disabled"))}},{key:"_update",value:function(){var e=this._input,n=this._focusRing;e.style.backgroundSize="".concat(100*this._ratio,"% 2px"),n.value=this.value,""===e.min&&"0"===e.value||e.min===e.value?e.setAttribute("_zero",""):e.removeAttribute("_zero"),["min","max"].forEach(function(t){return n[t]=e[t]})}},{key:"_scheme",get:function(){return bi}},{key:"_template",get:function(){return'\n <input type="'.concat(this.type,'" class="').concat(this._defaultClassName,'__input">\n <input type="range" class="range__focus-ring" tabIndex="-1">\n ')}},{key:"_defaultClassName",get:function(){return"range"}},{key:"type",get:function(){return"range"}},{key:"_onMouseDown",value:function(t){var e=this;this._input.classList.add(yi),setImmediate(function(){return e._input.focus()})}},{key:"_onTouchStart",value:function(t){this._onMouseDown()}},{key:"_onMouseUp",value:function(t){this._input.classList.remove(yi)}},{key:"_onTouchEnd",value:function(t){this._onMouseUp(t)}},{key:"_onDragstart",value:function(t){t.consumed=!0,t.gesture.stopPropagation(),this._input.classList.add(yi),this.addEventListener("drag",this._onDrag)}},{key:"_onDrag",value:function(t){t.stopPropagation()}},{key:"_onDragend",value:function(t){this._input.classList.remove(yi),this.removeEventListener("drag",this._onDrag)}},{key:"_focusRing",get:function(){return this.children[1]}},{key:"_ratio",get:function(){var t=""===this._input.min?0:parseInt(this._input.min),e=""===this._input.max?100:parseInt(this._input.max);return(this.value-t)/(e-t)}},{key:"attributeChangedCallback",value:function(t,e,n){"disabled"===t&&this._updateDisabled(n),p(h(i.prototype),"attributeChangedCallback",this).call(this,t,e,n)}},{key:"_updateDisabled",value:function(t){t?this.classList.add("range--disabled"):this.classList.remove("range--disabled")}},{key:"connectedCallback",value:function(){this._setupListeners(!0)}},{key:"disconnectedCallback",value:function(){this._setupListeners(!1)}},{key:"_setupListeners",value:function(t){t=(t?"add":"remove")+"EventListener";b[t](this,"touchstart",this._onTouchStart,{passive:!0}),this[t]("mousedown",this._onMouseDown),this[t]("mouseup",this._onMouseUp),this[t]("touchend",this._onTouchEnd),this[t]("dragstart",this._onDragstart),this[t]("dragend",this._onDragend),this[t]("input",this._onInput)}}],[{key:"observedAttributes",get:function(){return["disabled"].concat(m(In.observedAttributes))}}]),i}(),t=(i.Range=t,customElements.define("ons-range",t),function(){d(e,D);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e)}()),ki=(i.Row=t,customElements.define("ons-row",t),"segment"),wi={"":"segment--*",".segment__item":"segment--*__item",".segment__input":"segment--*__input",".segment__button":"segment--*__button"},Ei=(Ve=0,function(){return"ons-segment-gen-"+Ve++}),t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._segmentId=Ei(),t._tabbar=null,t._onChange=t._onChange.bind(a(t)),t._onTabbarPreChange=t._onTabbarPreChange.bind(a(t)),M(a(t),function(){t._compile(),setImmediate(function(){return t._lastActiveIndex=t._tabbar?t._tabbar.getActiveTabIndex():t.getActiveButtonIndex()})}),t}return c(n,[{key:"_compile",value:function(){g.prepare(this),this.classList.add(ki);for(var t=this.children.length-1;0<=t;t--){var e=this.children[t],n=(e.classList.add("segment__item"),b.findChild(e,".segment__input")||b.create("input.segment__input")),i=(n.type="radio",n.value=t,n.name=n.name||this._segmentId,n.checked=!this.hasAttribute("tabbar-id")&&t===(this.activeIndex||0),b.findChild(e,".segment__button")||b.create(".segment__button"));if(i.parentElement!==e)for(;e.firstChild;)i.appendChild(e.firstChild);e.appendChild(n),e.appendChild(i)}v.initModifier(this,wi)}},{key:"connectedCallback",value:function(){var e=this;M(this,function(){var t;e.hasAttribute("tabbar-id")&&(t=b.findParent(e,"ons-page"),e._tabbar=t&&t.querySelector("#"+e.getAttribute("tabbar-id")),e._tabbar&&"ONS-TABBAR"===e._tabbar.tagName||b.throw("No tabbar with id ".concat(e.getAttribute("tabbar-id")," was found.")),e._tabbar.setAttribute("hide-tabs",""),setImmediate(function(){var t=e._tabbar.getActiveTabIndex();e._setChecked(t),e.activeIndex=t}),e._tabbar.addEventListener("prechange",e._onTabbarPreChange))}),this.addEventListener("change",this._onChange)}},{key:"disconnectedCallback",value:function(){var t=this;M(this,function(){t._tabbar&&(t._tabbar.removeEventListener("prechange",t._onTabbarPreChange),t._tabbar=null)}),this.removeEventListener("change",this._onChange)}},{key:"_setChecked",value:function(t){this.children[t].firstElementChild.checked=!0}},{key:"setActiveButton",value:function(t,e){return this._tabbar?this._tabbar.setActiveTab(t,e):(this._setChecked(t),this._postChange(t),Promise.resolve(t))}},{key:"getActiveButtonIndex",value:function(){for(var t=this.children.length-1;0<=t;t--)if(this.children[t].firstElementChild.checked)return t;return-1}},{key:"_onChange",value:function(t){t.stopPropagation(),this._tabbar?this._tabbar.setActiveTab(this.getActiveButtonIndex(),{reject:!1}):this._postChange(this.getActiveButtonIndex())}},{key:"_onTabbarPreChange",value:function(t){var e=this;setImmediate(function(){t.detail.canceled||(e._setChecked(t.index),e._postChange(t.index))})}},{key:"_postChange",value:function(t){b.triggerElementEvent(this,"postchange",{index:t,activeIndex:t,lastActiveIndex:this._lastActiveIndex,segmentItem:this.children[t]}),this._lastActiveIndex=t,this.activeIndex=t}},{key:"activeIndex",get:function(){return parseInt(this.getAttribute("active-index"))},set:function(t){null!=t&&this.setAttribute("active-index",t)}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":b.restoreClass(this,ki,wi);break;case"modifier":v.onModifierChanged(e,n,this,wi);break;case"active-index":M(this,function(){i.getActiveButtonIndex()!==i.activeIndex&&i.setActiveButton(i.activeIndex)})}}}],[{key:"observedAttributes",get:function(){return["class","modifier","active-index"]}},{key:"events",get:function(){return["postchange"]}}]),n}(),Ci=(b.defineBooleanProperties(t,["disabled"]),i.Segment=t,customElements.define("ons-segment",t),{"":"select-* select--*",".select-input":"select-input--*"}),Ai=["autofocus","disabled","form","multiple","name","required","size"],t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),M(a(t=e.call(this)),function(){return t._compile()}),t._deriveGetters(),t}return c(n,[{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":b.restoreClass(this,"select",Ci);break;case"modifier":v.onModifierChanged(e,n,this,Ci)}0<=Ai.indexOf(t)&&M(this,function(){return i._updateBoundAttributes()})}},{key:"_select",get:function(){return this.querySelector("select")}},{key:"_updateBoundAttributes",value:function(){var e=this;Ai.forEach(function(t){e.hasAttribute(t)?e._select.setAttribute(t,e.getAttribute(t)):e._select.removeAttribute(t)})}},{key:"_compile",value:function(){g.prepare(this),this.classList.add("select");var e=this._select||document.createElement("select");!e.id&&this.hasAttribute("select-id")&&(e.id=this.getAttribute("select-id")),e.classList.add("select-input"),this._select||(b.arrayFrom(this.childNodes).forEach(function(t){return e.appendChild(t)}),this.appendChild(e)),v.initModifier(this,Ci)}},{key:"_deriveGetters",value:function(){var n=this;["disabled","length","multiple","name","options","selectedIndex","size","value","form","type"].forEach(function(e){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){return n._select[e]},set:-1===["form","type"].indexOf(e)?function(t){return M(n,function(){return n._select[e]=t})}:void 0})})}},{key:"add",value:function(t){this._select.add(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:null)}},{key:"remove",value:function(t){void 0===t?Element.prototype.remove.call(this):this._select.remove(t)}}],[{key:"observedAttributes",get:function(){return["modifier","class"].concat(Ai)}}]),n}(),Si=(i.Select=t,customElements.define("ons-select",t),"fab fab--mini speed-dial__item"),xi={"":"fab--* speed-dial__item--*"},t=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._compile(),t._boundOnClick=t._onClick.bind(a(t)),t}return c(n,[{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":b.restoreClass(this,Si,xi);break;case"modifier":v.onModifierChanged(e,n,this,xi),b.addModifier(this,"mini");break;case"ripple":this._updateRipple()}}},{key:"connectedCallback",value:function(){this.addEventListener("click",this._boundOnClick,!1)}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this._boundOnClick,!1)}},{key:"_updateRipple",value:function(){b.updateRipple(this)}},{key:"_onClick",value:function(t){t.stopPropagation()}},{key:"_compile",value:function(){var e=this;g.prepare(this),Si.split(/\s+/).forEach(function(t){return e.classList.add(t)}),b.addModifier(this,"mini"),this._updateRipple(),v.initModifier(this,xi)}}],[{key:"observedAttributes",get:function(){return["modifier","ripple","class"]}}]),n}(),Pi=(b.defineBooleanProperties(t,["ripple"]),i.SpeedDialItem=t,customElements.define("ons-speed-dial-item",t),"speed-dial"),Li={"":"speed-dial--*"},t=function(){d(o,D);var i=f(o);function o(){l(this,o),M(a(t=i.call(this)),function(){t._compile()}),t._boundOnClick=t._onClick.bind(a(t));var t,e=b.defineListenerProperty(a(t),"click"),n=e.onConnected,e=e.onDisconnected;return t._connectOnClick=n,t._disconnectOnClick=e,t}return c(o,[{key:"_compile",value:function(){this.classList.add(Pi),g.prepare(this),this._updateRipple(),v.initModifier(this,Li),this.hasAttribute("direction")?this._updateDirection(this.getAttribute("direction")):this._updateDirection("up"),this._updatePosition()}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":b.restoreClass(this,Pi,Li);break;case"modifier":v.onModifierChanged(e,n,this,Li);break;case"ripple":M(this,function(){return i._updateRipple()});break;case"direction":M(this,function(){return i._updateDirection(n)});break;case"position":M(this,function(){return i._updatePosition()});break;case"open":this._ignoreOpenSideEffect||M(this,function(){return i._updateOpen(e)})}}},{key:"connectedCallback",value:function(){this.addEventListener("click",this._boundOnClick,!1),this._connectOnClick()}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this._boundOnClick,!1),this._disconnectOnClick()}},{key:"items",get:function(){return b.arrayFrom(this.querySelectorAll("ons-speed-dial-item"))}},{key:"_fab",get:function(){return b.findChild(this,"ons-fab")}},{key:"_onClick",value:function(t){var e=this;setTimeout(function(){if(!t.defaultPrevented&&!e.disabled&&e.visible)return e.toggleItems()})}},{key:"_show",value:function(){return this.inline?Promise.resolve():this.show()}},{key:"_hide",value:function(){var e=this;return new Promise(function(t){e.inline?t():setImmediate(function(){return e.hide().then(t)})})}},{key:"_updateRipple",value:function(){this._fab&&(this.hasAttribute("ripple")?this._fab.setAttribute("ripple",""):this._fab.removeAttribute("ripple"))}},{key:"_updateDirection",value:function(t){for(var e=this.items,n=0;n<e.length;n++)u(e[n],{transitionDelay:25*n+"ms",bottom:"auto",right:"auto",top:"auto",left:"auto"});switch(t){case"up":for(var i=0;i<e.length;i++)e[i].style.bottom=72+56*i+"px",e[i].style.right="8px";break;case"down":for(var o=0;o<e.length;o++)e[o].style.top=72+56*o+"px",e[o].style.left="8px";break;case"left":for(var a=0;a<e.length;a++)e[a].style.top="8px",e[a].style.right=72+56*a+"px";break;case"right":for(var r=0;r<e.length;r++)e[r].style.top="8px",e[r].style.left=72+56*r+"px";break;default:b.throw("Argument must be one of up, down, left or right.")}}},{key:"_updatePosition",value:function(){var t=this.getAttribute("position");switch(this.classList.remove("fab--top__left","fab--bottom__right","fab--bottom__left","fab--top__right","fab--top__center","fab--bottom__center"),t){case"top right":case"right top":this.classList.add("fab--top__right");break;case"top left":case"left top":this.classList.add("fab--top__left");break;case"bottom right":case"right bottom":this.classList.add("fab--bottom__right");break;case"bottom left":case"left bottom":this.classList.add("fab--bottom__left");break;case"center top":case"top center":this.classList.add("fab--top__center");break;case"center bottom":case"bottom center":this.classList.add("fab--bottom__center")}}},{key:"_getTranslate",value:function(){return 0<=(this.getAttribute("position")||"").indexOf("bottom")?"translate3d(0px, -".concat(b.globals.fabOffset||0,"px, 0px) "):""}},{key:"show",value:function(){return this._fab.show(),u(this,{transform:this._getTranslate}),Promise.resolve()}},{key:"hide",value:function(){var t=this;return this.hideItems().then(function(){return t._fab.hide()})}},{key:"showItems",value:function(){var t=this.open;return this._ignoreOpenSideEffect=!0,this.open=!0,this._ignoreOpenSideEffect=!1,this._updateOpen(t)}},{key:"hideItems",value:function(){var t=this.open;return this._ignoreOpenSideEffect=!0,this.open=!1,this._ignoreOpenSideEffect=!1,this._updateOpen(t)}},{key:"_updateOpen",value:function(t){this.open&&(this.hasAttribute("direction")?this._updateDirection(this.getAttribute("direction")):this._updateDirection("up"));var e=0;if(t!==this.open){for(var n=this.items,i=0;i<n.length;i++){var o=25*(this.open?i:n.length-i);e+=o,u(n[i],{transform:"scale(".concat(this.open?1:0,")"),transitionDelay:o+"ms"})}e+=50,b.triggerElementEvent(this,this.open?"open":"close")}t=b.defer();return setTimeout(t.resolve,e),t.promise}},{key:"disabled",get:function(){return this.hasAttribute("disabled")},set:function(e){e&&this.hideItems(),b.arrayFrom(this.children).forEach(function(t){b.match(t,".fab")&&b.toggleAttribute(t,"disabled",e)}),b.toggleAttribute(this,"disabled",e)}},{key:"inline",get:function(){return this.hasAttribute("inline")}},{key:"visible",get:function(){return this._fab&&this._fab.visible&&"none"!==this.style.display}},{key:"isOpen",value:function(){return this.open}},{key:"toggle",value:function(){return this.visible?this.hide():this.show()}},{key:"toggleItems",value:function(){return this.open?this.hideItems():this.showItems()}}],[{key:"observedAttributes",get:function(){return["class","modifier","ripple","direction","position","open"]}},{key:"events",get:function(){return["open","close"]}}]),o}(),Oi=(b.defineBooleanProperties(t,["open","ripple"]),i.SpeedDial=t,customElements.define("ons-speed-dial",t),{ready:function(t,e){setImmediate(e)}}),t=function(){d(n,D);var t=f(n);function n(){var e;return l(this,n),(e=t.call(this))._page=null,e._pageLoader=Be,M(a(e),function(){Oi.ready(a(e),function(){var t=e._getPageTarget();t&&e.load(t)})}),e}return c(n,[{key:"connectedCallback",value:function(){b.match(this.parentNode,"ons-splitter")||b.throw('"ons-splitter-content" must have "ons-splitter" as parent')}},{key:"_getPageTarget",value:function(){return this._page||this.getAttribute("page")}},{key:"disconnectedCallback",value:function(){}},{key:"attributeChangedCallback",value:function(t,e,n){}},{key:"page",get:function(){return this._page},set:function(t){this._page=t}},{key:"_content",get:function(){return this.children[0]}},{key:"pageLoader",get:function(){return this._pageLoader},set:function(t){t instanceof Ne||b.throwPageLoader(),this._pageLoader=t}},{key:"load",value:function(t){var i=this,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=(this._page=t,e.callback||function(){});return new Promise(function(e){var n=i._content||null;i._pageLoader.load({page:t,parent:i},function(t){n&&(i._pageLoader.unload(n),n=null),setImmediate(function(){return i._show()}),o(t),e(t)})})}},{key:"_show",value:function(){this._content&&this._content._show()}},{key:"_hide",value:function(){this._content&&this._content._hide()}},{key:"_destroy",value:function(){this._content&&this._pageLoader.unload(this._content),this.remove()}}],[{key:"observedAttributes",get:function(){return[]}},{key:"rewritables",get:function(){return Oi}}]),n}(),t=(i.SplitterContent=t,customElements.define("ons-splitter-content",t),function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._boundOnClick=t._onClick.bind(a(t)),M(a(t),function(){t.parentNode._sides.every(function(t){return"split"===t.mode})&&t.setAttribute("style","display: none !important")}),t}return c(n,[{key:"_onClick",value:function(t){this.onClick instanceof Function?this.onClick():b.match(this.parentNode,"ons-splitter")&&this.parentNode._sides.forEach(function(t){return t.close("left").catch(function(){})}),t.stopPropagation()}},{key:"attributeChangedCallback",value:function(t,e,n){}},{key:"connectedCallback",value:function(){this.addEventListener("click",this._boundOnClick)}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this._boundOnClick)}}],[{key:"observedAttributes",get:function(){return[]}}]),n}()),Mi=(i.SplitterMask=t,customElements.define("ons-splitter-mask",t),function(){d(o,We);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"cubic-bezier(.1, .7, .1, 1)":e,n=t.duration,n=void 0===n?.3:n,t=t.delay,t=void 0===t?0:t;return l(this,o),i.call(this,{timing:e,duration:n,delay:t})}return c(o,[{key:"updateOptions",value:function(){b.extend(this,{timing:this.timing,duration:this.duration,delay:this.delay},0<arguments.length&&void 0!==arguments[0]?arguments[0]:{})}},{key:"activate",value:function(t){var e=this,n=t.parentNode;M(n,function(){e._side=t,e._oppositeSide=n.right!==t&&n.right||n.left!==t&&n.left,e._content=n.content,e._mask=n.mask})}},{key:"deactivate",value:function(){this.clearTransition(),this._mask&&this.clearMask(),this._content=this._side=this._oppositeSide=this._mask=null}},{key:"minus",get:function(){return"right"===this._side.side?"-":""}},{key:"clearTransition",value:function(){var e=this;"side mask content".split(/\s+/).forEach(function(t){return e["_"+t]&&u.clear(e["_"+t],"transform transition")})}},{key:"clearMask",value:function(){this._oppositeSide&&"split"!==this._oppositeSide.mode&&this._oppositeSide.isOpen||(this._mask.style.opacity="",this._mask.style.display="none")}},{key:"translate",value:function(t){}},{key:"open",value:function(t){t()}},{key:"close",value:function(t){t()}}]),o}()),t=function(){d(e,Mi);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"translate",value:function(t){this._mask.style.display="block",C(this._side).queue({transform:"translate3d(".concat(this.minus+t,"px, 0, 0)")}).play()}},{key:"open",value:function(e){C.runAll(C(this._side).wait(this.delay).queue({transform:"translate3d(".concat(this.minus,"100%, 0, 0)")},this.def).queue(function(t){t(),e&&e()}),C(this._mask).wait(this.delay).queue({display:"block"}).queue({opacity:"1"},{duration:this.duration,timing:"linear"}))}},{key:"close",value:function(e){C.runAll(C(this._side).wait(this.delay).queue({transform:"translate3d(0, 0, 0)"},this.def).queue(function(t){e&&e(),t()}),C(this._mask).wait(this.delay).queue({opacity:"0"},{duration:this.duration,timing:"linear"}).queue({display:"none"}))}}]),e}(),Ti={default:t,overlay:t,push:function(){d(i,Mi);var t=f(i);function i(){return l(this,i),t.apply(this,arguments)}return c(i,[{key:"_getSlidingElements",value:function(){var t=[this._side,this._content];return this._oppositeSide&&"split"===this._oppositeSide.mode&&t.push(this._oppositeSide),t}},{key:"translate",value:function(t){this._slidingElements||(this._slidingElements=this._getSlidingElements()),this._mask.style.display="block",C(this._slidingElements).queue({transform:"translate3d(".concat(this.minus+t,"px, 0, 0)")}).play()}},{key:"open",value:function(e){var n=this,t=this._side.offsetWidth;this._slidingElements=this._getSlidingElements(),C.runAll(C(this._slidingElements).wait(this.delay).queue({transform:"translate3d(".concat(this.minus+t,"px, 0, 0)")},this.def).queue(function(t){n._slidingElements=null,t(),e&&e()}),C(this._mask).wait(this.delay).queue({display:"block"}))}},{key:"close",value:function(e){var n=this;this._slidingElements=this._getSlidingElements(),C.runAll(C(this._slidingElements).wait(this.delay).queue({transform:"translate3d(0, 0, 0)"},this.def).queue(function(t){n._slidingElements=null,p(h(i.prototype),"clearTransition",n).call(n),e&&e(),t()}),C(this._mask).wait(this.delay).queue({display:"none"}))}}]),i}(),reveal:function(){d(e,Mi);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"_getSlidingElements",value:function(){var t=[this._content,this._mask];return this._oppositeSide&&"split"===this._oppositeSide.mode&&t.push(this._oppositeSide),t}},{key:"activate",value:function(t){p(h(e.prototype),"activate",this).call(this,t),"collapse"===t.mode&&this._setStyles(t)}},{key:"deactivate",value:function(){this._side&&this._unsetStyles(this._side),p(h(e.prototype),"deactivate",this).call(this)}},{key:"_setStyles",value:function(t){u(t,{left:"right"===t.side?"auto":0,right:"right"===t.side?0:"auto",zIndex:0,backgroundColor:"black",transform:this._generateBehindPageStyle(0).container.transform,display:"none"});var e=t.parentElement;M(e,function(){return e.content&&u(e.content,{boxShadow:"0 0 12px 0 rgba(0, 0, 0, 0.2)"})})}},{key:"_unsetStyles",value:function(t){u.clear(t,"left right zIndex backgroundColor display"),t._content&&(t._content.style.opacity=""),this._oppositeSide&&"split"!==this._oppositeSide.mode||t.parentElement.content&&u.clear(t.parentElement.content,"boxShadow")}},{key:"_generateBehindPageStyle",value:function(t){var e=this.maxWidth,t=(t-e)/e*10;return{content:{opacity:1+(t=isNaN(t)?0:Math.max(Math.min(t,0),-10))/100},container:{transform:"translate3d(".concat((this.minus?-1:1)*t,"%, 0, 0)")}}}},{key:"translate",value:function(t){this._side.style.display="",this._side.style.zIndex=1,this.maxWidth=this.maxWidth||this._getMaxWidth();var e=this._generateBehindPageStyle(Math.min(t,this.maxWidth));this._slidingElements||(this._slidingElements=this._getSlidingElements()),this._mask.style.display="block",C.runAll(C(this._slidingElements).queue({transform:"translate3d(".concat(this.minus+t,"px, 0, 0)")}),C(this._side._content).queue(e.content),C(this._side).queue(e.container))}},{key:"open",value:function(e){var n=this,t=(this._side.style.display="",this._side.style.zIndex=1,this.maxWidth=this.maxWidth||this._getMaxWidth(),this._generateBehindPageStyle(this.maxWidth));this._slidingElements=this._getSlidingElements(),setTimeout(function(){C.runAll(C(n._slidingElements).wait(n.delay).queue({transform:"translate3d(".concat(n.minus+n.maxWidth,"px, 0, 0)")},n.def),C(n._mask).wait(n.delay).queue({display:"block"}),C(n._side._content).wait(n.delay).queue(t.content,n.def),C(n._side).wait(n.delay).queue(t.container,n.def).queue(function(t){n._slidingElements=null,t(),e&&e()}))},1e3/60)}},{key:"close",value:function(e){var n=this,t=this._generateBehindPageStyle(0);this._slidingElements=this._getSlidingElements(),C.runAll(C(this._slidingElements).wait(this.delay).queue({transform:"translate3d(0, 0, 0)"},this.def),C(this._mask).wait(this.delay).queue({display:"none"}),C(this._side._content).wait(this.delay).queue(t.content,this.def),C(this._side).wait(this.delay).queue(t.container,this.def).queue(function(t){n._slidingElements=null,n._side.style.zIndex=0,n._side.style.display="none",n._side._content.style.opacity="",e&&e(),t()}))}},{key:"_getMaxWidth",value:function(){return this._side.offsetWidth}}]),e}()},Ii=function(){d(n,D);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._onModeChange=t._onModeChange.bind(a(t)),M(a(t),function(){t.mask||t.appendChild(document.createElement("ons-splitter-mask")),t._layout()}),t}return c(n,[{key:"_getSide",value:function(e){return b.findChild(this,function(t){return b.match(t,"ons-splitter-side")&&t.getAttribute("side")===e})}},{key:"left",get:function(){return this._getSide("left")}},{key:"right",get:function(){return this._getSide("right")}},{key:"side",get:function(){return b.findChild(this,"ons-splitter-side")}},{key:"_sides",get:function(){return[this.left,this.right].filter(function(t){return t})}},{key:"content",get:function(){return b.findChild(this,"ons-splitter-content")}},{key:"topPage",get:function(){return this.content._content}},{key:"mask",get:function(){return b.findChild(this,"ons-splitter-mask")}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler},set:function(t){this._backButtonHandler&&this._backButtonHandler.destroy(),this._backButtonHandler=Yt.createHandler(this,t)}},{key:"_onDeviceBackButton",value:function(t){this._sides.some(function(t){return!!t.isOpen&&t.close()})||t.callParentHandler()}},{key:"_onModeChange",value:function(t){var e=this;t.target.parentNode&&M(this,function(){e._layout()})}},{key:"_layout",value:function(){var e=this;this._sides.forEach(function(t){e.content&&(e.content.style[t.side]="split"===t.mode?t.style.width:0)})}},{key:"connectedCallback",value:function(){this.onDeviceBackButton=this._onDeviceBackButton.bind(this),this.addEventListener("modechange",this._onModeChange,!1)}},{key:"disconnectedCallback",value:function(){this._backButtonHandler.destroy(),this._backButtonHandler=null,this.removeEventListener("modechange",this._onModeChange,!1)}},{key:"attributeChangedCallback",value:function(t,e,n){}},{key:"_show",value:function(){b.propagateAction(this,"_show")}},{key:"_hide",value:function(){b.propagateAction(this,"_hide")}},{key:"_destroy",value:function(){b.propagateAction(this,"_destroy"),this.remove()}}],[{key:"registerAnimator",value:function(t,e){e instanceof SplitterAnimator||b.throwAnimator("Splitter"),Ti[t]=e}},{key:"SplitterAnimator",get:function(){return SplitterAnimator}},{key:"animators",get:function(){return Ti}}]),n}(),Di=(i.Splitter=Ii,customElements.define("ons-splitter",Ii),"split"),Ni="collapse",Bi="closed",Ri="changing",Hi={ready:function(t,e){setImmediate(e)}},qi=function(){function n(t,e){l(this,n),this._element=t,this._onChange=this._onChange.bind(this),e&&this.changeTarget(e)}return c(n,[{key:"changeTarget",value:function(t){this.disable(),(this._target=t)&&(this._orientation=-1!==["portrait","landscape"].indexOf(t),this.activate())}},{key:"_match",value:function(t){return this._orientation?this._target===(t.isPortrait?"portrait":"landscape"):t.matches}},{key:"_onChange",value:function(t){this._element._updateMode(this._match(t)?Ni:Di)}},{key:"activate",value:function(){this._orientation?(xe.on("change",this._onChange),this._onChange({isPortrait:xe.isPortrait()})):(this._queryResult=window.matchMedia(this._target),this._queryResult.addListener(this._onChange),this._onChange(this._queryResult))}},{key:"disable",value:function(){this._orientation?xe.off("change",this._onChange):this._queryResult&&(this._queryResult.removeListener(this._onChange),this._queryResult=null)}}]),n}(),t=function(){d(n,D);var t=f(n);function n(){var e;return l(this,n),(e=t.call(this))._page=null,e._state=Bi,e._lock=new Oe,e._pageLoader=Be,e._collapseDetection=new qi(a(e)),e._animatorFactory=new w({animators:Ii.animators,baseClass:Mi,baseClassName:"SplitterAnimator",defaultAnimation:e.getAttribute("animation")}),M(a(e),function(){e.attributeChangedCallback("width"),e.hasAttribute("side")||e.setAttribute("side","left"),Hi.ready(a(e),function(){var t=e._page||e.getAttribute("page");t&&e.load(t)})}),e}return c(n,[{key:"connectedCallback",value:function(){var o=this;b.match(this.parentNode,"ons-splitter")||b.throw("Parent must be an ons-splitter element"),this._swipe||(this._swipe=new jn({element:this,elementHandler:this.parentElement,swipeMax:function(){o._onSwipe&&o._onSwipe(1,o._animationOpt),b.triggerElementEvent(o,"swipe",{ratio:1,animationOptions:o._animationOpt}),o.open()},swipeMid:function(t,e){e=t/e;o._onSwipe&&o._onSwipe(e),b.triggerElementEvent(o,"swipe",{ratio:e}),o._animator.translate(t)},swipeMin:function(){o._onSwipe&&o._onSwipe(0,o._animationOpt),b.triggerElementEvent(o,"swipe",{ratio:0,animationOptions:o._animationOpt}),o.close()},getThreshold:function(){return Math.max(0,Math.min(1,parseFloat(o.getAttribute("open-threshold"))||.3))},getSide:function(){return o.side},isInitialState:function(){var t=o._state===Bi;return o._state=Ri,t},ignoreSwipe:function(t,e){var n=o.isOpen,i=Math.max(0,parseInt(o.getAttribute("swipe-target-width"),10)||0);return o._mode===Di||o._lock.isLocked()||o._isOtherSideOpen()||(t=t.gesture.direction,!("left"===o.side?"left"===t&&n||"right"===t&&!n:"left"===t&&!n||"right"===t&&n))||!n&&0!==i&&i<e}}),this.attributeChangedCallback("swipeable")),M(this,function(){o.constructor.observedAttributes.forEach(function(t){return o.attributeChangedCallback(t,null,o.getAttribute(t))})})}},{key:"side",get:function(){return"right"===this.getAttribute("side")?"right":"left"},set:function(t){t?this.setAttribute("side",t):tihs.removeAttribute("side")}},{key:"disconnectedCallback",value:function(){this._swipe&&this._swipe.dispose(),this._animator=this._animationOpt=this._swipe=null}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"swipeable":this._swipe&&this._swipe.update();break;case"width":n=this.getAttribute("width"),this.style.width=/^\d+(px|%)$/.test(n)?n:"80%";break;case"animation":case"animation-options":this._updateAnimation();break;default:this[b.camelize("_update-".concat(t))](n)}}},{key:"_emitEvent",value:function(t){if("pre"!==t.slice(0,3))return b.triggerElementEvent(this,t,{side:this});var e=!1;return b.triggerElementEvent(this,t,{side:this,cancel:function(){return e=!0}}),e}},{key:"_isOtherSideOpen",value:function(){var e=this;return!!b.findChild(this.parentElement,function(t){return t instanceof e.constructor&&t!==e&&t._mode===Ni&&t.isOpen})}},{key:"_updateCollapse",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.getAttribute("collapse");return null===t||"split"===t?(this._collapseDetection.disable(),this._updateMode(Di)):""===t||"collapse"===t?(this._collapseDetection.disable(),this._updateMode(Ni)):void this._collapseDetection.changeTarget(t)}},{key:"_updateMode",value:function(t){t!==this._mode&&(this._mode=t,this.setAttribute("mode",t),t===Di?(this._animator&&this._animator.deactivate(),this._state=Bi):(this._animator&&this._animator.activate(this),"open"===this._state&&this._animator.open()),b.triggerElementEvent(this,"modechange",{side:this,mode:t}))}},{key:"_updateAnimation",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.getAttribute("animation");this.parentNode&&(this._animator&&this._animator.deactivate(),this._animator=this._animatorFactory.newAnimator({animation:t}),this._animator.activate(this),this._animationOpt={timing:this._animator.duration,duration:this._animator.duration},this._animator.updateOptions(this.animationOptions))}},{key:"page",get:function(){return this._page},set:function(t){this._page=t}},{key:"_content",get:function(){return this.children[0]}},{key:"pageLoader",get:function(){return this._pageLoader},set:function(t){t instanceof Ne||b.throwPageLoader(),this._pageLoader=t}},{key:"mode",get:function(){return this._mode}},{key:"onSwipe",get:function(){return this._onSwipe},set:function(t){!t||t instanceof Function||b.throw('"onSwipe" must be a function'),this._onSwipe=t}},{key:"animationOptions",get:function(){return this.hasAttribute("animation-options")?w.parseAnimationOptionsString(this.getAttribute("animation-options")):{}},set:function(t){null==t?this.removeAttribute("animation-options"):this.setAttribute("animation-options",JSON.stringify(t))}},{key:"isOpen",get:function(){return this._mode===Ni&&this._state!==Bi},set:function(t){this.toggle({},t)}},{key:"open",value:function(t){return this.toggle(t,!0)}},{key:"close",value:function(t){return this.toggle(t,!1)}},{key:"toggle",value:function(){var e=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length?arguments[1]:void 0,i="boolean"==typeof t?t:!this.isOpen,o=i?"open":"close",a=i?"open":Bi;if(this._mode===Di)return Promise.resolve(!1);if(this._state===a)return Promise.resolve(this);if(this._lock.isLocked())return Promise.reject("Another splitter-side action is already running.");if(i&&this._isOtherSideOpen())return Promise.reject("Another menu is already open.");if(this._emitEvent("pre".concat(o)))return Promise.reject("Canceled in pre".concat(o," event."));var r=this._lock.lock();return this._state=Ri,n.animation&&this._updateAnimation(n.animation),new Promise(function(t){e._animator[o](function(){b.iosPageScrollFix(i),e._state=a,r(),e._emitEvent("post".concat(o)),n.callback instanceof Function&&n.callback(e),t(e)})})}},{key:"load",value:function(t){var i=this,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=(this._page=t,e.callback||function(){});return new Promise(function(e){var n=i._content||null;i._pageLoader.load({page:t,parent:i},function(t){n&&(i._pageLoader.unload(n),n=null),setImmediate(function(){return i._show()}),o(t),e(t)})})}},{key:"_show",value:function(){this._content&&this._content._show()}},{key:"_hide",value:function(){this._content&&this._content._hide()}},{key:"_destroy",value:function(){this._content&&this._pageLoader.unload(this._content),this.remove()}}],[{key:"observedAttributes",get:function(){return["animation","width","collapse","swipeable","animation-options"]}},{key:"events",get:function(){return["preopen","postopen","preclose","postclose","modechange","swipe"]}},{key:"rewritables",get:function(){return Hi}}]),n}(),zi=(b.defineBooleanProperties(t,["swipeable"]),i.SplitterSide=t,customElements.define("ons-splitter-side",t),{"":"switch--*",".switch__input":"switch--*__input",".switch__handle":"switch--*__handle",".switch__toggle":"switch--*__toggle"}),Fi={ios:[1,21],material:[0,16]},t=function(){d(o,Nn);var e=f(o);function o(){var t;return l(this,o),M(a(t=e.call(this)),function(){t.attributeChangedCallback("modifier",null,t.getAttribute("modifier"))}),t._onChange=t._onChange.bind(a(t)),t._onRelease=t._onRelease.bind(a(t)),t._lastTimeStamp=0,t}return c(o,[{key:"_scheme",get:function(){return zi}},{key:"_defaultClassName",get:function(){return"switch"}},{key:"_template",get:function(){return'\n <input type="'.concat(this.type,'" class="').concat(this._defaultClassName,'__input">\n <div class="').concat(this._defaultClassName,'__toggle">\n <div class="').concat(this._defaultClassName,'__handle">\n <div class="').concat(this._defaultClassName,'__touch"></div>\n </div>\n </div>\n ')}},{key:"type",get:function(){return"checkbox"}},{key:"_getPosition",value:function(t){var e=this._locations;return Math.min(e[1],Math.max(e[0],this._startX+t.gesture.deltaX))}},{key:"_emitChangeEvent",value:function(){b.triggerElementEvent(this,"change",{value:this.checked,switch:this,isInteractive:!0})}},{key:"_onChange",value:function(t){t&&t.stopPropagation&&t.stopPropagation(),this._emitChangeEvent()}},{key:"_onClick",value:function(t){(t.target.classList.contains("".concat(this.defaultElementClass,"__touch"))||t.timeStamp-this._lastTimeStamp<50)&&t.preventDefault(),this._lastTimeStamp=t.timeStamp}},{key:"_onHold",value:function(t){this.disabled||(v.addModifier(this,"active"),document.addEventListener("release",this._onRelease))}},{key:"_onDragStart",value:function(t){this.disabled||-1===["left","right"].indexOf(t.gesture.direction)?v.removeModifier(this,"active"):(t.consumed=!0,v.addModifier(this,"active"),this._startX=this._locations[this.checked?1:0],this.addEventListener("drag",this._onDrag),document.addEventListener("release",this._onRelease))}},{key:"_onDrag",value:function(t){t.stopPropagation(),this._handle.style.left=this._getPosition(t)+"px"}},{key:"_onRelease",value:function(t){var e=this._locations,t=this._getPosition(t),n=this.checked;this.checked=t>=(e[0]+e[1])/2,this.checked!==n&&this._emitChangeEvent(),this.removeEventListener("drag",this._onDrag),document.removeEventListener("release",this._onRelease),this._handle.style.left="",v.removeModifier(this,"active")}},{key:"click",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.disabled||(this.checked=!this.checked,this._emitChangeEvent(),this._lastTimeStamp=t.timeStamp||0)}},{key:"_handle",get:function(){return this.querySelector(".".concat(this._defaultClassName,"__handle"))}},{key:"checkbox",get:function(){return this._input}},{key:"connectedCallback",value:function(){var t=this;M(this,function(){t._input.addEventListener("change",t._onChange)}),this.addEventListener("dragstart",this._onDragStart),this.addEventListener("hold",this._onHold),this.addEventListener("tap",this.click),this.addEventListener("click",this._onClick),this._gestureDetector=new A(this,{dragMinDistance:1,holdTimeout:251,passive:!0})}},{key:"disconnectedCallback",value:function(){var t=this;M(this,function(){t._input.removeEventListener("change",t._onChange)}),this.removeEventListener("dragstart",this._onDragStart),this.removeEventListener("hold",this._onHold),this.removeEventListener("tap",this.click),this.removeEventListener("click",this._onClick),this._gestureDetector&&this._gestureDetector.dispose()}},{key:"attributeChangedCallback",value:function(t,e,n){var i;"modifier"===t&&(i=-1!==(n||"").indexOf("material"),this._locations=Fi[i?"material":"ios"]),p(h(o.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(m(p(h(o),"observedAttributes",this)),["modifier"])}}]),o}(),ji=(i.Switch=t,customElements.define("ons-switch",t),{".tabbar__content":"tabbar--*__content",".tabbar__border":"tabbar--*__border",".tabbar":"tabbar--*"}),Vi={ready:function(t,e){e()}},Wi=(k.nullElement,function(){d(o,D);var i=f(o);function o(){l(this,o),(t=i.call(this))._loadInactive=b.defer(),M(a(t),function(){return t._compile()});var t,e=b.defineListenerProperty(a(t),"swipe"),n=e.onConnected,e=e.onDisconnected;return t._connectOnSwipe=n,t._disconnectOnSwipe=e,t}return c(o,[{key:"connectedCallback",value:function(){var t=this;this._swiper||(this._swiper=new fn({getElement:function(){return t._contentElement},getInitialIndex:function(){return t.activeIndex||t.getAttribute("activeIndex")},getAutoScrollRatio:this._getAutoScrollRatio.bind(this),getBubbleWidth:function(){return parseInt(t.getAttribute("ignore-edge-width")||25,10)},isAutoScrollable:function(){return!0},preChangeHook:this._onPreChange.bind(this),postChangeHook:this._onPostChange.bind(this),refreshHook:this._onRefresh.bind(this),scrollHook:this._onScroll.bind(this)}),M(this,function(){t._tabbarBorder=b.findChild(t._tabbarElement,".tabbar__border"),t._swiper.init({swipeable:t.hasAttribute("swipeable")})})),M(this,function(){t._updatePosition(),t._updateVisibility(),b.findParent(t,"ons-page",function(t){return t===document.body})||t._show()}),this._connectOnSwipe()}},{key:"disconnectedCallback",value:function(){this._swiper&&this._swiper.initialized&&(this._swiper.dispose(),this._swiper=null,this._tabbarBorder=null,this._tabsRect=null),this._disconnectOnSwipe()}},{key:"_normalizeEvent",value:function(t){return s(s({},t),{},{index:t.activeIndex,tabItem:this.tabs[t.activeIndex]})}},{key:"_onPostChange",value:function(t){t=this._normalizeEvent(t),b.triggerElementEvent(this,"postchange",t);t=t.tabItem.pageElement;t&&t._show()}},{key:"_onPreChange",value:function(t){var e,n,i;return(t=this._normalizeEvent(t)).cancel=function(){return t.canceled=!0},b.triggerElementEvent(this,"prechange",t),t.canceled||(i=(e=t).activeIndex,e=e.lastActiveIndex,(n=this.tabs)[i].setActive(!0),0<=e&&((i=n[e]).setActive(!1),i.pageElement&&i.pageElement._hide())),t.canceled}},{key:"_onScroll",value:function(t){var e,n,i,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this._tabbarBorder&&(this._tabbarBorder.style.transition="all ".concat(o.duration||0,"s ").concat(o.timing||""),this._autogrow&&0<this._tabsRect.length?(e=Math.floor(t),n=Math.ceil(t),this._tabbarBorder.style.width=je(this._tabsRect[e].width,this._tabsRect[n].width,i=t%1)+"px",this._tabbarBorder.style.transform="translate3d(".concat(je(this._tabsRect[e].left,this._tabsRect[n].left,i),"px, 0, 0)")):this._tabbarBorder.style.transform="translate3d(".concat(100*t,"%, 0, 0)")),b.triggerElementEvent(this,"swipe",{index:t,options:o})}},{key:"_onRefresh",value:function(){var t;this._autogrow=b.hasModifier(this,"autogrow"),this._tabsRect=this.tabs.map(function(t){return t.getBoundingClientRect()}),this._tabbarBorder&&(this._tabbarBorder.style.display=this.hasAttribute("tab-border")||b.hasModifier(this,"material")?"block":"none",t=this.getActiveTabIndex(),0<this._tabsRect.length&&0<=t&&(this._tabbarBorder.style.width=this._tabsRect[t].width+"px"))}},{key:"_getAutoScrollRatio",value:function(t,e,n){return Math.min(1,Math.max(0,.6+e*(n/300*(t?-1:1))))}},{key:"_tabbarElement",get:function(){return b.findChild(this,".tabbar")}},{key:"_contentElement",get:function(){return b.findChild(this,".tabbar__content")}},{key:"_targetElement",get:function(){var t=this._contentElement;return t&&t.children[0]||null}},{key:"_compile",value:function(){g.prepare(this);var t=this._contentElement||b.create(".tabbar__content"),e=(t.classList.add("ons-tabbar__content"),this._tabbarElement||b.create(".tabbar"));if(e.classList.add("ons-tabbar__footer"),!e.parentNode)for(;this.firstChild;)e.appendChild(this.firstChild);e.children.length>this.activeIndex&&!b.findChild(e,"[active]")&&e.children[this.activeIndex].setAttribute("active",""),this._tabbarBorder=b.findChild(e,".tabbar__border")||b.create(".tabbar__border"),e.appendChild(this._tabbarBorder),e.classList.add("ons-swiper-tabbar"),t.children[0]||t.appendChild(document.createElement("div")),t.children[1]||t.appendChild(document.createElement("div")),t.appendChild=t.appendChild.bind(t.children[0]),t.insertBefore=t.insertBefore.bind(t.children[0]),this.appendChild(t),this.appendChild(e),v.initModifier(this,ji)}},{key:"_updatePosition",value:function(){var i=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.getAttribute("position"),o=this._top="top"===t||"auto"===t&&b.hasModifier(this,"material"),a=o?b.addModifier:b.removeModifier,r=(a(this,"top"),b.findParent(this,"ons-page"));r&&M(r,function(){var t=0,e=(r.children[0]&&b.match(r.children[0],"ons-toolbar")&&(a(r.children[0],"noshadow"),t=1),r._getContentElement()),n=window.getComputedStyle(r._getContentElement(),null);i.style.top=o?parseInt(n.getPropertyValue("padding-top"),10)-t+"px":"",e.style.top=n.top,e.style.top=""}),k.autoStatusBarFill(function(){var t=b.findParent(i,function(t){return t.hasAttribute("status-bar-fill")});b.toggleAttribute(i,"status-bar-fill",o&&!t)})}},{key:"topPage",get:function(){var t=this.tabs,e=this.getActiveTabIndex();return t[e]&&(t[e].pageElement||this.pages[0])||null}},{key:"pages",get:function(){return b.arrayFrom(this._targetElement.children)}},{key:"tabs",get:function(){return Array.prototype.filter.call(this._tabbarElement.children,function(t){return"ONS-TAB"===t.tagName})}},{key:"setActiveTab",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=this.activeIndex;return this._activeIndexSkipEffect=!0,this.activeIndex=t,this._updateActiveIndex(t,n,e)}},{key:"_updateActiveIndex",value:function(e,t){var n=this,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=this.tabs[t],a=this.tabs[e];if(!a)return Promise.reject("Specified index does not match any tab.");if(e===t)return b.triggerElementEvent(this,"reactive",{index:e,activeIndex:e,tabItem:a}),Promise.resolve(a.pageElement);t=a.pageElement;return(t?Promise.resolve(t):a.loaded).then(function(t){return n._swiper.setActiveIndex(e,s(s({reject:!0},i),{},{animation:o&&t?i.animation||n.getAttribute("animation"):"none",animationOptions:b.extend({duration:.3,timing:"cubic-bezier(.4, .7, .5, 1)"},n.animationOptions,i.animationOptions||{})})).then(function(){return i.callback instanceof Function&&i.callback(t),t})})}},{key:"setTabbarVisibility",value:function(t){this.hideTabs=!t}},{key:"show",value:function(){this.hideTabs=!1}},{key:"hide",value:function(){this.hideTabs=!0}},{key:"_updateVisibility",value:function(){var e=this;M(this,function(){var t=!e.hideTabs;e._contentElement.style[e._top?"top":"bottom"]=t?"":"0px",e._tabbarElement.style.display=t?"":"none",t&&e._onRefresh()})}},{key:"visible",get:function(){return"none"!==this._tabbarElement.style.display}},{key:"getActiveTabIndex",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.tabs,e=0;e<t.length;e++)if(t[e]&&"ONS-TAB"===t[e].tagName&&t[e].isActive())return e;return-1}},{key:"activeIndex",get:function(){return Number(this.getAttribute("active-index"))},set:function(t){null!=t&&this.setAttribute("active-index",t)}},{key:"_show",value:function(){var n=this;this._swiper.show(),setImmediate(function(){var t=n.tabs,e=n.getActiveTabIndex(t);n._loadInactive.resolve(),0<t.length&&0<=e&&t[e].loaded.then(function(t){return t&&setImmediate(function(){return t._show()})})})}},{key:"_hide",value:function(){this._swiper.hide();var t=this.topPage;t&&t._hide()}},{key:"_destroy",value:function(){this.tabs.forEach(function(t){return t.remove()}),this.remove()}},{key:"attributeChangedCallback",value:function(t,e,n){var i,o=this;"modifier"===t?(v.onModifierChanged(e,n,this,ji),(i=function(t){return/(^|\s+)top($|\s+)/i.test(t)})(e)!==i(n)&&this._updatePosition()):"position"===t?b.isAttached(this)&&this._updatePosition():"swipeable"===t?this._swiper&&this._swiper.updateSwipeable(this.hasAttribute("swipeable")):"hide-tabs"===t?this.isConnected&&this._updateVisibility():"active-index"===t&&(this._activeIndexSkipEffect?this._activeIndexSkipEffect=!1:this.isConnected&&M(this,function(){return o._updateActiveIndex(n,e)}))}},{key:"animationOptions",get:function(){return this.hasAttribute("animation-options")?b.animationOptionsParse(this.getAttribute("animation-options")):{}},set:function(t){null==t?this.removeAttribute("animation-options"):this.setAttribute("animation-options",JSON.stringify(t))}}],[{key:"observedAttributes",get:function(){return["modifier","position","swipeable","tab-border","hide-tabs","active-index"]}},{key:"rewritables",get:function(){return Vi}},{key:"events",get:function(){return["prechange","postchange","reactive","swipe"]}}]),o}()),Xi=(b.defineBooleanProperties(Wi,["hide-tabs","swipeable","tab-border"]),i.Tabbar=Wi,customElements.define("ons-tabbar",Wi),"tabbar__item"),Ui={"":"tabbar--*__item",".tabbar__button":"tabbar--*__button"},t=function(){d(o,D);var i=f(o);function o(){l(this,o),t=i.call(this),["label","icon","badge"].some(t.hasAttribute.bind(a(t)))?t._compile():M(a(t),function(){return t._compile()}),t._pageLoader=Be,t._onClick=t._onClick.bind(a(t));var t,e=b.defineListenerProperty(a(t),"click"),n=e.onConnected,e=e.onDisconnected;return t._connectOnClick=n,t._disconnectOnClick=e,t}return c(o,[{key:"pageLoader",get:function(){return this._pageLoader},set:function(t){t instanceof Ne||b.throwPageLoader(),this._pageLoader=t}},{key:"_compile",value:function(){if(g.prepare(this),this.classList.add(Xi),!this._button){for(var t=b.create("button.tabbar__button");this.childNodes[0];)t.appendChild(this.childNodes[0]);var e=b.create("input",{display:"none"});e.type="radio",this.appendChild(e),this.appendChild(t),this._updateButtonContent(),v.initModifier(this,Ui),this._updateRipple()}}},{key:"_updateRipple",value:function(){this._button&&b.updateRipple(this._button,this.hasAttribute("ripple"))}},{key:"_updateButtonContent",value:function(){var t,e,n,i=this,o=this._button,a=this._icon;this.hasAttribute("icon")?(t=(a=a||b.createElement('<div class="tabbar__icon"><ons-icon></ons-icon></div>')).children[0],n=t.getAttribute("icon"),e=function(){return t.attributeChangedCallback("icon",n,i.getAttribute("icon"))},this.hasAttribute("icon")&&this.hasAttribute("active-icon")?t.setAttribute("icon",this.getAttribute(this.isActive()?"active-icon":"icon")):this.hasAttribute("icon")&&t.setAttribute("icon",this.getAttribute("icon")),a.parentElement!==o&&o.insertBefore(a,o.firstChild),t.attributeChangedCallback instanceof Function?e():setImmediate(function(){return t.attributeChangedCallback instanceof Function&&e()})):a&&a.remove(),["label","badge"].forEach(function(t,e){var n=i.querySelector(".tabbar__".concat(t));i.hasAttribute(t)?((n=n||b.create(".tabbar__".concat(t)+("badge"===t?" notification":""))).textContent=i.getAttribute(t),n.parentElement!==o&&o.appendChild(n)):n&&n.remove()})}},{key:"_input",get:function(){return b.findChild(this,"input")}},{key:"_button",get:function(){return b.findChild(this,".tabbar__button")}},{key:"_icon",get:function(){return this.querySelector(".tabbar__icon")}},{key:"_tabbar",get:function(){return b.findParent(this,"ons-tabbar")}},{key:"index",get:function(){return Array.prototype.indexOf.call(this.parentElement.children,this)}},{key:"_onClick",value:function(t){var e=this;setTimeout(function(){t.defaultPrevented||e._tabbar.setActiveTab(e.index,{reject:!1})})}},{key:"setActive",value:function(){var t=this,e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];M(this,function(){t._input.checked=e,t.classList.toggle("active",e),b.toggleAttribute(t,"active",e),t.hasAttribute("icon")&&t.hasAttribute("active-icon")&&t._icon.children[0].setAttribute("icon",t.getAttribute(e?"active-icon":"icon"))})}},{key:"_loadPageElement",value:function(n,t){var i=this;return this._hasLoaded=!0,new Promise(function(e){i._pageLoader.load({parent:n,page:t},function(t){n.replaceChild(t,n.children[i.index]),i._loadedPage=t,e(t)})})}},{key:"pageElement",get:function(){if(this._loadedPage)return this._loadedPage;var t=this._tabbar;return t.pages.length===t.tabs.length?t.pages[this.index]:null}},{key:"isActive",value:function(){return this.classList.contains("active")}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this._onClick,!1),this._loadedPage&&(this._hasLoaded=!1,this.loaded=null),this._disconnectOnClick()}},{key:"connectedCallback",value:function(){var a,r=this;this.addEventListener("click",this._onClick,!1),b.isAttached(this)&&!this.loaded&&(a=b.defer(),this.loaded=a.promise,M(this,function(){var i=r.index,o=r._tabbar;o||b.throw("Tab elements must be children of Tabbar"),o.hasAttribute("modifier")&&b.addModifier(r,o.getAttribute("modifier")),r._hasLoaded||(r.hasAttribute("active")&&(r.setActive(!0),o.activeIndex=i),i===o.tabs.length-1&&(o._onRefresh(),setImmediate(function(){return o._onRefresh()})),Wi.rewritables.ready(o,function(){var t,e,n=r.page||r.getAttribute("page");return!r.pageElement&&n?(t=o._targetElement,e=b.create("div",{height:"100%",width:"100%",visibility:"hidden"}),t.insertBefore(e,t.children[i]),e=function(){return r._loadPageElement(t,n).then(a.resolve)},r.isActive()?e():o._loadInactive.promise.then(e)):a.resolve(r.pageElement)}))}),this._connectOnClick())}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":b.restoreClass(this,Xi,Ui);break;case"modifier":M(this,function(){return v.onModifierChanged(e,n,i,Ui)});break;case"ripple":M(this,function(){return i._updateRipple()});break;case"icon":case"label":case"badge":M(this,function(){return i._updateButtonContent()});break;case"page":this.page=n||""}}}],[{key:"observedAttributes",get:function(){return["modifier","ripple","icon","label","page","badge","class"]}}]),o}(),Yi=(i.Tab=t,customElements.define("ons-tab",t),function(){d(o,We);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"linear":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.2:t;return l(this,o),i.call(this,{timing:e,delay:n,duration:t})}return c(o,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),o}()),t=function(){d(o,Yi);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"linear":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.3:t;return l(this,o),i.call(this,{timing:e,delay:n,duration:t})}return c(o,[{key:"show",value:function(t,e){e=e||function(){},C(t,this.def).default({opacity:0},{opacity:1}).queue(function(t){e(),t()}).play()}},{key:"hide",value:function(t,e){e=e||function(){},C(t,this.def).default({opacity:1},{opacity:0}).queue(function(t){e(),t()}).play()}}]),o}(),$i=function(){d(o,Yi);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"ease":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.25:t;return l(this,o),(e=i.call(this,{timing:e,delay:n,duration:t})).messageDelay=.4*e.duration+e.delay,r.isAndroid()?e.ascension=48:N.isIPhoneXPortraitPatchActive()?e.ascension=98:N.isIPhoneXLandscapePatchActive()?e.ascension=85:e.ascension=64,e}return c(o,[{key:"show",value:function(t,e){t=t._toast,b.globals.fabOffset=this.ascension,C.runAll(C(t,this.def).default({transform:"translate3d(0, ".concat(this.ascension,"px, 0)")},{transform:"translate3d(0, 0, 0)"}).queue(function(t){e&&e(),t()}),C(this._getFabs()).wait(this.delay).queue({transform:"translate3d(0, -".concat(this.ascension,"px, 0) scale(1)")},this.def),C(b.arrayFrom(t.children),this.def).default({opacity:0},{opacity:1}))}},{key:"hide",value:function(t,e){t=t._toast,b.globals.fabOffset=0,C.runAll(C(t,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(0, ".concat(this.ascension,"px, 0)")}).queue(function(t){e&&e(),t()}),C(this._getFabs(),this.def).wait(this.delay).queue({transform:"translate3d(0, 0, 0) scale(1)"},this.def),C(b.arrayFrom(t.children),this.def).default({opacity:1},{opacity:0}))}},{key:"_getFabs",value:function(){return b.arrayFrom(document.querySelectorAll("ons-fab[position~=bottom], ons-speed-dial[position~=bottom]")).filter(function(t){return t.visible})}}]),o}(),Gi=function(){d(o,Yi);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"ease":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.35:t;return l(this,o),(e=i.call(this,{timing:e,delay:n,duration:t})).bodyHeight=document.body.clientHeight,N.isIPhoneXPortraitPatchActive()?e.liftAmount="calc(100% + 34px)":N.isIPhoneXLandscapePatchActive()?e.liftAmount="calc(100% + 21px)":e.liftAmount="100%",e}return c(o,[{key:"show",value:function(t,e){t=t._toast,C.runAll(C(t,this.def).default({transform:"translate3d(0, ".concat(this.liftAmount,", 0)"),opacity:0},{transform:"translate3d(0, 0, 0)",opacity:1}).queue(function(t){e&&e(),t()}))}},{key:"hide",value:function(t,e){t=t._toast,C.runAll(C(t,this.def).default({transform:"translate3d(0, 0, 0)",opacity:1},{transform:"translate3d(0, ".concat(this.liftAmount,", 0)"),opacity:0}).queue(function(t){e&&e(),t()}))}},{key:"_updatePosition",value:function(t){0===parseInt(t.style.top,10)&&(t.style.top=t.style.bottom="")}}]),o}(),Ki=function(){d(o,Yi);var i=f(o);function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.timing,e=void 0===e?"ease":e,n=t.delay,n=void 0===n?0:n,t=t.duration,t=void 0===t?.35:t;return l(this,o),e=i.call(this,{timing:e,delay:n,duration:t}),N.isIPhoneXPortraitPatchActive()?e.fallAmount="calc(-100% - 44px)":e.fallAmount="-100%",e}return c(o,[{key:"show",value:function(t,e){t=t._toast,this._updatePosition(t),C.runAll(C(t,this.def).default({transform:"translate3d(0, ".concat(this.fallAmount,", 0)"),opacity:0},{transform:"translate3d(0, 0, 0)",opacity:1}).queue(function(t){e&&e(),t()}))}},{key:"hide",value:function(e,n){var i=this;e=e._toast,this._updatePosition(e),C.runAll(C(e,this.def).default({transform:"translate3d(0, 0, 0)",opacity:1},{transform:"translate3d(0, ".concat(this.fallAmount,", 0)"),opacity:0}).queue(function(t){i._updatePosition(e,!0),n&&n(),t()}))}},{key:"_updatePosition",value:function(t,e){var n=N.isIPhoneXPortraitPatchActive()?"44px":"0";t.style.top!==n&&(t.style.top=n,t.style.bottom="initial")}}]),o}(),Ji={".toast":"toast--*",".toast__message":"toast--*__message",".toast__button":"toast--*__button"},Qi="toast",Zi={default:r.isAndroid()?$i:Gi,fade:t,ascend:$i,lift:Gi,fall:Ki,none:Yi},t=function(){d(n,$e);var e=f(n);function n(){var t;return l(this,n),(t=e.call(this))._defaultDBB=null,M(a(t),function(){return t._compile()}),t}return c(n,[{key:"_scheme",get:function(){return Ji}},{key:"_toast",get:function(){return b.findChild(this,".".concat(Qi))}},{key:"_updateAnimatorFactory",value:function(){return this._toast&&(this._toast.style.top=this._toast.style.bottom=""),new w({animators:Zi,baseClass:Yi,baseClassName:"ToastAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){g.prepare(this),this.style.display="none",this.style.zIndex=1e4;var t="toast__message",e="toast__button",n=b.findChild(this,".".concat(Qi));if(!n)for((n=document.createElement("div")).classList.add(Qi);this.childNodes[0];)n.appendChild(this.childNodes[0]);var i=b.findChild(n,".".concat(e));if(i||(i=b.findChild(n,function(t){return b.match(t,".button")||b.match(t,"button")}))&&(i.classList.remove("button"),i.classList.add(e),n.appendChild(i)),!b.findChild(n,".".concat(t))){if(!(o=b.findChild(n,".message")))for(var o=document.createElement("div"),a=n.childNodes.length-1;0<=a;a--)n.childNodes[a]!==i&&o.insertBefore(n.childNodes[a],o.firstChild);o.classList.add(t),n.insertBefore(o,n.firstChild)}n.parentNode!==this&&this.appendChild(n),v.initModifier(this,this._scheme)}}],[{key:"registerAnimator",value:function(t,e){e.prototype instanceof Yi||b.throw('"Animator" param must inherit OnsToastElement.ToastAnimator'),Zi[t]=e}},{key:"animators",get:function(){return Zi}},{key:"ToastAnimator",get:function(){return Yi}}]),n}(),$i=(i.Toast=t,customElements.define("ons-toast",t),function(){d(e,Ze);var t=f(e);function e(){return l(this,e),t.apply(this,arguments)}return c(e,[{key:"_scheme",get:function(){return{"":"toolbar-button--*"}}},{key:"_defaultClassName",get:function(){return"toolbar-button"}},{key:"_rippleOpt",get:function(){return[this,void 0,{center:"",size:"contain",background:"transparent"}]}}]),e}());return i.ToolbarButton=$i,customElements.define("ons-toolbar-button",$i),e=T,k.waitDOMContentLoaded(function(){function t(t){for(var e=window.document.querySelectorAll(t),n=0;n<e.length;n++)k.templateStore.set(e[n].getAttribute("id"),e[n].textContent||e[n].content)}t('script[type="text/template"]'),t('script[type="text/ng-template"]'),t("template")}),window._onsLoaded&&e._util.warn("Onsen UI is loaded more than once."),window._onsLoaded=!0,e.ready(function(){e.enableDeviceBackButtonHandler(),e._defaultDeviceBackButtonHandler=e._internal.dbbDispatcher.createHandler(window.document.body,function(){Object.hasOwnProperty.call(navigator,"app")?navigator.app.exitApp():console.warn("Could not close the app. Is 'cordova.js' included?\nError: 'window.navigator.app' is undefined.")}),document.body._gestureDetector=new e.GestureDetector(document.body,{passive:!0}),e.platform.isWebView()||document.body.addEventListener("keydown",function(t){27===t.keyCode&&e.fireDeviceBackButtonEvent()}),e._setupLoadingPlaceHolders()}),Viewport.setup(),window._superSecretOns=T});
\No newline at end of file