SelfHost/Test Environment/admin/spiderbasic/onsenui.min.js
2025-12-15 19:46:13 +01:00

11 lines
294 KiB
JavaScript

!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 t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(t){return n="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},n(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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,g(i.key),i)}}function o(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e,n){return(e=g(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(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&&c(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function u(t,e){if(null==t)return{};var n,i,a=function(t,e){if(null==t)return{};var n,i,a={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){var e=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 n,i=l(t);if(e){var a=l(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}(this,n)}}function f(){return f="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=l(t)););return t}(t,e);if(i){var a=Object.getOwnPropertyDescriptor(i,e);return a.get?a.get.call(arguments.length<3?t:n):a.value}},f.apply(this,arguments)}function p(t){return function(t){if(Array.isArray(t))return m(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)return;if("string"==typeof t)return m(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(t,e)}(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 m(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}function g(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var v=window.HTMLElement,_=function(){function t(){i(this,t),this._selectedPlatform=null,this._ignorePlatformSelect=!1}return o(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;var e=t();return this._ignorePlatformSelect=!1,e}},{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||430===window.screen.width&&932===window.screen.height||932===window.screen.width&&430===window.screen.height||393===window.screen.width&&852===window.screen.height||852===window.screen.width&&393===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":n(device))||/browser/i.test(device.platform)?/iPhone|iPad|iPod/i.test(navigator.userAgent)||this.isIPadOS():/iOS/i.test(device.platform)}},{key:"isIOS7above",value:function(){if("object"===("undefined"==typeof device?"undefined":n(device))&&!/browser/i.test(device.platform))return/iOS/i.test(device.platform)&&parseInt(device.version.split(".")[0])>=7;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){var t=(navigator.userAgent.match(/\b[0-9]+_[0-9]+(?:_[0-9]+)?\b/)||[""])[0].replace(/_/g,".");return parseInt(t.split(".")[0])>=7}return!1}},{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(v);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":n(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":n(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":n(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||navigator.userAgent.indexOf(" OPR/")>=0}},{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():Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0||"[object SafariRemoteNotification]"===(!window.safari||safari.pushNotification).toString()}},{key:"isChrome",value:function(t){return!t&&this._getSelectedPlatform()?"chrome"===this._getSelectedPlatform():!(!window.chrome||window.opera||navigator.userAgent.indexOf(" OPR/")>=0||navigator.userAgent.indexOf(" Edge/")>=0)}},{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():navigator.userAgent.indexOf(" Edge/")>=0}},{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}(),b=new _;window.customElements&&(window.customElements.forcePolyfill=!0),function(){var t=new function(){},e=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function n(t){var n=e.has(t);return t=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(t),!n&&t}function i(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 a(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function o(t,e,n){n=n||new Set;for(var i=t;i;){if(i.nodeType===Node.ELEMENT_NODE){var r=i;e(r);var s=r.localName;if("link"===s&&"import"===r.getAttribute("rel")){if((i=r.import)instanceof Node&&!n.has(i))for(n.add(i),i=i.firstChild;i;i=i.nextSibling)o(i,e,n);i=a(t,r);continue}if("template"===s){i=a(t,r);continue}if(r=r.__CE_shadowRoot)for(r=r.firstChild;r;r=r.nextSibling)o(r,e,n)}i=i.firstChild?i.firstChild:a(t,i)}}function r(t,e,n){t[e]=n}function s(){this.a=new Map,this.f=new Map,this.c=[],this.b=!1}function l(t,e){t.b=!0,t.c.push(e)}function c(t,e){t.b&&o(e,(function(e){return u(t,e)}))}function u(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 d(t,e){var n=[];for(o(e,(function(t){return n.push(t)})),e=0;e<n.length;e++){var a=n[e];1===a.__CE_state?i(a)&&t.connectedCallback(a):p(t,a)}}function h(t,e){var n=[];for(o(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 f(t,e,n){n=n||new Set;var i=[];if(o(e,(function(e){if("link"===e.localName&&"import"===e.getAttribute("rel")){var a=e.import;a instanceof Node&&"complete"===a.readyState?(a.__CE_isImportDocument=!0,a.__CE_hasRegistry=!0):e.addEventListener("load",(function(){var i=e.import;i.__CE_documentLoadHandled||(i.__CE_documentLoadHandled=!0,i.__CE_isImportDocument=!0,i.__CE_hasRegistry=!0,n.delete(i),f(t,i,n))}))}else i.push(e)}),n),t.b)for(e=0;e<i.length;e++)u(t,i[e]);for(e=0;e<i.length;e++)p(t,i[e])}function p(t,e){if(void 0===e.__CE_state){var n=t.a.get(e.localName);if(n){n.constructionStack.push(e);var a=n.constructor;try{try{if(new a!==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,n.attributeChangedCallback)for(n=n.observedAttributes,a=0;a<n.length;a++){var o=n[a],r=e.getAttribute(o);null!==r&&t.attributeChangedCallback(e,o,null,r,null)}i(e)&&t.connectedCallback(e)}}}function m(t,e){this.c=t,this.a=e,this.b=void 0,f(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 g(t){t.b&&t.b.disconnect()}function v(){var t=this;this.b=this.a=void 0,this.c=new Promise((function(e){t.b=e,t.a&&e(t.a)}))}function _(t){if(t.a)throw Error("Already resolved.");t.a=void 0,t.b&&t.b(void 0)}function b(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 m(t,document)}s.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t),t.i=!0},s.prototype.disconnectedCallback=function(t){t.i||this.connectedCallback(t);var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t),t.i=void 0},s.prototype.attributeChangedCallback=function(t,e,n,i,a){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,i,a)},m.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||g(this),e=0;e<t.length;e++)for(var n=t[e].addedNodes,i=0;i<n.length;i++)f(this.c,n[i])},b.prototype.m=function(t,e){var i,a,o,r,s,l=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!n(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 c=function(t){var e=u[t];if(void 0!==e&&!(e instanceof Function))throw Error("The '"+t+"' callback must be a function.");return e},u=e.prototype;if(!(u instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");i=c("connectedCallback"),a=c("disconnectedCallback"),o=c("adoptedCallback"),r=c("attributeChangedCallback"),s=e.observedAttributes||[]}catch(t){return}finally{this.f=!1}!function(t,e,n){t.a.set(e,n),t.f.set(n.constructor,n)}(this.a,t,{localName:t,constructor:e,connectedCallback:i,disconnectedCallback:a,adoptedCallback:o,attributeChangedCallback:r,observedAttributes:s,constructionStack:[]}),this.c.push(t),this.b||(this.b=!0,this.g((function(){if(!1!==l.b)for(l.b=!1,f(l.a,document);0<l.c.length;){var t=l.c.shift();(t=l.h.get(t))&&_(t)}})))},b.prototype.get=function(t){if(t=this.a.a.get(t))return t.constructor},b.prototype.s=function(t){if(!n(t))return Promise.reject(new SyntaxError("'"+t+"' is not a valid custom element name."));var e=this.h.get(t);return e||(e=new v,this.h.set(t,e),this.a.a.get(t)&&-1===this.c.indexOf(t)&&_(e)),e.c},b.prototype.o=function(t){g(this.l);var e=this.g;this.g=function(n){return t((function(){return e(n)}))}},window.CustomElementRegistry=b,b.prototype.define=b.prototype.m,b.prototype.get=b.prototype.get,b.prototype.whenDefined=b.prototype.s,b.prototype.polyfillWrapFlushCallback=b.prototype.o;var y=window.Document.prototype.createElement,k=window.Document.prototype.createElementNS,w=window.Document.prototype.importNode,E=window.Document.prototype.prepend,C=window.Document.prototype.append,A=window.Node.prototype.cloneNode,S=window.Node.prototype.appendChild,x=window.Node.prototype.insertBefore,P=window.Node.prototype.removeChild,L=window.Node.prototype.replaceChild,O=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),M=window.Element.prototype.attachShadow,T=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),I=window.Element.prototype.getAttribute,D=window.Element.prototype.setAttribute,N=window.Element.prototype.removeAttribute,B=window.Element.prototype.getAttributeNS,R=window.Element.prototype.setAttributeNS,H=window.Element.prototype.removeAttributeNS,q=window.Element.prototype.insertAdjacentElement,z=window.Element.prototype.prepend,F=window.Element.prototype.append,j=window.Element.prototype.before,V=window.Element.prototype.after,W=window.Element.prototype.replaceWith,X=window.Element.prototype.remove,U=window.HTMLElement,Y=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),$=window.HTMLElement.prototype.insertAdjacentElement;function G(t,e,n){e.prepend=function(e){for(var a=[],o=0;o<arguments.length;++o)a[o-0]=arguments[o];o=a.filter((function(t){return t instanceof Node&&i(t)})),n.j.apply(this,a);for(var r=0;r<o.length;r++)h(t,o[r]);if(i(this))for(o=0;o<a.length;o++)(r=a[o])instanceof Element&&d(t,r)},e.append=function(e){for(var a=[],o=0;o<arguments.length;++o)a[o-0]=arguments[o];o=a.filter((function(t){return t instanceof Node&&i(t)})),n.append.apply(this,a);for(var r=0;r<o.length;r++)h(t,o[r]);if(i(this))for(o=0;o<a.length;o++)(r=a[o])instanceof Element&&d(t,r)}}var K,J=window.customElements;if(!J||J.forcePolyfill||"function"!=typeof J.define||"function"!=typeof J.get){var Q=new s;K=Q,window.HTMLElement=function(){function e(){var e=this.constructor;if(!(i=K.f.get(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=i.constructionStack;if(!n.length)return n=y.call(document,i.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=i,u(K,n),n;var i,a=n[i=n.length-1];if(a===t)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[i]=t,Object.setPrototypeOf(a,e.prototype),u(K,a),a}return e.prototype=U.prototype,e}(),function(){var t=Q;r(Document.prototype,"createElement",(function(e){if(this.__CE_hasRegistry){var n=t.a.get(e);if(n)return new n.constructor}return e=y.call(this,e),u(t,e),e})),r(Document.prototype,"importNode",(function(e,n){return e=w.call(this,e,n),this.__CE_hasRegistry?f(t,e):c(t,e),e})),r(Document.prototype,"createElementNS",(function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var i=t.a.get(n);if(i)return new i.constructor}return e=k.call(this,e,n),u(t,e),e})),G(t,Document.prototype,{j:E,append:C})}(),function(){var t=Q;function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var a=void 0;if(this.firstChild){var o=this.childNodes,r=o.length;if(0<r&&i(this)){a=Array(r);for(var s=0;s<r;s++)a[s]=o[s]}}if(n.set.call(this,e),a)for(e=0;e<a.length;e++)h(t,a[e])}}})}r(Node.prototype,"insertBefore",(function(e,n){if(e instanceof DocumentFragment){var a=Array.prototype.slice.apply(e.childNodes);if(e=x.call(this,e,n),i(this))for(n=0;n<a.length;n++)d(t,a[n]);return e}return a=i(e),n=x.call(this,e,n),a&&h(t,e),i(this)&&d(t,e),n})),r(Node.prototype,"appendChild",(function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=S.call(this,e),i(this))for(var a=0;a<n.length;a++)d(t,n[a]);return e}return n=i(e),a=S.call(this,e),n&&h(t,e),i(this)&&d(t,e),a})),r(Node.prototype,"cloneNode",(function(e){return e=A.call(this,e),this.ownerDocument.__CE_hasRegistry?f(t,e):c(t,e),e})),r(Node.prototype,"removeChild",(function(e){var n=i(e),a=P.call(this,e);return n&&h(t,e),a})),r(Node.prototype,"replaceChild",(function(e,n){if(e instanceof DocumentFragment){var a=Array.prototype.slice.apply(e.childNodes);if(e=L.call(this,e,n),i(this))for(h(t,n),n=0;n<a.length;n++)d(t,a[n]);return e}a=i(e);var o=L.call(this,e,n),r=i(this);return r&&h(t,n),a&&h(t,e),r&&d(t,e),o})),O&&O.get?e(Node.prototype,O):l(t,(function(t){e(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;)P.call(this,this.firstChild);S.call(this,document.createTextNode(t))}})}))}(),function(){var t=Q;function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var a=this,r=void 0;if(i(this)&&(r=[],o(this,(function(t){t!==a&&r.push(t)}))),n.set.call(this,e),r)for(var s=0;s<r.length;s++){var l=r[s];1===l.__CE_state&&t.disconnectedCallback(l)}return this.ownerDocument.__CE_hasRegistry?f(t,this):c(t,this),e}})}function n(e,n){r(e,"insertAdjacentElement",(function(e,a){var o=i(a);return e=n.call(this,e,a),o&&h(t,a),i(e)&&d(t,a),e}))}if(M?r(Element.prototype,"attachShadow",(function(t){return this.__CE_shadowRoot=M.call(this,t)})):console.warn("Custom Elements: `Element#attachShadow` was not patched."),T&&T.get)e(Element.prototype,T);else if(Y&&Y.get)e(HTMLElement.prototype,Y);else{var a=y.call(document,"div");l(t,(function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return A.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName?this.content:this;for(a.innerHTML=t;0<e.childNodes.length;)P.call(e,e.childNodes[0]);for(;0<a.childNodes.length;)S.call(e,a.childNodes[0])}})}))}r(Element.prototype,"setAttribute",(function(e,n){if(1!==this.__CE_state)return D.call(this,e,n);var i=I.call(this,e);D.call(this,e,n),n=I.call(this,e),t.attributeChangedCallback(this,e,i,n,null)})),r(Element.prototype,"setAttributeNS",(function(e,n,i){if(1!==this.__CE_state)return R.call(this,e,n,i);var a=B.call(this,e,n);R.call(this,e,n,i),i=B.call(this,e,n),t.attributeChangedCallback(this,n,a,i,e)})),r(Element.prototype,"removeAttribute",(function(e){if(1!==this.__CE_state)return N.call(this,e);var n=I.call(this,e);N.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)})),r(Element.prototype,"removeAttributeNS",(function(e,n){if(1!==this.__CE_state)return H.call(this,e,n);var i=B.call(this,e,n);H.call(this,e,n);var a=B.call(this,e,n);i!==a&&t.attributeChangedCallback(this,n,i,a,e)})),$?n(HTMLElement.prototype,$):q?n(Element.prototype,q):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),G(t,Element.prototype,{j:z,append:F}),function(t){var e=Element.prototype;e.before=function(e){for(var n=[],a=0;a<arguments.length;++a)n[a-0]=arguments[a];a=n.filter((function(t){return t instanceof Node&&i(t)})),j.apply(this,n);for(var o=0;o<a.length;o++)h(t,a[o]);if(i(this))for(a=0;a<n.length;a++)(o=n[a])instanceof Element&&d(t,o)},e.after=function(e){for(var n=[],a=0;a<arguments.length;++a)n[a-0]=arguments[a];a=n.filter((function(t){return t instanceof Node&&i(t)})),V.apply(this,n);for(var o=0;o<a.length;o++)h(t,a[o]);if(i(this))for(a=0;a<n.length;a++)(o=n[a])instanceof Element&&d(t,o)},e.replaceWith=function(e){for(var n=[],a=0;a<arguments.length;++a)n[a-0]=arguments[a];a=n.filter((function(t){return t instanceof Node&&i(t)}));var o=i(this);W.apply(this,n);for(var r=0;r<a.length;r++)h(t,a[r]);if(o)for(h(t,this),a=0;a<n.length;a++)(o=n[a])instanceof Element&&d(t,o)},e.remove=function(){var e=i(this);X.call(this),e&&h(t,this)}}(t)}(),document.__CE_hasRegistry=!0;var Z=new b(Q);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:Z})}}.call(self),
/**
* @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
function(t){if(!t.JsMutationObserver){var e,n=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))e=setTimeout;else if(window.setImmediate)e=window.setImmediate;else{var i=[],a=String(Math.random());window.addEventListener("message",(function(t){if(t.data===a){var e=i;i=[],e.forEach((function(t){t()}))}})),e=function(t){i.push(t),window.postMessage(a,"*")}}var o,r,s=!1,l=[],c=0;h.prototype={observe:function(t,e){var i;if(i=t,t=window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(i)||i,!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 a,o=n.get(t);o||n.set(t,o=[]);for(var r=0;r<o.length;r++)if(o[r].observer===this){(a=o[r]).removeListeners(),a.options=e;break}a||(a=new v(this,t,e),o.push(a),this.nodes_.push(t)),a.addListeners()},disconnect:function(){this.nodes_.forEach((function(t){for(var e=n.get(t),i=0;i<e.length;i++){var a=e[i];if(a.observer===this){a.removeListeners(),e.splice(i,1);break}}}),this),this.records_=[]},takeRecords:function(){var t=this.records_;return this.records_=[],t}},v.prototype={enqueue:function(t){var n,i=this.observer.records_,a=i.length;if(i.length>0){var o=g(i[a-1],t);if(o)return void(i[a-1]=o)}else n=this.observer,l.push(n),s||(s=!0,e(u));i[a]=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){if(t!==this.target){this.addListeners_(t),this.transientObservedNodes.push(t);var e=n.get(t);e||n.set(t,e=[]),e.push(this)}},removeTransientObservers:function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach((function(t){this.removeListeners_(t);for(var e=n.get(t),i=0;i<e.length;i++)if(e[i]===this){e.splice(i,1);break}}),this)},handleEvent:function(t){switch(t.stopImmediatePropagation(),t.type){case"DOMAttrModified":var e=t.attrName,n=t.relatedNode.namespaceURI,i=t.target;(s=new p("attributes",i)).attributeName=e,s.attributeNamespace=n;var a=t.attrChange===MutationEvent.ADDITION?null:t.prevValue;d(i,(function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(e)||-1!==t.attributeFilter.indexOf(n)))return t.attributeOldValue?m(a):s}));break;case"DOMCharacterDataModified":var s=p("characterData",i=t.target);a=t.prevValue;d(i,(function(t){if(t.characterData)return t.characterDataOldValue?m(a):s}));break;case"DOMNodeRemoved":this.addTransientObserver(t.target);case"DOMNodeInserted":var l,c,u=t.target;"DOMNodeInserted"===t.type?(l=[u],c=[]):(l=[],c=[u]);var h=u.previousSibling,f=u.nextSibling;(s=p("childList",t.target.parentNode)).addedNodes=l,s.removedNodes=c,s.previousSibling=h,s.nextSibling=f,d(t.relatedNode,(function(t){if(t.childList)return s}))}o=r=void 0}},t.JsMutationObserver=h,t.MutationObserver||(t.MutationObserver=h,h._isPolyfilled=!0)}function u(){s=!1;var t=l;l=[],t.sort((function(t,e){return t.uid_-e.uid_}));var e=!1;t.forEach((function(t){var i=t.takeRecords();!function(t){t.nodes_.forEach((function(e){var i=n.get(e);i&&i.forEach((function(e){e.observer===t&&e.removeTransientObservers()}))}))}(t),i.length&&(t.callback_(i,t),e=!0)})),e&&u()}function d(t,e){for(var i=t;i;i=i.parentNode){var a=n.get(i);if(a)for(var o=0;o<a.length;o++){var r=a[o],s=r.options;if(i===t||s.subtree){var l=e(s);l&&r.enqueue(l)}}}}function h(t){this.callback_=t,this.nodes_=[],this.records_=[],this.uid_=++c}function f(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 p(t,e){return o=new f(t,e)}function m(t){return r||((n=new f((e=o).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,(r=n).oldValue=t,r);var e,n}function g(t,e){return t===e?t:r&&((n=t)===r||n===o)?r:null;var n}function v(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}}(self),function(t,e){if(!t.setImmediate){var n,i,a,o,r,s=1,l={},c=!1,u=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?n=function(){var t=h(arguments);return process.nextTick(f(p,t)),t}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((a=new MessageChannel).port1.onmessage=function(t){p(t.data)},n=function(){var t=h(arguments);return a.port2.postMessage(t),t}):u&&"onreadystatechange"in u.createElement("script")?(i=u.documentElement,n=function(){var t=h(arguments),e=u.createElement("script");return e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e),t}):n=function(){var t=h(arguments);return setTimeout(f(p,t),0),t}:(o="setImmediate$"+Math.random()+"$",r=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(o)&&p(+e.data.slice(o.length))},t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),n=function(){var e=h(arguments);return t.postMessage(o+e,"*"),e}),d.setImmediate=n,d.clearImmediate=m}function h(t){return l[s]=f.apply(e,t),s++}function f(t){var n=[].slice.call(arguments,1);return function(){"function"==typeof t?t.apply(e,n):new Function(""+t)()}}function p(t){if(c)setTimeout(f(p,t),0);else{var e=l[t];if(e){c=!0;try{e()}finally{m(t),c=!1}}}}function m(t){delete l[t]}}(self),function(){var t={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 e=t.ensureViewportElement();e&&(e.hasAttribute("content")||e.setAttribute("content","width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"))}};window.Viewport=t}();var y=function(){};y.prototype={on:function(t,e){this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e)},once:function(t,e){var n=this;this.on(t,(function i(){return n.off(t,i),e.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))}},y.mixin=function(t){for(var e=["on","once","off","emit"],n=0;n<e.length;n++)"function"==typeof t?t.prototype[e[n]]=y.prototype[e[n]]:t[e[n]]=y.prototype[e[n]]},window.MicroEvent=y;var k={},w=function(){var t=window.getComputedStyle(document.documentElement,""),e=(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.OLink&&["","o"])[1];return function(t){return"-"+e+"-"+Y.hyphenate(t)}}(),E=function(t,e){return Object.keys(e).forEach((function(n){n in t.style?t.style[n]=e[n]:w(n)in t.style?t.style[w(n)]=e[n]:Y.warn("No such style property: "+n)})),t};E.clear=function(t){for(var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split(/\s+/).reduce((function(t,e){return t.concat([Y.hyphenate(e),w(e)])}),[]),n=[],i=function(){var i=t.style[a];(0===e.length||e.some((function(t){return 0===i.indexOf(t)})))&&n.push(i)},a=t.style.length-1;a>=0;a--)i();n.forEach((function(e){return t.style[e]=""})),""===t.getAttribute("style")&&t.removeAttribute("style")};var C=!0,A={quiet:"material--flat",light:"material--flat",outline:"material--flat",cta:"","large--quiet":"material--flat large","large--cta":"large",noborder:"",tappable:""},S={android:function(t){var e=t.tagName.toLowerCase();if(!Y.hasModifier(t,"material")){var n=(t.getAttribute("modifier")||"").trim().split(/\s+/).map((function(t){return Object.prototype.hasOwnProperty.call(A,t)?A[t]:t}));n.unshift("material"),t.setAttribute("modifier",n.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(e)||t.hasAttribute("ripple")||t.querySelector("ons-ripple")||("ons-list-item"===e?t.hasAttribute("tappable")&&(t.setAttribute("ripple",""),t.removeAttribute("tappable")):t.setAttribute("ripple",""))},ios:function(t){Y.removeModifier(t,"material")&&(Y.removeModifier(t,"material--flat")&&Y.addModifier(t,Y.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"))}},x={android:!0},P=function(t,e){if(C&&!t.hasAttribute("disable-auto-styling")){var n=b.getMobileOS();if(Object.prototype.hasOwnProperty.call(S,n)&&(Object.prototype.hasOwnProperty.call(x,n)||e))return n}return null},L=function(t,e,n){return P(e,n)?t.split(/\s+/).map((function(t){return Object.prototype.hasOwnProperty.call(A,t)?A[t]:t})).join(" "):t},O={isEnabled:function(){return C},enable:function(){return C=!0},disable:function(){return C=!1},prepare:function(t,e){var n=P(t,e);n&&S[n](t)},mapModifier:L,getPlatform:P,restoreModifier:function(t){if("android"===P(t)){var e=t.getAttribute("modifier")||"",n=L(e,t);if(/(^|\s+)material($|\s+)/i.test(e)||(n="material "+n),n!==e)return t.setAttribute("modifier",n.trim()),!0}return!1}},M=function(){function t(){i(this,t)}return o(t,null,[{key:"diff",value:function(e,n){e=a((""+e).trim()),n=a((""+n).trim());var i=Object.keys(e).reduce((function(t,e){return n[e]||t.push(e),t}),[]);return{added:Object.keys(n).reduce((function(t,n){return e[n]||t.push(n),t}),[]),removed:i};function a(e){var n={};return t.split(e).forEach((function(t){return n[t]=t})),n}}},{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(e,n,i){Object.keys(i).forEach((function(a){for(var o=!a||Y.match(n,a)?[n]:Array.prototype.filter.call(n.querySelectorAll(a),(function(t){return!Y.findParent(t,n.tagName,(function(t){return t===n}))})),r=0;r<o.length;r++)t.applyDiffToClassList(e,o[r].classList,i[a])}))}},{key:"onModifierChanged",value:function(e,n,i,a){t.applyDiffToElement(t.diff(e,n),i,a),O.restoreModifier(i)}},{key:"refresh",value:function(e,n){t.applyDiffToElement(t.diff("",e.getAttribute("modifier")||""),e,n)}},{key:"initModifier",value:function(e,n){var i=e.getAttribute("modifier");"string"==typeof i&&t.applyDiffToElement({removed:[],added:t.split(i)},e,n)}},{key:"split",value:function(t){return"string"!=typeof t?[]:t.trim().split(/ +/).filter((function(t){return""!==t}))}},{key:"addModifier",value:function(e,n){if(e.hasAttribute("modifier")){var i=t.split(e.getAttribute("modifier"));-1==i.indexOf(n)&&(i.push(n),e.setAttribute("modifier",i.join(" ")))}else e.setAttribute("modifier",n)}},{key:"removeModifier",value:function(e,n){if(e.hasAttribute("modifier")){var i=t.split(e.getAttribute("modifier")),a=i.indexOf(n);-1!==a&&(i.splice(a,1),e.setAttribute("modifier",i.join(" ")))}}}]),t}(),T=function(t,e){return t.substr(0,e.length)===e},I=function(t,e){return t.substr(t.length-e.length,e.length)===e},D=function(t){return t.slice(1,-1)},N=function(t){return T(t,"{")&&I(t,"}")},B=function(t){return T(t,"[")&&I(t,"]")},R=function(t){return T(t,"'")&&I(t,"'")||T(t,'"')&&I(t,'"')},H=function(t,e,n){throw new Error("Unexpected token '"+t+"' at position "+(n.length-e.length-1)+" in string: '"+n+"'")},q=function(t,e,n){return"true"===t||"false"===t?"true"===t:R(t)?D(t):isNaN(t)?N(t)?F(D(t)):B(t)?j(D(t)):void H(t,e,n):+t},z=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,a=1;a<t.length;a++)if(t.charCodeAt(a)===n)i++;else if(t.charCodeAt(a)===n+2&&0===--i){e=a+1;break}}else if("'"===t[0]||'"'===t[0]){for(var o=1;o<t.length;o++)if(t[o]===t[0]){e=o+1;break}}else for(var r=1;r<t.length;r++)if(-1!==[" ",",",":"].indexOf(t[r])){e=r;break}return t.slice(0,e)},F=function(t){for(var e,n,i,a=function(t){return/^[A-Z_$][A-Z0-9_$]*$/i.test(t)},o=t=t.trim(),r={},s=!0;t.length>0;)if(n=i,i=z(t),t=t.slice(i.length,t.length).trim(),":"===i&&(!s||!n||","===n)||","===i&&s||":"!==i&&","!==i&&n&&","!==n&&":"!==n)H(i,t,o);else if(":"===i&&s&&n){if(!a(n=R(n)?D(n):n))throw new Error("Invalid key token '"+n+"' at position 0 in string: '"+o+"'");e=n,s=!1}else","===i&&!s&&n&&(r[e]=q(n,t,o),s=!0);return i&&(r[e]=q(i,t,o)),r},j=function(t){for(var e,n,i=t=t.trim(),a=[];t.length>0;)e=n,n=z(t),t=t.slice(n.length,t.length).trim(),","!==n||e&&","!==e?","===n&&a.push(q(e,t,i)):H(n,t,i);return n&&(","!==n?a.push(q(n,t,i)):H(n,t,i)),a},V={},W="[Onsen UI]";V.globals={fabOffset:0,errorPrefix:W,supportsPassive:!1},b._runOnActualPlatform((function(){V.globals.actualMobileOS=b.getMobileOS(),V.globals.isWKWebView=b.isWKWebView()}));try{var X=Object.defineProperty({},"passive",{get:function(){V.globals.supportsPassive=!0}});window.addEventListener("testPassive",null,X),window.removeEventListener("testPassive",null,X)}catch(t){}V.addEventListener=function(t,e,n,i,a){t.addEventListener(e,n,V.globals.supportsPassive?i:(i||{}).capture)},V.removeEventListener=function(t,e,n,i,a){t.removeEventListener(e,n,V.globals.supportsPassive?i:(i||{}).capture)},V.prepareQuery=function(t){return t instanceof Function?t:function(e){return V.match(e,t)}},V.match=function(t,e){return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector).call(t,e)},V.findChild=function(t,e){for(var n=V.prepareQuery(e),i=0;i<t.childNodes.length;i++){var a=t.childNodes[i];if(a.nodeType===Node.ELEMENT_NODE&&n(a))return a}return null},V.findParent=function(t,e,n){for(var i=V.prepareQuery(e),a=t.parentNode;;){if(!a||a===document||a instanceof DocumentFragment||n&&n(a))return null;if(i(a))return a;a=a.parentNode}},V.isAttached=function(t){return document.body.contains(t)},V.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},V.getAllChildNodes=function(t){var e;return(e=[t]).concat.apply(e,p(Array.from(t.children).map((function(t){return V.getAllChildNodes(t)}))))},V.isPageControl=function(t){return t.nodeName.match(/^ons-(navigator|splitter|tabbar|page)$/i)},V.propagateAction=function(t,e){for(var n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];i[e]instanceof Function?i[e]():V.propagateAction(i,e)}},V.camelize=function(t){return t.toLowerCase().replace(/-([a-z])/g,(function(t,e){return e.toUpperCase()}))},V.hyphenate=function(t){return t.replace(/([a-zA-Z])([A-Z])/g,"$1-$2").toLowerCase()},V.create=function(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("."),n=document.createElement(e.shift()||"div");return e.length&&(n.className=e.join(" ")),E(n,t),n},V.createElement=function(t){var e=document.createElement("div");t instanceof DocumentFragment?e.appendChild(document.importNode(t,!0)):e.innerHTML=t.trim(),e.children.length>1&&V.throw("HTML template must contain a single root element");var n=e.children[0];return e.children[0].remove(),n},V.createFragment=function(t){var e=document.createElement("template");return e.innerHTML=t,document.importNode(e.content,!0)},V.extend=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];for(var a=0;a<n.length;a++)if(n[a])for(var o=Object.keys(n[a]),r=0;r<o.length;r++){var s=o[r];t[s]=n[a][s]}return t},V.arrayFrom=function(t){return Array.prototype.slice.apply(t)},V.parseJSONObjectSafely=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var i=JSON.parse(""+t);if("object"===n(i)&&null!==i)return i}catch(t){return e}return e},V.findFromPath=function(t){t=t.split(".");for(var e,n=window;e=t.shift();)n=n[e];return n},V.getTopPage=function(t){return t&&("ons-page"===t.tagName.toLowerCase()?t:t.topPage)||null},V.findToolbarPage=function(t){var e=V.getTopPage(t);if(e){if(e._canAnimateToolbar())return e;for(var n=0;n<e._contentElement.children.length;n++){var i=V.getTopPage(e._contentElement.children[n]);if(i&&!/ons-tabbar/i.test(e._contentElement.children[n].tagName))return V.findToolbarPage(i)}}return null},V.triggerElementEvent=function(t,e){var n=arguments.length>2&&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},V.hasModifier=function(t,e){return!!t.hasAttribute("modifier")&&RegExp("(^|\\s+)".concat(e,"($|\\s+)"),"i").test(t.getAttribute("modifier"))},V.addModifier=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.autoStyle&&(e=O.mapModifier(e,t,n.forceAutoStyle)),!V.hasModifier(t,e)&&(t.setAttribute("modifier",((t.getAttribute("modifier")||"")+" "+e).trim()),!0)},V.removeModifier=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(n.autoStyle&&(e=O.mapModifier(e,t,n.forceAutoStyle)),!t.getAttribute("modifier")||!V.hasModifier(t,e))return!1;var i=t.getAttribute("modifier").split(/\s+/).filter((function(t){return t&&t!==e}));return i.length?t.setAttribute("modifier",i.join(" ")):t.removeAttribute("modifier"),!0},V.toggleModifier=function(){var t=arguments.length>2?arguments.length<=2?void 0:arguments[2]:{},e="boolean"==typeof t?t:t.force;("boolean"==typeof e?e:!V.hasModifier.apply(V,arguments))?V.addModifier.apply(V,arguments):V.removeModifier.apply(V,arguments)},V.restoreClass=function(t,e,n){e.split(/\s+/).forEach((function(e){return""!==e&&!t.classList.contains(e)&&t.classList.add(e)})),t.hasAttribute("modifier")&&M.refresh(t,n)},V.updateParentPosition=function(t){!t._parentUpdated&&t.parentElement&&("static"===window.getComputedStyle(t.parentElement).getPropertyValue("position")&&(t.parentElement.style.position="relative"),t._parentUpdated=!0)},V.toggleAttribute=function(t,e,n){n?t.setAttribute(e,"boolean"==typeof n?"":n):t.removeAttribute(e)},V.bindListeners=function(t,e){e.forEach((function(e){var n=e.replace(/^_[a-z]/,"_bound"+e[1].toUpperCase());t[n]=t[n]||t[e].bind(t)}))},V.each=function(t,e){return Object.keys(t).forEach((function(n){return e(n,t[n])}))},V.updateRipple=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};void 0===e&&(e=t.hasAttribute("ripple"));var i=V.findChild(t,"ons-ripple");if(e){if(!i){var a=document.createElement("ons-ripple");Object.keys(n).forEach((function(t){return a.setAttribute(t,n[t])})),t.insertBefore(a,t.firstChild)}}else i&&i.remove()},V.animationOptionsParse=function(t){if(t=t.trim(),N(t))return F(D(t));if(B(t))return j(D(t));throw new Error("Provided string must be object or array like: "+t)},V.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},V.defer=function(){var t={};return t.promise=new Promise((function(e,n){t.resolve=e,t.reject=n})),t},V.warn=function(){if(!Q.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,[W].concat(n))}},V.throw=function(t){throw new Error("".concat(W," ").concat(t))},V.throwAbstract=function(){return V.throw("Cannot instantiate abstract class")},V.throwMember=function(){return V.throw("Class member must be implemented")},V.throwPageLoader=function(){return V.throw("First parameter should be an instance of PageLoader")},V.throwAnimator=function(t){return V.throw('"Animator" param must inherit '.concat(t,"Animator"))};var U=function(t){return t.cancelable&&t.preventDefault()};V.iosPreventScroll=function(t){if("ios"===V.globals.actualMobileOS){t.on("touchmove",U),t.on("dragend",(function e(n){t.off("touchmove",U),t.off("dragend",e)}))}},V.iosPageScrollFix=function(t){"ios"===V.globals.actualMobileOS&&(document.body.classList.toggle("ons-ios-scroll",t),document.body.classList.toggle("ons-ios-scroll-fix",t))},V.isValidGesture=function(t){return void 0!==t.gesture&&(t.gesture.distance<=15||t.gesture.deltaTime<=100)},V.checkMissingImport=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach((function(t){k[t]||V.throw("Ons".concat(t," is required but was not imported (Custom Elements)"))}))},V.defineBooleanProperties=function(t,e){e.forEach((function(e){var n=V.camelize(e);Object.defineProperty(t.prototype,n,{get:function(){return this.hasAttribute(e)},set:function(t){t?this.setAttribute(e,""):this.removeAttribute(e)},configurable:!0})}))},V.defineStringProperties=function(t,e){e.forEach((function(e){var n=V.camelize(e);Object.defineProperty(t.prototype,n,{get:function(){return this.getAttribute(e)},set:function(t){null==t?this.removeAttribute(e):this.setAttribute(e,t)},configurable:!0})}))},V.defineListenerProperty=function(t,e){var n,i=V.camelize(e),a="on"+i.charAt(0).toUpperCase()+i.slice(1);return Object.defineProperty(t,a,{get:function(){return n},set:function(i){t.isConnected&&(n&&t.removeEventListener(e,n),t.addEventListener(e,i)),n=i},configurable:!0}),{onConnected:function(){t[a]&&t.addEventListener(e,t[a])},onDisconnected:function(){t[a]&&t.removeEventListener(e,t[a])}}};var Y=V,G=function(t){return Y.throw("In PageAttributeExpression: ".concat(t))},K={_variables:{},defineVariable:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];"string"!=typeof t?G("Variable name must be a string"):"string"!=typeof e&&"function"!=typeof e?G("Variable value must be a string or a function"):Object.prototype.hasOwnProperty.call(this._variables,t)&&!n&&G('"'.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,n=!1,i=0,a=[];0===t.length&&G("Unable to parse empty string");for(var o=0;o<t.length;o++){if("$"===(e=t.charAt(o))&&"{"===t.charAt(o+1))n&&G("Nested interpolation not supported"),t.substring(i,o).length>0&&a.push(t.substring(i,o)),i=o,n=!0;else if("}"===e){n||G("} must be preceeded by ${"),t.substring(i,o+1).length>0&&a.push(t.substring(i,o+1)),i=o+1,n=!1}}return n&&G("Unterminated interpolation"),a.push(t.substring(i,t.length)),a},_replaceToken:function(t){var e=t.match(/^\${(.*?)}$/);if(!e)return t;var n=e[1].trim(),i=this.getVariable(n);if(null!==i){if("string"==typeof i)return i;var a=i();return"string"!=typeof a&&G("Must return a string"),a}G('Variable "'.concat(n,'" does not exist'))},_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):[]}};K.defineVariable("mobileOS",b.getMobileOS()),K.defineVariable("iOSDevice",b.getIOSDevice()),K.defineVariable("runtime",(function(){return b.isWebView()?"cordova":"browser"}));var J={config:{autoStatusBarFill:!0,animationsDisabled:!1,warningsDisabled:!1}};J.nullElement=window.document.createElement("div"),J.isEnabledAutoStatusBarFill=function(){return!!J.config.autoStatusBarFill},J.normalizePageHTML=function(t){return(""+t).trim()},J.waitDOMContentLoaded=function(t){if("loading"===window.document.readyState||"uninitialized"==window.document.readyState){window.document.addEventListener("DOMContentLoaded",(function e(){t(),window.document.removeEventListener("DOMContentLoaded",e)}))}else setImmediate(t)},J.autoStatusBarFill=function(t){var e=function e(){J.shouldFillStatusBar()&&t(),document.removeEventListener("deviceready",e)};"object"===("undefined"==typeof device?"undefined":n(device))?document.addEventListener("deviceready",e):-1===["complete","interactive"].indexOf(document.readyState)?J.waitDOMContentLoaded(e):e()},J.shouldFillStatusBar=function(){return J.isEnabledAutoStatusBarFill()&&(b.isWebView()&&(b.isIOS7above()||b.isIPadOS())&&!b.isIPhoneX()||document.body.querySelector(".ons-status-bar-mock.ios"))},J.templateStore={_storage:{},get:function(t){return J.templateStore._storage[t]||null},set:function(t,e){J.templateStore._storage[t]=e}},J.getTemplateHTMLAsync=function(t){return new Promise((function(e,n){J.waitDOMContentLoaded((function(){var i=J.templateStore.get(t);if(i){if(i instanceof DocumentFragment)return e(i);var a="string"==typeof i?i:i[1];return e(J.normalizePageHTML(a))}var o=window.document.getElementById(t);if(o){var r=o.textContent||o.content;return e(r)}var s=new XMLHttpRequest;s.open("GET",t,!0),s.onload=function(){var i=s.responseText;if(s.status>=400&&s.status<600)404===s.status?n(404):n(i);else{var a=Y.createFragment(i);Y.arrayFrom(a.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)})),J.templateStore.set(t,a),e(a)}},s.onerror=function(){Y.throw("Page template not found: ".concat(t))},s.send(null)}))}))},J.getPageHTMLAsync=function(t){var e=K.evaluate(t);return function t(n){return"string"!=typeof n?Promise.reject("Must specify a page."):J.getTemplateHTMLAsync(n).catch((function(n){return 0===e.length?Promise.reject(n):t(e.shift())}))}(e.shift())};var Q=J,Z=function(){function t(e){i(this,t),this._animators=e.animators,this._baseClass=e.baseClass,this._baseClassName=e.baseClassName||e.baseClass.name,this._animation=e.defaultAnimation||"default",this._animationOptions=e.defaultAnimationOptions||{},this._animators[this._animation]||Y.throw("No such animation: "+this._animation)}return o(t,[{key:"setAnimationOptions",value:function(t){this._animationOptions=t}},{key:"newAnimator",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=null;if(t.animation instanceof this._baseClass)return t.animation;var i=null;if("string"==typeof t.animation&&(i=this._animators[t.animation]),!i&&e)n=e;else{i=i||this._animators[this._animation];var a=Y.extend({},this._animationOptions,t.animationOptions||{},Q.config.animationsDisabled?{duration:0,delay:0}:{});"function"==typeof(n=new i(a))&&(n=new n(a))}return n instanceof this._baseClass||Y.throw('"animator" is not an instance of '.concat(this._baseClassName)),n}}],[{key:"parseAnimationOptionsString",value:function(t){try{if("string"==typeof t){var e=Y.animationOptionsParse(t);if("object"===n(e)&&null!==e)return e;console.error('"animation-options" attribute must be a JSON object string: '+t)}return{}}catch(e){return console.error('"animation-options" attribute must be a JSON object string: '+t),{}}}}]),t}(),tt={_ready:!1,_domContentLoaded:!1,_onDOMContentLoaded:function(){tt._domContentLoaded=!0,b.isWebView()?window.document.addEventListener("deviceready",(function(){tt._ready=!0}),!1):tt._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)}))}};window.addEventListener("DOMContentLoaded",(function(){return tt._onDOMContentLoaded()}),!1);var et,nt={_store:{},_genId:(et=0,function(){return et++}),set:function(t,e){t.dataset.deviceBackButtonHandlerId&&this.remove(t);var n=t.dataset.deviceBackButtonHandlerId=nt._genId();this._store[n]=e},remove:function(t){t.dataset.deviceBackButtonHandlerId&&(delete this._store[t.dataset.deviceBackButtonHandlerId],delete t.dataset.deviceBackButtonHandlerId)},get:function(t){if(t.dataset.deviceBackButtonHandlerId){var e=t.dataset.deviceBackButtonHandlerId;if(!this._store[e])throw new Error;return this._store[e]}},has:function(t){if(!t.dataset)return!1;var e=t.dataset.deviceBackButtonHandlerId;return!!this._store[e]}},it=function(){function t(){i(this,t),this._isEnabled=!1,this._boundCallback=this._callback.bind(this)}return o(t,[{key:"enable",value:function(){this._isEnabled||(tt.addBackButtonListener(this._boundCallback),this._isEnabled=!0)}},{key:"disable",value:function(){this._isEnabled&&(tt.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");var n={_callback:e,_element:t,disable:function(){nt.remove(t)},setListener:function(t){this._callback=t},enable:function(){nt.set(t,this)},isEnabled:function(){return nt.get(t)===this},destroy:function(){nt.remove(t),this._callback=this._element=null}};return n.enable(),n}},{key:"_dispatchDeviceBackButtonEvent",value:function(){var t=this._captureTree(),e=this._findHandlerLeafElement(t),n=nt.get(e);n._callback(function t(e){return{_element:e,callParentHandler:function(){for(var e=this._element.parentNode;e;){if(n=nt.get(e))return n._callback(t(e));e=e.parentNode}}}}(e))}},{key:"_captureTree",value:function(){return function e(n){var i={element:n,children:Array.prototype.concat.apply([],t(n.children).map((function(t){if("none"===t.style.display||!1===t._isShown)return[];if(0===t.children.length&&!nt.has(t))return[];var n=e(t);return 0!==n.children.length||nt.has(n.element)?[n]:[]})))};if(!nt.has(i.element))for(var a=0;a<i.children.length;a++){var o=i.children[a];if(nt.has(o.element))return o}return i}(document.body);function t(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))return n>i?t:e;throw new Error("Capturing backbutton-handler is failure.")}),null)}(t)}}]),t}(),at=new it;Q.AnimatorFactory=Z,Q.ModifierUtil=M,Q.dbbDispatcher=at;var ot,rt,st={};st.capitalize=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},st.buildTransitionValue=function(t){return t.property=t.property||"all",t.duration=t.duration||.4,t.timing=t.timing||"linear",t.property.split(/ +/).map((function(e){return e+" "+t.duration+"s "+t.timing})).join(", ")},st.onceOnTransitionEnd=function(t,e){if(!t)return function(){};var n=function(){st._transitionEndEvents.forEach((function(e){t.removeEventListener(e,i,!1)}))},i=function(i){t==i.target&&(i.stopPropagation(),n(),e())};return st._transitionEndEvents.forEach((function(e){t.addEventListener(e,i,!1)})),n},st._transitionEndEvents="ontransitionend"in window?["transitionend"]:"onwebkittransitionend"in window?["webkitTransitionEnd"]:"webkit"===st.vendorPrefix||"o"===st.vendorPrefix||"moz"===st.vendorPrefix||"ms"===st.vendorPrefix?[st.vendorPrefix+"TransitionEnd","transitionend"]:[],st._cssPropertyDict=function(){for(var t=window.getComputedStyle(document.documentElement,""),e={},n="A".charCodeAt(0),i="z".charCodeAt(0),a=function(t){return t.substr(1).toUpperCase()},o=0;o<t.length;o++){var r=t[o].replace(/^[-]+/,"").replace(/[-][a-z]/g,a).replace(/^moz/,"Moz");n<=r.charCodeAt(0)&&i>=r.charCodeAt(0)&&"cssText"!==r&&"parentText"!==r&&(e[r]=!0)}return e}(),st.hasCssProperty=function(t){return t in st._cssPropertyDict},st.vendorPrefix=(ot=window.getComputedStyle(document.documentElement,""),(Array.prototype.slice.call(ot).join("").match(/-(moz|webkit|ms)-/)||""===ot.OLink&&["","o"])[1]),st.forceLayoutAtOnce=function(t,e){this.batchImmediate((function(){t.forEach((function(t){t.offsetHeight})),e()}))},st.batchImmediate=(rt=[],function(t){0===rt.length&&setImmediate((function(){var t=rt.slice(0);rt=[],t.forEach((function(t){t()}))})),rt.push(t)}),st.batchAnimationFrame=function(){var t=[],e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)};return function(n){0===t.length&&e((function(){var e=t.slice(0);t=[],e.forEach((function(t){t()}))})),t.push(n)}}(),st.transitionPropertyName=function(){if(st.hasCssProperty("transitionDuration"))return"transition";if(st.hasCssProperty(st.vendorPrefix+"TransitionDuration"))return st.vendorPrefix+"Transition";throw new Error("Invalid state")}();var lt,ct,ut,dt,ht=function t(e,n){if(!(this instanceof t))return new t(e,n);if(e instanceof HTMLElement)this.elements=[e];else{if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("First argument must be an array or an instance of HTMLElement.");this.elements=e}this.defaults=n,this.transitionQueue=[],this.lastStyleAttributeDict=[]};ht.prototype={transitionQueue:void 0,elements:void 0,defaults:void 0,play:function(t){return"function"==typeof t&&this.transitionQueue.push((function(e){t(),e()})),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 ht.Transition(e)),t instanceof Function||t instanceof ht.Transition||(t=t.css?new ht.Transition(t):new ht.Transition({css:t})),t instanceof Function)n.push(t);else{if(!(t instanceof ht.Transition))throw new Error("Invalid arguments");n.push(t.build())}return this},wait:function(t){return t>0&&this.transitionQueue.push((function(e){setTimeout(e,1e3*t)})),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(t){var e=this;if((t=t||{}).transition&&!t.duration)throw new Error('"options.duration" is required when "options.transition" is enabled.');var n=st.transitionPropertyName;if(t.transition||t.duration&&t.duration>0){var i=t.transition||"all "+t.duration+"s "+(t.timing||"linear");this.transitionQueue.push((function(a){var o,r=this.elements,s=function(){r.forEach((function(t){t.style[n]=""}))},l=st.onceOnTransitionEnd(r[0],(function(){clearTimeout(o),s(),a()}));o=setTimeout((function(){l(),s(),a()}),1e3*t.duration*1.4),r.forEach((function(t,a){var o,r=e.lastStyleAttributeDict[a];if(!r)throw new Error("restoreStyle(): The style is not saved. Invoke saveStyle() before.");e.lastStyleAttributeDict[a]=void 0;for(var s=0,l=t.style.length;s<l;s++)o=t.style[s],void 0===r[o]&&(r[o]="");t.style[n]=i,Object.keys(r).forEach((function(e){e!==n&&(t.style[e]=r[e])})),t.style[n]=i}))}))}else this.transitionQueue.push((function(t){e.elements.forEach((function(t,i){t.style[n]="none";var a=e.lastStyleAttributeDict[i];if(!a)throw new Error("restoreStyle(): The style is not saved. Invoke saveStyle() before.");e.lastStyleAttributeDict[i]=void 0;for(var o=0;o<t.style.length;o++)t.style[o],void 0===a[t.style[o]]&&(a[t.style[o]]="");Object.keys(a).forEach((function(e){t.style[e]=a[e]}))})),t()}));return 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()}))}},ht.runAll=function(){for(var t=0;t<arguments.length;t++)arguments[t].play()},(ht.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.");var t=function(t){var e={};return Object.keys(t).forEach((function(n){var i=t[n];if(st.hasCssProperty(n))e[n]=i;else{var a=st.vendorPrefix+st.capitalize(n);st.hasCssProperty(a)?e[a]=i:(e[a]=i,e[n]=i)}})),e}(this.options.css);if(this.options.duration>0){var e=st.buildTransitionValue(this.options),n=this;return function(i){var a,o=this.elements,r=1e3*n.options.duration*1.4,s=st.onceOnTransitionEnd(o[0],(function(){clearTimeout(a),i()}));a=setTimeout((function(){s(),i()}),r),o.forEach((function(n){n.style[st.transitionPropertyName]=e,Object.keys(t).forEach((function(e){n.style[e]=t[e]}))}))}}if(this.options.duration<=0)return function(e){var n=this.elements;n.forEach((function(e){e.style[st.transitionPropertyName]="",Object.keys(t).forEach((function(n){e.style[n]=t[n]}))})),n.length>0?st.forceLayoutAtOnce(n,(function(){st.batchAnimationFrame(e)})):st.batchAnimationFrame(e)}}};var ft=function t(e,n){return new t.Instance(e,n||{})};ft.defaults={behavior:{touchAction:"pan-y",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},ft.DOCUMENT=document,ft.HAS_POINTEREVENTS=navigator.pointerEnabled||navigator.msPointerEnabled,ft.HAS_TOUCHEVENTS="ontouchstart"in window,ft.IS_MOBILE=/mobile|tablet|ip(ad|hone|od)|android|silk/i.test(navigator.userAgent),ft.NO_MOUSEEVENTS=ft.HAS_TOUCHEVENTS&&ft.IS_MOBILE||ft.HAS_POINTEREVENTS,ft.CALCULATE_INTERVAL=25;var pt,mt,gt,vt,_t={},bt=ft.DIRECTION_DOWN="down",yt=ft.DIRECTION_LEFT="left",kt=ft.DIRECTION_UP="up",wt=ft.DIRECTION_RIGHT="right",Et=ft.POINTER_MOUSE="mouse",Ct=ft.POINTER_TOUCH="touch",At=ft.POINTER_PEN="pen",St=ft.EVENT_START="start",xt=ft.EVENT_MOVE="move",Pt=ft.EVENT_END="end",Lt=ft.EVENT_RELEASE="release",Ot=ft.EVENT_TOUCH="touch";function Mt(t){gt.set(t,!0)}function Tt(t){var e=vt.get(t,[])||[];vt.delete(t),e.forEach((function(t){return t()}))}function It(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};(void 0===gt&&(gt=new WeakMap,vt=new WeakMap),function(t,e){vt.has(t)||vt.set(t,[]),vt.get(t).push(e)}(t,e),function(t){return t.childNodes.length>0&&Mt(t),gt.has(t)}(t))?Tt(t):(new MutationObserver((function(e){Mt(t),Tt(t)})).observe(t,{childList:!0,characterData:!0}),setImmediate((function(){Mt(t),Tt(t)})))}ft.READY=!1,ft.plugins=ft.plugins||{},ft.gestures=ft.gestures||{},ct=ft.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){Y.addEventListener(t,e,n,i,!0)},off:function(t,e,n,i){Y.removeEventListener(t,e,n,i,!0)},each:function(t,e,n){var i,a;if("forEach"in t)t.forEach(e,n);else if(void 0!==t.length){for(i=0,a=t.length;i<a;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 t.indexOf(e)>-1},inArray:function(t,e,n){if(n){for(var i=0,a=t.length;i<a;i++)if(Object.keys(e).every((function(n){return t[i][n]===e[n]})))return i;return-1}if(t.indexOf)return t.indexOf(e);for(i=0,a=t.length;i<a;i++)if(t[i]===e)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=[],a=[],o=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}:(ct.each(t,(function(t){e.push(t.pageX),n.push(t.pageY),i.push(t.clientX),a.push(t.clientY)})),{pageX:(o.apply(Math,e)+r.apply(Math,e))/2,pageY:(o.apply(Math,n)+r.apply(Math,n))/2,clientX:(o.apply(Math,i)+r.apply(Math,i))/2,clientY:(o.apply(Math,a)+r.apply(Math,a))/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,i=e.clientY-t.clientY;return 180*Math.atan2(i,n)/Math.PI},getDirection:function(t,e){return Math.abs(t.clientX-e.clientX)>=Math.abs(t.clientY-e.clientY)?t.clientX-e.clientX>0?yt:wt:t.clientY-e.clientY>0?kt:bt},getDistance:function(t,e){var n=e.clientX-t.clientX,i=e.clientY-t.clientY;return Math.sqrt(n*n+i*i)},getScale:function(t,e){return t.length>=2&&e.length>=2?this.getDistance(e[0],e[1])/this.getDistance(t[0],t[1]):1},getRotation:function(t,e){return t.length>=2&&e.length>=2?this.getAngle(e[1],e[0])-this.getAngle(t[1],t[0]):0},isVertical:function(t){return t==kt||t==bt},setPrefixedCss:function(t,e,n,i){var a=["","Webkit","Moz","O","ms"];e=ct.toCamelCase(e);for(var o=0;o<a.length;o++){var r=e;if(a[o]&&(r=a[o]+r.slice(0,1).toUpperCase()+r.slice(1)),r in t.style){t.style[r]=(null===i||i)&&n||"";break}}},toggleBehavior:function(t,e,n){if(e&&t&&t.style){ct.each(e,(function(e,i){ct.setPrefixedCss(t,i,e,n)}));var i=n&&function(){return!1};"none"==e.userSelect&&(t.onselectstart=i),"none"==e.userDrag&&(t.ondragstart=i)}},toCamelCase:function(t){return t.replace(/[_-]([a-z])/g,(function(t){return t[1].toUpperCase()}))}},lt=ft.event={preventMouseEvents:!1,started:!1,shouldDetect:!1,on:function(t,e,n,i,a){var o=e.split(" ");ct.each(o,(function(e){ct.on(t,e,n,i),a&&a(e)}))},off:function(t,e,n,i,a){var o=e.split(" ");ct.each(o,(function(e){ct.off(t,e,n,i),a&&a(e)}))},onTouch:function(t,e,n,i){var a=this,o=function(i){var o,r=i.type.toLowerCase(),s=ft.HAS_POINTEREVENTS,l=ct.inStr(r,"mouse");l&&a.preventMouseEvents||(l&&e==St&&0===i.button?(a.preventMouseEvents=!1,a.shouldDetect=!0):s&&e==St?a.shouldDetect=1===i.buttons||dt.matchType(Ct,i):l||e!=St||(a.preventMouseEvents=!0,a.shouldDetect=!0),s&&e!=Pt&&dt.updatePointer(e,i),a.shouldDetect&&(o=a.doDetect.call(a,i,e,t,n)),o==Pt&&(a.preventMouseEvents=!1,a.shouldDetect=!1,dt.reset()),s&&e==Pt&&dt.updatePointer(e,i))};return this.on(t,_t[e],o,i),o},doDetect:function(t,e,n,i){var a=this.getTouchList(t,e),o=a.length,r=e,s=a.trigger,l=o;e==St?s=Ot:e==Pt&&(s=Lt,l=a.length-(t.changedTouches?t.changedTouches.length:1)),l>0&&this.started&&(r=xt),this.started=!0;var c=this.collectEventData(n,r,a,t);return e!=Pt&&i.call(ut,c),s&&(c.changedLength=l,c.eventType=s,i.call(ut,c),c.eventType=r,delete c.changedLength),r==Pt&&(i.call(ut,c),this.started=!1),r},determineEventTypes:function(){var t;return t=ft.HAS_POINTEREVENTS?window.PointerEvent?["pointerdown","pointermove","pointerup pointercancel lostpointercapture"]:["MSPointerDown","MSPointerMove","MSPointerUp MSPointerCancel MSLostPointerCapture"]:ft.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],_t[St]=t[0],_t[xt]=t[1],_t[Pt]=t[2],_t},getTouchList:function(t,e){if(ft.HAS_POINTEREVENTS)return dt.getTouchList();if(t.touches){if(e==xt)return t.touches;var n=[],i=[].concat(ct.toArray(t.touches),ct.toArray(t.changedTouches)),a=[];return ct.each(i,(function(t){-1===ct.inArray(n,t.identifier)&&a.push(t),n.push(t.identifier)})),a}return t.identifier=1,[t]},collectEventData:function(t,e,n,i){var a=Ct;return ct.inStr(i.type,"mouse")||dt.matchType(Et,i)?a=Et:dt.matchType(At,i)&&(a=At),{center:ct.getCenter(n),timeStamp:Date.now(),target:i.target,touches:n,eventType:e,pointerType:a,srcEvent:i,preventDefault:function(){var t=this.srcEvent;t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return ut.stopDetect()}}}},dt=ft.PointerEvent={pointers:{},getTouchList:function(){var t=[];return ct.each(this.pointers,(function(e){t.push(e)})),t},updatePointer:function(t,e){t==Pt||t!=Pt&&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[Et]=n===(e.MSPOINTER_TYPE_MOUSE||Et),i[Ct]=n===(e.MSPOINTER_TYPE_TOUCH||Ct),i[At]=n===(e.MSPOINTER_TYPE_PEN||At),i[t]},reset:function(){this.pointers={}}},ut=ft.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(t,e){this.current||(this.stopped=!1,this.current={inst:t,startEvent:ct.extend({},e),lastEvent:!1,lastCalcEvent:!1,futureCalcEvent:!1,lastCalcData:{},name:""},this.detect(e))},detect:function(t){if(this.current&&!this.stopped){t=this.extendEventData(t);var e=this.current.inst,n=e.options;return ct.each(this.gestures,(function(i){!this.stopped&&e.enabled&&n[i.name]&&i.handler.call(i,t,e)}),this),this.current&&(this.current.lastEvent=t),t.eventType==Pt&&this.stopDetect(),t}},stopDetect:function(){this.previous=ct.extend({},this.current),this.current=null,this.stopped=!0},getCalculatedData:function(t,e,n,i,a){var o=this.current,r=!1,s=o.lastCalcEvent,l=o.lastCalcData;s&&t.timeStamp-s.timeStamp>ft.CALCULATE_INTERVAL&&(e=s.center,n=t.timeStamp-s.timeStamp,i=t.center.clientX-s.center.clientX,a=t.center.clientY-s.center.clientY,r=!0),t.eventType!=Ot&&t.eventType!=Lt||(o.futureCalcEvent=t),o.lastCalcEvent&&!r||(l.velocity=ct.getVelocity(n,i,a),l.angle=ct.getAngle(e,t.center),l.direction=ct.getDirection(e,t.center),o.lastCalcEvent=o.futureCalcEvent||t,o.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,i=e.lastEvent||n;t.eventType!=Ot&&t.eventType!=Lt||(n.touches=[],ct.each(t.touches,(function(t){n.touches.push({clientX:t.clientX,clientY:t.clientY})})));var a=t.timeStamp-n.timeStamp,o=t.center.clientX-n.center.clientX,r=t.center.clientY-n.center.clientY;return this.getCalculatedData(t,i.center,a,o,r),ct.extend(t,{startEvent:n,deltaTime:a,deltaX:o,deltaY:r,distance:ct.getDistance(n.center,t.center),angle:ct.getAngle(n.center,t.center),direction:ct.getDirection(n.center,t.center),scale:ct.getScale(n.touches,t.touches),rotation:ct.getRotation(n.touches,t.touches)}),t},register:function(t){var e=t.defaults||{};return void 0===e[t.name]&&(e[t.name]=!0),ct.extend(ft.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}},ft.Instance=function(t,e){var n=this,i=e&&e.passive?{passive:!0}:void 0;!function(t){ft.READY||(lt.determineEventTypes(),ct.each(ft.gestures,(function(t){ut.register(t)})),lt.onTouch(ft.DOCUMENT,xt,ut.detect,t),lt.onTouch(ft.DOCUMENT,Pt,ut.detect,t),ft.READY=!0)}(i),this.element=t,this.enabled=!0,ct.each(e,(function(t,n){delete e[n],e[ct.toCamelCase(n)]=t})),this.options=ct.extend(ct.extend({},ft.defaults),e||{}),this.options.listenerOptions=i,this.options.behavior&&ct.toggleBehavior(this.element,this.options.behavior,!0),this.eventStartHandler=lt.onTouch(t,St,(function(t){n.enabled&&t.eventType==St?ut.startDetect(n,t):t.eventType==Ot&&ut.detect(t)}),i),this.eventHandlers=[]},ft.Instance.prototype={on:function(t,e,n){var i=this;return lt.on(i.element,t,e,Y.extend({},i.options.listenerOptions,n),(function(t){i.eventHandlers.push({gesture:t,handler:e})})),i},off:function(t,e,n){var i=this;return lt.off(i.element,t,e,Y.extend({},i.options.listenerOptions,n),(function(t){var n=ct.inArray(i.eventHandlers,{gesture:t,handler:e},!0);n>=0&&i.eventHandlers.splice(n,1)})),i},trigger:function(t,e){e||(e={});var n=ft.DOCUMENT.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e;var i=this.element;return ct.hasParent(e.target,i)&&(i=e.target),i.dispatchEvent(n),this},enable:function(t){return this.enabled=t,this},dispose:function(){var t,e;for(ct.toggleBehavior(this.element,this.options.behavior,!1),t=-1;e=this.eventHandlers[++t];)ct.off(this.element,e.gesture,e.handler);return this.eventHandlers=[],lt.off(this.element,_t[St],this.eventStartHandler),null}},pt="drag",mt=!1,ft.gestures.Drag={name:pt,index:50,handler:function(t,e){var n=ut.current;if(!(e.options.dragMaxTouches>0&&t.touches.length>e.options.dragMaxTouches))switch(t.eventType){case St:mt=!1;break;case xt:if(t.distance<e.options.dragMinDistance&&n.name!=pt)return;var i=n.startEvent.center;if(n.name!=pt&&(n.name=pt,e.options.dragDistanceCorrection&&t.distance>0)){var a=Math.abs(e.options.dragMinDistance/t.distance);i.pageX+=t.deltaX*a,i.pageY+=t.deltaY*a,i.clientX+=t.deltaX*a,i.clientY+=t.deltaY*a,t=ut.extendEventData(t)}(n.lastEvent.dragLockToAxis||e.options.dragLockToAxis&&e.options.dragLockMinDistance<=t.distance)&&(t.dragLockToAxis=!0);var o=n.lastEvent.direction;t.dragLockToAxis&&o!==t.direction&&(ct.isVertical(o)?t.direction=t.deltaY<0?kt:bt:t.direction=t.deltaX<0?yt:wt),mt||(e.trigger(pt+"start",t),mt=!0),e.trigger(pt,t),e.trigger(pt+t.direction,t);var r=ct.isVertical(t.direction);(e.options.dragBlockVertical&&r||e.options.dragBlockHorizontal&&!r)&&t.preventDefault();break;case Lt:mt&&t.changedLength<=e.options.dragMaxTouches&&(e.trigger(pt+"end",t),mt=!1);break;case Pt:mt=!1}},defaults:{dragMinDistance:10,dragDistanceCorrection:!0,dragMaxTouches:1,dragBlockHorizontal:!1,dragBlockVertical:!1,dragLockToAxis:!1,dragLockMinDistance:25}},ft.gestures.Gesture={name:"gesture",index:1337,handler:function(t,e){e.trigger(this.name,t)}},function(t){var e;ft.gestures.Hold={name:t,index:10,defaults:{holdTimeout:500,holdThreshold:2},handler:function(n,i){var a=i.options,o=ut.current;switch(n.eventType){case St:clearTimeout(e),o.name=t,e=setTimeout((function(){o&&o.name==t&&i.trigger(t,n)}),a.holdTimeout);break;case xt:n.distance>a.holdThreshold&&clearTimeout(e);break;case Lt:clearTimeout(e)}}}}("hold"),ft.gestures.Release={name:"release",index:1/0,handler:function(t,e){t.eventType==Lt&&e.trigger(this.name,t)}},ft.gestures.Swipe={name:"swipe",index:40,defaults:{swipeMinTouches:1,swipeMaxTouches:1,swipeVelocityX:.6,swipeVelocityY:.6},handler:function(t,e){if(t.eventType==Lt){var n=t.touches.length,i=e.options;if(n<i.swipeMinTouches||n>i.swipeMaxTouches)return;(t.velocityX>i.swipeVelocityX||t.velocityY>i.swipeVelocityY)&&(e.trigger(this.name,t),e.trigger(this.name+t.direction,t))}}},function(t){var e=!1;ft.gestures.Tap={name:t,index:100,handler:function(n,i){var a,o,r=i.options,s=ut.current,l=ut.previous;switch(n.eventType){case St:e=!1;break;case xt:e=e||n.distance>r.tapMaxDistance;break;case Pt:!ct.inStr(n.srcEvent.type,"cancel")&&n.deltaTime<r.tapMaxTime&&!e&&(a=l&&l.lastEvent&&n.timeStamp-l.lastEvent.timeStamp,o=!1,l&&l.name==t&&a&&a<r.doubleTapInterval&&n.distance<r.doubleTapDistance&&(i.trigger("doubletap",n),o=!0),o&&!r.tapAlways||(s.name=t,i.trigger(s.name,n)))}},defaults:{tapMaxTime:250,tapMaxDistance:10,tapAlways:!0,doubleTapDistance:20,doubleTapInterval:300}}}("tap"),ft.gestures.Touch={name:"touch",index:-1/0,defaults:{preventDefault:!1,preventMouse:!1},handler:function(t,e){e.options.preventMouse&&t.pointerType==Et?t.stopDetect():(e.options.preventDefault&&t.preventDefault(),t.eventType==Ot&&e.trigger("touch",t))}},function(t){var e=!1;ft.gestures.Transform={name:t,index:45,defaults:{transformMinScale:.01,transformMinRotation:1},handler:function(n,i){switch(n.eventType){case St:e=!1;break;case xt:if(n.touches.length<2)return;var a=Math.abs(1-n.scale),o=Math.abs(n.rotation);if(a<i.options.transformMinScale&&o<i.options.transformMinRotation)return;ut.current.name=t,e||(i.trigger(t+"start",n),e=!0),i.trigger(t,n),o>i.options.transformMinRotation&&i.trigger("rotate",n),a>i.options.transformMinScale&&(i.trigger("pinch",n),i.trigger("pinch"+(n.scale<1?"in":"out"),n));break;case Lt:e&&n.changedLength<2&&(i.trigger(t+"end",n),e=!1)}}}}("transform");var Dt,Nt=new(function(){function t(){i(this,t),this.queue=[]}return o(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(),n.queue.length>0&&setTimeout(n.queue[0],1e3/30)}))}}]),t}()),Bt=function(t,e){["id","class","animation"].forEach((function(n){return Object.prototype.hasOwnProperty.call(e,n)&&t.setAttribute(n,e[n])})),e.modifier&&Y.addModifier(t,e.modifier)},Rt=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n=e({},n),"string"==typeof t?n.message=t:n=t,n&&(n.message||n.messageHTML)||Y.throw("Notifications must contain a message"),(Object.prototype.hasOwnProperty.call(n,"buttonLabels")||Object.prototype.hasOwnProperty.call(n,"buttonLabel"))&&(n.buttonLabels=n.buttonLabels||n.buttonLabel,Array.isArray(n.buttonLabels)||(n.buttonLabels=[n.buttonLabels||""])),Y.extend({compile:function(t){return t},callback:function(t){return t},animation:"default",cancelable:!1,primaryButtonIndex:(n.buttonLabels||i.buttonLabels||[]).length-1},i,n)},Ht={_createAlertDialog:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Promise((function(t){var n=Rt.apply(void 0,e);Y.checkMissingImport("AlertDialog","AlertDialogButton");var i="";n.isPrompt&&(i='\n <input\n class="text-input text-input--underbar"\n type="'.concat(n.inputType||"text",'"\n placeholder="').concat(n.placeholder||"",'"\n value="').concat(n.defaultValue||"",'"\n style="width: 100%; margin-top: 10px;"\n />\n '));var a="";n.buttonLabels.forEach((function(t,e){a+='\n <ons-alert-dialog-button\n class="\n '.concat(e===n.primaryButtonIndex?" alert-dialog-button--primal":"","\n ").concat(n.buttonLabels.length<=2?" alert-dialog-button--rowfooter":"",'\n "\n style="position: relative;">\n ').concat(t,"\n </ons-alert-dialog-button>\n ")}));var o={},r=function(){o.dialog.onDialogCancel&&o.dialog.removeEventListener("dialogcancel",o.dialog.onDialogCancel),Object.keys(o).forEach((function(t){return delete o[t]})),o=null,n.destroy instanceof Function&&n.destroy()};o.dialog=document.createElement("ons-alert-dialog"),o.dialog.innerHTML='\n <div class="alert-dialog-mask"\n style="\n '.concat(n.maskColor?"background-color: "+n.maskColor:"",'\n "></div>\n <div class="alert-dialog">\n <div class="alert-dialog-container">\n <div class="alert-dialog-title">\n ').concat(n.title||"",'\n </div>\n <div class="alert-dialog-content">\n ').concat(n.message||n.messageHTML,"\n ").concat(i,'\n </div>\n <div class="\n alert-dialog-footer\n ').concat(n.buttonLabels.length<=2?" alert-dialog-footer--rowfooter":"",'\n ">\n ').concat(a,"\n </div>\n </div>\n </div>\n "),It(o.dialog),Bt(o.dialog,n),n.isPrompt&&(o.input=o.dialog.querySelector(".text-input"),n.submitOnEnter&&(o.input.onkeypress=function(e){13===e.keyCode&&o.dialog.hide().then((function(){if(o){var e=o.input.value;r(),n.callback(e),t(e)}}))})),o.footer=o.dialog.querySelector(".alert-dialog-footer"),Y.arrayFrom(o.dialog.querySelectorAll(".alert-dialog-button")).forEach((function(e,i){e.onclick=function(){o.dialog.hide().then((function(){if(o){var e=i;n.isPrompt&&(e=i===n.primaryButtonIndex?o.input.value:null),o.dialog.remove(),r(),n.callback(e),t(e)}}))},o.footer.appendChild(e)})),n.cancelable&&(o.dialog.cancelable=!0,o.dialog.onDialogCancel=function(){setImmediate((function(){o.dialog.remove(),r()}));var e=n.isPrompt?null:-1;n.callback(e),t(e)},o.dialog.addEventListener("dialogcancel",o.dialog.onDialogCancel,!1)),document.body.appendChild(o.dialog),n.compile(o.dialog),setImmediate((function(){o.dialog.show().then((function(){if(o.input&&n.isPrompt&&n.autofocus){var t=o.input.value.length;o.input.focus(),o.input.type&&["text","search","url","tel","password"].includes(o.input.type)&&o.input.setSelectionRange(t,t)}}))}))}))},alert:function(t,e){return Ht._createAlertDialog(t,e,{buttonLabels:["OK"],title:"Alert"})},confirm:function(t,e){return Ht._createAlertDialog(t,e,{buttonLabels:["Cancel","OK"],title:"Confirm"})},prompt:function(t,e){return Ht._createAlertDialog(t,e,{buttonLabels:["OK"],title:"Alert",isPrompt:!0,autofocus:!0,submitOnEnter:!0})},toast:function(t,e){var n=new Promise((function(i){Y.checkMissingImport("Toast"),e=Rt(t,e,{timeout:0,force:!1});var a=Y.createElement("\n <ons-toast>\n ".concat(e.message,"\n ").concat(e.buttonLabels?"<button>".concat(e.buttonLabels[0],"</button>"):"","\n </ons-toast>\n "));Bt(a,e);var o=a.hide.bind(a),r=function(t){a&&o().then((function(){a&&(a.remove(),a=null,e.callback(t),i(t))}))};e.buttonLabels&&(Y.findChild(a._toast,"button").onclick=function(){return r(0)}),a.hide=function(){return r(-1)},document.body.appendChild(a),e.compile(a);var s=function(){a.parentElement&&a.show(e).then((function(){e.timeout&&setTimeout((function(){return r(-1)}),e.timeout)}))};setImmediate((function(){return e.force?s():Nt.add(s,n)}))}));return n}},qt=(Dt={_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 t=this,e=this._isPortrait(),n=0,i=setInterval((function(){n++;var a=window.innerWidth,o=window.innerHeight;(e&&a<=o||!e&&a>=o||50===n)&&(t.emit("change",{isPortrait:e}),clearInterval(i))}),20)},_onResize:function(){this.emit("change",{isPortrait:this.isPortrait()})}},y.mixin(Dt),Dt)._init(),zt={add:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return n.forEach((function(e){return Y.addModifier(t,e)}))},remove:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return n.forEach((function(e){return Y.removeModifier(t,e)}))},contains:Y.hasModifier,toggle:Y.toggleModifier},Ft=new y;Ft._visible=!1;var jt=function(){Ft._visible=!0,Ft.emit("show")},Vt=function(){Ft._visible=!1,Ft.emit("hide")},Wt=function(){Y.warn("ons-keyboard: Cordova Keyboard plugin is not present.")};document.addEventListener("deviceready",(function(){("undefined"!=typeof Keyboard?(Keyboard.onshow=jt,Keyboard.onhide=Vt,Ft.emit("init",{visible:Keyboard.isVisible}),1):void 0!==cordova.plugins&&void 0!==cordova.plugins.Keyboard&&(window.addEventListener("native.keyboardshow",jt),window.addEventListener("native.keyboardhide",Vt),Ft.emit("init",{visible:cordova.plugins.Keyboard.isVisible}),1))||((document.querySelector("[ons-keyboard-active]")||document.querySelector("[ons-keyboard-inactive]"))&&Wt(),Ft.on=Wt)}));var Xt=function(){var t=0;return function(){return t++}}(),Ut=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this._lockList=[],this._waitList=[],this._log=e.log||function(){}}return o(t,[{key:"lock",value:function(){var t=this,e=function e(){t._unlock(e)};return e.id=Xt(),this._lockList.push(e),this._log("lock: "+e.id),e}},{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()&&this._waitList.length>0;)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 this._lockList.length>0}}]),t}();function Yt(t,e,n){var i=t.page,a=t.parent;t.params;var o=document.getElementById(i);a.appendChild(o),o.style.display="",e(o)}function $t(t){t._destroy,t.style.display="none",$("body").append(t)}var Gt,Kt=function(){function t(e,n){i(this,t),this._loader=e instanceof Function?e:Yt,this._unloader=n instanceof Function?n:$t}return o(t,[{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,a=t.parent,o=t.params,r=void 0===o?{}:o;this._loader({page:i,parent:a,params:r},(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)}}]),t}(),Jt=new Kt,Qt=new Kt((function(t,e){var n=t.page,i=t.parent;t.params;var a=Y.createElement(n.trim());i.appendChild(a),e(a)}),$t),Zt={animit:ht,defaultPageLoader:Jt,elements:k,GestureDetector:ft,modifier:zt,notification:Ht,orientation:qt,pageAttributeExpression:K,PageLoader:Kt,platform:b,softwareKeyboard:Ft,_autoStyle:O,_internal:Q,_readyLock:new Ut,_util:Y};Zt.platform.select((window.location.search.match(/platform=([\w-]+)/)||[])[1]),Gt=Zt._readyLock.lock(),window.addEventListener("DOMContentLoaded",(function(){Zt.isWebView()?window.document.addEventListener("deviceready",Gt,{once:!0}):Gt()}),{once:!0});var te=function(t){return Y.throw("This method must be called ".concat(t?"after":"before"," ons.isReady() is true"))};Zt.isReady=function(){return!Zt._readyLock.isLocked()},Zt.isWebView=Zt.platform.isWebView,Zt.ready=function(t){Zt.isReady()?t():Zt._readyLock.waitUnlock(t)},Zt.setDefaultDeviceBackButtonListener=function(t){Zt.isReady()||te(!0),Zt._defaultDeviceBackButtonHandler.setListener(t)},Zt.disableDeviceBackButtonHandler=function(){Zt.isReady()||te(!0),Q.dbbDispatcher.disable()},Zt.enableDeviceBackButtonHandler=function(){Zt.isReady()||te(!0),Q.dbbDispatcher.enable()},Zt.fireDeviceBackButtonEvent=function(){Q.dbbDispatcher.fireDeviceBackButtonEvent()},Zt.enableAutoStatusBarFill=function(){Zt.isReady()&&te(!1),Q.config.autoStatusBarFill=!0},Zt.disableAutoStatusBarFill=function(){Zt.isReady()&&te(!1),Q.config.autoStatusBarFill=!1},Zt.mockStatusBar=function(){Zt.isReady()&&te(!1);var t=function(){if(!document.body.children[0]||!document.body.children[0].classList.contains("ons-status-bar-mock")){var t=b.isAndroid(),e=function(t){return'<i class="'.concat(t.split("-")[0]," ").concat(t,'"></i>')},n=t?"".concat(e("zmdi-twitter")," ").concat(e("zmdi-google-play")):"No SIM ".concat(e("fa-wifi")),i=t?"":"12:28 PM",a=t?"".concat(e("zmdi-network")," ").concat(e("zmdi-wifi")," ").concat(e("zmdi-battery")," 12:28 PM"):"80% ".concat(e("fa-battery-three-quarters"));document.body.insertBefore(Y.createElement('<div class="ons-status-bar-mock '.concat(t?"android":"ios",'">')+"<div>".concat(n,"</div><div>").concat(i,"</div><div>").concat(a,"</div>")+"</div>"),document.body.firstChild)}};document.body?t():Q.waitDOMContentLoaded(t)},Zt.disableAnimations=function(){Q.config.animationsDisabled=!0},Zt.enableAnimations=function(){Q.config.animationsDisabled=!1},Zt._disableWarnings=function(){Q.config.warningsDisabled=!0},Zt._enableWarnings=function(){Q.config.warningsDisabled=!1},Zt.disableAutoStyling=O.disable,Zt.enableAutoStyling=O.enable,Zt.disableIconAutoPrefix=function(){Y.checkMissingImport("Icon"),k.Icon.setAutoPrefix(!1)},Zt.forcePlatformStyling=function(t){Zt.enableAutoStyling(),Zt.platform.select(t||"ios"),Zt._util.arrayFrom(document.querySelectorAll("*")).forEach((function(t){"ons-if"===t.tagName.toLowerCase()?t._platformUpdate():t.tagName.match(/^ons-/i)&&(O.prepare(t,!0),"ons-tabbar"===t.tagName.toLowerCase()&&t._updatePosition())}))},Zt.preload=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Promise.all((t instanceof Array?t:[t]).map((function(t){return"string"!=typeof t&&Y.throw("Expected string arguments but got "+n(t)),Q.getTemplateHTMLAsync(t)})))},Zt.createElement=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(t){var n=Zt._util.createElement(t);(n.remove(),e.append)&&((e.append instanceof HTMLElement?e.append:document.body).insertBefore(n,e.insertBefore||null),e.link instanceof Function&&e.link(n));return n};return"<"===(t=t.trim()).charAt(0)?n(t):Q.getPageHTMLAsync(t).then(n)},Zt.createPopover=Zt.createDialog=Zt.createAlertDialog=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Zt.createElement(t,e({append:!0},n))},Zt.openActionSheet=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(n){Y.checkMissingImport("ActionSheet"),function(t){var e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Function";return Y.throw('"options.'.concat(t,'" must be an instance of ').concat(e))},n=function(e){return Object.hasOwnProperty.call(t,e)},i=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Function;return t[e]instanceof n},a="buttons",o="callback",r="compile",s="destroy";(!n(a)||!i(a,Array))&&e(a,"Array"),n(o)&&!i(o)&&e(o),n(r)&&!i(r)&&e(r),n(s)&&!i(s)&&e(s)}(t);var i=Y.createElement("\n <ons-action-sheet\n ".concat(t.title?'title="'.concat(t.title,'"'):"","\n ").concat(t.cancelable?"cancelable":"","\n ").concat(t.modifier?'modifier="'.concat(t.modifier,'"'):"","\n ").concat(t.maskColor?'mask-color="'.concat(t.maskColor,'"'):"","\n ").concat(t.id?'id="'.concat(t.id,'"'):"","\n ").concat(t.class?'class="'.concat(t.class,'"'):"",'\n >\n <div class="action-sheet"></div>\n </ons-action-sheet>\n ')),a=function e(a){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;i&&(t.destroy&&t.destroy(i),i.removeEventListener("dialogcancel",e,!1),i.remove(),i=null,t.callback&&t.callback(o),n(o))};i.addEventListener("dialogcancel",a,!1);var o=document.createDocumentFragment();t.buttons.forEach((function(n,r){var s="string"==typeof n?{label:n}:e({},n);t.destructive===r&&(s.modifier=(s.modifier||"")+" destructive");var l=Y.createElement("\n <ons-action-sheet-button\n ".concat(s.icon?'icon="'.concat(s.icon,'"'):"","\n ").concat(s.modifier?'modifier="'.concat(s.modifier,'"'):"","\n >\n ").concat(s.label,"\n </ons-action-sheet-button>\n "));l.onclick=function(t){return i.hide().then((function(){return a(t,r)}))},o.appendChild(l)})),Y.findChild(i,".action-sheet").appendChild(o),document.body.appendChild(i),t.compile&&t.compile(el.dialog),setImmediate((function(){return i.show({animation:t.animation,animationOptions:t.animationOptions})}))}))},Zt.resolveLoadingPlaceholder=function(t,e){var n=Zt._util.arrayFrom(window.document.querySelectorAll("[ons-loading-placeholder]"));0===n.length&&Y.throw("No ons-loading-placeholder exists"),n.filter((function(t){return!t.getAttribute("page")})).forEach((function(n){n.setAttribute("ons-loading-placeholder",t),Zt._resolveLoadingPlaceholder(n,t,e)}))},Zt._setupLoadingPlaceHolders=function(){Zt.ready((function(){Zt._util.arrayFrom(window.document.querySelectorAll("[ons-loading-placeholder]")).forEach((function(t){var e=t.getAttribute("ons-loading-placeholder");"string"==typeof e&&Zt._resolveLoadingPlaceholder(t,e)}))}))},Zt._resolveLoadingPlaceholder=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t,e){return e()};e&&Zt.createElement(e).then((function(e){e.style.display="none",t.appendChild(e),n(e,(function(){for(;t.firstChild&&t.firstChild!==e;)t.removeChild(t.firstChild);e.style.display=""}))})).catch((function(t){return Promise.reject("Unabled to resolve placeholder: "+t)}))};var ee="currentScript"in document?function(){return document.currentScript}:function(){return document.scripts[document.scripts.length-1]};Zt.getScriptPage=function(){return ee()&&/ons-page/i.test(ee().parentElement.tagName)&&ee().parentElement||null};var ne=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.call(this)}return o(n)}(function(){if("function"!=typeof HTMLElement){var t=function(){};return t.prototype=document.createElement("div"),t}return HTMLElement}()),ie=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){if(null!==b._getSelectedPlatform())t._platformUpdate();else if(!t._isAllowedPlatform()){for(;t.childNodes[0];)t.childNodes[0].remove();t._platformUpdate()}})),t._onOrientationChange(),t}return o(n,[{key:"connectedCallback",value:function(){qt.on("change",this._onOrientationChange.bind(this))}},{key:"attributeChangedCallback",value:function(t){"orientation"===t&&this._onOrientationChange()}},{key:"disconnectedCallback",value:function(){qt.off("change",this._onOrientationChange)}},{key:"_platformUpdate",value:function(){this.style.display=this._isAllowedPlatform()?"":"none"}},{key:"_isAllowedPlatform",value:function(){return!this.getAttribute("platform")||this.getAttribute("platform").split(/\s+/).indexOf(b.getMobileOS())>=0}},{key:"_onOrientationChange",value:function(){if(this.hasAttribute("orientation")&&this._isAllowedPlatform()){var t=this.getAttribute("orientation").toLowerCase(),e=qt.isPortrait()?"portrait":"landscape";this.style.display=t===e?"":"none"}}}],[{key:"observedAttributes",get:function(){return["orientation"]}}]),n}(ne);k.If=ie,customElements.define("ons-if",ie);var ae=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this.timing=e.timing||"linear",this.duration=e.duration||0,this.delay=e.delay||0,this.def={timing:this.timing,duration:this.duration,delay:this.delay}}return o(t,null,[{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this,n=function(){e.apply(this,arguments),Y.extend(this,t)};return n.prototype=this.prototype,n}}]),t}(),oe={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(){return oe.isIPhoneXPortraitPatchActive()?{top:44,right:0,bottom:34,left:0}:oe.isIPhoneXLandscapePatchActive()?{top:0,right:44,bottom:21,left:44}:{top:0,right:0,bottom:0,left:0}},getSafeAreaDOMRect:function(){var t;return e(e({},t=oe.isIPhoneXPortraitPatchActive()?{x:0,y:44,width:window.innerWidth,height:window.innerHeight-78}:oe.isIPhoneXLandscapePatchActive()?{x:44,y:0,width:window.innerWidth-88,height:window.innerHeight-21}:{x:0,y:0,width:window.innerWidth,height:window.innerHeight}),{},{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}},re=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),n}(ae),se=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"ease":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.4:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).maskTiming="linear",t.maskDuration=.2,t}return o(n,[{key:"show",value:function(t,e){ht.runAll(ht(t._mask).queue({opacity:0}).wait(this.delay).queue({opacity:1},{duration:this.maskDuration,timing:this.maskTiming}),ht(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){ht.runAll(ht(t._mask).queue({opacity:1}).wait(this.delay).queue({opacity:0},{duration:this.maskDuration,timing:this.maskTiming}),ht(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()})))}}]),n}(re),le=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"ease":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.3:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).maskTiming="linear",t.maskDuration=.2,oe.isIPhoneXPortraitPatchActive()?t.liftAmount="calc(100% + 48px)":oe.isIPhoneXLandscapePatchActive()?t.liftAmount="calc(100% + 33px)":t.liftAmount=document.body.clientHeight/2-1+"px",t}return o(n,[{key:"show",value:function(t,e){ht.runAll(ht(t._mask).queue({opacity:0}).wait(this.delay).queue({opacity:1},{duration:this.maskDuration,timing:this.maskTiming}),ht(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){ht.runAll(ht(t._mask).queue({opacity:1}).wait(this.delay).queue({opacity:0},{duration:this.maskDuration,timing:this.maskTiming}),ht(t._sheet,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(0, ".concat(this.liftAmount,", 0)")}).queue((function(t){e&&e(),t()})))}}]),n}(re),ce=function(t){s(a,t);var n=h(a);function a(){var t;return i(this,a),(t=n.call(this)).constructor===a&&Y.throwAbstract(),t._visible=!1,t._doorLock=new Ut,t._cancel=t._cancel.bind(d(t)),t._selfCamelName=Y.camelize(t.tagName.slice(4)),t._defaultDBB=function(e){return t.cancelable?t._cancel():e.callParentHandler()},t._animatorFactory=t._updateAnimatorFactory(),t}return o(a,[{key:"_scheme",get:function(){Y.throwMember()}},{key:"_updateAnimatorFactory",value:function(){Y.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=at.createHandler(this,t)}},{key:"_cancel",value:function(){var t=this;this.cancelable&&!this._running&&(this._running=!0,this.hide().then((function(){t._running=!1,Y.triggerElementEvent(t,"dialogcancel"),Y.triggerElementEvent(t,"dialog-cancel")}),(function(){return t._running=!1})))}},{key:"show",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this._setVisible.apply(this,[!0].concat(n)).then((function(e){return t.visible=!0,e}))}},{key:"hide",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this._setVisible.apply(this,[!1].concat(n)).then((function(e){return t.visible=!1,e}))}},{key:"toggle",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this._setVisible.apply(this,[!this.visible].concat(n)).then((function(e){return t.visible=t._visible,e}))}},{key:"_setVisible",value:function(t){var n,i=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t?"show":"hide";(a=e({},a)).animationOptions=Y.extend(a.animationOptions||{},this.animationOptions);var s=!1;return Y.triggerElementEvent(this,"pre".concat(o),(r(n={},this._selfCamelName,this),r(n,"cancel",(function(){return s=!0})),n)),s?Promise.reject("Canceled in pre".concat(o," event.")):new Promise((function(e){i._doorLock.waitUnlock((function(){var n=i._doorLock.lock(),s=i._animatorFactory.newAnimator(a);t&&i._toggleStyle(!0,a),i._visible=t,Y.iosPageScrollFix(t),It(i,(function(){s[o](i,(function(){!t&&i._toggleStyle(!1,a),n(),Y.propagateAction(i,"_"+o),Y.triggerElementEvent(i,"post"+o,r({},i._selfCamelName,i)),a.callback instanceof Function&&a.callback(i),e(i)}))}))}))}))}},{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 Z.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;It(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)),It(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":M.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(),It(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"]}}]),a}(ne);Y.defineBooleanProperties(ce,["visible","disabled","cancelable"]);var ue={".action-sheet":"action-sheet--*",".action-sheet-mask":"action-sheet-mask--*",".action-sheet-title":"action-sheet-title--*"},de={default:function(){return b.isAndroid()?se:le},none:re},he=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){return t._compile()})),t}return o(n,[{key:"_scheme",get:function(){return ue}},{key:"_mask",get:function(){return Y.findChild(this,".action-sheet-mask")}},{key:"_sheet",get:function(){return Y.findChild(this,".action-sheet")}},{key:"_title",get:function(){return this.querySelector(".action-sheet-title")}},{key:"_updateAnimatorFactory",value:function(){return new Z({animators:de,baseClass:re,baseClassName:"ActionSheetAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){if(O.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)}if(!this._title){var e=document.createElement("div");e.classList.add("action-sheet-title"),this.title?e.innerHTML=this.title:e.hidden=!0,this._sheet.insertBefore(e,this._sheet.firstChild)}if(!this._mask){var n=document.createElement("div");n.classList.add("action-sheet-mask"),this.insertBefore(n,this.firstChild)}this._sheet.style.zIndex=20001,this._mask.style.zIndex=2e4,M.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,i){"title"===t?this._updateTitle():f(l(n.prototype),"attributeChangedCallback",this).call(this,t,e,i)}}],[{key:"observedAttributes",get:function(){return[].concat(p(f(l(n),"observedAttributes",this)),["title"])}},{key:"registerAnimator",value:function(t,e){e.prototype instanceof re||Y.throwAnimator("ActionSheet"),de[t]=e}},{key:"animators",get:function(){return de}},{key:"ActionSheetAnimator",get:function(){return re}}]),n}(ce);k.ActionSheet=he,customElements.define("ons-action-sheet",he);var fe=function(){function t(){i(this,t),this._queue=[],this._index=0}return o(t,[{key:"animate",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,i=(new Date).getTime(),a={},o=!1,r=!1,s=!1,l=Object.keys(e),c={stop:function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s&&clearTimeout(s);var d=Math.min(1,((new Date).getTime()-i)/n);return l.forEach((function(n){t.style[n]=(1-d)*a[n]+d*e[n]+("opacity"==n?"":"px")})),t.style.transitionDuration="0s",u.stopNext?r=!1:o||(o=!0,r&&r()),c},then:function(t){return r=t,o&&r&&r(),c},speed:function(r){if(Q.config.animationsDisabled&&(r=0),!o){s&&clearTimeout(s);var u=((new Date).getTime()-i)/n,d=r*(1-u);l.forEach((function(n){t.style[n]=(1-u)*a[n]+u*e[n]+("opacity"==n?"":"px")})),h=window.getComputedStyle(t),l.forEach(h.getPropertyValue.bind(h)),h=t.offsetHeight,i=t.speedUpTime,n=d,t.style.transitionDuration=n/1e3+"s",l.forEach((function(n){t.style[n]=e[n]+("opacity"==n?"":"px")})),s=setTimeout(c.stop,d)}var h;return c},finish:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,e=((new Date).getTime()-i)/n;return c.speed(t/(1-e)),c}};if(t.hasAttribute("disabled")||o||Q.config.animationsDisabled)return c;var u=window.getComputedStyle(t);return l.forEach((function(t){var e=parseFloat(u.getPropertyValue(t));a[t]=isNaN(e)?0:e})),o||(t.style.transitionProperty=l.join(","),t.style.transitionDuration=n/1e3+"s",l.forEach((function(n){t.style[n]=e[n]+("opacity"==n?"":"px")}))),s=setTimeout(c.stop,n),this._onStopAnimations(t,c.stop),c}},{key:"_onStopAnimations",value:function(t,e){var n=this._queue,i=this._index++;n[t]=n[t]||[],n[t][i]=function(a){return delete n[t][i],n[t]&&0==n[t].length&&delete n[t],e(a)}}},{key:"stopAnimations",value:function(t){var e=this,n=arguments.length>1&&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=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.stopAnimations(Object.keys(this._queue),t)}},{key:"fade",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;return this.animate(t,{opacity:0},e)}}]),t}(),pe="ripple",me={"":"ripple--*",".ripple__wave":"ripple--*__wave",".ripple__background":"ripple--*__background"},ge=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._onTap=t._onTap.bind(d(t)),t._onHold=t._onHold.bind(d(t)),t._onDragStart=t._onDragStart.bind(d(t)),t._onRelease=t._onRelease.bind(d(t)),It(d(t),(function(){return t._compile()})),t._animator=new fe,["color","center","start-radius","background","modifier"].forEach((function(e){t.attributeChangedCallback(e,null,t.getAttribute(e))})),t}return o(n,[{key:"_compile",value:function(){this.classList.add(pe),this._wave=this.getElementsByClassName("ripple__wave")[0],this._background=this.getElementsByClassName("ripple__background")[0],this._background&&this._wave||(this._wave=Y.create(".ripple__wave"),this._background=Y.create(".ripple__background"),this.appendChild(this._wave),this.appendChild(this._background)),M.initModifier(this,me)}},{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){var e,n,i,a,o,r=this.getBoundingClientRect(),s=this._getEffectSize(),l=function(){return Y.throw("Ripple invalid state")};return this._center?(e=r.width/2,n=r.height/2,"cover"===s?o=Math.sqrt(e*e+n*n):"contain"===s?o=Math.min(e,n):l()):(e=("number"==typeof t.clientX?t.clientX:t.changedTouches[0].clientX)-r.left,n=("number"==typeof t.clientY?t.clientY:t.changedTouches[0].clientY)-r.top,i=Math.max(n,r.height-n),a=Math.max(e,r.width-e),"cover"===s?o=Math.sqrt(i*i+a*a):"contain"===s?o=Math.min(Math.round(i/2),Math.round(a/2)):l()),{x:e,y:n,r:o}}},{key:"_rippleAnimation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,n=this._animator,i=this._wave,a=this._background,o=this._minR,r=this._calculateCoords(t),s=r.x,l=r.y,c=r.r;return n.stopAll({stopNext:1}),n.animate(a,{opacity:1},e),Y.extend(i.style,{opacity:1,top:l-o+"px",left:s-o+"px",width:2*o+"px",height:2*o+"px"}),n.animate(i,{top:l-c,left:s-c,height:2*c,width:2*c},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,Q.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":Y.restoreClass(this,pe,me);break;case"modifier":M.onModifierChanged(e,n,this,me);break;case"start-radius":this._minR=Math.max(0,parseFloat(n)||0);break;case"color":n&&It(this,(function(){i._wave.style.background=n,i.hasAttribute("background")||(i._background.style.background=n)}));break;case"background":(n||e)&&It(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}(ne);Y.defineBooleanProperties(ge,["disabled","center"]),k.Ripple=ge,customElements.define("ons-ripple",ge);var ve=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this)).constructor===n&&Y.throwAbstract(),It(d(t),(function(){return t._compile()})),t}return o(n,[{key:"_scheme",get:function(){Y.throwMember()}},{key:"_defaultClassName",get:function(){Y.throwMember()}},{key:"_rippleOpt",get:function(){return[this]}},{key:"_icon",get:function(){return Y.findChild(this,"ons-icon")}},{key:"_hiddenButton",get:function(){return Y.findChild(this,"button")}},{key:"_compile",value:function(){if(O.prepare(this),this.classList.add(this._defaultClassName),!this._icon&&this.hasAttribute("icon")){Y.checkMissingImport("Icon");var t=Y.createElement('<ons-icon icon="'.concat(this.getAttribute("icon"),'"></ons-icon>'));t.classList.add(this._defaultClassName.replace("button","icon")),this.insertBefore(t,this.firstChild)}if(!this._hiddenButton){var e=Y.createElement("<button hidden></button>");this.appendChild(e)}this._updateRipple(),M.initModifier(this,this._scheme)}},{key:"_updateIcon",value:function(){this._icon&&this._icon.setAttribute("icon",this.getAttribute("icon"))}},{key:"_updateRipple",value:function(){this._rippleOpt&&Y.updateRipple.apply(Y,p(this._rippleOpt))}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,this._defaultClassName,this._scheme);break;case"modifier":M.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}(ne);Y.defineBooleanProperties(ve,["ripple","disabled"]);var _e=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{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(){}}]),n}(ve);k.ActionSheetButton=_e,customElements.define("ons-action-sheet-button",_e);var be=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),n}(ae),ye=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"cubic-bezier(.1, .7, .4, 1)":a,r=t.duration,s=void 0===r?.2:r,l=t.delay,c=void 0===l?0:l;return i(this,n),e.call(this,{duration:s,timing:o,delay:c})}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:0},{opacity:1}),ht(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(){},ht.runAll(ht(t._mask,this.def).default({opacity:1},{opacity:0}),ht(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()})))}}]),n}(be),ke=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"cubic-bezier(.1, .7, .4, 1)":a,r=t.duration,s=void 0===r?.2:r,l=t.delay,c=void 0===l?0:l;return i(this,n),e.call(this,{duration:s,timing:o,delay:c})}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:0},{opacity:1}),ht(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(){},ht.runAll(ht(t._mask,this.def).default({opacity:1},{opacity:0}),ht(t._dialog,this.def).default({opacity:1},{opacity:0}).queue((function(t){e(),t()})))}}]),n}(be),we={".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--*"},Ee={none:be,default:function(){return b.isAndroid()?ye:ke},fade:function(){return b.isAndroid()?ye:ke}},Ce=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){return t._compile()})),t}return o(n,[{key:"_scheme",get:function(){return we}},{key:"_mask",get:function(){return Y.findChild(this,".alert-dialog-mask")}},{key:"_dialog",get:function(){return Y.findChild(this,".alert-dialog")}},{key:"_titleElement",get:function(){return Y.findChild(this._dialog.children[0],".alert-dialog-title")}},{key:"_contentElement",get:function(){return Y.findChild(this._dialog.children[0],".alert-dialog-content")}},{key:"_updateAnimatorFactory",value:function(){return new Z({animators:Ee,baseClass:be,baseClassName:"AlertDialogAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){O.prepare(this),this.style.display="none",this.style.zIndex=10001;var t=document.createDocumentFragment();if(!this._mask&&!this._dialog)for(;this.firstChild;)t.appendChild(this.firstChild);if(!this._mask){var e=document.createElement("div");e.classList.add("alert-dialog-mask"),this.insertBefore(e,this.children[0])}if(!this._dialog){var n=document.createElement("div");n.classList.add("alert-dialog"),this.insertBefore(n,null)}if(!Y.findChild(this._dialog,".alert-dialog-container")){var i=document.createElement("div");i.classList.add("alert-dialog-container"),this._dialog.appendChild(i)}this._dialog.children[0].appendChild(t),this._dialog.style.zIndex=20001,this._mask.style.zIndex=2e4,M.initModifier(this,this._scheme)}}],[{key:"registerAnimator",value:function(t,e){e.prototype instanceof be||Y.throwAnimator("AlertDialog"),Ee[t]=e}},{key:"animators",get:function(){return Ee}},{key:"AlertDialogAnimator",get:function(){return be}}]),n}(ce);k.AlertDialog=Ce,customElements.define("ons-alert-dialog",Ce);var Ae=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{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"}]}}]),n}(ve);k.AlertDialogButton=Ae,customElements.define("ons-alert-dialog-button",Ae);var Se="back-button",xe={"":"back-button--*",".back-button__icon":"back-button--*__icon",".back-button__label":"back-button--*__label"},Pe=function(t){s(a,t);var n=h(a);function a(){var t;i(this,a),It(d(t=n.call(this)),(function(){t._compile()})),t._options={},t._boundOnClick=t._onClick.bind(d(t));var e=Y.defineListenerProperty(d(t),"click"),o=e.onConnected,r=e.onDisconnected;return t._connectOnClick=o,t._disconnectOnClick=r,t}return o(a,[{key:"_updateIcon",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y.findChild(this,".back-button__icon")).innerHTML="android"===O.getPlatform(this)||Y.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(O.prepare(this),this.classList.add(Se),!Y.findChild(this,".back-button__label")){for(var t=Y.create("span.back-button__label");this.childNodes[0];)t.appendChild(this.childNodes[0]);this.appendChild(t)}if(!Y.findChild(this,".back-button__icon")){var e=Y.create("span.back-button__icon");this._updateIcon(e),this.insertBefore(e,this.children[0])}Y.updateRipple(this,void 0,{center:"",size:"contain",background:"transparent"}),M.initModifier(this,xe)}},{key:"options",get:function(){return this._options},set:function(t){this._options=t}},{key:"_onClick",value:function(t){var n=this;setTimeout((function(){if(!t.defaultPrevented){var i=Y.findParent(n,"ons-navigator");i&&i.popPage(e(e({},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":Y.restoreClass(this,Se,xe);break;case"modifier":M.onModifierChanged(e,n,this,xe)&&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"]}}]),a}(ne);k.BackButton=Pe,customElements.define("ons-back-button",Pe);var Le="bottom-bar",Oe={"":"bottom-bar--*"},Me=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this)).classList.add(Le),M.initModifier(d(t),Oe),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,Le,Oe);break;case"modifier":M.onModifierChanged(e,n,this,Oe)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(ne);k.BottomToolbar=Me,customElements.define("ons-bottom-toolbar",Me);var Te=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_scheme",get:function(){return{"":"button--*"}}},{key:"_defaultClassName",get:function(){return"button"}}]),n}(ve);k.Button=Te,customElements.define("ons-button",Te);var Ie="card",De={"":"card--*",".card__title":"card--*__title",".card__content":"card--*__content"},Ne=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){t._compile()})),t}return o(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")}O.prepare(this),this.classList.add(Ie),M.initModifier(this,De)}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,Ie,De);break;case"modifier":M.onModifierChanged(e,n,this,De)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(ne);k.Card=Ne,customElements.define("ons-card",Ne);var Be={"":"carousel-item--*"},Re=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this)).style.width="100%",M.initModifier(d(t),Be),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){if("modifier"===t)return M.onModifierChanged(e,n,this,Be)}}],[{key:"observedAttributes",get:function(){return["modifier"]}}]),n}(ne);k.CarouselItem=Re,customElements.define("ons-carousel-item",Re);var He={vertical:{axis:"Y",size:"Height",dir:["up","down"],t3d:["0px, ","px, 0px"]},horizontal:{axis:"X",size:"Width",dir:["left","right"],t3d:["","px, 0px, 0px"]}},qe=function(){function t(e){var n=this;i(this,t);var a=function(){return!1};"getInitialIndex getBubbleWidth isVertical isOverScrollable isCentered\n isAutoScrollable refreshHook preChangeHook postChangeHook overScrollHook".split(/\s+/).forEach((function(t){return n[t]=e[t]||a})),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||t>1)&&Y.throw("Invalid auto-scroll-ratio "+t+". Must be between 0 and 1"),t},this.shouldBlock="other"===Y.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"===Y.globals.actualMobileOS}return o(t,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.swipeable,i=e.autoRefresh;this.initialized=!0,this.target=this.getElement().children[0],this.blocker=this.getElement().children[1],this.target&&this.blocker||Y.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 ft(this.getElement(),{dragMinDistance:1,dragLockToAxis:!0,passive:!this._shouldFixScroll}),this._mutationObserver=new MutationObserver((function(){return t.refresh()})),this.updateSwipeable(n),this.updateAutoRefresh(i),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|%)/);t||Y.throw("Invalid state: swiper's size unit must be '%' or 'px'");var e=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=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._setSwiping(!0),t=Math.max(0,Math.min(t,this.itemCount-1));var n=Math.max(0,Math.min(this.maxScroll,this._offset+this.itemNumSize*t));return this._changeTo(n,e)}},{key:"getActiveIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._scroll;t-=this._offset;var e=this.itemCount,n=this.itemNumSize;if(0===this.itemNumSize||!Y.isInteger(t))return this._lastActiveIndex;if(t<=0)return 0;for(var i=0;i<e;i++)if(n*i<=t&&n*(i+1)>t)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){if(this._gestureDetector){var e=t?"on":"off";this._gestureDetector[e]("drag",this.onDrag),this._gestureDetector[e]("dragstart",this.onDragStart),this._gestureDetector[e]("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 e=t.direction,n=0===this._scroll&&!this.isOverScrollable(),i=this._scroll===this.maxScroll&&!this.isOverScrollable();return this.isVertical()?"down"===e&&!n||"up"===e&&!i:"right"===e&&!n||"left"===e&&!i}},{key:"onDragStart",value:function(t){var e=this;if(this._ignoreDrag=t.consumed||!Y.isValidGesture(t),!this._ignoreDrag){var n=t.consume;if(t.consume=function(){n&&n(),e._ignoreDrag=!0},this._canConsumeGesture(t.gesture)){var i=t.gesture.center&&t.gesture.center.clientX||0,a=this.getBubbleWidth()||0,o=function(){n&&n(),t.consumed=!0,e._started=!0,e.shouldBlock&&e.toggleBlocker(!0),e._setSwiping(!0),Y.iosPreventScroll(e._gestureDetector)};i<a||i>this.targetSize-a?setImmediate((function(){return!e._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){if(this._started=!1,t.gesture&&!this._ignoreDrag&&this._continued){this._continued=!1,t.stopPropagation();var e=this._scroll-this._getDelta(t),n=this._normalizeScroll(e);e===n?this._startMomentumScroll(e,t):this._killOverScroll(n),this.shouldBlock&&this.toggleBlocker(!1)}else this._ignoreDrag=!0}},{key:"_startMomentumScroll",value:function(t,e){var n=this._getVelocity(e),i=e.gesture.interimDirection===this.dM.dir[this._getDelta(e)<0?0:1],a=this._getAutoScroll(t,n,i),o=Math.abs(a-t)/(n+.01)/1e3;o=Math.min(.25,Math.max(.1,o)),this._changeTo(a,{swipe:!0,animationOptions:{duration:o,timing:"cubic-bezier(.4, .7, .5, 1)"}})}},{key:"_killOverScroll",value:function(t){var e=this;this._scroll=t;var n=this.dM.dir[Number(t>0)],i=function(){return e._changeTo(t,{animationOptions:{duration:.4,timing:"cubic-bezier(.1, .4, .1, 1)"}})};this.overScrollHook({direction:n,killOverScroll:i})||i()}},{key:"_changeTo",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={activeIndex:this.getActiveIndex(t),lastActiveIndex:this._lastActiveIndex,swipe:n.swipe||!1},a=i.activeIndex!==i.lastActiveIndex,o=!!a&&this.preChangeHook(i);return this._scroll=o?this._offset+i.lastActiveIndex*this.itemNumSize:t,this._lastActiveIndex=o?i.lastActiveIndex:i.activeIndex,this._scrollTo(this._scroll,n).then((function(){if(t!==e._scroll||o){if(n.reject)return e._setSwiping(!1),Promise.reject("Canceled")}else e._setSwiping(!1),a&&e.postChangeHook(i)})).catch((function(){return!1}))}},{key:"_scrollTo",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.throttle){if(t<0)t=this.isOverScrollable()?Math.round(.35*t):0;else{var i=this.maxScroll;i<t&&(t=this.isOverScrollable()?i+Math.round(.35*(t-i)):i)}}var a="none"===n.animation?{}:n.animationOptions;return this.scrollHook&&this.itemNumSize>0&&this.scrollHook((t/this.itemNumSize).toFixed(2),n.animationOptions||{}),new Promise((function(n){return ht(e.target).queue({transform:e._getTransform(t)},a).play(n)}))}},{key:"_getAutoScroll",value:function(t,e,n){var i=this.maxScroll,a=this._offset,o=this.itemNumSize;if(!this.isAutoScrollable())return Math.max(0,Math.min(i,t));for(var r=[],s=a;s<i;s+=o)r.push(s);r.push(i);var l=(r=r.sort((function(e,n){return Math.abs(e-t)-Math.abs(n-t)})).filter((function(t,e){return!e||t!==r[e-1]})))[0],c=this._lastActiveIndex*o+a,u=Math.abs(t-c)/o;return u<=this.getAutoScrollRatio(n,e,o)?l=c:u<1&&r[0]===c&&r.length>1&&(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(){if(this._reset(),this._updateLayout(),Y.isInteger(this._scroll)){var t=this._normalizeScroll(this._scroll);t!==this._scroll?this._killOverScroll(t):this._changeTo(t)}else 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=He[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}(),ze=function(t){s(a,t);var n=h(a);function a(){var t;i(this,a),t=n.call(this);var e=Y.defineListenerProperty(d(t),"swipe"),o=e.onConnected,r=e.onDisconnected;return t._connectOnSwipe=o,t._disconnectOnSwipe=r,It(d(t),(function(){return t._compile()})),t}return o(a,[{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 t=this;this._swiper||(this._swiper=new qe({getElement:function(){return t},getInitialIndex:function(){return t.getAttribute("active-index")||t.getAttribute("initial-index")},getAutoScrollRatio:function(){return t.autoScrollRatio},isVertical:function(){return t.vertical},isOverScrollable:function(){return t.overscrollable},isCentered:function(){return t.centered},isAutoScrollable:function(){return t.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(e,n){return Y.triggerElementEvent(t,"swipe",{index:e,options:n})}}),It(this,(function(){return t._swiper.init({swipeable:t.hasAttribute("swipeable"),autoRefresh:t.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 Y.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,n=t.lastActiveIndex;Y.triggerElementEvent(this,"prechange",{carousel:this,activeIndex:e,lastActiveIndex:n})}},{key:"_onPostChange",value:function(t){var e=t.activeIndex,n=t.lastActiveIndex;this.activeIndex=e,Y.triggerElementEvent(this,"postchange",{carousel:this,activeIndex:e,lastActiveIndex:n})}},{key:"_onRefresh",value:function(){Y.triggerElementEvent(this,"refresh",{carousel:this})}},{key:"setActiveIndex",value:function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i=e({animation:this.getAttribute("animation"),animationOptions:this.animationOptions||{duration:.3,timing:"cubic-bezier(.4, .7, .5, 1)"}},i),this._swiper.setActiveIndex(t,i).then((function(){return i.callback instanceof Function&&i.callback(n),Promise.resolve(n)}))}},{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?Y.animationOptionsParse(t):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"]}}]),a}(ne);Y.defineBooleanProperties(ze,["swipeable","disabled","overscrollable","auto-scroll","centered","fullscreen","auto-refresh"]),k.Carousel=ze,customElements.define("ons-carousel",ze);var Fe=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this)).getAttribute("width")&&t._updateWidth(),t}return o(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,E(this,{flex:"0 0 "+t,maxWidth:t})):E.clear(this,"flex maxWidth")}}],[{key:"observedAttributes",get:function(){return["width"]}}]),n}(ne);k.Col=Fe,customElements.define("ons-col",Fe);var je=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),n}(ae),Ve=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"ease-in-out":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.3:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:0},{opacity:1}),ht(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(){},ht.runAll(ht(t._mask,this.def).default({opacity:1},{opacity:0}),ht(t._dialog,this.def).default({transform:"translate3d(-50%, -50%, 0)",opacity:1},{transform:"translate3d(-50%, -60%, 0)",opacity:0}).queue((function(t){e(),t()})))}}]),n}(je),We=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"ease-in-out":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.2:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).bodyHeight=document.body.clientHeight,t}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:0},{opacity:1}),ht(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(){},ht.runAll(ht(t._mask,this.def).default({opacity:1},{opacity:0}),ht(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()})))}}]),n}(je),Xe=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"cubic-bezier(.1, .7, .4, 1)":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.2:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).bodyHeight=document.body.clientHeight,t}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht.runAll(ht(t._mask,this.def).default({opacity:0},{opacity:1}),ht(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(){},ht.runAll(ht(t._mask,this.def).default({opacity:1},{opacity:0}),ht(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()})))}}]),n}(je),Ue={".dialog":"dialog--*",".dialog-container":"dialog-container--*",".dialog-mask":"dialog-mask--*"},Ye={default:function(){return b.isAndroid()?Ve:We},slide:Xe,none:je},$e=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){return t._compile()})),t}return o(n,[{key:"_scheme",get:function(){return Ue}},{key:"_mask",get:function(){return Y.findChild(this,".dialog-mask")}},{key:"_dialog",get:function(){return Y.findChild(this,".dialog")}},{key:"_updateAnimatorFactory",value:function(){return new Z({animators:Ye,baseClass:je,baseClassName:"DialogAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){if(O.prepare(this),this.style.display="none",this.style.zIndex=10001,!this._dialog){var t=document.createElement("div");t.classList.add("dialog");var e=document.createElement("div");for(e.classList.add("dialog-container");this.firstChild;)e.appendChild(this.firstChild);t.appendChild(e),this.appendChild(t)}if(!this._mask){var n=document.createElement("div");n.classList.add("dialog-mask"),this.insertBefore(n,this.firstChild)}this._dialog.style.zIndex=20001,this._mask.style.zIndex=2e4,this.setAttribute("status-bar-fill",""),M.initModifier(this,this._scheme)}}],[{key:"registerAnimator",value:function(t,e){e.prototype instanceof je||Y.throwAnimator("Dialog"),Ye[t]=e}},{key:"animators",get:function(){return Ye}},{key:"DialogAnimator",get:function(){return je}}]),n}(ce);k.Dialog=$e,customElements.define("ons-dialog",$e);var Ge={"":"fab--*",".fab__icon":"fab--*__icon"},Ke=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._hide(),t.classList.add("fab"),It(d(t),(function(){t._compile()})),t}return o(n,[{key:"_compile",value:function(){if(O.prepare(this),!Y.findChild(this,".fab__icon")){var t=document.createElement("span");t.classList.add("fab__icon"),Y.arrayFrom(this.childNodes).forEach((function(e){e.tagName&&"ons-ripple"===e.tagName.toLowerCase()||t.appendChild(e)})),this.appendChild(t)}this._updateRipple(),M.initModifier(this,Ge),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":Y.restoreClass(this,"fab",Ge);break;case"modifier":M.onModifierChanged(e,n,this,Ge);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(){Y.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=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.visible;this._manuallyHidden=!t,this._toggle(t)}},{key:"_toggle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.visible,e=(this.getAttribute("position")||"").indexOf("bottom")>=0?"translate3d(0px, -".concat(Y.globals.fabOffset||0,"px, 0px)"):"";E(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}(ne);Y.defineBooleanProperties(Ke,["disabled","ripple"]),k.Fab=Ke,customElements.define("ons-fab",Ke);var Je=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._gestureDetector=new ft(d(t),{passive:!0}),t}return o(n)}(ne);k.GestureDetector=Je,customElements.define("ons-gesture-detector",Je);var Qe="fa",Ze=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){t._compile()})),t}return o(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(){O.prepare(this),this._update()}},{key:"_update",value:function(){var t=this,e=this._buildClassAndStyle(this._parseAttr("icon"),this._parseAttr("size")),n=e.classList,i=e.style;Y.extend(this.style,i),n.forEach((function(e){return t.classList.add(e)}))}},{key:"_parseAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getAttribute("modifier")||"",n=(this.getAttribute(t)||t||"").split(/\s*,\s*/),i=n[0],a=n[1];return a=(a||"").split(/\s*:\s*/),(e&&RegExp("(^|\\s+)".concat(a[0],"($|\\s+)"),"i").test(e)?a[1]:i)||""}},{key:"_cleanClassAttribute",value:function(t,e){var n=this,i=this._prefixIcon(this._parseAttr(t,e)),a=i.className,o=i.prefix,r=a!==o?"|".concat(o,"$|").concat(o,"-"):"|".concat(a,"$")||"",s=new RegExp("^(fa$|fa-|ion-|zmdi$|zmdi-|ons-icon--".concat(r,")"));Y.arrayFrom(this.classList).filter((function(t){return s.test(t)})).forEach((function(t){return n.classList.remove(t)}))}},{key:"_prefixIcon",value:function(t){var e=Qe+(Qe?"-":"")+t;return{className:e,prefix:e.split("-")[0]}}},{key:"_buildClassAndStyle",value:function(t,e){var n=["ons-icon"],i={};if(0===t.indexOf("ion-"))n.push(t),n.push("ons-icon--ion");else if(0===t.indexOf("fa-"))n.push(t),this.classList.contains("far")||this.classList.contains("fab")||this.classList.contains("fal")||n.push("fa");else if(0===t.indexOf("md-"))n.push("zmdi"),n.push("zmdi-"+t.split(/-(.+)?/)[1]);else{var a=this._prefixIcon(t),o=a.className,r=a.prefix;r&&n.push(r),o&&n.push(o)}return e.match(/^[1-5]x|lg$/)?(n.push("ons-icon--"+e),this.style.removeProperty("font-size")):i.fontSize=e,{classList:n,style:i}}}],[{key:"observedAttributes",get:function(){return["icon","size","modifier","class"]}},{key:"setAutoPrefix",value:function(t){Qe=t?"string"==typeof t&&t||"fa":""}}]),n}(ne);Y.defineBooleanProperties(Ze,["fixed-width","spin"]),k.Icon=Ze,customElements.define("ons-icon",Ze);var tn=function(){function t(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;i(this,t),"object"===n(e)&&null!==e||Y.throw('"delegate" parameter must be an object'),this._userDelegate=e,a instanceof Element||null===a||Y.throw('"templateElement" parameter must be an instance of Element or null'),this._templateElement=a}return o(t,[{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){if(this._userDelegate.loadItemElement instanceof Function)this._userDelegate.loadItemElement(t,e);else{var n=this._userDelegate.createItemContent(t,this._templateElement);n instanceof Element||Y.throw('"createItemContent" must return an instance of Element'),e({element:n})}}},{key:"countItems",value:function(){var t=this._userDelegate.countItems();return"number"!=typeof t&&Y.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){if(this._userDelegate.calculateItemHeight instanceof Function){var e=this._userDelegate.calculateItemHeight(t);return"number"!=typeof e&&Y.throw('"calculateItemHeight" must return a number'),e}return 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}}]),t}(),en=function(){function t(e,n){i(this,t),n instanceof tn||Y.throw('"delegate" parameter must be an instance of LazyRepeatDelegate'),this._wrapperElement=e,this._delegate=n,this._insertIndex=this._wrapperElement.children[0]&&"ONS-LAZY-REPEAT"===this._wrapperElement.children[0].tagName?1:0,"ons-list"===e.tagName.toLowerCase()&&e.classList.add("lazy-list"),this._pageContent=this._findPageContentElement(e),this._pageContent||Y.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 o(t,[{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=Y.findParent(t,".page__content");if(e)return e;var n=Y.findParent(t,"ons-page");if(n){var i=Y.findChild(n,".content");if(i)return i}return null}},{key:"_checkItemHeight",value:function(t){var e=this;this._delegate.loadItemElement(0,(function(n){e._unknownItemHeight||Y.throw("Invalid state"),e._wrapperElement.appendChild(n.element);var i=function(){e._delegate.destroyItem(0,n),n.element&&n.element.remove(),delete e._unknownItemHeight,t()};e._itemHeight=n.element.offsetHeight,e._itemHeight>0?i():(e._wrapperElement.style.visibility="hidden",n.element.style.visibility="hidden",setImmediate((function(){e._itemHeight=n.element.offsetHeight,0==e._itemHeight&&Y.throw('Invalid state: "itemHeight" must be greater than zero'),e._wrapperElement.style.visibility="",i()})))}))}},{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 t=this;return Object.keys(this._renderedItems).reduce((function(e,n){return e+t._getItemHeight(+n)}),0)}},{key:"_onChange",value:function(){this._render()}},{key:"_lastItemRendered",value:function(){return Math.max.apply(Math,p(Object.keys(this._renderedItems)))}},{key:"_firstItemRendered",value:function(){return Math.min.apply(Math,p(Object.keys(this._renderedItems)))}},{key:"refresh",value:function(){var t={forceScrollDown:!0},e=this._firstItemRendered();Y.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 t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.forceScrollDown,i=void 0!==n&&n,a=e.forceFirstIndex,o=e.forceLastIndex;if(this._unknownItemHeight)return this._checkItemHeight(this._render.bind(this,arguments[0]));var r=!i&&this.lastScrollTop>this._pageContent.scrollTop;this.lastScrollTop=this._pageContent.scrollTop;for(var s={},l=this._wrapperElement.getBoundingClientRect().top,c=4*window.innerHeight-l,u=this._countItems(),d=a||Math.max(0,this._calculateStartIndex(l)-30),h=d,f=this._topPositions[h];h<u&&f<c;h++)h>=this._topPositions.length&&(this._topPositions.length+=100),this._topPositions[h]=f,f+=this._getItemHeight(h);if(this._delegate.hasRenderFunction&&this._delegate.hasRenderFunction())return this._delegate._render(d,h,(function(){t.padding=t._topPositions[d]}));if(r)for(var m=h-1;m>=d;m--)s[m]=!0,this._renderElement(m,r);else for(var g=o||Math.max.apply(Math,[h-1].concat(p(Object.keys(this._renderedItems)))),v=d;v<=g;v++)s[v]=!0,this._renderElement(v,r);Object.keys(this._renderedItems).forEach((function(e){return s[e]||t._removeElement(e,r)}))}},{key:"_renderElement",value:function(t,e){var n=this,i=this._renderedItems[t];i?this._delegate.updateItem(t,i):this._delegate.loadItemElement(t,(function(i){e?(n._wrapperElement.insertBefore(i.element,n._wrapperElement.children[n._insertIndex]),n.padding=n._topPositions[t],i.height=n._topPositions[t+1]-n._topPositions[t]):n._wrapperElement.appendChild(i.element),n._renderedItems[t]=i}))}},{key:"_removeElement",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t=+t;var n=this._renderedItems[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 t=this;Object.keys(this._renderedItems).forEach((function(e){return t._removeElement(e)}))}},{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){var e=this._firstItemRendered(),n=this._lastItemRendered();this._recalculateTopPositions(e,n);for(var i=0,a=this._countItems()-1;;){var o=Math.floor((i+a)/2),r=t+this._topPositions[o];if(a<i)return 0;if(r<=0&&r+this._getItemHeight(o)>0)return o;isNaN(r)||r>=0?a=o-1:i=o+1}}},{key:"_debounce",value:function(t,e,n){var i;return function(){var a=arguments,o=this,r=n&&!i;clearTimeout(i),r?t.apply(this,arguments):i=setTimeout((function(){i=null,t.apply(o,a)}),e)}}},{key:"_doubleFireOnTouchend",value:function(){this._render(),this._debounce(this._render.bind(this),100)}},{key:"_addEventListeners",value:function(){Y.bindListeners(this,["_onChange","_doubleFireOnTouchend"]),b.isIOS()&&(this._boundOnChange=this._debounce(this._boundOnChange,30)),this._pageContent.addEventListener("scroll",this._boundOnChange,!0),b.isIOS()&&(Y.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),b.isIOS()&&(Y.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()}}]),t}(),nn=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"connectedCallback",value:function(){this.hasAttribute("delegate")&&(this.delegate=window[this.getAttribute("delegate")])}},{key:"delegate",get:function(){Y.throw("No delegate getter")},set:function(t){this._lazyRepeatProvider&&this._lazyRepeatProvider.destroy(),!this._templateElement&&this.children[0]&&(this._templateElement=this.removeChild(this.children[0]));var e=new tn(t,this._templateElement||null);this._lazyRepeatProvider=new en(this.parentElement,e)}},{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)}}]),n}(ne);Q.LazyRepeatDelegate=tn,Q.LazyRepeatProvider=en,k.LazyRepeat=nn,customElements.define("ons-lazy-repeat",nn);var an="list-header",on={"":"list-header--*"},rn=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._compile(),t}return o(n,[{key:"_compile",value:function(){O.prepare(this),this.classList.add(an),M.initModifier(this,on)}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,an,on);break;case"modifier":M.onModifierChanged(e,n,this,on)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(ne);k.ListHeader=rn,customElements.define("ons-list-header",rn);var sn="list-title",ln={"":"list-title--*"},cn=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._compile(),t}return o(n,[{key:"_compile",value:function(){O.prepare(this),this.classList.add(sn),M.initModifier(this,ln)}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,sn,ln);break;case"modifier":M.onModifierChanged(e,n,this,ln)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(ne);k.ListTitle=cn,customElements.define("ons-list-title",cn);var un=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"showExpansion",value:function(t,e){e()}},{key:"hideExpansion",value:function(t,e){e()}}]),n}(ae),dn=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{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,a=t.expandableContent.style.height,o=t.expandableContent.style.display;t.expandableContent.style.height="auto",t.expandableContent.style.display="block";var r,s=window.getComputedStyle(t.expandableContent),l=[{height:0,paddingTop:0,paddingBottom:0},{height:s.height,paddingTop:s.paddingTop,paddingBottom:s.paddingBottom}],c=[{transform:"rotate(45deg)"},{transform:"rotate(225deg)"}];(t.expandableContent.style.height=a,(i=ht(t.expandableContent,{duration:this.duration,property:"height padding-top padding-bottom"})).default.apply(i,p(e?l:l.reverse())).play((function(){t.expandableContent.style.display=o,n&&n()})),t.expandChevron)&&(r=ht(t.expandChevron,{duration:this.duration,property:"transform"})).default.apply(r,p(e?c:c.reverse())).play()}}]),n}(un),hn="list-item",fn={".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"},pn={default:dn,none:un},mn=function(t){s(n,t);var e=h(n);function n(){var t;i(this,n),(t=e.call(this))._animatorFactory=t._updateAnimatorFactory();var a=/^ons-(?!col$|row$|if$)/i;return t._shouldIgnoreTap=function(t){return t.hasAttribute("prevent-tap")||a.test(t.tagName)},t.show=t.showExpansion,t.hide=t.hideExpansion,It(d(t),(function(){t._compile()})),t}return o(n,[{key:"_compile",value:function(){var t,e;O.prepare(this),this.classList.add(hn);var n,i,a,o=[];Array.from(this.childNodes).forEach((function(n){n.nodeType!==Node.ELEMENT_NODE?o.push(n):n.classList.contains("top")?t=n:n.classList.contains("expandable-content")?e=n:o.push(n),"ONS-RIPPLE"!==n.nodeName&&n.remove()})),o=t?Array.from(t.childNodes):o;var r=[];if(o.forEach((function(t){t.nodeType!==Node.ELEMENT_NODE?r.push(t):t.classList.contains("left")?n=t:t.classList.contains("right")?i=t:t.classList.contains("center")?a=t:r.push(t)})),this.hasAttribute("expandable")){if(this.classList.add("list-item--expandable"),t||(t=document.createElement("div")).classList.add("top"),t.classList.add("list-item__top"),this.appendChild(t),this._top=t,e&&(e.classList.add("list-item__expandable-content"),this.appendChild(e)),!i){(i=document.createElement("div")).classList.add("list-item__right","right");var s=document.createElement("span");s.classList.add("list-item__expand-chevron"),i.appendChild(s)}this.expanded&&this.classList.add("list-item--expanded")}else t=this;a||((a=document.createElement("div")).classList.add("center"),r.forEach((function(t){return a.appendChild(t)}))),a.classList.add("list-item__center"),t.appendChild(a),n&&(n.classList.add("list-item__left"),t.appendChild(n)),i&&(i.classList.add("list-item__right"),t.appendChild(i)),Y.updateRipple(this),M.initModifier(this,fn)}},{key:"showExpansion",value:function(){this.expanded=!0}},{key:"hideExpansion",value:function(){this.expanded=!1}},{key:"toggleExpansion",value:function(){this.expanded=!this.expanded}},{key:"clearTapBackgroundColor",value:function(){this._clearTapBackgroundColor()}},{key:"_animateExpansion",value:function(){var t=this,e=this.expanded&&this.classList.contains("list-item--expanded");if(this.hasAttribute("expandable")&&!this._expanding&&!e){this._expanding=!0;var n=function(){t._expanding=!1,t.expanded?t.classList.add("list-item--expanded"):t.classList.remove("list-item--expanded")},i=this._animatorFactory.newAnimator();i._animateExpansion?i._animateExpansion(this,this.expanded,n):n()}}},{key:"_updateAnimatorFactory",value:function(){return new Z({animators:pn,baseClass:un,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":Y.restoreClass(this,hn,fn);break;case"modifier":M.onModifierChanged(e,n,this,fn);break;case"ripple":Y.updateRipple(this);break;case"animation":this._animatorFactory=this._updateAnimatorFactory();break;case"expanded":It(this,(function(){return i._animateExpansion()}))}}},{key:"connectedCallback",value:function(){var t=this;It(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){var e=(t?"add":"remove")+"EventListener";Y[e](this,"touchstart",this._onTouch,{passive:!0}),Y[e](this,"touchmove",this._onRelease,{passive:!0}),this[e]("touchcancel",this._onRelease),this[e]("touchend",this._onRelease),this[e]("touchleave",this._onRelease),this[e]("drag",this._onDrag),this[e]("mousedown",this._onTouch),this[e]("mouseup",this._onRelease),this[e]("mouseout",this._onRelease),this._top&&this._top[e]("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){var e=t.gesture;this.hasAttribute("lock-on-drag")&&["left","right"].indexOf(e.direction)>-1&&e.preventDefault()}},{key:"_onTouch",value:function(t){var e=this;if(!(this.tapped||this!==t.target&&(this._shouldIgnoreTap(t.target)||Y.findParent(t.target,this._shouldIgnoreTap,(function(t){return t===e}))))){this.tapped=!0;var n={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),n.backgroundColor=this.getAttribute("tap-background-color")||"#d9d9d9",n.boxShadow="0px -1px 0px 0px ".concat(n.backgroundColor)),E(this,n)}}},{key:"_onRelease",value:function(){this.tapped=!1,this.keepTapBackgroundColor||this._clearTapBackgroundColor(),E.clear(this,"transition boxShadow")}},{key:"_clearTapBackgroundColor",value:function(){this.style.backgroundColor=this._originalBackgroundColor||""}}],[{key:"observedAttributes",get:function(){return["modifier","class","ripple","animation","expanded"]}}]),n}(ne);Y.defineBooleanProperties(mn,["expanded","expandable","tappable","lock-on-drag","keep-tap-background-color"]),Y.defineStringProperties(mn,["animation","tap-background-color"]),k.ListItem=mn,customElements.define("ons-list-item",mn);var gn="list",vn={"":"list--*"},_n=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._compile(),t}return o(n,[{key:"_compile",value:function(){O.prepare(this),this.classList.add(gn),M.initModifier(this,vn)}},{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,gn,vn);break;case"modifier":M.onModifierChanged(e,n,this,vn)}}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(ne);k.List=_n,customElements.define("ons-list",_n);var bn=["autocapitalize","autocomplete","autocorrect","autofocus","disabled","inputmode","max","maxlength","min","minlength","name","pattern","placeholder","readonly","required","size","spellcheck","step","validator","value"],yn=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this)).constructor===n&&Y.throwAbstract(),It(d(t),(function(){return t._compile()})),t._boundDelegateEvent=t._delegateEvent.bind(d(t)),t}return o(n,[{key:"_update",value:function(){}},{key:"_scheme",get:function(){Y.throwMember()}},{key:"_template",get:function(){Y.throwMember()}},{key:"type",get:function(){Y.throwMember()}},{key:"_compile",value:function(){O.prepare(this),this._defaultClassName&&this.classList.add(this._defaultClassName),0===this.children.length&&(this.appendChild(Y.createFragment(this._template)),this._setInputId(),this._updateBoundAttributes(),M.initModifier(this,this._scheme))}},{key:"_updateBoundAttributes",value:function(){var t=this;bn.forEach((function(e){t.hasAttribute(e)?t._input.setAttribute(e,t.getAttribute(e)):t._input.removeAttribute(e)})),this._update()}},{key:"_delegateEvent",value:function(t){var e=new CustomEvent(t.type,{bubbles:!1,cancelable:!0});return this.dispatchEvent(e)}},{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;It(this,(function(){t instanceof Date&&(t=t.toISOString().substring(0,10)),e._input.value=t,e._update()}))}},{key:"connectedCallback",value:function(){var t=this;It(this,(function(){t._input.addEventListener("focus",t._boundDelegateEvent),t._input.addEventListener("blur",t._boundDelegateEvent)}))}},{key:"disconnectedCallback",value:function(){var t=this;It(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":It(this,(function(){return M.onModifierChanged(e,n,i,i._scheme)}));break;case"input-id":It(this,(function(){return i._setInputId()}));break;case"class":Y.restoreClass(this,this._defaultClassName,this._scheme)}bn.indexOf(t)>=0&&It(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(bn)}}]),n}(ne);Y.defineBooleanProperties(yn,["disabled"]);var kn={".text-input":"text-input--*",".text-input__label":"text-input--*__label"},wn=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._boundOnInput=t._update.bind(d(t)),t._boundOnFocusin=t._update.bind(d(t)),t}return o(n,[{key:"_update",value:function(){this._updateLabel(),this._updateLabelClass()}},{key:"_scheme",get:function(){return kn}},{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;f(l(n.prototype),"connectedCallback",this).call(this),It(this,(function(){t._input.addEventListener("input",t._boundOnInput),t._input.addEventListener("focusin",t._boundOnFocusin)}));var e=this.getAttribute("type");["checkbox","radio"].indexOf(e)>=0&&Y.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;f(l(n.prototype),"disconnectedCallback",this).call(this),It(this,(function(){t._input.removeEventListener("input",t._boundOnInput),t._input.removeEventListener("focusin",t._boundOnFocusin)}))}},{key:"attributeChangedCallback",value:function(t,e,i){var a=this;if("type"===t)It(this,(function(){return a._input.setAttribute("type",a.type)}));else f(l(n.prototype),"attributeChangedCallback",this).call(this,t,e,i)}}],[{key:"observedAttributes",get:function(){return[].concat(p(f(l(n),"observedAttributes",this)),["type"])}}]),n}(yn);Y.defineBooleanProperties(wn,["float"]),k.Input=wn,customElements.define("ons-input",wn);var En=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this)).constructor===n&&util.throwAbstract(),It(d(t),(function(){t.attributeChangedCallback("checked",null,t.getAttribute("checked"))})),t}return o(n,[{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;It(this,(function(){e._input.checked=t}))}},{key:"attributeChangedCallback",value:function(t,e,i){if("checked"===t)this.checked=null!==i;else f(l(n.prototype),"attributeChangedCallback",this).call(this,t,e,i)}}],[{key:"observedAttributes",get:function(){return[].concat(p(f(l(n),"observedAttributes",this)),["checked"])}}]),n}(yn),Cn={".checkbox":"checkbox--*",".checkbox__input":"checkbox--*__input",".checkbox__checkmark":"checkbox--*__checkmark"},An=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_scheme",get:function(){return Cn}},{key:"_defaultClassName",get:function(){return"checkbox"}},{key:"type",get:function(){return"checkbox"}}]),n}(En);k.Checkbox=An,customElements.define("ons-checkbox",An);var Sn={".radio-button":"radio-button--*",".radio-button__input":"radio-button--*__input",".radio-button__checkmark":"radio-button--*__checkmark"},xn=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_scheme",get:function(){return Sn}},{key:"_defaultClassName",get:function(){return"radio-button"}},{key:"type",get:function(){return"radio"}}]),n}(En);k.Radio=xn,customElements.define("ons-radio",xn);var Pn={".search-input":"search-input--*"},Ln=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"_scheme",get:function(){return Pn}},{key:"_template",get:function(){return'\n <input type="'.concat(this.type,'" class="search-input">\n ')}},{key:"type",get:function(){return"search"}}]),n}(yn);k.SearchInput=Ln,customElements.define("ons-search-input",Ln);var On=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),n}(ae),Mn=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.3:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht(t,this.def).default({opacity:0},{opacity:1}).queue((function(t){e(),t()})).play()}},{key:"hide",value:function(t,e){e=e||function(){},ht(t,this.def).default({opacity:1},{opacity:0}).queue((function(t){e(),t()})).play()}}]),n}(On),Tn=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"cubic-bezier( .1, .7, .1, 1)":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.4:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht(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(){},ht(t,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(0, 100%, 0)"}).queue((function(t){e(),t()})).play()}}]),n}(On),In={"":"modal--*",modal__content:"modal--*__content"},Dn="modal",Nn={default:On,fade:Mn,lift:Tn,none:On},Bn=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._defaultDBB=function(){},It(d(t),(function(){return t._compile()})),t}return o(n,[{key:"_scheme",get:function(){return In}},{key:"_updateAnimatorFactory",value:function(){return new Z({animators:Nn,baseClass:On,baseClassName:"ModalAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){if(this.style.display="none",this.style.zIndex=10001,this.classList.add(Dn),!Y.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)}M.initModifier(this,this._scheme)}},{key:"_toggleStyle",value:function(t){this.style.display=t?"table":"none"}},{key:"connectedCallback",value:function(){f(l(n.prototype),"connectedCallback",this).call(this)}},{key:"disconnectedCallback",value:function(){f(l(n.prototype),"disconnectedCallback",this).call(this)}},{key:"attributeChangedCallback",value:function(t,e,i){"class"===t?Y.restoreClass(this,Dn,In):f(l(n.prototype),"attributeChangedCallback",this).call(this,t,e,i)}}],[{key:"observedAttributes",get:function(){return[].concat(p(f(l(n),"observedAttributes",this)),["class"])}},{key:"registerAnimator",value:function(t,e){e.prototype instanceof On||Y.throwAnimator("Modal"),Nn[t]=e}},{key:"animators",get:function(){return Nn}},{key:"ModalAnimator",get:function(){return On}}]),n}(ce);k.Modal=Bn,customElements.define("ons-modal",Bn);var Rn=function(){function t(e){var n=this;i(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"===Y.globals.actualMobileOS}return o(t,[{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.element.hasAttribute("swipeable");this.gestureDetector||(this.gestureDetector=new ft(this.elementHandler,{dragMinDistance:1,passive:!this._shouldFixScroll}));var e=t?"on":"off";this.gestureDetector[e]("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,n,i,a=this;this._ignoreDrag=t.consumed||!Y.isValidGesture(t)||this.ignoreSwipe(t,"left"===a.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%",n=[parseInt(e,10),/px/.test(e)],i=n[0],n[1]?i:Math.round(document.body.offsetWidth*i/100)),this._startDistance=this._distance=this.isInitialState instanceof Function&&!this.isInitialState()?this._width:0,Y.iosPreventScroll(this.gestureDetector))}},{key:"onDrag",value:function(t){t.stopPropagation();var e="left"===this.getSide()?t.gesture.deltaX:-t.gesture.deltaX,n=Math.max(0,Math.min(this._width,this._startDistance+e));n!==this._distance&&(this._distance=n,this.swipeMid(this._distance,this._width))}},{key:"onDragEnd",value:function(t){t.stopPropagation();var e=t.gesture.interimDirection;this.getSide()!==e&&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}(),Hn=function(t){s(n,t);var e=h(n);function n(t){return i(this,n),t=Y.extend({timing:"linear",duration:"0.4",delay:"0"},t||{}),e.call(this,t)}return o(n,[{key:"push",value:function(t,e,n){n()}},{key:"pop",value:function(t,e,n){n()}},{key:"block",value:function(t){var e=Y.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}(ae),qn=["durationRestore","durationSwipe","timingSwipe"],zn=function(t){s(a,t);var n=h(a);function a(){var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=o.durationRestore,s=void 0===r?.1:r,l=o.durationSwipe,c=void 0===l?.15:l,d=o.timingSwipe,h=void 0===d?"linear":d,f=u(o,qn);return i(this,a),(t=n.call(this,e({},f))).constructor===a&&Y.throwAbstract(),t.durationRestore=s,t.durationSwipe=c,t.timingSwipe=h,t.optSwipe={timing:h,duration:c},t.optRestore={timing:h,duration:s},t.swipeShadow=Y.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 o(a,[{key:"_decompose",value:function(){Y.throwMember()}},{key:"_shouldAnimateToolbar",value:function(){Y.throwMember()}},{key:"_calculateDelta",value:function(){Y.throwMember()}},{key:"_dragStartSetup",value:function(t,e){this.isDragStart=!1,this.unblock=f(l(a.prototype),"block",this).call(this,e),t.parentElement.insertBefore(this.backgroundMask,t),this.target={enter:Y.findToolbarPage(t)||t,leave:Y.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));var a=(t-e)/e;this.shouldAnimateToolbar?ht.runAll(ht([this.decomp.enter.content,this.decomp.enter.bottomToolbar,this.decomp.enter.background]).queue({transform:"translate3d(".concat(25*a,"%, 0, 0)"),opacity:1+10*a/100}),ht(this.decomp.enter.toolbarCenter).queue({transform:"translate3d(".concat(this.delta.title*a,"px, 0, 0)"),opacity:1+a}),ht(this.decomp.enter.backButtonLabel).queue({opacity:1+10*a/100,transform:"translate3d(".concat(this.delta.label*a,"px, 0, 0)")}),ht(this.decomp.enter.other).queue({opacity:1+a}),ht([this.decomp.leave.content,this.decomp.leave.bottomToolbar,this.decomp.leave.background,this.swipeShadow]).queue({transform:"translate3d(".concat(t,"px, 0, 0)")}),ht(this.decomp.leave.toolbar).queue({opacity:-1*a}),ht(this.decomp.leave.toolbarCenter).queue({transform:"translate3d(".concat(125*(1+a),"%, 0, 0)")}),ht(this.decomp.leave.backButtonLabel).queue({opacity:-1*a,transform:"translate3d(".concat(this.delta.title*(1+a),"px, 0, 0)")}),ht(this.swipeShadow).queue({opacity:-1*a})):ht.runAll(ht(i).queue({transform:"translate3d(".concat(t,"px, 0, 0)")}),ht(n).queue({transform:"translate3d(".concat(25*a,"%, 0, 0)"),opacity:1+10*a/100}),ht(this.swipeShadow).queue({opacity:-1*a}))}},{key:"restore",value:function(t,e,n){var i=this;this.isDragStart||(this.shouldAnimateToolbar?ht.runAll(ht([this.decomp.enter.content,this.decomp.enter.bottomToolbar,this.decomp.enter.background]).queue({transform:"translate3d(-25%, 0, 0)",opacity:.9},this.optRestore),ht(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}),ht(this.decomp.enter.backButtonLabel).queue({transform:"translate3d(-".concat(this.delta.label,"px, 0, 0)")},this.optRestore),ht(this.decomp.enter.other).queue({opacity:0},this.optRestore),ht([this.decomp.leave.content,this.decomp.leave.bottomToolbar,this.decomp.leave.background,this.swipeShadow]).queue({transform:"translate3d(0, 0, 0)"},this.optRestore),ht(this.decomp.leave.toolbar).queue({opacity:1},this.optRestore),ht(this.decomp.leave.toolbarCenter).queue({transform:"translate3d(0, 0, 0)"},this.optRestore),ht(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)}),ht(this.swipeShadow).queue({opacity:0},this.optRestore).queue((function(e){i._reset(i.target.enter,i.target.leave),t.style.display="none",n&&n(),e()}))):ht.runAll(ht(t).queue({transform:"translate3D(-25%, 0, 0)",opacity:.9},this.optRestore),ht(e).queue({transform:"translate3D(0, 0, 0)"},this.optRestore).queue((function(a){i._reset(t,e),t.style.display="none",n&&n(),a()}))))}},{key:"popSwipe",value:function(t,e,n){var i=this;this.isDragStart||(this.shouldAnimateToolbar?ht.runAll(ht([this.decomp.enter.content,this.decomp.enter.bottomToolbar,this.decomp.enter.background]).queue({transform:"translate3d(0, 0, 0)",opacity:1},this.optSwipe),ht(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}),ht(this.decomp.enter.backButtonLabel).queue({transform:"translate3d(0, 0, 0)"},this.optSwipe),ht(this.decomp.enter.other).queue({opacity:1},this.optSwipe),ht([this.decomp.leave.content,this.decomp.leave.bottomToolbar,this.decomp.leave.background]).queue({transform:"translate3d(100%, 0, 0)"},this.optSwipe),ht(this.decomp.leave.toolbar).queue({opacity:0},this.optSwipe),ht(this.decomp.leave.toolbarCenter).queue({transform:"translate3d(125%, 0, 0)"},this.optSwipe),ht(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)}),ht(this.swipeShadow).queue({opacity:0,transform:"translate3d(".concat(this.maxWidth,"px, 0, 0)")},this.optSwipe).queue((function(t){i._reset(i.target.enter,i.target.leave),n&&n(),t()}))):ht.runAll(ht(t).queue({transform:"translate3D(0, 0, 0)",opacity:1},this.optSwipe),ht(e).queue({transform:"translate3D(100%, 0, 0)"},this.optSwipe).queue((function(a){i._reset(t,e),n&&n(),a()}))))}},{key:"_saveStyle",value:function(){var t=this;this._savedStyle=new WeakMap;for(var e=function(e){return t._savedStyle.set(e,e.getAttribute("style"))},n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];i.forEach(e),Object.keys(this.decomp).forEach((function(n){Object.keys(t.decomp[n]).forEach((function(i){(t.decomp[n][i]instanceof Array?t.decomp[n][i]:[t.decomp[n][i]]).forEach(e)}))}))}},{key:"_restoreStyle",value:function(){for(var t=this,e=function(e){null===t._savedStyle.get(e)?e.removeAttribute("style"):e.setAttribute("style",t._savedStyle.get(e)),t._savedStyle.delete(e)},n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];i.forEach(e),Object.keys(this.decomp).forEach((function(n){Object.keys(t.decomp[n]).forEach((function(i){(t.decomp[n][i]instanceof Array?t.decomp[n][i]:[t.decomp[n][i]]).forEach(e)}))}))}},{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}(Hn),Fn=["timing","delay","duration"],jn=function(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return"translate3d(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,", ").concat(t,", ").concat(e,")")},Vn=function(t){s(a,t);var n=h(a);function a(){var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=o.timing,s=void 0===r?"cubic-bezier(0.3, .4, 0, .9)":r,l=o.delay,c=void 0===l?0:l,d=o.duration,h=void 0===d?.4:d,f=u(o,Fn);return i(this,a),(t=n.call(this,e({timing:s,delay:c,duration:h},f))).backgroundMask=Y.createElement('<div style="position: absolute; width: 100%; height: 100%;background-color: black; z-index: 2"></div>'),t}return o(a,[{key:"_decompose",value:function(t){var e=t._getToolbarElement(),n=e._getToolbarLeftItemsElement(),i=e._getToolbarRightItemsElement(),a=function(t){for(var e=[],n=0;n<t.length;n++)"ons-back-button"!==t[n].nodeName.toLowerCase()&&e.push(t[n]);return e},o=[].concat(0===n.children.length?n:a(n.children)).concat(0===i.children.length?i:a(i.children));return{toolbarCenter:e._getToolbarCenterItemsElement(),backButtonIcon:e._getToolbarBackButtonIconElement(),backButtonLabel:e._getToolbarBackButtonLabelElement(),other:o,content:t._getContentElement(),background:t._getBackgroundElement(),toolbar:e,bottomToolbar:t._getBottomToolbarElement()}}},{key:"_shouldAnimateToolbar",value:function(t,e){var n=t._canAnimateToolbar()&&e._canAnimateToolbar(),i=t._getToolbarElement(),a=e._getToolbarElement(),o=i.hasAttribute("static")||a.hasAttribute("static"),r=Y.hasModifier(i,"material")||Y.hasModifier(a,"material"),s=Y.hasModifier(i,"transparent")||Y.hasModifier(a,"transparent");return n&&!o&&!r&&!s}},{key:"_calculateDelta",value:function(t,e){var n,i,a=t.getBoundingClientRect();if(e.backButtonLabel.classList.contains("back-button__label")){var o=e.backButtonLabel.getBoundingClientRect();n=Math.round(a.width/2-o.width/2-o.left)}else n=Math.round(a.width/2*.6);return e.backButtonIcon.classList.contains("back-button__icon")&&(i=e.backButtonIcon.getBoundingClientRect().right-2),{title:n,label:i}}},{key:"push",value:function(t,e,n){var i=this;this.backgroundMask.remove(),e.parentNode.insertBefore(this.backgroundMask,e);var o=f(l(a.prototype),"block",this).call(this,t);It(t,(function(){var a=Y.findToolbarPage(t)||t,r=Y.findToolbarPage(e)||e,s=i._decompose(a),l=i._decompose(r),c=i._calculateDelta(e,s);i._shouldAnimateToolbar(a,r)?ht.runAll(ht([s.content,s.bottomToolbar,s.background],i.def).default({transform:jn("100%")},{transform:jn()}),ht(s.toolbar,i.def).default({opacity:0},{opacity:1}),ht(s.toolbarCenter,i.def).default({transform:jn("125%"),opacity:1},{transform:jn(),opacity:1}),ht(s.backButtonLabel,i.def).default({transform:jn("".concat(c.title,"px")),opacity:0},{transform:jn(),opacity:1,transition:"opacity ".concat(i.duration,"s linear, transform ").concat(i.duration,"s ").concat(i.timing)}),ht(s.other,i.def).default({opacity:0},{css:{opacity:1},timing:"linear"}),ht([l.content,l.bottomToolbar,l.background],i.def).default({transform:jn(),opacity:1},{transform:jn("-25%"),opacity:.9}).queue((function(t){i.backgroundMask.remove(),o(),n(),t()})),ht(l.toolbarCenter,i.def).default({transform:jn(),opacity:1},{transform:jn("-".concat(c.title,"px")),opacity:0,transition:"opacity ".concat(i.duration,"s linear, transform ").concat(i.duration,"s ").concat(i.timing)}),ht(l.backButtonLabel,i.def).default({transform:jn(),opacity:1},{transform:jn("-".concat(c.label,"px")),opacity:0}),ht(l.other,i.def).default({opacity:1},{css:{opacity:0},timing:"linear"})):ht.runAll(ht(t,i.def).default({transform:jn("100%")},{transform:jn()}),ht(e,i.def).default({transform:jn(),opacity:1},{transform:jn("-25%"),opacity:.9}).queue((function(t){i.backgroundMask.remove(),o(),n(),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=f(l(a.prototype),"block",this).call(this,t),r=Y.findToolbarPage(t)||t,s=Y.findToolbarPage(e)||e,c=this._decompose(r),u=this._decompose(s),d=this._calculateDelta(e,u);this._shouldAnimateToolbar(r,s)?ht.runAll(ht([c.content,c.bottomToolbar,c.background],this.def).default({transform:jn("-25%"),opacity:.9},{transform:jn(),opacity:1}),ht(c.toolbarCenter,this.def).default({transform:jn("-".concat(d.title,"px")),opacity:0},{transform:jn(),opacity:1,transition:"opacity ".concat(this.duration,"s linear, transform ").concat(this.duration,"s ").concat(this.timing)}),ht(c.backButtonLabel,this.def).default({transform:jn("-".concat(d.label,"px"))},{transform:jn()}),ht(c.other,this.def).default({opacity:0},{css:{opacity:1},timing:"linear"}),ht([u.content,u.bottomToolbar,u.background],this.def).default({transform:jn()},{transform:jn("100%")}).wait(0).queue((function(t){i.backgroundMask.remove(),o(),n(),t()})),ht(u.toolbar,this.def).default({opacity:1},{opacity:0}),ht(u.toolbarCenter,this.def).default({transform:jn()},{transform:jn("125%")}),ht(u.backButtonLabel,this.def).default({transform:jn(),opacity:1},{transform:jn("".concat(d.title,"px")),opacity:0,transition:"opacity ".concat(this.duration,"s linear, transform ").concat(this.duration,"s ").concat(this.timing)})):ht.runAll(ht(t,this.def).default({transform:jn("-25%"),opacity:.9},{transform:jn(),opacity:1}),ht(e,this.def).default({transform:jn()},{transform:jn("100%")}).queue((function(t){i.backgroundMask.remove(),o(),n(),t()})))}}]),a}(zn),Wn=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"cubic-bezier(.1, .7, .1, 1)":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.4:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).backgroundMask=Y.createElement('<div style="position: absolute; width: 100%; height: 100%;background: linear-gradient(black, white);"></div>'),t}return o(n,[{key:"push",value:function(t,e,i){var a=this;this.backgroundMask.remove(),e.parentNode.insertBefore(this.backgroundMask,e);var o=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(t,this.def).default({transform:"translate3D(0, 100%, 0)"},{transform:"translate3D(0, 0, 0)"}),ht(e,this.def).default({transform:"translate3D(0, 0, 0)",opacity:1},{transform:"translate3D(0, -10%, 0)",opacity:.9}).queue((function(t){a.backgroundMask.remove(),o(),i(),t()})))}},{key:"pop",value:function(t,e,i){var a=this;this.backgroundMask.remove(),t.parentNode.insertBefore(this.backgroundMask,t);var o=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(t,this.def).default({transform:"translate3D(0, -43px, 0)",opacity:.9},{transform:"translate3D(0, 0, 0)",opacity:1}).queue((function(t){a.backgroundMask.remove(),o(),i(),t()})),ht(e,this.def).default({transform:"translate3D(0, 0, 0)"},{transform:"translate3D(0, 100%, 0)"}))}}]),n}(Hn),Xn="translate3d(0, 0, 0)",Un=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.4:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"push",value:function(t,e,i){var a=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(t,this.def).default({transform:Xn,opacity:0},{transform:Xn,opacity:1}).queue((function(t){a(),i(),t()})))}},{key:"pop",value:function(t,e,i){var a=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(e,this.def).default({transform:Xn,opacity:1},{transform:Xn,opacity:0}).queue((function(t){a(),i(),t()})))}}]),n}(Hn),Yn=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"cubic-bezier(.1, .7, .4, 1)":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.3:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).blackMaskOpacity=.4,t.backgroundMask=Y.createElement('<div style="position: absolute; width: 100%; height: 100%; z-index: 2;background-color: black; opacity: 0;"></div>'),t}return o(n,[{key:"push",value:function(t,e,i){var a=this;this.backgroundMask.remove(),e.parentElement.insertBefore(this.backgroundMask,e.nextSibling);var o=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(this.backgroundMask,this.def).default({transform:"translate3d(0, 0, 0)",opacity:0},{opacity:this.blackMaskOpacity}).queue((function(t){a.backgroundMask.remove(),t()})),ht(t,this.def).default({transform:"translate3d(100%, 0, 0)"},{transform:"translate3d(0, 0, 0)"}),ht(e,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(-45%, 0, 0)"}).queue((function(t){o(),i(),t()})))}},{key:"pop",value:function(t,e,i){var a=this;this.backgroundMask.remove(),t.parentNode.insertBefore(this.backgroundMask,t.nextSibling);var o=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(this.backgroundMask,this.def).default({transform:"translate3d(0, 0, 0)",opacity:this.blackMaskOpacity},{opacity:0}).queue((function(t){a.backgroundMask.remove(),t()})),ht(t,this.def).default({transform:"translate3d(-45%, 0, 0)",opacity:.9},{transform:"translate3d(0, 0, 0)",opacity:1}),ht(e,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(100%, 0, 0)"}).queue((function(t){o(),i(),t()})))}}]),n}(Hn),$n=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"cubic-bezier(.1, .7, .1, 1)":o,s=a.delay,l=void 0===s?.05:s,c=a.duration,u=void 0===c?.4:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).backgroundMask=Y.createElement('<div style="position: absolute; width: 100%; height: 100%;background-color: black;"></div>'),t}return o(n,[{key:"push",value:function(t,e,i){var a=this;this.backgroundMask.remove(),e.parentNode.insertBefore(this.backgroundMask,e);var o=f(l(n.prototype),"block",this).call(this,t),r=ht(this.backgroundMask).wait(this.delay+this.duration).queue((function(t){a.backgroundMask.remove(),t()}));ht.runAll(r,ht(t,this.def).default({transform:"translate3d(0, 100%, 0)"},{transform:"translate3d(0, 0, 0)"}),ht(e,this.def).default({opacity:1},{opacity:.4}).queue((function(t){o(),i(),t()})))}},{key:"pop",value:function(t,e,i){var a=this;this.backgroundMask.remove(),t.parentNode.insertBefore(this.backgroundMask,t);var o=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(this.backgroundMask).wait(this.delay+this.duration).queue((function(t){a.backgroundMask.remove(),t()})),ht(t,this.def).default({opacity:.4},{opacity:1}).queue((function(t){o(),i(),t()})),ht(e,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(0, 100%, 0)"}))}}]),n}(Hn),Gn=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"cubic-bezier(0.4, 0, 0.2, 1)":o,s=a.timingPop,l=void 0===s?"cubic-bezier(0.4, 0, 1, 1)":s,c=a.delay,u=void 0===c?0:c,d=a.duration,h=void 0===d?.2:d;return i(this,n),(t=e.call(this,{timing:r,delay:u,duration:h})).timingPop=l,t}return o(n,[{key:"push",value:function(t,e,i){var a=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(t,this.def).default({transform:"translate3D(0, 42px, 0)",opacity:0},{transform:"translate3D(0, 0, 0)",opacity:1}).queue((function(t){a(),i(),t()})))}},{key:"pop",value:function(t,e,i){var a=f(l(n.prototype),"block",this).call(this,t);ht.runAll(ht(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){a(),i(),t()})))}}]),n}(Hn),Kn={default:function(){return b.isAndroid()?Gn:Vn},slide:function(){return b.isAndroid()?Yn:Vn},lift:function(){return b.isAndroid()?$n:Wn},fade:function(){return b.isAndroid()?Gn:Un},"slide-ios":Vn,"slide-md":Yn,"lift-ios":Wn,"lift-md":$n,"fade-ios":Un,"fade-md":Gn,none:function(t){s(n,t);var e=h(n);function n(t){return i(this,n),e.call(this,t)}return o(n,[{key:"push",value:function(t,e,n){n()}},{key:"pop",value:function(t,e,n){n()}}]),n}(Hn)},Jn={ready:function(t,e){e()}},Qn=function(t){return"ONS-PAGE"!==t.nodeName&&Y.throw("Only page elements can be children of navigator")},Zn=function(t){s(a,t);var e=h(a);function a(){var t;return i(this,a),(t=e.call(this))._isRunning=!1,t._initialized=!1,t._pageLoader=Jt,t._pageMap=new WeakMap,t._updateAnimatorFactory(),t}return o(a,[{key:"animatorFactory",get:function(){return this._animatorFactory}},{key:"pageLoader",get:function(){return this._pageLoader},set:function(t){t instanceof Kt||Y.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 t,e=this;(this.onDeviceBackButton=this._onDeviceBackButton.bind(this),b.isAndroid()&&"force"!==this.getAttribute("swipeable"))||(this._swipe=new Rn({element:this,getThreshold:function(){return Math.max(.2,parseFloat(e.getAttribute("swipe-threshold"))||0)},swipeMax:function(){var n={duration:t.durationSwipe,timing:t.timingSwipe};e._onSwipe&&e._onSwipe(1,n),Y.triggerElementEvent(e,"swipe",{ratio:1,animationOptions:n}),e[e.swipeMax?"swipeMax":"popPage"]({animator:t,swipeToPop:!0}),t=null},swipeMid:function(n,i){var a=n/i;e._onSwipe&&e._onSwipe(a),Y.triggerElementEvent(e,"swipe",{ratio:a}),t.translate(n,i,e.topPage.previousElementSibling,e.topPage)},swipeMin:function(){var n={duration:t.durationRestore,timing:t.timingSwipe};e._onSwipe&&e._onSwipe(0,n),Y.triggerElementEvent(e,"swipe",{ratio:0,animationOptions:n}),t.restore(e.topPage.previousElementSibling,e.topPage),t=null},ignoreSwipe:function(n,i){if(!e._isRunning&&e.children.length>1){var a=parseInt(e.getAttribute("swipe-target-width")||25,10);if("right"===n.gesture.direction&&a>i){var o=function(t){return/ons-back-button/i.test(t.tagName)};if(!o(n.target)&&!Y.findParent(n.target,o,(function(t){return/ons-page/i.test(t.tagName)}))){var r=(e.topPage.pushedOptions||{}).animation||e.animatorFactory._animation,s=Kn[r]instanceof Function?Kn[r].call():Kn[r];if(void 0!==s&&s.swipeable)return t=new s,!1}}}return!0}}),this.attributeChangedCallback("swipeable"));if(!this._initialized){this._initialized=!0;var n=Y.defer();this.loaded=n.promise,Jn.ready(this,(function(){var t=!Y.hasAnyComponentAsParent(e),i={animation:"none",show:t};if(0===e.pages.length&&e._getPageTarget())e.pushPage(e._getPageTarget(),i).then((function(){return n.resolve()}));else if(e.pages.length>0){for(var a=0;a<e.pages.length;a++)Qn(e.pages[a]);e.topPage&&It(e.topPage,(function(){return setTimeout((function(){n.resolve(),t&&e.topPage._show(),e._updateLastPageBackButton()}),0)}))}else It(e,(function(){0===e.pages.length&&e._getPageTarget()?e.pushPage(e._getPageTarget(),i).then((function(){return n.resolve()})):n.resolve()}))}))}}},{key:"_updateAnimatorFactory",value:function(){this._animatorFactory=new Z({animators:Kn,baseClass:Hn,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 t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=this._preparePageAndOptions(null,e).options,Y.isInteger(e.times)&&e.times>1&&this._removePages(e.times);return this._popPage(e,(function(){return new Promise((function(e){t._pageLoader.unload(t.pages[t.pages.length-1]),e()}))}))}},{key:"_popPage",value:function(t){var e=this,n=arguments.length>1&&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 i=this.pages.length;return this._isRunning=!0,this.pages[i-2].updateBackButton(i-2>0),new Promise((function(a){var o=e.pages[i-1],r=e.pages[i-2];(t=Y.extend({},e.options||{},t)).data&&(r.data=Y.extend({},r.data||{},t.data||{}));o._hide(),r.style.display="",(t.animator||e._animatorFactory.newAnimator(t)).pop(e.pages[i-2],e.pages[i-1],(function(){n().then((function(){e._isRunning=!1,r._show(),Y.triggerElementEvent(e,"postpop",{leavePage:o,enterPage:r,navigator:e,swipeToPop:!!t.swipeToPop,onsBackButton:!!t.onsBackButton}),t.callback&&t.callback(r),a(r)}))}))})).catch((function(){return e._isRunning=!1}))}},{key:"pushPage",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this._preparePageAndOptions(t,n);t=i.page,n=i.options;var a=function(i){Qn(i),e._pageMap.set(i,t),(i=Y.extend(i,{data:n.data})).style.visibility="hidden"};return n.pageHTML?this._pushPage(n,(function(){return new Promise((function(t){Qt.load({page:n.pageHTML,parent:e,params:n.data},(function(e){a(e),t()}))}))})):this._pushPage(n,(function(){return new Promise((function(i,o){e._pageLoader.load({page:t,parent:e,params:n.data},(function(t){a(t),i()}),(function(t){e._isRunning=!1,o(t)}))}))}))}},{key:"_pushPage",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&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 i=this.animationOptions;e=Y.extend({},this.options||{},{animationOptions:i},e);var a=this._animatorFactory.newAnimator(e);return n().then((function(){var n=t.pages.length,i=t.pages[n-1],o=e.leavePage||t.pages[n-2];return Qn(i),i.updateBackButton(n>(e._replacePage?2:1)),i.pushedOptions=Y.extend({},i.pushedOptions||{},e||{}),i.data=Y.extend({},i.data||{},e.data||{}),i.unload=i.unload||e.unload,new Promise((function(n){var r=function(){t._isRunning=!1,!1!==e.show&&setImmediate((function(){return i._show()})),Y.triggerElementEvent(t,"postpush",{leavePage:o,enterPage:i,navigator:t}),o&&(o.style.display="none"),e.callback&&e.callback(i),n(i)};i.style.visibility="",o?(o._hide(),a.push(i,o,r)):r()}))})).catch((function(e){throw t._isRunning=!1,e}))}},{key:"replacePage",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.pushPage(t,n).then((function(t){return e.pages.length>1&&e._pageLoader.unload(e.pages[e.pages.length-2]),e._updateLastPageBackButton(),Promise.resolve(t)}))}},{key:"insertPage",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=this._preparePageAndOptions(e,i);if(e=a.page,i=a.options,(t=this._normalizeIndex(t))>=this.pages.length)return this.pushPage(e,i);e="string"==typeof i.pageHTML?i.pageHTML:e;var o="string"==typeof i.pageHTML?Qt:this._pageLoader;return new Promise((function(a){o.load({page:e,parent:n},(function(o){Qn(o),n._pageMap.set(o,e),o=Y.extend(o,{data:i.data,pushedOptions:i}),i.animationOptions=Y.extend({},n.animationOptions,i.animationOptions||{}),o.style.display="none",n.insertBefore(o,n.pages[t]),n.topPage.updateBackButton(!0),setTimeout((function(){o=null,a(n.pages[t])}),1e3/60)}))}))}},{key:"removePage",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(t=this._normalizeIndex(t))<this.pages.length-1?new Promise((function(n){var i=e.pages[t],a=e.topPage;e._pageMap.delete(i),e._pageLoader.unload(i),1===e.pages.length&&e.topPage.updateBackButton(!1),n(a)})):this.popPage(n)}},{key:"resetToPage",value:function(t){var e=this,n=arguments.length>1&&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 a=n.callback;return n.callback=function(t){e._removePages(),t.updateBackButton(!1),a&&a(t)},this.pushPage(t,n)}},{key:"bringPageTop",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};-1===["number","string"].indexOf(n(t))&&Y.throw("First argument must be a page name or the index of an existing page. You supplied "+t);var i="number"==typeof t?this._normalizeIndex(t):this._lastIndexOfPage(t),a=this.pages[i];return i<0?this.pushPage(t,e):(e=this._preparePageAndOptions(a,e).options,i===this.pages.length-1?Promise.resolve(a):(a||Y.throw("Failed to find item "+t),this._isRunning?Promise.reject("pushPage is already running."):this._emitPrePushEvent()?Promise.reject("Canceled in prepush event."):(a.style.display="",a.style.visibility="hidden",a.parentNode.appendChild(a),this._pushPage(e))))}},{key:"_preparePageAndOptions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"object"!=n(e)&&Y.throw("options must be an object. You supplied "+e),null==t&&e.page&&(t=e.page),{page:t,options:e=Y.extend({},this.options||{},e,{page:t})}}},{key:"_removePages",value:function(t){var e=this.pages,n=void 0===t?0:e.length-t;n=n<0?1:n;for(var i=e.length-2;i>=n;i--)this._pageMap.delete(e[i]),this._pageLoader.unload(e[i])}},{key:"_updateLastPageBackButton",value:function(){var t=this.pages.length-1;t>=0&&this.pages[t].updateBackButton(t>0)}},{key:"_normalizeIndex",value:function(t){return t>=0?t:Math.abs(this.pages.length+t)%this.pages.length}},{key:"_onDeviceBackButton",value:function(t){this.pages.length>1?this.popPage():t.callParentHandler()}},{key:"_lastIndexOfPage",value:function(t){var e;for(e=this.pages.length-1;e>=0&&t!==this._pageMap.get(this.pages[e]);e--);return e}},{key:"_emitPreEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!1;return Y.triggerElementEvent(this,"pre"+t,Y.extend({navigator:this,currentPage:this.pages[this.pages.length-1],cancel:function(){return n=!0}},e)),n}},{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){var e=Y.createElement(Q.normalizePageHTML(t));return Qn(e),e}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler},set:function(t){this._backButtonHandler&&this._backButtonHandler.destroy(),this._backButtonHandler=at.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 Y.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||Y.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")?Z.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;t>=0;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 Hn||Y.throwAnimator("Navigator"),Kn[t]=e}},{key:"animators",get:function(){return Kn}},{key:"NavigatorAnimator",get:function(){return Hn}},{key:"events",get:function(){return["prepush","postpush","prepop","postpop","swipe"]}},{key:"rewritables",get:function(){return Jn}}]),a}(ne);k.Navigator=Zn,customElements.define("ons-navigator",Zn);var ti="toolbar",ei={"":"toolbar--*",".toolbar__left":"toolbar--*__left",".toolbar__center":"toolbar--*__center",".toolbar__right":"toolbar--*__right"},ni=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._visible=!0,It(d(t),(function(){t._compile()})),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,ti,ei);break;case"modifier":M.onModifierChanged(e,n,this,ei)}}},{key:"setVisibility",value:function(t){var e=this;It(this,(function(){if(e._visible=t,e.style.display=t?"":"none",e.parentNode){var n=Y.findChild(e.parentNode,".page__background");n&&(n.style.top=t?null:0);var i=Y.findChild(e.parentNode,".page__content");i&&(i.style.top=t?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")||Q.nullElement}},{key:"_getToolbarCenterItemsElement",value:function(){return this.querySelector(".center")||Q.nullElement}},{key:"_getToolbarRightItemsElement",value:function(){return this.querySelector(".right")||Q.nullElement}},{key:"_getToolbarBackButtonLabelElement",value:function(){return this.querySelector("ons-back-button .back-button__label")||Q.nullElement}},{key:"_getToolbarBackButtonIconElement",value:function(){return this.querySelector("ons-back-button .back-button__icon")||Q.nullElement}},{key:"_compile",value:function(){O.prepare(this),this.classList.add(ti),this._ensureToolbarItemElements(),M.initModifier(this,ei)}},{key:"_ensureToolbarItemElements",value:function(){for(var t=this.childNodes.length-1;t>=0;t--)1!=this.childNodes[t].nodeType&&this.removeChild(this.childNodes[t]);var e=this._ensureToolbarElement("center");if(e.classList.add("toolbar__title"),1!==this.children.length||!this.children[0].classList.contains("center")){var n=this._ensureToolbarElement("left"),i=this._ensureToolbarElement("right");this.children[0]===n&&this.children[1]===e&&this.children[2]===i||(this.appendChild(n),this.appendChild(e),this.appendChild(i))}}},{key:"_ensureToolbarElement",value:function(t){if(Y.findChild(this,".toolbar__"+t)){var e=Y.findChild(this,".toolbar__"+t);return e.classList.add(t),e}var n=Y.findChild(this,"."+t)||Y.create("."+t);return n.classList.add("toolbar__"+t),n}}],[{key:"observedAttributes",get:function(){return["modifier","class"]}}]),n}(ne);Y.defineBooleanProperties(ni,["static"]),k.Toolbar=ni,customElements.define("ons-toolbar",ni);var ii="page",ai={"":"page--*",".page__content":"page--*__content",".page__background":"page--*__background"},oi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._deriveHooks(),t._defaultClassName=ii,t.classList.add(ii),t._initialized=!1,It(d(t),(function(){t._compile(),t._isShown=!1,t._contentElement=t._getContentElement(),t._backgroundElement=t._getBackgroundElement()})),t}return o(n,[{key:"_compile",value:function(){var t=this;O.prepare(this);var e=Y.findChild(this,"ons-toolbar"),n=Y.findChild(this,".page__background")||Y.findChild(this,".background")||document.createElement("div");n.classList.add("page__background"),this.insertBefore(n,!e&&this.firstChild||e&&e.nextSibling);var i=Y.findChild(this,".page__content")||Y.findChild(this,".content")||document.createElement("div");i.classList.add("page__content"),i.parentElement||Y.arrayFrom(this.childNodes).forEach((function(e){(1!==e.nodeType||t._elementShouldBeMoved(e))&&i.appendChild(e)})),this._tryToFillStatusBar(i),this.insertBefore(i,n.nextSibling),e&&Y.hasModifier(e,"transparent")||1!==i.children.length||!Y.isPageControl(i.children[0])||(this._defaultClassName+=" page--wrapper",this.attributeChangedCallback("class")),Y.findChild(this,"ons-bottom-toolbar")&&(this._defaultClassName+=" page-with-bottom-toolbar",this.attributeChangedCallback("class")),M.initModifier(this,ai)}},{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=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._contentElement;Q.autoStatusBarFill((function(){Y.toggleAttribute(t,"status-bar-fill",!Y.findParent(t,(function(t){return t.hasAttribute("status-bar-fill")}))&&(t._canAnimateToolbar(e)||!Y.findChild(e,Y.isPageControl)))}))}},{key:"_canAnimateToolbar",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._contentElement;return!!Y.findChild(this,"ons-toolbar")||!!Y.findChild(t,(function(t){return Y.match(t,"ons-toolbar")&&!t.hasAttribute("inline")}))}},{key:"connectedCallback",value:function(){var t=this;Y.isAttached(this)&&It(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(),Y.triggerElementEvent(t,"init")})),Y.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||Y.throw('"onInfiniteScroll" must be function or null'),It(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,n=(e.scrollTop+e.clientHeight)/e.scrollHeight>=this._infiniteScrollLimit;this._onInfiniteScroll&&!this._loadingContent&&n&&(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=at.createHandler(this,t)}},{key:"scrollTop",get:function(){return this._contentElement.scrollTop},set:function(t){this._contentElement.scrollTop=t}},{key:"_getContentElement",value:function(){var t=Y.findChild(this,".page__content");if(t)return t;Y.throw('Fail to get ".page__content" element')}},{key:"_getBackgroundElement",value:function(){var t=Y.findChild(this,".page__background");if(t)return t;Y.throw('Fail to get ".page__background" element')}},{key:"_getBottomToolbarElement",value:function(){return Y.findChild(this,"ons-bottom-toolbar")||Q.nullElement}},{key:"_getToolbarElement",value:function(){return Y.findChild(this,"ons-toolbar")||document.createElement("ons-toolbar")}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":Y.restoreClass(this,this._defaultClassName,ai);break;case"modifier":M.onModifierChanged(e,n,this,ai);break;case"on-infinite-scroll":this.onInfiniteScroll=null===n?null:function(t){var e=Y.findFromPath(n);i.onInfiniteScroll=e,e(t)}}}},{key:"_show",value:function(){!this._isShown&&Y.isAttached(this)&&(this._isShown=!0,this.setAttribute("shown",""),this.onShow&&this.onShow(),Y.triggerElementEvent(this,"show"),Y.propagateAction(this,"_show"))}},{key:"_hide",value:function(){this._isShown&&(this._isShown=!1,this.removeAttribute("shown"),this.onHide&&this.onHide(),Y.triggerElementEvent(this,"hide"),Y.propagateAction(this,"_hide"))}},{key:"_destroy",value:function(){this._hide(),this.onDestroy&&this.onDestroy(),Y.triggerElementEvent(this,"destroy"),this.onDeviceBackButton&&this.onDeviceBackButton.destroy(),Y.propagateAction(this,"_destroy"),this.remove()}},{key:"_deriveHooks",value:function(){var t=this;this.constructor.events.forEach((function(e){var n="on"+e.charAt(0).toUpperCase()+e.slice(1);Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get:function(){return t["_".concat(n)]},set:function(e){e instanceof Function||Y.throw('"'.concat(n,'" hook must be a function')),t["_".concat(n)]=e.bind(t)}})}))}}],[{key:"observedAttributes",get:function(){return["modifier","on-infinite-scroll","class"]}},{key:"events",get:function(){return["init","show","hide","destroy"]}}]),n}(ne);k.Page=oi,customElements.define("ons-page",oi);var ri=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"cubic-bezier(.1, .7, .4, 1)":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{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,a=e.options,o=e.callback,r=e.restore,s=void 0!==r&&r,l=e.animation;return a=Y.extend({},this.options,a),l&&(n=l.from,i=l.to),l=ht(t),s&&(l=l.saveStyle()),l=l.queue(n).wait(this.delay).queue({css:i,duration:this.duration,timing:this.timing}),s&&(l=l.restoreStyle()),o&&(l=l.queue((function(t){o(),t()}))),l}},{key:"_animateAll",value:function(t,e){var n=this;Object.keys(e).forEach((function(i){return n._animate(t[i],e[i]).play()}))}}]),n}(ae),si={out:{from:{opacity:1},to:{opacity:0}},in:{from:{opacity:0},to:{opacity:1}}},li=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"show",value:function(t,e){this._animateAll(t,{_mask:si.in,_popover:{animation:si.in,restore:!0,callback:e}})}},{key:"hide",value:function(t,e){this._animateAll(t,{_mask:si.out,_popover:{animation:si.out,restore:!0,callback:e}})}}]),n}(ri),ci=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"show",value:function(t,e){this._animateAll(t,{_mask:si.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}})}}]),n}(li),ui={".popover":"popover--*",".popover-mask":"popover-mask--*",".popover__content":"popover--*__content",".popover__arrow":"popover--*__arrow"},di={default:function(){return b.isAndroid()?li:ci},none:ri,"fade-ios":ci,"fade-md":li},hi={up:"bottom",left:"right",down:"top",right:"left"},fi=function(t){s(r,t);var a=h(r);function r(){var t;return i(this,r),(t=a.call(this))._boundOnChange=t._onChange.bind(d(t)),It(d(t),(function(){t._compile(),t.style.display="none"})),t}return o(r,[{key:"_scheme",get:function(){return ui}},{key:"_mask",get:function(){return Y.findChild(this,".popover-mask")}},{key:"_popover",get:function(){return Y.findChild(this,".popover")}},{key:"_content",get:function(){return Y.findChild(this._popover,".popover__content")}},{key:"_arrow",get:function(){return Y.findChild(this._popover,".popover__arrow")}},{key:"_updateAnimatorFactory",value:function(){return new Z({animators:di,baseClass:ri,baseClassName:"PopoverAnimator",defaultAnimation:this.getAttribute("animation")||"default"})}},{key:"_toggleStyle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){this.style.display="block";var n=e.target;!n&&this.target&&(n=document.getElementById(this.target)),this._currentTarget=n,this._positionPopover(n)}else this.style.display="none",this._clearStyles()}},{key:"_positionPopover",value:function(t){var e=this._radius,n=this._content,i=this._margin,a=oe.getSafeAreaLengths(),o=oe.getSafeAreaDOMRect(),r=t.getBoundingClientRect(),s=Y.hasModifier(this,"material"),l=s&&this.hasAttribute("cover-target"),c=(Y.findParent(this,"ons-page")||document.body).getBoundingClientRect(),u=Math.max(c.top,o.top),d=Math.max(c.left,o.left),h=Math.min(c.bottom,o.bottom),f=Math.min(c.right,o.right),p={top:r.top-(u+i),left:r.left-(d+i),bottom:h-i-r.bottom,right:f-i-r.right},m={top:r.top+Math.round(r.height/2)-(u+i),left:r.left+Math.round(r.width/2)-(d+i),bottom:h-i-r.bottom+Math.round(r.height/2),right:f-i-r.right+Math.round(r.width/2)},g=this._calculateDirections(p),v=g.vertical,_=g.primary,b=g.secondary;this._currentDirection=_,Y.addModifier(this,_);var y,k=v?"width":"height",w=(y=window.getComputedStyle(n),{width:parseInt(y.getPropertyValue("width"),10),height:parseInt(y.getPropertyValue("height"),10)}),E=l?0:(v?r.height:r.width)+(s?0:14),C=Math.max(a[_]+i,a[_]+i+p[_]+E),A=Math.max(a[b]+i,a[b]+i+m[b]-w[k]/2);this._popover.style[_]=C+"px",this._popover.style[b]=A+"px",this._arrow.style[b]=Math.max(e,a[b]+i+m[b]-A)+"px"}},{key:"_calculateDirections",value:function(t){var e=(this.getAttribute("direction")||"up down left right").split(/\s+/).map((function(t){return hi[t]})).sort((function(e,n){return t[e]-t[n]}))[0],n="top"==e||"bottom"==e;return{vertical:n,primary:e,secondary:n?t.left<t.right?"left":"right":t.top<t.bottom?"top":"bottom"}}},{key:"_clearStyles",value:function(){var t=this;this._currentDirection=null,["top","bottom","left","right"].forEach((function(e){t._arrow.style[e]=t._content.style[e]=t._popover.style[e]="",Y.removeModifier(t,e)}))}},{key:"_onChange",value:function(){var t=this;setImmediate((function(){t._currentTarget&&t._positionPopover(t._currentTarget)}))}},{key:"_compile",value:function(){if(O.prepare(this),!this._popover||!this._mask){if(this._popover&&this._content){if(!this._mask){var t=document.createElement("div");t.classList.add("popover-mask"),this.insertBefore(t,this.firstChild)}if(!this._arrow){var e=document.createElement("div");e.classList.add("popover__arrow"),this._popover.appendChild(e)}}else{for(var n=Y.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 '),i=n.querySelector(".popover__content");this.childNodes[0];)i.appendChild(this.childNodes[0]);this.appendChild(n)}this.hasAttribute("style")&&(this._popover.setAttribute("style",this.getAttribute("style")),this.removeAttribute("style")),M.initModifier(this,this._scheme)}}},{key:"show",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof(i=!t||"object"!==n(t)||t instanceof Event||t instanceof HTMLElement?e(e({},i),{},{target:t}):e({},t)).target?i.target=document.querySelector(i.target):i.target instanceof Event&&(i.target=i.target.target),!i.target&&this.target&&(i.target=document.getElementById(this.target)),i.target instanceof HTMLElement||Y.throw("Invalid target type or undefined"),f(l(r.prototype),"show",this).call(this,i)}},{key:"connectedCallback",value:function(){var t=this;f(l(r.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,It(this,(function(){t._radius=parseInt(window.getComputedStyle(t._content).getPropertyValue("border-top-left-radius"))}))}},{key:"disconnectedCallback",value:function(){f(l(r.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&&Y.addModifier(this,this._currentDirection),f(l(r.prototype),"attributeChangedCallback",this).call(this,t,e,n)}}],[{key:"observedAttributes",get:function(){return[].concat(p(f(l(r),"observedAttributes",this)),["direction"])}},{key:"registerAnimator",value:function(t,e){e.prototype instanceof ri||Y.throwAnimator("Popover"),di[t]=e}},{key:"animators",get:function(){return di}},{key:"PopoverAnimator",get:function(){return ri}}]),r}(ce);Y.defineBooleanProperties(fi,["cover-target"]),Y.defineStringProperties(fi,["target"]),k.Popover=fi,customElements.define("ons-popover",fi);var pi={".progress-bar":"progress-bar--*",".progress-bar__primary":"progress-bar--*__primary",".progress-bar__secondary":"progress-bar--*__secondary"},mi=Y.createElement('\n <div class="progress-bar">\n <div class="progress-bar__secondary"></div>\n <div class="progress-bar__primary"></div>\n </div>\n'),gi="indeterminate",vi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){return t._compile()})),t}return o(n,[{key:"_compile",value:function(){this._isCompiled()?this._template=Y.findChild(this,".progress-bar"):this._template=mi.cloneNode(!0),this._primary=Y.findChild(this._template,".progress-bar__primary"),this._secondary=Y.findChild(this._template,".progress-bar__secondary"),this._updateDeterminate(),this._updateValue(),this.appendChild(this._template),O.prepare(this),M.initModifier(this,pi)}},{key:"_isCompiled",value:function(){if(!Y.findChild(this,".progress-bar"))return!1;var t=Y.findChild(this,".progress-bar");return!!Y.findChild(t,".progress-bar__secondary")&&!!Y.findChild(t,".progress-bar__primary")}},{key:"attributeChangedCallback",value:function(t,e,n){"modifier"===t?(M.onModifierChanged(e,n,this,pi),this.hasAttribute(gi)&&this._updateDeterminate()):"value"===t||"secondary-value"===t?this._updateValue():t===gi&&this._updateDeterminate()}},{key:"_updateDeterminate",value:function(){var t=this;It(this,(function(){return Y.toggleModifier(t,gi,{force:t.hasAttribute(gi)})}))}},{key:"_updateValue",value:function(){var t=this;It(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||t>100)&&Y.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||t>100)&&Y.throw("Invalid value"),this.setAttribute("secondary-value",Math.floor(t))}},{key:"indeterminate",get:function(){return this.hasAttribute(gi)},set:function(t){t?this.setAttribute(gi,""):this.removeAttribute(gi)}}],[{key:"observedAttributes",get:function(){return["modifier","value","secondary-value",gi]}}]),n}(ne);k.ProgressBar=vi,customElements.define("ons-progress-bar",vi);var _i={".progress-circular":"progress-circular--*",".progress-circular__background":"progress-circular--*__background",".progress-circular__primary":"progress-circular--*__primary",".progress-circular__secondary":"progress-circular--*__secondary"},bi=Y.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'),yi="indeterminate",ki=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){return t._compile()})),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){"modifier"===t?(M.onModifierChanged(e,n,this,_i),this.hasAttribute(yi)&&this._updateDeterminate()):"value"===t||"secondary-value"===t?this._updateValue():t===yi&&this._updateDeterminate()}},{key:"_updateDeterminate",value:function(){var t=this;It(this,(function(){return Y.toggleModifier(t,yi,{force:t.hasAttribute(yi)})}))}},{key:"_updateValue",value:function(){var t=this;this.hasAttribute("value")&&It(this,(function(){var e=Math.ceil(251.32*t.getAttribute("value")*.01);t._primary.style["stroke-dasharray"]=e+"%, 251.32%"})),this.hasAttribute("secondary-value")?It(this,(function(){var e=Math.ceil(251.32*t.getAttribute("secondary-value")*.01);t._secondary.style.display=null,t._secondary.style["stroke-dasharray"]=e+"%, 251.32%"})):It(this,(function(){t._secondary.style.display="none"}))}},{key:"value",get:function(){return parseInt(this.getAttribute("value")||"0")},set:function(t){("number"!=typeof t||t<0||t>100)&&Y.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||t>100)&&Y.throw("Invalid value"),this.setAttribute("secondary-value",Math.floor(t))}},{key:"indeterminate",get:function(){return this.hasAttribute(yi)},set:function(t){t?this.setAttribute(yi,""):this.removeAttribute(yi)}},{key:"_compile",value:function(){this._isCompiled()?this._template=Y.findChild(this,".progress-circular"):this._template=bi.cloneNode(!0),this._primary=Y.findChild(this._template,".progress-circular__primary"),this._secondary=Y.findChild(this._template,".progress-circular__secondary"),this._updateDeterminate(),this._updateValue(),this.appendChild(this._template),O.prepare(this),M.initModifier(this,_i)}},{key:"_isCompiled",value:function(){if(!Y.findChild(this,".progress-circular"))return!1;var t=Y.findChild(this,".progress-circular");return!!Y.findChild(t,".progress-circular__secondary")&&!!Y.findChild(t,".progress-circular__primary")}}],[{key:"observedAttributes",get:function(){return["modifier","value","secondary-value",yi]}}]),n}(ne);k.ProgressCircular=ki,customElements.define("ons-progress-circular",ki);var wi="initial",Ei=function(t,e){return Y.throw('"'.concat(t,'" must be ').concat(e))},Ci=function(t){s(n,t);var e=h(n);function n(){var t;i(this,n),(t=e.call(this))._onDrag=t._onDrag.bind(d(t)),t._onDragStart=t._onDragStart.bind(d(t)),t._onDragEnd=t._onDragEnd.bind(d(t)),t._onScroll=t._onScroll.bind(d(t)),t._setState(wi,!0),t._hide();var a=Y.defineListenerProperty(d(t),"pull"),o=a.onConnected,r=a.onDisconnected;return t._connectOnPull=o,t._disconnectOnPull=r,t}return o(n,[{key:"_setStyle",value:function(){var t=this.height+"px";E(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=this;if(t.gesture&&!this.disabled){var n=t.gesture.center.clientY+this._pageElement.scrollTop,i=window.innerHeight;if(this._ignoreDrag=t.consumed||n>1*i,!this._ignoreDrag){var a=t.consume;t.consume=function(){a&&a(),e._ignoreDrag=!0,e._hide()},this._canConsumeGesture(t.gesture)&&(a&&a(),t.consumed=!0,this._show())}this._startScroll=this._pageElement.scrollTop}}},{key:"_onDrag",value:function(t){var e=this;if(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;var n=Math.max(t.gesture.deltaY-this._startScroll,0);if(n!==this._currentTranslation){var i=this.thresholdHeight;i>0&&n>=i?(t.gesture.stopDetect(),setImmediate((function(){return e._finish()}))):n>=this.height?this._setState("preaction"):this._setState(wi),this._translateTo(n)}}}},{key:"_onDragEnd",value:function(t){!t.gesture||this.disabled||this._ignoreDrag||(t.stopPropagation(),this._currentTranslation>0&&(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||Ei("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(wi)}))}},{key:"height",get:function(){return parseInt(this.getAttribute("height")||"64",10)},set:function(t){Y.isInteger(t)||Ei("height","integer"),this.setAttribute("height","".concat(t,"px"))}},{key:"thresholdHeight",get:function(){return parseInt(this.getAttribute("threshold-height")||"96",10)},set:function(t){Y.isInteger(t)||Ei("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||Y.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=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0!=this._currentTranslation||0!=t){this._currentTranslation=t;var n=e.animate?{duration:.3,timing:"cubic-bezier(.1, .7, .1, 1)"}:{};Y.triggerElementEvent(this,"pull",{ratio:(t/this.height).toFixed(2),animationOptions:n});var i=this.hasAttribute("fixed-content")?this:this._pageElement;ht(i).queue({transform:"translate3d(0px, ".concat(t,"px, 0px)")},n).play((function(){0===t&&E.clear(i,"transition transform"),e.callback instanceof Function&&e.callback()}))}}},{key:"_disableDragLock",value:function(){this._dragLockDisabled=!0,this._setupListeners(!0)}},{key:"_setupListeners",value:function(t){var e=this,n=function(t){return e._pageElement["".concat(t,"EventListener")]("scroll",e._onScroll,!1)},i=function(t){var n={passive:!0};e._gestureDetector[t]("drag",e._onDrag,n),e._gestureDetector[t]("dragstart",e._onDragStart,n),e._gestureDetector[t]("dragend",e._onDragEnd,n)};this._gestureDetector&&(i("off"),this._gestureDetector.dispose(),this._gestureDetector=null),n("remove"),t&&(this._gestureDetector=new ft(this._pageElement,{dragMinDistance:1,dragDistanceCorrection:!1,dragLockToAxis:!this._dragLockDisabled,passive:!0}),i("on"),n("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"]}}]),n}(ne);Y.defineBooleanProperties(Ci,["disabled","fixed-content"]),k.PullHook=Ci,customElements.define("ons-pull-hook",Ci);var Ai={"":"range--*",".range__input":"range--*__input",".range__focus-ring":"range--*__focus-ring"},Si="range__input--active",xi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._onMouseDown=t._onMouseDown.bind(d(t)),t._onMouseUp=t._onMouseUp.bind(d(t)),t._onTouchStart=t._onTouchStart.bind(d(t)),t._onTouchEnd=t._onTouchEnd.bind(d(t)),t._onInput=t._update.bind(d(t)),t._onDragstart=t._onDragstart.bind(d(t)),t._onDragend=t._onDragend.bind(d(t)),t}return o(n,[{key:"_compile",value:function(){f(l(n.prototype),"_compile",this).call(this),this._updateDisabled(this.hasAttribute("disabled"))}},{key:"_update",value:function(){var t=this._input,e=this._focusRing;t.style.backgroundSize="".concat(100*this._ratio,"% 2px"),e.value=this.value,""===t.min&&"0"===t.value||t.min===t.value?t.setAttribute("_zero",""):t.removeAttribute("_zero"),["min","max"].forEach((function(n){return e[n]=t[n]}))}},{key:"_scheme",get:function(){return Ai}},{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(Si),setImmediate((function(){return e._input.focus()}))}},{key:"_onTouchStart",value:function(t){this._onMouseDown()}},{key:"_onMouseUp",value:function(t){this._input.classList.remove(Si)}},{key:"_onTouchEnd",value:function(t){this._onMouseUp(t)}},{key:"_onDragstart",value:function(t){t.consumed=!0,t.gesture.stopPropagation(),this._input.classList.add(Si),this.addEventListener("drag",this._onDrag)}},{key:"_onDrag",value:function(t){t.stopPropagation()}},{key:"_onDragend",value:function(t){this._input.classList.remove(Si),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,i){"disabled"===t&&this._updateDisabled(i),f(l(n.prototype),"attributeChangedCallback",this).call(this,t,e,i)}},{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){var e=(t?"add":"remove")+"EventListener";Y[e](this,"touchstart",this._onTouchStart,{passive:!0}),this[e]("mousedown",this._onMouseDown),this[e]("mouseup",this._onMouseUp),this[e]("touchend",this._onTouchEnd),this[e]("dragstart",this._onDragstart),this[e]("dragend",this._onDragend),this[e]("input",this._onInput)}}],[{key:"observedAttributes",get:function(){return["disabled"].concat(p(yn.observedAttributes))}}]),n}(yn);k.Range=xi,customElements.define("ons-range",xi);var Pi=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n)}(ne);k.Row=Pi,customElements.define("ons-row",Pi);var Li="segment",Oi={"":"segment--*",".segment__item":"segment--*__item",".segment__input":"segment--*__input",".segment__button":"segment--*__button"},Mi=function(){var t=0;return function(){return"ons-segment-gen-"+t++}}(),Ti=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._segmentId=Mi(),t._tabbar=null,t._onChange=t._onChange.bind(d(t)),t._onTabbarPreChange=t._onTabbarPreChange.bind(d(t)),It(d(t),(function(){t._compile(),setImmediate((function(){return t._lastActiveIndex=t._tabbar?t._tabbar.getActiveTabIndex():t.getActiveButtonIndex()}))})),t}return o(n,[{key:"_compile",value:function(){O.prepare(this),this.classList.add(Li);for(var t=this.children.length-1;t>=0;t--){var e=this.children[t];e.classList.add("segment__item");var n=Y.findChild(e,".segment__input")||Y.create("input.segment__input");n.type="radio",n.value=t,n.name=n.name||this._segmentId,n.checked=!this.hasAttribute("tabbar-id")&&t===(this.activeIndex||0);var i=Y.findChild(e,".segment__button")||Y.create(".segment__button");if(i.parentElement!==e)for(;e.firstChild;)i.appendChild(e.firstChild);e.appendChild(n),e.appendChild(i)}M.initModifier(this,Oi)}},{key:"connectedCallback",value:function(){var t=this;It(this,(function(){if(t.hasAttribute("tabbar-id")){var e=Y.findParent(t,"ons-page");t._tabbar=e&&e.querySelector("#"+t.getAttribute("tabbar-id")),t._tabbar&&"ONS-TABBAR"===t._tabbar.tagName||Y.throw("No tabbar with id ".concat(t.getAttribute("tabbar-id")," was found.")),t._tabbar.setAttribute("hide-tabs",""),setImmediate((function(){var e=t._tabbar.getActiveTabIndex();t._setChecked(e),t.activeIndex=e})),t._tabbar.addEventListener("prechange",t._onTabbarPreChange)}})),this.addEventListener("change",this._onChange)}},{key:"disconnectedCallback",value:function(){var t=this;It(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;t>=0;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){Y.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":Y.restoreClass(this,Li,Oi);break;case"modifier":M.onModifierChanged(e,n,this,Oi);break;case"active-index":It(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}(ne);Y.defineBooleanProperties(Ti,["disabled"]),k.Segment=Ti,customElements.define("ons-segment",Ti);var Ii={"":"select-* select--*",".select-input":"select-input--*"},Di="select",Ni=["autofocus","disabled","form","multiple","name","required","size"],Bi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){return t._compile()})),t._deriveGetters(),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":Y.restoreClass(this,Di,Ii);break;case"modifier":M.onModifierChanged(e,n,this,Ii)}Ni.indexOf(t)>=0&&It(this,(function(){return i._updateBoundAttributes()}))}},{key:"_select",get:function(){return this.querySelector("select")}},{key:"_updateBoundAttributes",value:function(){var t=this;Ni.forEach((function(e){t.hasAttribute(e)?t._select.setAttribute(e,t.getAttribute(e)):t._select.removeAttribute(e)}))}},{key:"_compile",value:function(){O.prepare(this),this.classList.add(Di);var t=this._select||document.createElement("select");!t.id&&this.hasAttribute("select-id")&&(t.id=this.getAttribute("select-id")),t.classList.add("select-input"),this._select||(Y.arrayFrom(this.childNodes).forEach((function(e){return t.appendChild(e)})),this.appendChild(t)),M.initModifier(this,Ii)}},{key:"_deriveGetters",value:function(){var t=this;["disabled","length","multiple","name","options","selectedIndex","size","value","form","type"].forEach((function(e){Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){return t._select[e]},set:-1===["form","type"].indexOf(e)?function(n){return It(t,(function(){return t._select[e]=n}))}:void 0})}))}},{key:"add",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this._select.add(t,e)}},{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(Ni)}}]),n}(ne);k.Select=Bi,customElements.define("ons-select",Bi);var Ri="fab fab--mini speed-dial__item",Hi={"":"fab--* speed-dial__item--*"},qi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._compile(),t._boundOnClick=t._onClick.bind(d(t)),t}return o(n,[{key:"attributeChangedCallback",value:function(t,e,n){switch(t){case"class":Y.restoreClass(this,Ri,Hi);break;case"modifier":M.onModifierChanged(e,n,this,Hi),Y.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(){Y.updateRipple(this)}},{key:"_onClick",value:function(t){t.stopPropagation()}},{key:"_compile",value:function(){var t=this;O.prepare(this),Ri.split(/\s+/).forEach((function(e){return t.classList.add(e)})),Y.addModifier(this,"mini"),this._updateRipple(),M.initModifier(this,Hi)}}],[{key:"observedAttributes",get:function(){return["modifier","ripple","class"]}}]),n}(ne);Y.defineBooleanProperties(qi,["ripple"]),k.SpeedDialItem=qi,customElements.define("ons-speed-dial-item",qi);var zi="speed-dial",Fi={"":"speed-dial--*"},ji=function(t){s(n,t);var e=h(n);function n(){var t;i(this,n),It(d(t=e.call(this)),(function(){t._compile()})),t._boundOnClick=t._onClick.bind(d(t));var a=Y.defineListenerProperty(d(t),"click"),o=a.onConnected,r=a.onDisconnected;return t._connectOnClick=o,t._disconnectOnClick=r,t}return o(n,[{key:"_compile",value:function(){this.classList.add(zi),O.prepare(this),this._updateRipple(),M.initModifier(this,Fi),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":Y.restoreClass(this,zi,Fi);break;case"modifier":M.onModifierChanged(e,n,this,Fi);break;case"ripple":It(this,(function(){return i._updateRipple()}));break;case"direction":It(this,(function(){return i._updateDirection(n)}));break;case"position":It(this,(function(){return i._updatePosition()}));break;case"open":this._ignoreOpenSideEffect||It(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 Y.arrayFrom(this.querySelectorAll("ons-speed-dial-item"))}},{key:"_fab",get:function(){return Y.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 t=this;return new Promise((function(e){t.inline?e():setImmediate((function(){return t.hide().then(e)}))}))}},{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++)E(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 a=0;a<e.length;a++)e[a].style.top=72+56*a+"px",e[a].style.left="8px";break;case"left":for(var o=0;o<e.length;o++)e[o].style.top="8px",e[o].style.right=72+56*o+"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:Y.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(this.getAttribute("position")||"").indexOf("bottom")>=0?"translate3d(0px, -".concat(Y.globals.fabOffset||0,"px, 0px) "):""}},{key:"show",value:function(){return this._fab.show(),E(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 a=25*(this.open?i:n.length-i);e+=a,E(n[i],{transform:"scale(".concat(this.open?1:0,")"),transitionDelay:a+"ms"})}e+=50,Y.triggerElementEvent(this,this.open?"open":"close")}var o=Y.defer();return setTimeout(o.resolve,e),o.promise}},{key:"disabled",get:function(){return this.hasAttribute("disabled")},set:function(t){t&&this.hideItems(),Y.arrayFrom(this.children).forEach((function(e){Y.match(e,".fab")&&Y.toggleAttribute(e,"disabled",t)})),Y.toggleAttribute(this,"disabled",t)}},{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"]}}]),n}(ne);Y.defineBooleanProperties(ji,["open","ripple"]),k.SpeedDial=ji,customElements.define("ons-speed-dial",ji);var Vi={ready:function(t,e){setImmediate(e)}},Wi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._page=null,t._pageLoader=Jt,It(d(t),(function(){Vi.ready(d(t),(function(){var e=t._getPageTarget();e&&t.load(e)}))})),t}return o(n,[{key:"connectedCallback",value:function(){Y.match(this.parentNode,"ons-splitter")||Y.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 Kt||Y.throwPageLoader(),this._pageLoader=t}},{key:"load",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._page=t;var i=n.callback||function(){};return new Promise((function(n){var a=e._content||null;e._pageLoader.load({page:t,parent:e},(function(t){a&&(e._pageLoader.unload(a),a=null),setImmediate((function(){return e._show()})),i(t),n(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 Vi}}]),n}(ne);k.SplitterContent=Wi,customElements.define("ons-splitter-content",Wi);var Xi=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._boundOnClick=t._onClick.bind(d(t)),It(d(t),(function(){t.parentNode._sides.every((function(t){return"split"===t.mode}))&&t.setAttribute("style","display: none !important")})),t}return o(n,[{key:"_onClick",value:function(t){this.onClick instanceof Function?this.onClick():Y.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}(ne);k.SplitterMask=Xi,customElements.define("ons-splitter-mask",Xi);var Ui=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"cubic-bezier(.1, .7, .1, 1)":a,r=t.duration,s=void 0===r?.3:r,l=t.delay,c=void 0===l?0:l;return i(this,n),e.call(this,{timing:o,duration:s,delay:c})}return o(n,[{key:"updateOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Y.extend(this,{timing:this.timing,duration:this.duration,delay:this.delay},t)}},{key:"activate",value:function(t){var e=this,n=t.parentNode;It(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 t=this;"side mask content".split(/\s+/).forEach((function(e){return t["_"+e]&&E.clear(t["_"+e],"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()}}]),n}(ae),Yi=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{key:"translate",value:function(t){this._mask.style.display="block",ht(this._side).queue({transform:"translate3d(".concat(this.minus+t,"px, 0, 0)")}).play()}},{key:"open",value:function(t){ht.runAll(ht(this._side).wait(this.delay).queue({transform:"translate3d(".concat(this.minus,"100%, 0, 0)")},this.def).queue((function(e){e(),t&&t()})),ht(this._mask).wait(this.delay).queue({display:"block"}).queue({opacity:"1"},{duration:this.duration,timing:"linear"}))}},{key:"close",value:function(t){ht.runAll(ht(this._side).wait(this.delay).queue({transform:"translate3d(0, 0, 0)"},this.def).queue((function(e){t&&t(),e()})),ht(this._mask).wait(this.delay).queue({opacity:"0"},{duration:this.duration,timing:"linear"}).queue({display:"none"}))}}]),n}(Ui),$i=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{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",ht(this._slidingElements).queue({transform:"translate3d(".concat(this.minus+t,"px, 0, 0)")}).play()}},{key:"open",value:function(t){var e=this,n=this._side.offsetWidth;this._slidingElements=this._getSlidingElements(),ht.runAll(ht(this._slidingElements).wait(this.delay).queue({transform:"translate3d(".concat(this.minus+n,"px, 0, 0)")},this.def).queue((function(n){e._slidingElements=null,n(),t&&t()})),ht(this._mask).wait(this.delay).queue({display:"block"}))}},{key:"close",value:function(t){var e=this;this._slidingElements=this._getSlidingElements(),ht.runAll(ht(this._slidingElements).wait(this.delay).queue({transform:"translate3d(0, 0, 0)"},this.def).queue((function(i){e._slidingElements=null,f(l(n.prototype),"clearTransition",e).call(e),t&&t(),i()})),ht(this._mask).wait(this.delay).queue({display:"none"}))}}]),n}(Ui),Gi=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{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){f(l(n.prototype),"activate",this).call(this,t),"collapse"===t.mode&&this._setStyles(t)}},{key:"deactivate",value:function(){this._side&&this._unsetStyles(this._side),f(l(n.prototype),"deactivate",this).call(this)}},{key:"_setStyles",value:function(t){E(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;It(e,(function(){return e.content&&E(e.content,{boxShadow:"0 0 12px 0 rgba(0, 0, 0, 0.2)"})}))}},{key:"_unsetStyles",value:function(t){E.clear(t,"left right zIndex backgroundColor display"),t._content&&(t._content.style.opacity=""),this._oppositeSide&&"split"!==this._oppositeSide.mode||t.parentElement.content&&E.clear(t.parentElement.content,"boxShadow")}},{key:"_generateBehindPageStyle",value:function(t){var e=this.maxWidth,n=(t-e)/e*10;return{content:{opacity:1+(n=isNaN(n)?0:Math.max(Math.min(n,0),-10))/100},container:{transform:"translate3d(".concat((this.minus?-1:1)*n,"%, 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",ht.runAll(ht(this._slidingElements).queue({transform:"translate3d(".concat(this.minus+t,"px, 0, 0)")}),ht(this._side._content).queue(e.content),ht(this._side).queue(e.container))}},{key:"open",value:function(t){var e=this;this._side.style.display="",this._side.style.zIndex=1,this.maxWidth=this.maxWidth||this._getMaxWidth();var n=this._generateBehindPageStyle(this.maxWidth);this._slidingElements=this._getSlidingElements(),setTimeout((function(){ht.runAll(ht(e._slidingElements).wait(e.delay).queue({transform:"translate3d(".concat(e.minus+e.maxWidth,"px, 0, 0)")},e.def),ht(e._mask).wait(e.delay).queue({display:"block"}),ht(e._side._content).wait(e.delay).queue(n.content,e.def),ht(e._side).wait(e.delay).queue(n.container,e.def).queue((function(n){e._slidingElements=null,n(),t&&t()})))}),1e3/60)}},{key:"close",value:function(t){var e=this,n=this._generateBehindPageStyle(0);this._slidingElements=this._getSlidingElements(),ht.runAll(ht(this._slidingElements).wait(this.delay).queue({transform:"translate3d(0, 0, 0)"},this.def),ht(this._mask).wait(this.delay).queue({display:"none"}),ht(this._side._content).wait(this.delay).queue(n.content,this.def),ht(this._side).wait(this.delay).queue(n.container,this.def).queue((function(n){e._slidingElements=null,e._side.style.zIndex=0,e._side.style.display="none",e._side._content.style.opacity="",t&&t(),n()})))}},{key:"_getMaxWidth",value:function(){return this._side.offsetWidth}}]),n}(Ui),Ki={default:Yi,overlay:Yi,push:$i,reveal:Gi},Ji=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._onModeChange=t._onModeChange.bind(d(t)),It(d(t),(function(){!t.mask&&t.appendChild(document.createElement("ons-splitter-mask")),t._layout()})),t}return o(n,[{key:"_getSide",value:function(t){return Y.findChild(this,(function(e){return Y.match(e,"ons-splitter-side")&&e.getAttribute("side")===t}))}},{key:"left",get:function(){return this._getSide("left")}},{key:"right",get:function(){return this._getSide("right")}},{key:"side",get:function(){return Y.findChild(this,"ons-splitter-side")}},{key:"_sides",get:function(){return[this.left,this.right].filter((function(t){return t}))}},{key:"content",get:function(){return Y.findChild(this,"ons-splitter-content")}},{key:"topPage",get:function(){return this.content._content}},{key:"mask",get:function(){return Y.findChild(this,"ons-splitter-mask")}},{key:"onDeviceBackButton",get:function(){return this._backButtonHandler},set:function(t){this._backButtonHandler&&this._backButtonHandler.destroy(),this._backButtonHandler=at.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&&It(this,(function(){e._layout()}))}},{key:"_layout",value:function(){var t=this;this._sides.forEach((function(e){t.content&&(t.content.style[e.side]="split"===e.mode?e.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(){Y.propagateAction(this,"_show")}},{key:"_hide",value:function(){Y.propagateAction(this,"_hide")}},{key:"_destroy",value:function(){Y.propagateAction(this,"_destroy"),this.remove()}}],[{key:"registerAnimator",value:function(t,e){e instanceof SplitterAnimator||Y.throwAnimator("Splitter"),Ki[t]=e}},{key:"SplitterAnimator",get:function(){return SplitterAnimator}},{key:"animators",get:function(){return Ki}}]),n}(ne);k.Splitter=Ji,customElements.define("ons-splitter",Ji);var Qi="split",Zi="collapse",ta="closed",ea="open",na="changing",ia={ready:function(t,e){setImmediate(e)}},aa=function(){function t(e,n){i(this,t),this._element=e,this._onChange=this._onChange.bind(this),n&&this.changeTarget(n)}return o(t,[{key:"changeTarget",value:function(t){this.disable(),this._target=t,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)?Zi:Qi)}},{key:"activate",value:function(){this._orientation?(qt.on("change",this._onChange),this._onChange({isPortrait:qt.isPortrait()})):(this._queryResult=window.matchMedia(this._target),this._queryResult.addListener(this._onChange),this._onChange(this._queryResult))}},{key:"disable",value:function(){this._orientation?qt.off("change",this._onChange):this._queryResult&&(this._queryResult.removeListener(this._onChange),this._queryResult=null)}}]),t}(),oa=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._page=null,t._state=ta,t._lock=new Ut,t._pageLoader=Jt,t._collapseDetection=new aa(d(t)),t._animatorFactory=new Z({animators:Ji.animators,baseClass:Ui,baseClassName:"SplitterAnimator",defaultAnimation:t.getAttribute("animation")}),It(d(t),(function(){t.attributeChangedCallback("width"),t.hasAttribute("side")||t.setAttribute("side","left"),ia.ready(d(t),(function(){var e=t._page||t.getAttribute("page");e&&t.load(e)}))})),t}return o(n,[{key:"connectedCallback",value:function(){var t=this;Y.match(this.parentNode,"ons-splitter")||Y.throw("Parent must be an ons-splitter element"),this._swipe||(this._swipe=new Rn({element:this,elementHandler:this.parentElement,swipeMax:function(){t._onSwipe&&t._onSwipe(1,t._animationOpt),Y.triggerElementEvent(t,"swipe",{ratio:1,animationOptions:t._animationOpt}),t.open()},swipeMid:function(e,n){var i=e/n;t._onSwipe&&t._onSwipe(i),Y.triggerElementEvent(t,"swipe",{ratio:i}),t._animator.translate(e)},swipeMin:function(){t._onSwipe&&t._onSwipe(0,t._animationOpt),Y.triggerElementEvent(t,"swipe",{ratio:0,animationOptions:t._animationOpt}),t.close()},getThreshold:function(){return Math.max(0,Math.min(1,parseFloat(t.getAttribute("open-threshold"))||.3))},getSide:function(){return t.side},isInitialState:function(){var e=t._state===ta;return t._state=na,e},ignoreSwipe:function(e,n){var i,a=t.isOpen,o=Math.max(0,parseInt(t.getAttribute("swipe-target-width"),10)||0);return t._mode===Qi||t._lock.isLocked()||t._isOtherSideOpen()||(i=e.gesture.direction,!("left"===t.side?"left"===i&&a||"right"===i&&!a:"left"===i&&!a||"right"===i&&a))||!a&&0!==o&&n>o}}),this.attributeChangedCallback("swipeable")),It(this,(function(){t.constructor.observedAttributes.forEach((function(e){return t.attributeChangedCallback(e,null,t.getAttribute(e))}))}))}},{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[Y.camelize("_update-".concat(t))](n)}}},{key:"_emitEvent",value:function(t){if("pre"!==t.slice(0,3))return Y.triggerElementEvent(this,t,{side:this});var e=!1;return Y.triggerElementEvent(this,t,{side:this,cancel:function(){return e=!0}}),e}},{key:"_isOtherSideOpen",value:function(){var t=this;return!!Y.findChild(this.parentElement,(function(e){return e instanceof t.constructor&&e!==t&&e._mode===Zi&&e.isOpen}))}},{key:"_updateCollapse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAttribute("collapse");return null===t||"split"===t?(this._collapseDetection.disable(),this._updateMode(Qi)):""===t||"collapse"===t?(this._collapseDetection.disable(),this._updateMode(Zi)):void this._collapseDetection.changeTarget(t)}},{key:"_updateMode",value:function(t){t!==this._mode&&(this._mode=t,this.setAttribute("mode",t),t===Qi?(this._animator&&this._animator.deactivate(),this._state=ta):(this._animator&&this._animator.activate(this),this._state===ea&&this._animator.open()),Y.triggerElementEvent(this,"modechange",{side:this,mode:t}))}},{key:"_updateAnimation",value:function(){var t=arguments.length>0&&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 Kt||Y.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||Y.throw('"onSwipe" must be a function'),this._onSwipe=t}},{key:"animationOptions",get:function(){return this.hasAttribute("animation-options")?Z.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===Zi&&this._state!==ta},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 t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i="boolean"==typeof n?n:!this.isOpen,a=i?"open":"close",o=i?ea:ta;if(this._mode===Qi)return Promise.resolve(!1);if(this._state===o)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(a)))return Promise.reject("Canceled in pre".concat(a," event."));var r=this._lock.lock();return this._state=na,e.animation&&this._updateAnimation(e.animation),new Promise((function(n){t._animator[a]((function(){Y.iosPageScrollFix(i),t._state=o,r(),t._emitEvent("post".concat(a)),e.callback instanceof Function&&e.callback(t),n(t)}))}))}},{key:"load",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._page=t;var i=n.callback||function(){};return new Promise((function(n){var a=e._content||null;e._pageLoader.load({page:t,parent:e},(function(t){a&&(e._pageLoader.unload(a),a=null),setImmediate((function(){return e._show()})),i(t),n(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 ia}}]),n}(ne);Y.defineBooleanProperties(oa,["swipeable"]),k.SplitterSide=oa,customElements.define("ons-splitter-side",oa);var ra={"":"switch--*",".switch__input":"switch--*__input",".switch__handle":"switch--*__handle",".switch__toggle":"switch--*__toggle"},sa={ios:[1,21],material:[0,16]},la=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),It(d(t=e.call(this)),(function(){t.attributeChangedCallback("modifier",null,t.getAttribute("modifier"))})),t._onChange=t._onChange.bind(d(t)),t._onRelease=t._onRelease.bind(d(t)),t._lastTimeStamp=0,t}return o(n,[{key:"_scheme",get:function(){return ra}},{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(){Y.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||(M.addModifier(this,"active"),document.addEventListener("release",this._onRelease))}},{key:"_onDragStart",value:function(t){this.disabled||-1===["left","right"].indexOf(t.gesture.direction)?M.removeModifier(this,"active"):(t.consumed=!0,M.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,n=this._getPosition(t),i=this.checked;this.checked=n>=(e[0]+e[1])/2,this.checked!==i&&this._emitChangeEvent(),this.removeEventListener("drag",this._onDrag),document.removeEventListener("release",this._onRelease),this._handle.style.left="",M.removeModifier(this,"active")}},{key:"click",value:function(){var t=arguments.length>0&&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;It(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 ft(this,{dragMinDistance:1,holdTimeout:251,passive:!0})}},{key:"disconnectedCallback",value:function(){var t=this;It(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,i){if("modifier"===t){var a=-1!==(i||"").indexOf("material");this._locations=sa[a?"material":"ios"]}f(l(n.prototype),"attributeChangedCallback",this).call(this,t,e,i)}}],[{key:"observedAttributes",get:function(){return[].concat(p(f(l(n),"observedAttributes",this)),["modifier"])}}]),n}(En);k.Switch=la,customElements.define("ons-switch",la);var ca={".tabbar__content":"tabbar--*__content",".tabbar__border":"tabbar--*__border",".tabbar":"tabbar--*"},ua={ready:function(t,e){e()}};Q.nullElement;var da=function(t,e,n){return(1-n)*t+n*e},ha=function(t){s(a,t);var n=h(a);function a(){var t;i(this,a),(t=n.call(this))._loadInactive=Y.defer(),It(d(t),(function(){return t._compile()}));var e=Y.defineListenerProperty(d(t),"swipe"),o=e.onConnected,r=e.onDisconnected;return t._connectOnSwipe=o,t._disconnectOnSwipe=r,t}return o(a,[{key:"connectedCallback",value:function(){var t=this;this._swiper||(this._swiper=new qe({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)}),It(this,(function(){t._tabbarBorder=Y.findChild(t._tabbarElement,".tabbar__border"),t._swiper.init({swipeable:t.hasAttribute("swipeable")})}))),It(this,(function(){t._updatePosition(),t._updateVisibility(),Y.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 e(e({},t),{},{index:t.activeIndex,tabItem:this.tabs[t.activeIndex]})}},{key:"_onPostChange",value:function(t){t=this._normalizeEvent(t),Y.triggerElementEvent(this,"postchange",t);var e=t.tabItem.pageElement;e&&e._show()}},{key:"_onPreChange",value:function(t){if((t=this._normalizeEvent(t)).cancel=function(){return t.canceled=!0},Y.triggerElementEvent(this,"prechange",t),!t.canceled){var e=t,n=e.activeIndex,i=e.lastActiveIndex,a=this.tabs;if(a[n].setActive(!0),i>=0){var o=a[i];o.setActive(!1),o.pageElement&&o.pageElement._hide()}}return t.canceled}},{key:"_onScroll",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._tabbarBorder)if(this._tabbarBorder.style.transition="all ".concat(e.duration||0,"s ").concat(e.timing||""),this._autogrow&&this._tabsRect.length>0){var n=Math.floor(t),i=Math.ceil(t),a=t%1;this._tabbarBorder.style.width=da(this._tabsRect[n].width,this._tabsRect[i].width,a)+"px",this._tabbarBorder.style.transform="translate3d(".concat(da(this._tabsRect[n].left,this._tabsRect[i].left,a),"px, 0, 0)")}else this._tabbarBorder.style.transform="translate3d(".concat(100*t,"%, 0, 0)");Y.triggerElementEvent(this,"swipe",{index:t,options:e})}},{key:"_onRefresh",value:function(){if(this._autogrow=Y.hasModifier(this,"autogrow"),this._tabsRect=this.tabs.map((function(t){return t.getBoundingClientRect()})),this._tabbarBorder){this._tabbarBorder.style.display=this.hasAttribute("tab-border")||Y.hasModifier(this,"material")?"block":"none";var t=this.getActiveTabIndex();this._tabsRect.length>0&&t>=0&&(this._tabbarBorder.style.width=this._tabsRect[t].width+"px")}}},{key:"_getAutoScrollRatio",value:function(t,e,n){var i=n/300*(t?-1:1);return Math.min(1,Math.max(0,.6+e*i))}},{key:"_tabbarElement",get:function(){return Y.findChild(this,".tabbar")}},{key:"_contentElement",get:function(){return Y.findChild(this,".tabbar__content")}},{key:"_targetElement",get:function(){var t=this._contentElement;return t&&t.children[0]||null}},{key:"_compile",value:function(){O.prepare(this);var t=this._contentElement||Y.create(".tabbar__content");t.classList.add("ons-tabbar__content");var e=this._tabbarElement||Y.create(".tabbar");if(e.classList.add("ons-tabbar__footer"),!e.parentNode)for(;this.firstChild;)e.appendChild(this.firstChild);e.children.length>this.activeIndex&&!Y.findChild(e,"[active]")&&e.children[this.activeIndex].setAttribute("active",""),this._tabbarBorder=Y.findChild(e,".tabbar__border")||Y.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),M.initModifier(this,ca)}},{key:"_updatePosition",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAttribute("position"),n=this._top="top"===e||"auto"===e&&Y.hasModifier(this,"material"),i=n?Y.addModifier:Y.removeModifier;i(this,"top");var a=Y.findParent(this,"ons-page");a&&It(a,(function(){var e=0;a.children[0]&&Y.match(a.children[0],"ons-toolbar")&&(i(a.children[0],"noshadow"),e=1);var o=a._getContentElement(),r=window.getComputedStyle(a._getContentElement(),null);t.style.top=n?parseInt(r.getPropertyValue("padding-top"),10)-e+"px":"",o.style.top=r.top,o.style.top=""})),Q.autoStatusBarFill((function(){var e=Y.findParent(t,(function(t){return t.hasAttribute("status-bar-fill")}));Y.toggleAttribute(t,"status-bar-fill",n&&!e)}))}},{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 Y.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=arguments.length>1&&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(t,n){var i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.tabs[n],r=this.tabs[t];if(!r)return Promise.reject("Specified index does not match any tab.");if(t===n)return Y.triggerElementEvent(this,"reactive",{index:t,activeIndex:t,tabItem:r}),Promise.resolve(r.pageElement);var s=r.pageElement;return(s?Promise.resolve(s):r.loaded).then((function(n){return i._swiper.setActiveIndex(t,e(e({reject:!0},a),{},{animation:o&&n?a.animation||i.getAttribute("animation"):"none",animationOptions:Y.extend({duration:.3,timing:"cubic-bezier(.4, .7, .5, 1)"},i.animationOptions,a.animationOptions||{})})).then((function(){return a.callback instanceof Function&&a.callback(n),n}))}))}},{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 t=this;It(this,(function(){var e=!t.hideTabs;t._contentElement.style[t._top?"top":"bottom"]=e?"":"0px",t._tabbarElement.style.display=e?"":"none",e&&t._onRefresh()}))}},{key:"visible",get:function(){return"none"!==this._tabbarElement.style.display}},{key:"getActiveTabIndex",value:function(){for(var t=arguments.length>0&&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 t=this;this._swiper.show(),setImmediate((function(){var e=t.tabs,n=t.getActiveTabIndex(e);t._loadInactive.resolve(),e.length>0&&n>=0&&e[n].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=this;if("modifier"===t){M.onModifierChanged(e,n,this,ca);var a=function(t){return/(^|\s+)top($|\s+)/i.test(t)};a(e)!==a(n)&&this._updatePosition()}else"position"===t?Y.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&&It(this,(function(){return i._updateActiveIndex(n,e)})))}},{key:"animationOptions",get:function(){return this.hasAttribute("animation-options")?Y.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 ua}},{key:"events",get:function(){return["prechange","postchange","reactive","swipe"]}}]),a}(ne);Y.defineBooleanProperties(ha,["hide-tabs","swipeable","tab-border"]),k.Tabbar=ha,customElements.define("ons-tabbar",ha);var fa="tabbar__item",pa={"":"tabbar--*__item",".tabbar__button":"tabbar--*__button"},ma=function(t){s(n,t);var e=h(n);function n(){var t;i(this,n),t=e.call(this),["label","icon","badge"].some(t.hasAttribute.bind(d(t)))?t._compile():It(d(t),(function(){return t._compile()})),t._pageLoader=Jt,t._onClick=t._onClick.bind(d(t));var a=Y.defineListenerProperty(d(t),"click"),o=a.onConnected,r=a.onDisconnected;return t._connectOnClick=o,t._disconnectOnClick=r,t}return o(n,[{key:"pageLoader",get:function(){return this._pageLoader},set:function(t){t instanceof Kt||Y.throwPageLoader(),this._pageLoader=t}},{key:"_compile",value:function(){if(O.prepare(this),this.classList.add(fa),!this._button){for(var t=Y.create("button.tabbar__button");this.childNodes[0];)t.appendChild(this.childNodes[0]);var e=Y.create("input",{display:"none"});e.type="radio",this.appendChild(e),this.appendChild(t),this._updateButtonContent(),M.initModifier(this,pa),this._updateRipple()}}},{key:"_updateRipple",value:function(){this._button&&Y.updateRipple(this._button,this.hasAttribute("ripple"))}},{key:"_updateButtonContent",value:function(){var t,e=this,n=this._button,i=this._icon;if(this.hasAttribute("icon")){var a=(i=i||Y.createElement('<div class="tabbar__icon"><ons-icon></ons-icon></div>')).children[0],o=(t=a.getAttribute("icon"),function(){return a.attributeChangedCallback("icon",t,e.getAttribute("icon"))});this.hasAttribute("icon")&&this.hasAttribute("active-icon")?a.setAttribute("icon",this.getAttribute(this.isActive()?"active-icon":"icon")):this.hasAttribute("icon")&&a.setAttribute("icon",this.getAttribute("icon")),i.parentElement!==n&&n.insertBefore(i,n.firstChild),a.attributeChangedCallback instanceof Function?o():setImmediate((function(){return a.attributeChangedCallback instanceof Function&&o()}))}else i&&i.remove();["label","badge"].forEach((function(t,i){var a=e.querySelector(".tabbar__".concat(t));e.hasAttribute(t)?((a=a||Y.create(".tabbar__".concat(t)+("badge"===t?" notification":""))).textContent=e.getAttribute(t),a.parentElement!==n&&n.appendChild(a)):a&&a.remove()}))}},{key:"_input",get:function(){return Y.findChild(this,"input")}},{key:"_button",get:function(){return Y.findChild(this,".tabbar__button")}},{key:"_icon",get:function(){return this.querySelector(".tabbar__icon")}},{key:"_tabbar",get:function(){return Y.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=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];It(this,(function(){t._input.checked=e,t.classList.toggle("active",e),Y.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(t,e){var n=this;return this._hasLoaded=!0,new Promise((function(i){n._pageLoader.load({parent:t,page:e},(function(e){t.replaceChild(e,t.children[n.index]),n._loadedPage=e,i(e)}))}))}},{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 t=this;if(this.addEventListener("click",this._onClick,!1),Y.isAttached(this)&&!this.loaded){var e=Y.defer();this.loaded=e.promise,It(this,(function(){var n=t.index,i=t._tabbar;i||Y.throw("Tab elements must be children of Tabbar"),i.hasAttribute("modifier")&&Y.addModifier(t,i.getAttribute("modifier")),t._hasLoaded||(t.hasAttribute("active")&&(t.setActive(!0),i.activeIndex=n),n===i.tabs.length-1&&(i._onRefresh(),setImmediate((function(){return i._onRefresh()}))),ha.rewritables.ready(i,(function(){var a=t.page||t.getAttribute("page");if(!t.pageElement&&a){var o=i._targetElement,r=Y.create("div",{height:"100%",width:"100%",visibility:"hidden"});o.insertBefore(r,o.children[n]);var s=function(){return t._loadPageElement(o,a).then(e.resolve)};return t.isActive()?s():i._loadInactive.promise.then(s)}return e.resolve(t.pageElement)})))})),this._connectOnClick()}}},{key:"attributeChangedCallback",value:function(t,e,n){var i=this;switch(t){case"class":Y.restoreClass(this,fa,pa);break;case"modifier":It(this,(function(){return M.onModifierChanged(e,n,i,pa)}));break;case"ripple":It(this,(function(){return i._updateRipple()}));break;case"icon":case"label":case"badge":It(this,(function(){return i._updateButtonContent()}));break;case"page":this.page=n||""}}}],[{key:"observedAttributes",get:function(){return["modifier","ripple","icon","label","page","badge","class"]}}]),n}(ne);k.Tab=ma,customElements.define("ons-tab",ma);var ga=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.2:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e()}},{key:"hide",value:function(t,e){e()}}]),n}(ae),va=function(t){s(n,t);var e=h(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.timing,o=void 0===a?"linear":a,r=t.delay,s=void 0===r?0:r,l=t.duration,c=void 0===l?.3:l;return i(this,n),e.call(this,{timing:o,delay:s,duration:c})}return o(n,[{key:"show",value:function(t,e){e=e||function(){},ht(t,this.def).default({opacity:0},{opacity:1}).queue((function(t){e(),t()})).play()}},{key:"hide",value:function(t,e){e=e||function(){},ht(t,this.def).default({opacity:1},{opacity:0}).queue((function(t){e(),t()})).play()}}]),n}(ga),_a=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"ease":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.25:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).messageDelay=.4*t.duration+t.delay,b.isAndroid()?t.ascension=48:oe.isIPhoneXPortraitPatchActive()?t.ascension=98:oe.isIPhoneXLandscapePatchActive()?t.ascension=85:t.ascension=64,t}return o(n,[{key:"show",value:function(t,e){t=t._toast,Y.globals.fabOffset=this.ascension,ht.runAll(ht(t,this.def).default({transform:"translate3d(0, ".concat(this.ascension,"px, 0)")},{transform:"translate3d(0, 0, 0)"}).queue((function(t){e&&e(),t()})),ht(this._getFabs()).wait(this.delay).queue({transform:"translate3d(0, -".concat(this.ascension,"px, 0) scale(1)")},this.def),ht(Y.arrayFrom(t.children),this.def).default({opacity:0},{opacity:1}))}},{key:"hide",value:function(t,e){t=t._toast,Y.globals.fabOffset=0,ht.runAll(ht(t,this.def).default({transform:"translate3d(0, 0, 0)"},{transform:"translate3d(0, ".concat(this.ascension,"px, 0)")}).queue((function(t){e&&e(),t()})),ht(this._getFabs(),this.def).wait(this.delay).queue({transform:"translate3d(0, 0, 0) scale(1)"},this.def),ht(Y.arrayFrom(t.children),this.def).default({opacity:1},{opacity:0}))}},{key:"_getFabs",value:function(){return Y.arrayFrom(document.querySelectorAll("ons-fab[position~=bottom], ons-speed-dial[position~=bottom]")).filter((function(t){return t.visible}))}}]),n}(ga),ba=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"ease":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.35:c;return i(this,n),(t=e.call(this,{timing:r,delay:l,duration:u})).bodyHeight=document.body.clientHeight,oe.isIPhoneXPortraitPatchActive()?t.liftAmount="calc(100% + 34px)":oe.isIPhoneXLandscapePatchActive()?t.liftAmount="calc(100% + 21px)":t.liftAmount="100%",t}return o(n,[{key:"show",value:function(t,e){t=t._toast,ht.runAll(ht(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,ht.runAll(ht(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="")}}]),n}(ga),ya=function(t){s(n,t);var e=h(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.timing,r=void 0===o?"ease":o,s=a.delay,l=void 0===s?0:s,c=a.duration,u=void 0===c?.35:c;return i(this,n),t=e.call(this,{timing:r,delay:l,duration:u}),oe.isIPhoneXPortraitPatchActive()?t.fallAmount="calc(-100% - 44px)":t.fallAmount="-100%",t}return o(n,[{key:"show",value:function(t,e){t=t._toast,this._updatePosition(t),ht.runAll(ht(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(t,e){var n=this;t=t._toast,this._updatePosition(t),ht.runAll(ht(t,this.def).default({transform:"translate3d(0, 0, 0)",opacity:1},{transform:"translate3d(0, ".concat(this.fallAmount,", 0)"),opacity:0}).queue((function(i){n._updatePosition(t,!0),e&&e(),i()})))}},{key:"_updatePosition",value:function(t,e){var n;n=oe.isIPhoneXPortraitPatchActive()?"44px":"0",t.style.top!==n&&(t.style.top=n,t.style.bottom="initial")}}]),n}(ga),ka={".toast":"toast--*",".toast__message":"toast--*__message",".toast__button":"toast--*__button"},wa="toast",Ea={default:b.isAndroid()?_a:ba,fade:va,ascend:_a,lift:ba,fall:ya,none:ga},Ca=function(t){s(n,t);var e=h(n);function n(){var t;return i(this,n),(t=e.call(this))._defaultDBB=null,It(d(t),(function(){return t._compile()})),t}return o(n,[{key:"_scheme",get:function(){return ka}},{key:"_toast",get:function(){return Y.findChild(this,".".concat(wa))}},{key:"_updateAnimatorFactory",value:function(){return this._toast&&(this._toast.style.top=this._toast.style.bottom=""),new Z({animators:Ea,baseClass:ga,baseClassName:"ToastAnimator",defaultAnimation:this.getAttribute("animation")})}},{key:"_compile",value:function(){O.prepare(this),this.style.display="none",this.style.zIndex=1e4;var t="toast__message",e="toast__button",n=Y.findChild(this,".".concat(wa));if(!n)for((n=document.createElement("div")).classList.add(wa);this.childNodes[0];)n.appendChild(this.childNodes[0]);var i=Y.findChild(n,".".concat(e));if(i||(i=Y.findChild(n,(function(t){return Y.match(t,".button")||Y.match(t,"button")})))&&(i.classList.remove("button"),i.classList.add(e),n.appendChild(i)),!Y.findChild(n,".".concat(t))){var a=Y.findChild(n,".message");if(!a){a=document.createElement("div");for(var o=n.childNodes.length-1;o>=0;o--)n.childNodes[o]!==i&&a.insertBefore(n.childNodes[o],a.firstChild)}a.classList.add(t),n.insertBefore(a,n.firstChild)}n.parentNode!==this&&this.appendChild(n),M.initModifier(this,this._scheme)}}],[{key:"registerAnimator",value:function(t,e){e.prototype instanceof ga||Y.throw('"Animator" param must inherit OnsToastElement.ToastAnimator'),Ea[t]=e}},{key:"animators",get:function(){return Ea}},{key:"ToastAnimator",get:function(){return ga}}]),n}(ce);k.Toast=Ca,customElements.define("ons-toast",Ca);var Aa=function(t){s(n,t);var e=h(n);function n(){return i(this,n),e.apply(this,arguments)}return o(n,[{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"}]}}]),n}(ve);return k.ToolbarButton=Aa,customElements.define("ons-toolbar-button",Aa),function(t){Q.waitDOMContentLoaded((function(){function t(t){for(var e=window.document.querySelectorAll(t),n=0;n<e.length;n++)Q.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&&t._util.warn("Onsen UI is loaded more than once."),window._onsLoaded=!0,t.ready((function(){t.enableDeviceBackButtonHandler(),t._defaultDeviceBackButtonHandler=t._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 t.GestureDetector(document.body,{passive:!0}),t.platform.isWebView()||document.body.addEventListener("keydown",(function(e){27===e.keyCode&&t.fireDeviceBackButtonEvent()})),t._setupLoadingPlaceHolders()})),Viewport.setup()}(Zt),window._superSecretOns=Zt,Zt}));