@wiajs/core 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.min.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * wia core v1.0.1
2
+ * wia core v1.0.2
3
3
  * (c) 2015-2023 Sibyl Yu and contributors
4
4
  * Released under the MIT License.
5
5
  */
6
6
  /*!
7
- * wia core v1.0.1
7
+ * wia core v1.0.2
8
8
  * (c) 2015-2023 Sibyl Yu and contributors
9
9
  * Released under the MIT License.
10
10
  */
11
- var e,t;e=this,t=function(e){"use strict";var t=function(){function e(){}var t=e.prototype;return t.post=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(r.responseText):o(new Error(r.statusText),r.responseText))},r.open("POST",e,!0);var i=t;"object"==typeof t&&(i=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+"="+e[n]);return t.sort().join("&")}(t)),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.send(i)}))},t.postForm=function(e,t){return new Promise((function(n,o){var r=$.getXhr();r.onreadystatechange=function(){4===r.readyState&&(200===r.status?n(null,r.responseText):o(new Error(r.status),r.responseText))},r.open("POST",e,!0),r.send(t)}))},t.get=function(e,t){return $.get(e,t)},e}();function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var r=o.call(e,t||"default");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t)}var u=1,l={uniqueNumber:function(){return u+=1},id:function(e,t){return void 0===e&&(e="xxxxxxxxxx"),void 0===t&&(t="0123456789abcdef"),$.uid(e,t)},mdPreloaderContent:'\n\t\t<span class="preloader-inner">\n\t\t\t<svg viewBox="0 0 36 36">\n\t\t\t\t<circle cx="18" cy="18" r="16"></circle>\n\t\t\t</svg>\n </span>\n '.trim(),iosPreloaderContent:('\n\t\t<span class="preloader-inner">\n\t\t\t'+[0,1,2,3,4,5,6,7].map((function(){return'<span class="preloader-inner-line"></span>'})).join("")+"\n\t\t</span>\n ").trim(),auroraPreloaderContent:'\n <span class="preloader-inner">\n <span class="preloader-inner-circle"></span>\n </span>\n',eventNameToColonCase:function(e){var t;return e.split("").map((function(e,n){return e.match(/[A-Z]/)&&0!==n&&!t?(t=!0,":"+e.toLowerCase()):e.toLowerCase()})).join("")},deleteProps:function(e){$.deleteProps(e)},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},nextFrame:function(e){return $.nextFrame(e)},now:function(){return Date.now()},requestAnimationFrame:function(e){return $.requestAnimationFrame(e)},cancelAnimationFrame:function(e){return $.cancelAnimationFrame(e)},parseUrlQuery:function(e){return $.urlParam(e)},getTranslate:function(e,t){return void 0===t&&(t="x"),$.getTranslate(e,t)},serializeObject:function(e,t){if(void 0===t&&(t=[]),"string"==typeof e)return e;var n,o=[];function r(e){if(t.length>0){for(var n="",o=0;o<t.length;o+=1)n+=0===o?t[o]:"["+encodeURIComponent(t[o])+"]";return n+"["+encodeURIComponent(e)+"]"}return encodeURIComponent(e)}function i(e){return encodeURIComponent(e)}return Object.keys(e).forEach((function(a){var s;if(Array.isArray(e[a])){s=[];for(var c=0;c<e[a].length;c+=1)Array.isArray(e[a][c])||"object"!=typeof e[a][c]?s.push(r(a)+"[]="+i(e[a][c])):((n=t.slice()).push(a),n.push(String(c)),s.push(l.serializeObject(e[a][c],n)));s.length>0&&o.push(s.join("&"))}else null===e[a]||""===e[a]?o.push(r(a)+"="):"object"==typeof e[a]?((n=t.slice()).push(a),""!==(s=l.serializeObject(e[a],n))&&o.push(s)):void 0!==e[a]&&""!==e[a]?o.push(r(a)+"="+i(e[a])):""===e[a]&&o.push(r(a))})),o.join("&")},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},merge:function(){var e;return(e=$).merge.apply(e,arguments)},extend:function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var r=n[0];return n.splice(0,1),(e=$).assign.apply(e,[r].concat(n))},bindMethods:function(e,t){var n=this;Object.keys(t).forEach((function(o){n.isObject(t[o])&&Object.keys(t[o]).forEach((function(n){"function"==typeof t[o][n]&&(t[o][n]=t[o][n].bind(e))})),e[o]=t[o]}))},colorHexToRgb:function(e){var t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,o){return t+t+n+n+o+o})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?n.slice(1).map((function(e){return parseInt(e,16)})):null},colorRgbToHex:function(e,t,n){return"#"+[e,t,n].map((function(e){var t=e.toString(16);return 1===t.length?"0"+t:t})).join("")},colorRgbToHsl:function(e,t,n){e/=255,t/=255,n/=255;var o,r=Math.max(e,t,n),i=Math.min(e,t,n),a=r-i;0===a?o=0:r===e?o=(t-n)/a%6:r===t?o=(n-e)/a+2:r===n&&(o=(e-t)/a+4);var s=(i+r)/2;return o<0&&(o=6+o),[60*o,0===a?0:a/(1-Math.abs(2*s-1)),s]},colorHslToRgb:function(e,t,n){var o,r=(1-Math.abs(2*n-1))*t,i=e/60,a=r*(1-Math.abs(i%2-1));Number.isNaN(e)||void 0===e?o=[0,0,0]:i<=1?o=[r,a,0]:i<=2?o=[a,r,0]:i<=3?o=[0,r,a]:i<=4?o=[0,a,r]:i<=5?o=[a,0,r]:i<=6&&(o=[r,0,a]);var s=n-r/2;return o.map((function(e){return Math.max(0,Math.min(255,Math.round(255*(e+s))))}))},colorHsbToHsl:function(e,t,n){var o={h:e,s:0,l:0},r=t,i=n;return o.l=(2-r)*i/2,o.s=o.l&&o.l<1?r*i/(o.l<.5?2*o.l:2-2*o.l):o.s,[o.h,o.s,o.l]},colorHslToHsb:function(e,t,n){var o={h:e,s:0,b:0},r=n,i=t*(r<.5?r:1-r);return o.b=r+i,o.s=r>0?2*i/o.b:o.s,[o.h,o.s,o.b]},colorThemeCSSProperties:function(){for(var e,t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];if(1===o.length?(e=o[0],t=l.colorHexToRgb(e)):3===o.length&&(t=o,e=l.colorRgbToHex.apply(l,t)),!t)return{};var i=l.colorRgbToHsl.apply(l,t),a=[i[0],i[1],Math.max(0,i[2]-.08)],s=[i[0],i[1],Math.max(0,i[2]+.08)],c=l.colorRgbToHex.apply(l,l.colorHslToRgb.apply(l,a)),u=l.colorRgbToHex.apply(l,l.colorHslToRgb.apply(l,s));return{"--f7-theme-color":e,"--f7-theme-color-rgb":t.join(", "),"--f7-theme-color-shade":c,"--f7-theme-color-tint":u}}},d=function(){function e(e,t,n){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===n&&(n="");var o=this;o.params=e,t?Array.isArray(t)?o.eventsParents=t.filter((function(e){return e})):o.eventsParents=[t]:o.eventsParents=[],o.eventsListeners={},o.pre=n,o.params&&o.params.on&&Object.keys(o.params.on).forEach((function(e){o.on(e,o.params.on[e])}))}var t=e.prototype;return t.on=function(e,t,n){void 0===n&&(n=!1);var o=this;if("function"!=typeof t)return o;var r=n?"unshift":"push";return e.split(" ").forEach((function(e){var n={owner:"",appName:"",handler:t};if(e.includes("app::")){var i=null;if($.isPage(o)?i=o:$.isPage(null==o?void 0:o.page)?i=o.page:$.isPage(null==o?void 0:o.parent)&&(i=o.parent),i&&i.app&&$.isApp(i.app)){n.owner=i.owner,n.appName=i.appName;var a=i.app,s=e.replace("app::","");a.eventsListeners[s]||(a.eventsListeners[s]=[]),a.eventsListeners[s][r](n)}}else o.eventsListeners[e]||(o.eventsListeners[e]=[]),o.eventsListeners[e][r](n)})),o},t.once=function(e,t,n){void 0===n&&(n=!1);var o=this;if("function"!=typeof t)return o;function r(){if(o.off(e,r),r.proxy){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];r.proxy.apply(o,n),delete r.proxy}}return r.proxy=t,o.on(e,r,n)},t.off=function(e,t){var n=this;return n.eventsListeners?(e?e.split(" ").forEach((function(e){if(void 0===t)n.eventsListeners[e]=[];else if(n.eventsListeners[e])for(var o=n.eventsListeners[e],r=o.length-1;r>=0;r--){var i,a=o[r];a.handler!==t&&(null==(i=a.handler)?void 0:i.proxy)!==t||o.splice(r,1)}})):n.eventsListeners={},n):n},t.emit=function(){var e,t,n,o,r,i=this;if(!i.eventsListeners)return i;for(var a=!1,s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];var l=c[0];if(!l)return i;"string"==typeof l||Array.isArray(l)?(l=l.split(" "),i.pre?(t=[],l.forEach((function(e){t.push("."+e),t.push(""+i.pre+e[0].toUpperCase()+e.substr(1))}))):t=l,n=c.slice(1,c.length),o=i,r=i.eventsParents):(a=l.pop,t=l.events,n=l.data,o=l.context||i,r=l.local?[]:l.parents||i.eventsParents);var d=Array.isArray(t)?t:t.split(" "),p=d.map((function(e){return e.replace(/local::|^[.]/,"")})),f=null;if(a)f=l;else{var m=d.filter((function(e){return!e.match(/^local::|^[.]/)}));null!=m&&m.length&&(f={pop:!0,events:m,context:i,data:n,owner:"",appName:""})}return f&&$.isPage(i)&&(f.owner=null==i?void 0:i.owner,f.appName=null==i?void 0:i.appName),p.forEach((function(e){if(i.eventsListeners&&i.eventsListeners[e]){var t=[];i.eventsListeners[e].forEach((function(n){n.owner&&n.appName?a&&n.owner===e.owner&&n.appName===e.appName&&t.push(n.handler):t.push(n.handler)})),t.forEach((function(e){e.apply(o,n)}))}})),f&&(null==(e=r)?void 0:e.length)>0&&r.forEach((function(e){return e.emit(f)})),i},e}(),p=function(e){function t(t,n,o,r){var i;return(i=e.call(this,null,[t])||this).app=t,i.cfg=t.cfg,i.name=n,i.title=o,i.style=r||"./page/"+n+".css",i.owner="",i.appName="",i.path="",i.view=null,i.dom=null,i.$el=null,i.el=null,i.html="",i.css="",i.js="",i.data={},i.param={},i}c(t,e);var n=t.prototype;return n.load=function(e){this.emit("local::load pageLoad",e),this.emit("pageLoad",this)},n.ready=function(e,t,n){this.init(),this.emit("local::ready",e,t,n),this.emit("pageReady",this)},n.init=function(e){var t=this.view;e=e?$(e):t},n.show=function(e,t){e.qus("[name$=-tp]").hide(),e.qus('a[href=""]').attr("href","javascript:;"),this.reset&&this.reset(),this.emit("local::show",e,t),this.emit("pageShow",this)},n.back=function(e,t){e.qus("[name$=-tp]").hide(),e.qus('a[href=""]').attr("href","javascript:;"),this.emit("local::back",e,t),this.emit("pageBack",this)},n.hide=function(e){this.emit("local::hide",e),this.emit("pageHide",this)},n.unload=function(e){this.emit("local::unload",e),this.emit("pageUnload",this)},t}(d),f=function(e){function t(t,n){return void 0===t&&(t={}),void 0===n&&(n=[]),e.call(this,t,n)||this}c(t,e);var n=t.prototype;return n.useModuleParams=function(e,t){if(e.params){var n={};Object.keys(e.params).forEach((function(e){void 0!==t[e]&&(n[e]=$.extend({},t[e]))})),$.extend(t,e.params),Object.keys(n).forEach((function(e){$.extend(t[e],n[e])}))}},n.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=t.modules[n];o.params&&$.extend(e,o.params)}))},n.useModule=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var n=this;if(n.modules){var o="string"==typeof e?n.modules[e]:e;o&&(o.instance&&Object.keys(o.instance).forEach((function(e){var t=o.instance[e];n[e]="function"==typeof t?t.bind(n):t})),o.on&&n.on&&Object.keys(o.on).forEach((function(e){n.on(e,o.on[e])})),o.vnode&&(n.vnodeHooks||(n.vnodeHooks={}),Object.keys(o.vnode).forEach((function(e){Object.keys(o.vnode[e]).forEach((function(t){var r=o.vnode[e][t];n.vnodeHooks[t]||(n.vnodeHooks[t]={}),n.vnodeHooks[t][e]||(n.vnodeHooks[t][e]=[]),n.vnodeHooks[t][e].push(r.bind(n))}))}))),o.create&&o.create.bind(n)(t))}},n.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var o=e[n]||{};t.useModule(n,o)}))},t.installModule=function(e){var t=this;t.prototype.modules||(t.prototype.modules={});var n=e.name||Object.keys(t.prototype.modules).length+"_"+$.now();if(t.prototype.modules[n]=e,e.proto&&Object.keys(e.proto).forEach((function(n){t.prototype[n]=e.proto[n]})),e.static&&Object.keys(e.static).forEach((function(n){t[n]=e.static[n]})),e.install){for(var o=arguments.length,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];e.install.apply(t,r)}return t},t.use=function(e){var t=this;if(Array.isArray(e))return e.forEach((function(e){return t.installModule(e)})),t;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.installModule.apply(t,[e].concat(o))},i(t,null,[{key:"components",set:function(e){this.use&&this.use(e)}}]),t}(d);function m(e,t,n){return m=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(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var o=[null];o.push.apply(o,t);var r=new(Function.bind.apply(e,o));return n&&s(r,n.prototype),r},m.apply(null,arguments)}function h(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.domProp,i=t.app,a=t.addMethods,s={create:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m(o,i?[i].concat(t):t)},get:function(e){if(void 0===e&&(e=n),e instanceof o)return e;var t=$(e);return 0!==t.length?t[0][r]:void 0},destroy:function(e){var t=s.get(e);if(t&&t.destroy)return t.destroy()}};return a&&Array.isArray(a)&&a.forEach((function(e){s[e]=function(t){void 0===t&&(t=n);for(var o=s.get(t),r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];if(o&&o[e])return o[e].apply(o,i)}})),s}function v(e){void 0===e&&(e={});var t=e,n=t.defaultSelector,o=t.constructor,r=t.app;return $.extend(h({defaultSelector:n,constructor:o,app:r,domProp:"f7Modal"}),{open:function(e,t){var n=$(e),i=n[0].f7Modal;return i||(i=new o(r,{el:n})),i.open(t)},close:function(e,t){void 0===e&&(e=n);var i=$(e);if(0!==i.length){var a=i[0].f7Modal;return a||(a=new o(r,{el:i})),a.close(t)}}})}var y=[];function g(e){var t=this;return new Promise((function(n,o){var r,i,a,s=t.instance;if(e){if("string"==typeof e){var c=e.match(/([a-z0-9-]*)/i);if(e.indexOf(".")<0&&c&&c[0].length===e.length){if(!s||s&&!s.params.lazyModulesPath)return void o(new Error('Wia: "lazyModulesPath" app parameter must be specified to fetch module by name'));r=s.params.lazyModulesPath+"/"+e+".js"}else r=e}else"function"==typeof e?a=e:i=e;if(a){var u=a(t,!1);if(!u)return void o(new Error("Wia: Can't find Wia component in specified component function"));if(t.prototype.modules&&t.prototype.modules[u.name])return void n();f(u),n()}if(i){var l=i;if(!l)return void o(new Error("Wia: Can't find Wia component in specified component"));if(t.prototype.modules&&t.prototype.modules[l.name])return void n();f(l),n()}if(r){if(y.indexOf(r)>=0)return void n();y.push(r);var d=new Promise((function(e,n){t.request.get(r,(function(o){var i="wia_component_loader_callback_"+$.id(),a=document.createElement("script");a.innerHTML="window."+i+" = function (Wia, WiaAutoInstallComponent) {return "+o.trim()+"}",$("head").append(a);var s=window[i];delete window[i],$(a).remove();var c=s(t,!1);c?(t.prototype.modules&&t.prototype.modules[c.name]||f(c),e()):n(new Error("Wia: Can't find Wia component in "+r+" file"))}),(function(e,t){n(e,t)}))})),p=new Promise((function(e){t.request.get(r.replace(".js",s.rtl?".rtl.css":".css"),(function(t){var n=document.createElement("style");n.innerHTML=t,$("head").append(n),e()}),(function(){e()}))}));Promise.all([d,p]).then((function(){n()})).catch((function(e){o(e)}))}}else o(new Error("Wia: Lazy module must be specified"));function f(e){t.use(e),s&&(s.useModuleParams(e,s.params),s.useModule(e))}}))}var w={name:"resize",instance:{getSize:function(){var e=this;if(!e.root[0])return{width:0,height:0,left:0,top:0};var t=e.root.offset(),n=[e.root[0].offsetWidth,e.root[0].offsetHeight,t.left,t.top],o=n[0],r=n[1],i=n[2],a=n[3];return e.width=o,e.height=r,e.left=i,e.top=a,{width:o,height:r,left:i,top:a}}},on:{init:function(){var e=this;e.getSize(),window.addEventListener("resize",(function(){e.emit("resize")}),!1),window.addEventListener("orientationchange",(function(){e.emit("orientationchange")}))},orientationchange:function(){this.device.ipad&&(document.body.scrollLeft=0,setTimeout((function(){document.body.scrollLeft=0}),0))},resize:function(){this.getSize()}}};function b(e){var t,n,o;t=function(t){e.emit({events:"click",data:[t]})},$.support.touch?(document.addEventListener("touchstart",(function(e){n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY}),!0),document.addEventListener("touchend",(function(e){var r=Math.abs(e.changedTouches[0].clientX-n),i=Math.abs(e.changedTouches[0].clientY-o);r<=5&&i<=5&&t.call(this,e)}),!0)):document.addEventListener("click",t,!0),e.on("click",(function(t){var n=$(t.target),o=n.closest("a");o.length>0&&o.attr("href"),Object.keys(e.modules).forEach((function(o){var r=e.modules[o].clicks;r&&(t.preventF7Router||Object.keys(r).forEach((function(o){var i=n.closest(o).eq(0);i.length>0&&r[o].call(e,i,i.dataset(),t)})))}))}))}var k={name:"clicks",params:{clicks:{externalLinks:".ext"}},on:{init:function(){b(this)}}},C={registrations:[],register:function(e,t){var n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?new Promise((function(o,r){n.serviceWorker.container.register(e,t?{scope:t}:{}).then((function(e){C.registrations.push(e),n.emit("serviceWorkerRegisterSuccess",e),o(e)})).catch((function(e){n.emit("serviceWorkerRegisterError",e),r(e)}))})):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))},unregister:function(e){var t,n=this;return"serviceWorker"in window.navigator&&n.serviceWorker.container?(t=e?Array.isArray(e)?e:[e]:C.registrations,Promise.all(t.map((function(e){return new Promise((function(t,o){e.unregister().then((function(){C.registrations.indexOf(e)>=0&&C.registrations.splice(C.registrations.indexOf(e),1),n.emit("serviceWorkerUnregisterSuccess",e),t()})).catch((function(t){n.emit("serviceWorkerUnregisterError",e,t),o(t)}))}))})))):new Promise((function(e,t){t(new Error("Service worker is not supported"))}))}},x={name:"sw",params:{serviceWorker:{path:void 0,scope:void 0}},create:function(){var e=this;$.extend(e,{serviceWorker:{container:"serviceWorker"in window.navigator?window.navigator.serviceWorker:void 0,registrations:C.registrations,register:C.register.bind(e),unregister:C.unregister.bind(e)}})},on:{init:function(){if("serviceWorker"in window.navigator){var e=this;if(e.serviceWorker.container){var t=e.params.serviceWorker.path,n=e.params.serviceWorker.scope;!t||Array.isArray(t)&&!t.length||(Array.isArray(t)?t:[t]).forEach((function(t){e.serviceWorker.register(t,n)}))}}}}},E=$.support,L=$.device,M=function(e){function t(n){var o;o=e.call(this,n)||this;var r=$.extend({},n),i=a(o);i.device=L,i.support=E,console.log("App constructor",{Device:L,Support:E});var s={version:"0.0.1",root:"body",theme:"auto",language:window.navigator.language,routes:[],lazyModulesPath:null,initOnDeviceReady:!0,autoDarkTheme:!1,iosTranslucentBars:!0,iosTranslucentModals:!0,component:void 0,componentUrl:void 0};i.useModulesParams(s),i.params=$.extend(s,n);var c=$(i.params.root);$.isPage=function(e){return e instanceof p},$.isApp=function(e){return e instanceof t},$.extend(i,{owner:i.params.owner,name:i.params.name,id:i.params.owner+"."+i.params.name,version:i.params.version,routes:i.params.routes,language:i.params.language,root:c,$el:c,cfg:i.params.cfg,api:i.params.api,rtl:"rtl"===c.css("direction"),theme:"auto"===i.params.theme?L.ios?"ios":L.desktop?"aurora":"md":i.params.theme,passedParams:r,online:window.navigator.onLine}),i.root&&i.root[0]&&(i.root[0].wia=i),i.touchEvents={start:E.touch?"touchstart":E.pointerEvents?"pointerdown":"mousedown",move:E.touch?"touchmove":E.pointerEvents?"pointermove":"mousemove",end:E.touch?"touchend":E.pointerEvents?"pointerup":"mouseup"},i.useModules(),i.initData();var u="(prefers-color-scheme: dark)",l="(prefers-color-scheme: light)";return i.mq={},window.matchMedia&&(i.mq.dark=window.matchMedia(u),i.mq.light=window.matchMedia(l)),i.colorSchemeListener=function(e){var t=e.matches,n=e.media;if(t){var o=document.querySelector("html");n===u?o.classList.add("theme-dark"):n===l&&o.classList.remove("theme-dark")}},i.params.init&&(L.cordova&&i.params.initOnDeviceReady?$(document).on("deviceready",(function(){i.init()})):i.init()),i||a(o)}c(t,e);var n=t.prototype;return n.load=function(e){this.emit("local::load appLoad",e)},n.show=function(e,t){this.emit("local::show appShow",e,t)},n.hide=function(){this.emit("local::hide appHide")},n.unload=function(){this.emit("local::unload appUnload")},n.initData=function(){var e=this;e.data={},e.params.data&&"function"==typeof e.params.data?$.extend(e.data,e.params.data.bind(e)()):e.params.data&&$.extend(e.data,e.params.data),e.methods={},e.params.methods&&Object.keys(e.params.methods).forEach((function(t){"function"==typeof e.params.methods[t]?e.methods[t]=e.params.methods[t].bind(e):e.methods[t]=e.params.methods[t]}))},n.enableAutoDarkTheme=function(){if(window.matchMedia){var e=this,t=document.querySelector("html");e.mq.dark&&e.mq.light&&(e.mq.dark.addListener(e.colorSchemeListener),e.mq.light.addListener(e.colorSchemeListener)),e.mq.dark&&e.mq.dark.matches?t.classList.add("theme-dark"):e.mq.light&&e.mq.light.matches&&t.classList.remove("theme-dark")}},n.disableAutoDarkTheme=function(){if(window.matchMedia){var e=this;e.mq.dark&&e.mq.dark.removeListener(e.colorSchemeListener),e.mq.light&&e.mq.light.removeListener(e.colorSchemeListener)}},n.init=function(){var e,n,o,r=this;return r.initialized||($.App=t,L.ios&&L.webView&&window.addEventListener("touchstart",(function(){})),r.root.addClass("framework7-initializing"),r.rtl&&$("html").attr("dir","rtl"),r.params.autoDarkTheme&&r.enableAutoDarkTheme(),window.addEventListener("offline",(function(){r.online=!1,r.emit("offline"),r.emit("connection",!1)})),window.addEventListener("online",(function(){r.online=!0,r.emit("online"),r.emit("connection",!0)})),r.root.addClass("framework7-root"),$("html").removeClass("ios md aurora").addClass(r.theme),r.params.iosTranslucentBars&&"ios"===r.theme&&L.ios&&$("html").addClass("ios-translucent-bars"),r.params.iosTranslucentModals&&"ios"===r.theme&&L.ios&&$("html").addClass("ios-translucent-modals"),$.nextFrame((function(){r.root.removeClass("framework7-initializing")})),e=[],n=document.querySelector("html"),o=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]'),n&&(L.standalone&&L.ios&&o&&"black-translucent"===o.content&&e.push("device-full-viewport"),e.push("device-pixel-ratio-"+Math.floor(L.pixelRatio)),L.os&&!L.desktop?e.push("device-"+L.os):L.desktop&&(e.push("device-desktop"),L.os&&e.push("device-"+L.os)),(L.cordova||L.phonegap)&&e.push("device-cordova"),e.forEach((function(e){n.classList.add(e)}))),r.initialized=!0,r.emit("init")),r},n.loadModule=function(e){t.loadModule(e),this[e.name].init&&this[e.name].init()},n.loadModules=function(){return t.loadModules.apply(t,arguments)},n.getVnodeHooks=function(e,t){var n=this;return n.vnodeHooks&&n.vnodeHooks[e]&&n.vnodeHooks[e][t]||[]},i(t,[{key:"$",get:function(){return $}}],[{key:"Dom",get:function(){return $}},{key:"$",get:function(){return $}},{key:"Module",get:function(){return f}},{key:"Event",get:function(){return d}}]),t}(f);M.apps={},M.ModalMethods=v,M.ConstructorMethods=h,M.loadModule=g,M.loadModules=function(e){return Promise.all(e.map((function(e){return M.loadModule(e)})))},M.support=E,M.device=L,M.utils=l,M.use([w,k,x]);var A,O,j,P,T={normal:"nor",retina:"ret",srcset:"set",threshold:0},S=window.innerHeight,H=z(),q=document.body.classList.contains("srcset")||"srcset"in document.createElement("img"),R=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI,W=function(){function e(e){A=$.assign({},T,e)}var t=e.prototype;return t.start=function(e){return["scroll","resize"].forEach((function(t){return e.addEventListener(t,D)})),P=e,this},t.stop=function(){return["scroll","resize"].forEach((function(e){return P.removeEventListener(e,D)})),this},t.update=function(){setTimeout((function(){_(),U()}),1)},e}();function z(){return window.scrollY||window.pageYOffset}function D(){H=z(),O||(window.requestAnimationFrame((function(){return U()})),O=!0)}function N(e){var t=H,n=t+S,o=function(e){return e.getBoundingClientRect().top+H}(e),r=o+e.offsetHeight,i=A.threshold/100*S;return r>=t-i&&o<=n+i}function U(){if(j)return S=window.innerHeight,j.forEach((function(e){return N(e)&&function(e){if($.emit("lazy:src:before",e),q&&e.hasAttribute(A.srcset))e.setAttribute("srcset",e.getAttribute(A.srcset));else{var t=R>1&&e.getAttribute(A.retina)||e.getAttribute(A.normal);e.setAttribute("src",t),console.log("set src:"+t)}$.emit("lazy:src:after",e),[A.normal,A.retina,A.srcset].forEach((function(t){return e.removeAttribute(t)})),_()}(e)})),O=!1,this}function _(e){return j=e?Array.prototype.slice.call(e.querySelectorAll("["+A.normal+"]")):Array.prototype.slice.call(document.querySelectorAll("["+A.normal+"]")),this}var B=[],F=[],I=function(e){function t(t,n){var o,r=a(o=e.call(this,n,[t])||this);return r.params=l.extend({},n),r.opened=!1,a(o)||a(o)}c(t,e);var n=t.prototype;return n.onOpen=function(){var e=this;e.opened=!0,B.push(e),$("html").addClass("with-modal-"+e.type.toLowerCase()),e.$el.trigger("modal:open "+e.type.toLowerCase()+":open"),e.emit("local::open modalOpen "+e.type+"Open",e)},n.onOpened=function(){var e=this;e.$el.trigger("modal:opened "+e.type.toLowerCase()+":opened"),e.emit("local::opened modalOpened "+e.type+"Opened",e)},n.onClose=function(){var e=this;e.opened=!1,e.type&&e.$el&&(B.splice(B.indexOf(e),1),$("html").removeClass("with-modal-"+e.type.toLowerCase()),e.$el.trigger("modal:close "+e.type.toLowerCase()+":close"),e.emit("local::close modalClose "+e.type+"Close",e))},n.onClosed=function(){var e=this;e.type&&e.$el&&(e.$el.removeClass("modal-out"),e.$el.hide(),e.$el.trigger("modal:closed "+e.type.toLowerCase()+":closed"),e.emit("local::closed modalClosed "+e.type+"Closed",e))},n.open=function(e){var t,n=this,o=n.app,r=n.$el,i=n.type,a=n.$backdropEl,s=n.params.moveToRoot,c=!0;if(void 0!==e?c=e:void 0!==n.params.animate&&(c=n.params.animate),!r||r.hasClass("modal-in"))return n;if("dialog"===i&&o.params.modal.queueDialogs&&($(".dialog.modal-in").length>0?t=!0:B.length>0&&B.forEach((function(e){"dialog"===e.type&&(t=!0)})),t))return F.push(n),n;var u=r.parent(),l=r.parents(document).length>0;function d(){r.hasClass("modal-out")?n.onClosed():r.hasClass("modal-in")&&n.onOpened()}return s&&o.params.modal.moveToRoot&&!u.is(o.root)&&(o.root.append(r),n.once(i+"Closed",(function(){l?u.append(r):r.remove()}))),r.show(),n._clientLeft=r[0].clientLeft,c?(a&&(a.removeClass("not-animated"),a.addClass("backdrop-in")),r.animationEnd((function(){d()})),r.transitionEnd((function(){d()})),r.removeClass("modal-out not-animated").addClass("modal-in"),n.onOpen()):(a&&a.addClass("backdrop-in not-animated"),r.removeClass("modal-out").addClass("modal-in not-animated"),n.onOpen(),n.onOpened()),n},n.close=function(e){var t=this,n=t.$el,o=t.$backdropEl,r=!0;if(void 0!==e?r=e:void 0!==t.params.animate&&(r=t.params.animate),!n||!n.hasClass("modal-in"))return F.indexOf(t)>=0&&F.splice(F.indexOf(t),1),t;if(o){var i=!0;"popup"===t.type&&t.$el.prevAll(".popup.modal-in").each((function(e,n){var o=n.f7Modal;o&&o.params.closeByBackdropClick&&o.params.backdrop&&o.backdropEl===t.backdropEl&&(i=!1)})),i&&(o[r?"removeClass":"addClass"]("not-animated"),o.removeClass("backdrop-in"))}function a(){n.hasClass("modal-out")?t.onClosed():n.hasClass("modal-in")&&t.onOpened()}return n[r?"removeClass":"addClass"]("not-animated"),r?(n.animationEnd((function(){a()})),n.transitionEnd((function(){a()})),n.removeClass("modal-in").addClass("modal-out"),t.onClose()):(n.addClass("not-animated").removeClass("modal-in").addClass("modal-out"),t.onClose(),t.onClosed()),"dialog"===t.type&&0!==F.length&&F.shift().open(),t},n.destroy=function(){var e=this;e.destroyed||(e.emit("local::beforeDestroy modalBeforeDestroy "+e.type+"BeforeDestroy",e),e.$el&&(e.$el.trigger("modal:beforedestroy "+e.type.toLowerCase()+":beforedestroy"),e.$el.length&&e.$el[0].f7Modal&&delete e.$el[0].f7Modal),l.deleteProps(e),e.destroyed=!0)},t}(d),X=$.support,Y=$.device;e.Ajax=t,e.App=M,e.Constructors=h,e.Device=Y,e.Event=d,e.Lazy=W,e.Modal=I,e.Modals=v,e.Module=f,e.Page=p,e.Resize=w,e.SW=x,e.Support=X,e.Utils=l,e.jsx=function(e,t){for(var n=t||{},o=arguments.length,r=new Array(o>2?o-2:0),i=2;i<o;i++)r[i-2]=arguments[i];var a=r||[],s=Object.keys(n).map((function(e){return"_"===e[0]?n[e]?e.replace("_",""):"":e+'="'+n[e]+'"'})).filter((function(e){return!!e})).join(" ");return["path","img","circle","polygon","line","input"].indexOf(e)>=0?("<"+e+" "+s+" />").trim():("<"+e+" "+s+">"+a.filter((function(e){return!!e})).map((function(e){return Array.isArray(e)?e.join(""):e})).join("")+"</"+e+">").trim()},e.loadModule=g},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@wiajs/core"]={});
11
+ var t,e;t=this,e=function(t){"use strict";var e=function(){function t(){}var e=t.prototype;return e.post=function(t,e){return new Promise((function(r,n){var o=$.getXhr();o.onreadystatechange=function(){4===o.readyState&&(200===o.status?r(o.responseText):n(new Error(o.statusText),o.responseText))},o.open("POST",t,!0);var a=e;"object"==typeof e&&(a=function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r+"="+t[r]);return e.sort().join("&")}(e)),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.send(a)}))},e.postForm=function(t,e){return new Promise((function(r,n){var o=$.getXhr();o.onreadystatechange=function(){4===o.readyState&&(200===o.status?r(null,o.responseText):n(new Error(o.status),o.responseText))},o.open("POST",t,!0),o.send(e)}))},e.get=function(t,e){return $.get(t,e)},t}();function r(t){return r="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},r(t)}function n(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===r(e)?e:String(e)}function o(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}function a(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function c(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,s(t,e)}function u(){return u=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},u.apply(this,arguments)}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(t){return t<0?-1:0===t?0:1}function p(t,e,r){return(1-r)*t+r*e}function m(t){return(t%=360)<0&&(t+=360),t}function h(t,e){return[t[0]*e[0][0]+t[1]*e[0][1]+t[2]*e[0][2],t[0]*e[1][0]+t[1]*e[1][1]+t[2]*e[1][2],t[0]*e[2][0]+t[1]*e[2][1]+t[2]*e[2][2]]}var v=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],y=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],g=[95.047,100,108.883];function b(t,e,r){return(255<<24|(255&t)<<16|(255&e)<<8|255&r)>>>0}function w(t){return b(O(t[0]),O(t[1]),O(t[2]))}function C(t){return t>>16&255}function k(t){return t>>8&255}function M(t){return 255&t}function S(t){return 116*(e=function(t){return h([E(C(t)),E(k(t)),E(M(t))],v)}(t)[1]/100,e>216/24389?Math.pow(e,1/3):(903.2962962962963*e+16)/116)-16;var e}function A(t){return 100*((r=(e=(t+16)/116)*e*e)>216/24389?r:(116*e-16)/903.2962962962963);var e,r}function E(t){var e=t/255;return e<=.040449936?e/12.92*100:100*Math.pow((e+.055)/1.055,2.4)}function O(t){var e,r,n,o,a=t/100;return e=a<=.0031308?12.92*a:1.055*Math.pow(a,1/2.4)-.055,r=0,n=255,(o=Math.round(255*e))<r?r:o>n?n:o}var L=function(){function t(t,e,r,n,o,a,i,s,c,u){this.n=t,this.aw=e,this.nbb=r,this.ncb=n,this.c=o,this.nc=a,this.rgbD=i,this.fl=s,this.fLRoot=c,this.z=u}return t.make=function(e,r,n,o,a){void 0===e&&(e=g),void 0===r&&(r=200/Math.PI*A(50)/100),void 0===n&&(n=50),void 0===o&&(o=2),void 0===a&&(a=!1);var i=e,s=.401288*i[0]+.650173*i[1]+-.051461*i[2],c=-.250268*i[0]+1.204414*i[1]+.045854*i[2],u=-.002079*i[0]+.048952*i[1]+.953127*i[2],f=.8+o/10,l=f>=.9?p(.59,.69,10*(f-.9)):p(.525,.59,10*(f-.8)),d=a?1:f*(1-1/3.6*Math.exp((-r-42)/92)),m=f,h=[(d=d>1?1:d<0?0:d)*(100/s)+1-d,d*(100/c)+1-d,d*(100/u)+1-d],v=1/(5*r+1),y=v*v*v*v,b=1-y,w=y*r+.1*b*b*Math.cbrt(5*r),C=A(n)/e[1],k=1.48+Math.sqrt(C),M=.725/Math.pow(C,.2),S=M,E=[Math.pow(w*h[0]*s/100,.42),Math.pow(w*h[1]*c/100,.42),Math.pow(w*h[2]*u/100,.42)],O=[400*E[0]/(E[0]+27.13),400*E[1]/(E[1]+27.13),400*E[2]/(E[2]+27.13)];return new t(C,(2*O[0]+O[1]+.05*O[2])*M,M,S,l,m,h,w,Math.pow(w,.25),k)},t}();L.DEFAULT=L.make();var P=function(){function t(t,e,r,n,o,a,i,s,c){this.hue=t,this.chroma=e,this.j=r,this.q=n,this.m=o,this.s=a,this.jstar=i,this.astar=s,this.bstar=c}var e=t.prototype;return e.distance=function(t){var e=this.jstar-t.jstar,r=this.astar-t.astar,n=this.bstar-t.bstar,o=Math.sqrt(e*e+r*r+n*n);return 1.41*Math.pow(o,.63)},t.fromInt=function(e){return t.fromIntInViewingConditions(e,L.DEFAULT)},t.fromIntInViewingConditions=function(e,r){var n=(65280&e)>>8,o=255&e,a=E((16711680&e)>>16),i=E(n),s=E(o),c=.41233895*a+.35762064*i+.18051042*s,u=.2126*a+.7152*i+.0722*s,f=.01932141*a+.11916382*i+.95034478*s,l=.401288*c+.650173*u-.051461*f,p=-.250268*c+1.204414*u+.045854*f,m=-.002079*c+.048952*u+.953127*f,h=r.rgbD[0]*l,v=r.rgbD[1]*p,y=r.rgbD[2]*m,g=Math.pow(r.fl*Math.abs(h)/100,.42),b=Math.pow(r.fl*Math.abs(v)/100,.42),w=Math.pow(r.fl*Math.abs(y)/100,.42),C=400*d(h)*g/(g+27.13),k=400*d(v)*b/(b+27.13),M=400*d(y)*w/(w+27.13),S=(11*C+-12*k+M)/11,A=(C+k-2*M)/9,O=(20*C+20*k+21*M)/20,$=(40*C+20*k+M)/20,L=180*Math.atan2(A,S)/Math.PI,P=L<0?L+360:L>=360?L-360:L,T=P*Math.PI/180,x=$*r.nbb,I=100*Math.pow(x/r.aw,r.c*r.z),j=4/r.c*Math.sqrt(I/100)*(r.aw+4)*r.fLRoot,R=P<20.14?P+360:P,H=5e4/13*(.25*(Math.cos(R*Math.PI/180+2)+3.8))*r.nc*r.ncb*Math.sqrt(S*S+A*A)/(O+.305),q=Math.pow(H,.9)*Math.pow(1.64-Math.pow(.29,r.n),.73),D=q*Math.sqrt(I/100),z=D*r.fLRoot,_=50*Math.sqrt(q*r.c/(r.aw+4)),F=(1+100*.007)*I/(1+.007*I),B=1/.0228*Math.log(1+.0228*z);return new t(P,D,I,j,z,_,F,B*Math.cos(T),B*Math.sin(T))},t.fromJch=function(e,r,n){return t.fromJchInViewingConditions(e,r,n,L.DEFAULT)},t.fromJchInViewingConditions=function(e,r,n,o){var a=4/o.c*Math.sqrt(e/100)*(o.aw+4)*o.fLRoot,i=r*o.fLRoot,s=r/Math.sqrt(e/100),c=50*Math.sqrt(s*o.c/(o.aw+4)),u=n*Math.PI/180,f=(1+100*.007)*e/(1+.007*e),l=1/.0228*Math.log(1+.0228*i);return new t(n,r,e,a,i,c,f,l*Math.cos(u),l*Math.sin(u))},t.fromUcs=function(e,r,n){return t.fromUcsInViewingConditions(e,r,n,L.DEFAULT)},t.fromUcsInViewingConditions=function(e,r,n,o){var a=r,i=n,s=Math.sqrt(a*a+i*i),c=(Math.exp(.0228*s)-1)/.0228/o.fLRoot,u=Math.atan2(i,a)*(180/Math.PI);u<0&&(u+=360);var f=e/(1-.007*(e-100));return t.fromJchInViewingConditions(f,c,u,o)},e.toInt=function(){return this.viewed(L.DEFAULT)},e.viewed=function(t){var e,r,n,o,a,i,s,c=0===this.chroma||0===this.j?0:this.chroma/Math.sqrt(this.j/100),u=Math.pow(c/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),f=this.hue*Math.PI/180,l=.25*(Math.cos(f+2)+3.8),p=t.aw*Math.pow(this.j/100,1/t.c/t.z),m=l*(5e4/13)*t.nc*t.ncb,h=p/t.nbb,v=Math.sin(f),g=Math.cos(f),w=23*(h+.305)*u/(23*m+11*u*g+108*u*v),C=w*g,k=w*v,M=(460*h+451*C+288*k)/1403,S=(460*h-891*C-261*k)/1403,A=(460*h-220*C-6300*k)/1403,E=Math.max(0,27.13*Math.abs(M)/(400-Math.abs(M))),$=d(M)*(100/t.fl)*Math.pow(E,1/.42),L=Math.max(0,27.13*Math.abs(S)/(400-Math.abs(S))),P=d(S)*(100/t.fl)*Math.pow(L,1/.42),T=Math.max(0,27.13*Math.abs(A)/(400-Math.abs(A))),x=d(A)*(100/t.fl)*Math.pow(T,1/.42),I=$/t.rgbD[0],j=P/t.rgbD[1],R=x/t.rgbD[2];return e=1.86206786*I-1.01125463*j+.14918677*R,r=.38752654*I+.62144744*j-.00897398*R,n=-.0158415*I-.03412294*j+1.04996444*R,a=(o=y)[0][0]*e+o[0][1]*r+o[0][2]*n,i=o[1][0]*e+o[1][1]*r+o[1][2]*n,s=o[2][0]*e+o[2][1]*r+o[2][2]*n,b(O(a),O(i),O(s))},t}(),T=function(){function t(){}return t.sanitizeRadians=function(t){return(t+8*Math.PI)%(2*Math.PI)},t.trueDelinearized=function(t){var e=t/100;return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)},t.chromaticAdaptation=function(t){var e=Math.pow(Math.abs(t),.42);return 400*d(t)*e/(e+27.13)},t.hueOf=function(e){var r=h(e,t.SCALED_DISCOUNT_FROM_LINRGB),n=t.chromaticAdaptation(r[0]),o=t.chromaticAdaptation(r[1]),a=t.chromaticAdaptation(r[2]),i=(11*n+-12*o+a)/11,s=(n+o-2*a)/9;return Math.atan2(s,i)},t.areInCyclicOrder=function(e,r,n){return t.sanitizeRadians(r-e)<t.sanitizeRadians(n-e)},t.intercept=function(t,e,r){return(e-t)/(r-t)},t.lerpPoint=function(t,e,r){return[t[0]+(r[0]-t[0])*e,t[1]+(r[1]-t[1])*e,t[2]+(r[2]-t[2])*e]},t.setCoordinate=function(e,r,n,o){var a=t.intercept(e[o],r,n[o]);return t.lerpPoint(e,a,n)},t.isBounded=function(t){return 0<=t&&t<=100},t.nthVertex=function(e,r){var n=t.Y_FROM_LINRGB[0],o=t.Y_FROM_LINRGB[1],a=t.Y_FROM_LINRGB[2],i=r%4<=1?0:100,s=r%2==0?0:100;if(r<4){var c=i,u=s,f=(e-c*o-u*a)/n;return t.isBounded(f)?[f,c,u]:[-1,-1,-1]}if(r<8){var l=i,d=s,p=(e-d*n-l*a)/o;return t.isBounded(p)?[d,p,l]:[-1,-1,-1]}var m=i,h=s,v=(e-m*n-h*o)/a;return t.isBounded(v)?[m,h,v]:[-1,-1,-1]},t.bisectToSegment=function(e,r){for(var n=[-1,-1,-1],o=n,a=0,i=0,s=!1,c=!0,u=0;u<12;u++){var f=t.nthVertex(e,u);if(!(f[0]<0)){var l=t.hueOf(f);s?(c||t.areInCyclicOrder(a,l,i))&&(c=!1,t.areInCyclicOrder(a,r,l)?(o=f,i=l):(n=f,a=l)):(n=f,o=f,a=l,i=l,s=!0)}}return[n,o]},t.midpoint=function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2,(t[2]+e[2])/2]},t.criticalPlaneBelow=function(t){return Math.floor(t-.5)},t.criticalPlaneAbove=function(t){return Math.ceil(t-.5)},t.bisectToLimit=function(e,r){for(var n=t.bisectToSegment(e,r),o=n[0],a=t.hueOf(o),i=n[1],s=0;s<3;s++)if(o[s]!==i[s]){var c=-1,u=255;o[s]<i[s]?(c=t.criticalPlaneBelow(t.trueDelinearized(o[s])),u=t.criticalPlaneAbove(t.trueDelinearized(i[s]))):(c=t.criticalPlaneAbove(t.trueDelinearized(o[s])),u=t.criticalPlaneBelow(t.trueDelinearized(i[s])));for(var f=0;f<8&&!(Math.abs(u-c)<=1);f++){var l=Math.floor((c+u)/2),d=t.CRITICAL_PLANES[l],p=t.setCoordinate(o,d,i,s),m=t.hueOf(p);t.areInCyclicOrder(a,r,m)?(i=p,u=l):(o=p,a=m,c=l)}}return t.midpoint(o,i)},t.inverseChromaticAdaptation=function(t){var e=Math.abs(t),r=Math.max(0,27.13*e/(400-e));return d(t)*Math.pow(r,1/.42)},t.findResultByJ=function(e,r,n){for(var o=11*Math.sqrt(n),a=L.DEFAULT,i=1/Math.pow(1.64-Math.pow(.29,a.n),.73),s=.25*(Math.cos(e+2)+3.8)*(5e4/13)*a.nc*a.ncb,c=Math.sin(e),u=Math.cos(e),f=0;f<5;f++){var l=o/100,d=0===r||0===o?0:r/Math.sqrt(l),p=Math.pow(d*i,1/.9),m=a.aw*Math.pow(l,1/a.c/a.z)/a.nbb,v=23*(m+.305)*p/(23*s+11*p*u+108*p*c),y=v*u,g=v*c,b=(460*m+451*y+288*g)/1403,C=(460*m-891*y-261*g)/1403,k=(460*m-220*y-6300*g)/1403,M=h([t.inverseChromaticAdaptation(b),t.inverseChromaticAdaptation(C),t.inverseChromaticAdaptation(k)],t.LINRGB_FROM_SCALED_DISCOUNT);if(M[0]<0||M[1]<0||M[2]<0)return 0;var S=t.Y_FROM_LINRGB[0],A=t.Y_FROM_LINRGB[1],E=t.Y_FROM_LINRGB[2],O=S*M[0]+A*M[1]+E*M[2];if(O<=0)return 0;if(4===f||Math.abs(O-n)<.002)return M[0]>100.01||M[1]>100.01||M[2]>100.01?0:w(M);o-=(O-n)*o/(2*O)}return 0},t.solveToInt=function(e,r,n){if(r<1e-4||n<1e-4||n>99.9999)return function(t){var e=O(A(t));return b(e,e,e)}(n);var o=(e=m(e))/180*Math.PI,a=A(n),i=t.findResultByJ(o,r,a);return 0!==i?i:w(t.bisectToLimit(a,o))},t.solveToCam=function(e,r,n){return P.fromInt(t.solveToInt(e,r,n))},t}();T.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]],T.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]],T.Y_FROM_LINRGB=[.2126,.7152,.0722],T.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var x=function(){e.from=function(t,r,n){return new e(T.solveToInt(t,r,n))},e.fromInt=function(t){return new e(t)};var t=e.prototype;function e(t){this.argb=t;var e=P.fromInt(t);this.internalHue=e.hue,this.internalChroma=e.chroma,this.internalTone=S(t),this.argb=t}return t.toInt=function(){return this.argb},t.setInternalState=function(t){var e=P.fromInt(t);this.internalHue=e.hue,this.internalChroma=e.chroma,this.internalTone=S(t),this.argb=t},a(e,[{key:"hue",get:function(){return this.internalHue},set:function(t){this.setInternalState(T.solveToInt(t,this.internalChroma,this.internalTone))}},{key:"chroma",get:function(){return this.internalChroma},set:function(t){this.setInternalState(T.solveToInt(this.internalHue,t,this.internalTone))}},{key:"tone",get:function(){return this.internalTone},set:function(t){this.setInternalState(T.solveToInt(this.internalHue,this.internalChroma,t))}}]),e}(),I=function(){function t(){}return t.harmonize=function(t,e){var r,n,o,a=x.fromInt(t),i=x.fromInt(e),s=(n=a.hue,o=i.hue,180-Math.abs(Math.abs(n-o)-180)),c=Math.min(.5*s,15),u=m(a.hue+c*(r=a.hue,m(i.hue-r)<=180?1:-1));return x.from(u,a.chroma,a.tone).toInt()},t.hctHue=function(e,r,n){var o=t.cam16Ucs(e,r,n),a=P.fromInt(o),i=P.fromInt(e);return x.from(a.hue,i.chroma,S(e)).toInt()},t.cam16Ucs=function(t,e,r){var n=P.fromInt(t),o=P.fromInt(e),a=n.jstar,i=n.astar,s=n.bstar,c=a+(o.jstar-a)*r,u=i+(o.astar-i)*r,f=s+(o.bstar-s)*r;return P.fromUcs(c,u,f).toInt()},t}(),j=function(){function t(t,e){this.hue=t,this.chroma=e,this.cache=new Map}return t.fromInt=function(e){var r=x.fromInt(e);return t.fromHueAndChroma(r.hue,r.chroma)},t.fromHueAndChroma=function(e,r){return new t(e,r)},t.prototype.tone=function(t){var e=this.cache.get(t);return void 0===e&&(e=x.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,e)),e},t}(),R=function(){function t(t,e){var r=x.fromInt(t),n=r.hue,o=r.chroma;e?(this.a1=j.fromHueAndChroma(n,o),this.a2=j.fromHueAndChroma(n,o/3),this.a3=j.fromHueAndChroma(n+60,o/2),this.n1=j.fromHueAndChroma(n,Math.min(o/12,4)),this.n2=j.fromHueAndChroma(n,Math.min(o/6,8))):(this.a1=j.fromHueAndChroma(n,Math.max(48,o)),this.a2=j.fromHueAndChroma(n,16),this.a3=j.fromHueAndChroma(n+60,24),this.n1=j.fromHueAndChroma(n,4),this.n2=j.fromHueAndChroma(n,8)),this.error=j.fromHueAndChroma(25,84)}return t.of=function(e){return new t(e,!1)},t.contentOf=function(e){return new t(e,!0)},t.fromColors=function(e){return t.createPaletteFromColors(!1,e)},t.contentFromColors=function(e){return t.createPaletteFromColors(!0,e)},t.createPaletteFromColors=function(e,r){var n=new t(r.primary,e);if(r.secondary){var o=new t(r.secondary,e);n.a2=o.a1}if(r.tertiary){var a=new t(r.tertiary,e);n.a3=a.a1}if(r.error){var i=new t(r.error,e);n.error=i.a1}if(r.neutral){var s=new t(r.neutral,e);n.n1=s.n1}if(r.neutralVariant){var c=new t(r.neutralVariant,e);n.n2=c.n2}return n},t}(),H=function(){function t(t){this.props=t}return t.light=function(e){return t.lightFromCorePalette(R.of(e))},t.dark=function(e){return t.darkFromCorePalette(R.of(e))},t.lightContent=function(e){return t.lightFromCorePalette(R.contentOf(e))},t.darkContent=function(e){return t.darkFromCorePalette(R.contentOf(e))},t.lightFromCorePalette=function(e){return new t({primary:e.a1.tone(40),onPrimary:e.a1.tone(100),primaryContainer:e.a1.tone(90),onPrimaryContainer:e.a1.tone(10),secondary:e.a2.tone(40),onSecondary:e.a2.tone(100),secondaryContainer:e.a2.tone(90),onSecondaryContainer:e.a2.tone(10),tertiary:e.a3.tone(40),onTertiary:e.a3.tone(100),tertiaryContainer:e.a3.tone(90),onTertiaryContainer:e.a3.tone(10),error:e.error.tone(40),onError:e.error.tone(100),errorContainer:e.error.tone(90),onErrorContainer:e.error.tone(10),background:e.n1.tone(99),onBackground:e.n1.tone(10),surface:e.n1.tone(99),onSurface:e.n1.tone(10),surfaceVariant:e.n2.tone(90),onSurfaceVariant:e.n2.tone(30),outline:e.n2.tone(50),outlineVariant:e.n2.tone(80),shadow:e.n1.tone(0),scrim:e.n1.tone(0),inverseSurface:e.n1.tone(20),inverseOnSurface:e.n1.tone(95),inversePrimary:e.a1.tone(80)})},t.darkFromCorePalette=function(e){return new t({primary:e.a1.tone(80),onPrimary:e.a1.tone(20),primaryContainer:e.a1.tone(30),onPrimaryContainer:e.a1.tone(90),secondary:e.a2.tone(80),onSecondary:e.a2.tone(20),secondaryContainer:e.a2.tone(30),onSecondaryContainer:e.a2.tone(90),tertiary:e.a3.tone(80),onTertiary:e.a3.tone(20),tertiaryContainer:e.a3.tone(30),onTertiaryContainer:e.a3.tone(90),error:e.error.tone(80),onError:e.error.tone(20),errorContainer:e.error.tone(30),onErrorContainer:e.error.tone(80),background:e.n1.tone(10),onBackground:e.n1.tone(90),surface:e.n1.tone(10),onSurface:e.n1.tone(90),surfaceVariant:e.n2.tone(30),onSurfaceVariant:e.n2.tone(80),outline:e.n2.tone(60),outlineVariant:e.n2.tone(30),shadow:e.n1.tone(0),scrim:e.n1.tone(0),inverseSurface:e.n1.tone(90),inverseOnSurface:e.n1.tone(20),inversePrimary:e.a1.tone(40)})},t.prototype.toJSON=function(){return u({},this.props)},a(t,[{key:"primary",get:function(){return this.props.primary}},{key:"onPrimary",get:function(){return this.props.onPrimary}},{key:"primaryContainer",get:function(){return this.props.primaryContainer}},{key:"onPrimaryContainer",get:function(){return this.props.onPrimaryContainer}},{key:"secondary",get:function(){return this.props.secondary}},{key:"onSecondary",get:function(){return this.props.onSecondary}},{key:"secondaryContainer",get:function(){return this.props.secondaryContainer}},{key:"onSecondaryContainer",get:function(){return this.props.onSecondaryContainer}},{key:"tertiary",get:function(){return this.props.tertiary}},{key:"onTertiary",get:function(){return this.props.onTertiary}},{key:"tertiaryContainer",get:function(){return this.props.tertiaryContainer}},{key:"onTertiaryContainer",get:function(){return this.props.onTertiaryContainer}},{key:"error",get:function(){return this.props.error}},{key:"onError",get:function(){return this.props.onError}},{key:"errorContainer",get:function(){return this.props.errorContainer}},{key:"onErrorContainer",get:function(){return this.props.onErrorContainer}},{key:"background",get:function(){return this.props.background}},{key:"onBackground",get:function(){return this.props.onBackground}},{key:"surface",get:function(){return this.props.surface}},{key:"onSurface",get:function(){return this.props.onSurface}},{key:"surfaceVariant",get:function(){return this.props.surfaceVariant}},{key:"onSurfaceVariant",get:function(){return this.props.onSurfaceVariant}},{key:"outline",get:function(){return this.props.outline}},{key:"outlineVariant",get:function(){return this.props.outlineVariant}},{key:"shadow",get:function(){return this.props.shadow}},{key:"scrim",get:function(){return this.props.scrim}},{key:"inverseSurface",get:function(){return this.props.inverseSurface}},{key:"inverseOnSurface",get:function(){return this.props.inverseOnSurface}},{key:"inversePrimary",get:function(){return this.props.inversePrimary}}]),t}();function q(t){for(var e,r=C(t),n=k(t),o=M(t),a=[r.toString(16),n.toString(16),o.toString(16)],i=l(a.entries());!(e=i()).done;){var s=e.value,c=s[0],u=s[1];1===u.length&&(a[c]="0"+u)}return"#"+a.join("")}function D(t){var e=3===(t=t.replace("#","")).length,r=6===t.length,n=8===t.length;if(!e&&!r&&!n)throw new Error("unexpected hex "+t);var o=0,a=0,i=0;return e?(o=z(t.slice(0,1).repeat(2)),a=z(t.slice(1,2).repeat(2)),i=z(t.slice(2,3).repeat(2))):r?(o=z(t.slice(0,2)),a=z(t.slice(2,4)),i=z(t.slice(4,6))):n&&(o=z(t.slice(2,4)),a=z(t.slice(4,6)),i=z(t.slice(6,8))),(255<<24|(255&o)<<16|(255&a)<<8|255&i)>>>0}function z(t){return parseInt(t,16)}function _(t,e){void 0===e&&(e=[]);var r=R.of(t);return{source:t,schemes:{light:H.light(t),dark:H.dark(t)},palettes:{primary:r.a1,secondary:r.a2,tertiary:r.a3,neutral:r.n1,neutralVariant:r.n2,error:r.error},customColors:e.map((function(e){return function(t,e){var r=e.value,n=r,o=t;e.blend&&(r=I.harmonize(n,o));var a=R.of(r).a1;return{color:e,value:r,light:{color:a.tone(40),onColor:a.tone(100),colorContainer:a.tone(90),onColorContainer:a.tone(10)},dark:{color:a.tone(80),onColor:a.tone(20),colorContainer:a.tone(30),onColorContainer:a.tone(90)}}}(t,e)}))}}function F(t){var e=Math.round,r=t.length,n={};return"rgb"===t.slice(0,3).toLowerCase()?(t=t.replace(" ","").split(","),n[0]=parseInt(t[0].slice("a"===t[3].toLowerCase()?5:4),10),n[1]=parseInt(t[1],10),n[2]=parseInt(t[2],10),n[3]=t[3]?parseFloat(t[3]):-1):(t=r<6?parseInt(String(t[1])+t[1]+t[2]+t[2]+t[3]+t[3]+(r>4?String(t[4])+t[4]:""),16):parseInt(t.slice(1),16),n[0]=t>>16&255,n[1]=t>>8&255,n[2]=255&t,n[3]=9===r||5===r?e((t>>24&255)/255*1e4)/1e4:-1),n}function B(t,e,r){void 0===r&&(r=.5);var n=Math.round;t=t.trim(),e=e.trim(),r=r<0?-1*r:r;var o=F(t),a=F(e);return"r"===e[0]?"rgb"+("a"===e[3]?"a(":"(")+n((a[0]-o[0])*r+o[0])+","+n((a[1]-o[1])*r+o[1])+","+n((a[2]-o[2])*r+o[2])+(o[3]<0&&a[3]<0?"":","+(o[3]>-1&&a[3]>-1?n(1e4*((a[3]-o[3])*r+o[3]))/1e4:a[3]<0?o[3]:a[3]))+")":"#"+(4294967296+16777216*(o[3]>-1&&a[3]>-1?n(255*((a[3]-o[3])*r+o[3])):a[3]>-1?n(255*a[3]):o[3]>-1?n(255*o[3]):255)+65536*n((a[0]-o[0])*r+o[0])+256*n((a[1]-o[1])*r+o[1])+n((a[2]-o[2])*r+o[2])).toString(16).slice(o[3]>-1||a[3]>-1?1:3)}var N=1,U={uniqueNumber:function(){return N+=1},id:function(t,e){return void 0===t&&(t="xxxxxxxxxx"),void 0===e&&(e="0123456789abcdef"),$.uid(t,e)},mdPreloaderContent:'\n\t\t<span class="preloader-inner">\n\t\t\t<svg viewBox="0 0 36 36">\n\t\t\t\t<circle cx="18" cy="18" r="16"></circle>\n\t\t\t</svg>\n </span>\n '.trim(),iosPreloaderContent:('\n\t\t<span class="preloader-inner">\n\t\t\t'+[0,1,2,3,4,5,6,7].map((function(){return'<span class="preloader-inner-line"></span>'})).join("")+"\n\t\t</span>\n ").trim(),pcPreloaderContent:'\n <span class="preloader-inner">\n <span class="preloader-inner-circle"></span>\n </span>\n',eventNameToColonCase:function(t){var e;return t.split("").map((function(t,r){return t.match(/[A-Z]/)&&0!==r&&!e?(e=!0,":"+t.toLowerCase()):t.toLowerCase()})).join("")},deleteProps:function(t){$.deleteProps(t)},requestAnimationFrame:function(t){return $.requestAnimationFrame(t)},cancelAnimationFrame:function(t){return $.cancelAnimationFrame(t)},nextTick:function(t,e){return void 0===e&&(e=0),$.nextTick(t,e)},nextFrame:function(t){return $.nextFrame(t)},now:function(){return Date.now()},parseUrlQuery:function(t){return $.urlParam(t)},getTranslate:function(t,e){return void 0===e&&(e="x"),$.getTranslate(t,e)},serializeObject:function(t,e){if(void 0===e&&(e=[]),"string"==typeof t)return t;var r,n=[];function o(t){if(e.length>0){for(var r="",n=0;n<e.length;n+=1)r+=0===n?e[n]:"["+encodeURIComponent(e[n])+"]";return r+"["+encodeURIComponent(t)+"]"}return encodeURIComponent(t)}function a(t){return encodeURIComponent(t)}return Object.keys(t).forEach((function(i){var s;if(Array.isArray(t[i])){s=[];for(var c=0;c<t[i].length;c+=1)Array.isArray(t[i][c])||"object"!=typeof t[i][c]?s.push(o(i)+"[]="+a(t[i][c])):((r=e.slice()).push(i),r.push(String(c)),s.push(U.serializeObject(t[i][c],r)));s.length>0&&n.push(s.join("&"))}else null===t[i]||""===t[i]?n.push(o(i)+"="):"object"==typeof t[i]?((r=e.slice()).push(i),""!==(s=U.serializeObject(t[i],r))&&n.push(s)):void 0!==t[i]&&""!==t[i]?n.push(o(i)+"="+a(t[i])):""===t[i]&&n.push(o(i))})),n.join("&")},isObject:function(t){return"object"==typeof t&&null!==t&&t.constructor&&t.constructor===Object},merge:function(){var t;return(t=$).merge.apply(t,arguments)},extend:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var o=r[0];return r.splice(0,1),(t=$).assign.apply(t,[o].concat(r))},bindMethods:function(t,e){Object.keys(e).forEach((function(r){U.isObject(e[r])&&Object.keys(e[r]).forEach((function(n){"function"==typeof e[r][n]&&(e[r][n]=e[r][n].bind(t))})),t[r]=e[r]}))},flattenArray:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(){for(var t=[],e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((function(e){Array.isArray(e)?t.push.apply(t,flattenArray.apply(void 0,e)):t.push(e)})),t})),colorHexToRgb:function(t){var e=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,r,n){return e+e+r+r+n+n})),r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return r?r.slice(1).map((function(t){return parseInt(t,16)})):null},colorRgbToHex:function(t,e,r){return"#"+[t,e,r].map((function(t){var e=t.toString(16);return 1===e.length?"0"+e:e})).join("")},colorRgbToHsl:function(t,e,r){t/=255,e/=255,r/=255;var n,o=Math.max(t,e,r),a=Math.min(t,e,r),i=o-a;0===i?n=0:o===t?n=(e-r)/i%6:o===e?n=(r-t)/i+2:o===r&&(n=(t-e)/i+4);var s=(a+o)/2;return n<0&&(n=6+n),[60*n,0===i?0:i/(1-Math.abs(2*s-1)),s]},colorHslToRgb:function(t,e,r){var n,o=(1-Math.abs(2*r-1))*e,a=t/60,i=o*(1-Math.abs(a%2-1));Number.isNaN(t)||void 0===t?n=[0,0,0]:a<=1?n=[o,i,0]:a<=2?n=[i,o,0]:a<=3?n=[0,o,i]:a<=4?n=[0,i,o]:a<=5?n=[i,0,o]:a<=6&&(n=[o,0,i]);var s=r-o/2;return n.map((function(t){return Math.max(0,Math.min(255,Math.round(255*(t+s))))}))},colorHsbToHsl:function(t,e,r){var n={h:t,s:0,l:0},o=e,a=r;return n.l=(2-o)*a/2,n.s=n.l&&n.l<1?o*a/(n.l<.5?2*n.l:2-2*n.l):n.s,[n.h,n.s,n.l]},colorHslToHsb:function(t,e,r){var n={h:t,s:0,b:0},o=r,a=e*(o<.5?o:1-o);return n.b=o+a,n.s=o>0?2*a/n.b:n.s,[n.h,n.s,n.b]},getShadeTintColors:function(t){var e=colorRgbToHsl.apply(void 0,t),r=[e[0],e[1],Math.max(0,e[2]-.08)],n=[e[0],e[1],Math.max(0,e[2]+.08)];return{shade:colorRgbToHex.apply(void 0,colorHslToRgb.apply(void 0,r)),tint:colorRgbToHex.apply(void 0,colorHslToRgb.apply(void 0,n))}},colorThemeCSSProperties:function(){for(var t,e,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];if(1===n.length?(t=n[0],e=U.colorHexToRgb(t)):3===n.length&&(e=n,t=U.colorRgbToHex.apply(U,e)),!e)return{};var a=function(t){void 0===t&&(t="");var e=_(D("#"+t.replace("#","")));[.05,.08,.11,.12,.14].forEach((function(t,r){e.schemes.light.props["surface"+(r+1)]=D(B(q(e.schemes.light.props.surface),q(e.schemes.light.props.primary),t)),e.schemes.dark.props["surface"+(r+1)]=D(B(q(e.schemes.dark.props.surface),q(e.schemes.dark.props.primary),t))}));var r=function(t){return t.split("").map((function(t){return t.toUpperCase()===t&&"-"!==t&&"7"!==t?"-"+t.toLowerCase():t})).join("")},n=function(t){return["tertiary","shadow","scrim","error","background"].filter((function(e){return t.toLowerCase().includes(e)})).length>0},o={},a={};return Object.keys(e.schemes.light.props).forEach((function(t){n(t)||(o[r("--f7-md-"+t)]=q(e.schemes.light.props[t]))})),Object.keys(e.schemes.dark.props).forEach((function(t){n(t)||(a[r("--f7-md-"+t)]=q(e.schemes.dark.props[t]))})),{light:o,dark:a}}(t),i=a.light,s=a.dark,c=getShadeTintColors(e),f=getShadeTintColors(colorHexToRgb(i["--f7-md-primary"])),l=getShadeTintColors(colorHexToRgb(s["--f7-md-primary"]));return Object.keys(i).forEach((function(t){t.includes("surface-")&&(i[t+"-rgb"]=colorHexToRgb(i[t]))})),Object.keys(s).forEach((function(t){t.includes("surface-")&&(s[t+"-rgb"]=colorHexToRgb(s[t]))})),{ios:{"--f7-theme-color":"var(--f7-ios-primary)","--f7-theme-color-rgb":"var(--f7-ios-primary-rgb)","--f7-theme-color-shade":"var(--f7-ios-primary-shade)","--f7-theme-color-tint":"var(--f7-ios-primary-tint)"},md:{"--f7-theme-color":"var(--f7-md-primary)","--f7-theme-color-rgb":"var(--f7-md-primary-rgb)","--f7-theme-color-shade":"var(--f7-md-primary-shade)","--f7-theme-color-tint":"var(--f7-md-primary-tint)"},light:u({"--f7-ios-primary":t,"--f7-ios-primary-shade":c.shade,"--f7-ios-primary-tint":c.tint,"--f7-ios-primary-rgb":e.join(", "),"--f7-md-primary-shade":f.shade,"--f7-md-primary-tint":f.tint,"--f7-md-primary-rgb":colorHexToRgb(i["--f7-md-primary"]).join(", ")},i),dark:u({"--f7-md-primary-shade":l.shade,"--f7-md-primary-tint":l.tint,"--f7-md-primary-rgb":colorHexToRgb(s["--f7-md-primary"]).join(", ")},s)}},colorThemeCSSStyles:function(t){void 0===t&&(t={});var e=function(t){var e="";return Object.keys(t).forEach((function(r){e+=r+":"+t[r]+";"})),e},r=colorThemeCSSProperties(t.primary),n=[":root{",e(r.light),"--swiper-theme-color:var(--f7-theme-color);"].concat(Object.keys(t).map((function(e){return"--f7-color-"+e+": "+t[e]+";"})),["}",".dark{",e(r.dark),"}",".ios, .ios .dark{",e(r.ios),"}",".md, .md .dark{",e(r.md),"}"]).join(""),o={};Object.keys(t).forEach((function(e){var r=t[e];o[e]=colorThemeCSSProperties(r)}));var a="";return Object.keys(t).forEach((function(r){var n=o[r],i=n.light,s=n.dark,c=n.ios,u=n.md,f="\n\t\t\t--f7-ios-primary: #ffffff;\n\t\t\t--f7-ios-primary-shade: #ebebeb;\n\t\t\t--f7-ios-primary-tint: #ffffff;\n\t\t\t--f7-ios-primary-rgb: 255, 255, 255;\n\t\t\t--f7-md-primary-shade: #eee;\n\t\t\t--f7-md-primary-tint: #fff;\n\t\t\t--f7-md-primary-rgb: 255, 255, 255;\n\t\t\t--f7-md-primary: #fff;\n\t\t\t--f7-md-on-primary: #000;\n\t\t\t--f7-md-primary-container: #fff;\n\t\t\t--f7-md-on-primary-container: #000;\n\t\t\t--f7-md-secondary: #fff;\n\t\t\t--f7-md-on-secondary: #000;\n\t\t\t--f7-md-secondary-container: #555;\n\t\t\t--f7-md-on-secondary-container: #fff;\n\t\t\t--f7-md-surface: #fff;\n\t\t\t--f7-md-on-surface: #000;\n\t\t\t--f7-md-surface-variant: #333;\n\t\t\t--f7-md-on-surface-variant: #fff;\n\t\t\t--f7-md-outline: #fff;\n\t\t\t--f7-md-outline-variant: #fff;\n\t\t\t--f7-md-inverse-surface: #000;\n\t\t\t--f7-md-inverse-on-surface: #fff;\n\t\t\t--f7-md-inverse-primary: #000;\n\t\t\t--f7-md-surface-1: #f8f8f8;\n\t\t\t--f7-md-surface-2: #f1f1f1;\n\t\t\t--f7-md-surface-3: #e7e7e7;\n\t\t\t--f7-md-surface-4: #e1e1e1;\n\t\t\t--f7-md-surface-5: #d7d7d7;\n\t\t\t--f7-md-surface-variant-rgb: 51, 51, 51;\n\t\t\t--f7-md-on-surface-variant-rgb: 255, 255, 255;\n\t\t\t--f7-md-surface-1-rgb: 248, 248, 248;\n\t\t\t--f7-md-surface-2-rgb: 241, 241, 241;\n\t\t\t--f7-md-surface-3-rgb: 231, 231, 231;\n\t\t\t--f7-md-surface-4-rgb: 225, 225, 225;\n\t\t\t--f7-md-surface-5-rgb: 215, 215, 215;\n\t\t\t",l="\n\t\t\t--f7-ios-primary: #000;\n\t\t\t--f7-ios-primary-shade: #000;\n\t\t\t--f7-ios-primary-tint: #232323;\n\t\t\t--f7-ios-primary-rgb: 0, 0, 0;\n\t\t\t--f7-md-primary-shade: #000;\n\t\t\t--f7-md-primary-tint: #232323;\n\t\t\t--f7-md-primary-rgb: 0, 0, 0;\n\t\t\t--f7-md-primary: #000;\n\t\t\t--f7-md-on-primary: #fff;\n\t\t\t--f7-md-primary-container: #000;\n\t\t\t--f7-md-on-primary-container: #fff;\n\t\t\t--f7-md-secondary: #000;\n\t\t\t--f7-md-on-secondary: #fff;\n\t\t\t--f7-md-secondary-container: #aaa;\n\t\t\t--f7-md-on-secondary-container: #000;\n\t\t\t--f7-md-surface: #000;\n\t\t\t--f7-md-on-surface: #fff;\n\t\t\t--f7-md-surface-variant: #ccc;\n\t\t\t--f7-md-on-surface-variant: #000;\n\t\t\t--f7-md-outline: #000;\n\t\t\t--f7-md-outline-variant: #000;\n\t\t\t--f7-md-inverse-surface: #fff;\n\t\t\t--f7-md-inverse-on-surface: #000;\n\t\t\t--f7-md-inverse-primary: #fff;\n\t\t\t--f7-md-surface-1: #070707;\n\t\t\t--f7-md-surface-2: #161616;\n\t\t\t--f7-md-surface-3: #232323;\n\t\t\t--f7-md-surface-4: #303030;\n\t\t\t--f7-md-surface-5: #373737;\n\t\t\t--f7-md-surface-variant-rgb: 204, 204, 204;\n\t\t\t--f7-md-on-surface-variant-rgb: 0, 0, 0;\n\t\t\t--f7-md-surface-1-rgb: 7, 7, 7;\n\t\t\t--f7-md-surface-2-rgb: 22, 22, 22;\n\t\t\t--f7-md-surface-3-rgb: 35, 35, 35;\n\t\t\t--f7-md-surface-4-rgb: 48, 48, 48;\n\t\t\t--f7-md-surface-5-rgb: 55, 55, 55;\n\t\t\t",d="white"===r?f:"black"===r?l:e(i),p="white"===r?f:"black"===r?l:e(s);a+=[".color-"+r+" {",d,"--swiper-theme-color: var(--f7-theme-color);","}",".color-"+r+".dark, .color-"+r+" .dark, .dark .color-"+r+" {",p,"--swiper-theme-color: var(--f7-theme-color);","}",".ios .color-"+r+", .ios.color-"+r+", .ios .dark .color-"+r+", .ios .dark.color-"+r+" {",e(c),"}",".md .color-"+r+", .md.color-"+r+", .md .dark .color-"+r+", .md .dark.color-"+r+" {",e(u),"}",".text-color-"+r+" {","--f7-theme-color-text-color: "+t[r]+";","}",".bg-color-"+r+" {","--f7-theme-color-bg-color: "+t[r]+";","}",".border-color-"+r+" {","--f7-theme-color-border-color: "+t[r]+";","}",".ripple-color-"+r+" {","--f7-theme-color-ripple-color: rgba("+i["--f7-ios-primary-rgb"]+", 0.3);","}"].join("")})),""+n+a}},W=function(){function t(t,e,r){void 0===t&&(t={}),void 0===e&&(e=[]),void 0===r&&(r="");var n=this;n.params=t,e?Array.isArray(e)?n.eventsParents=e.filter((function(t){return t})):n.eventsParents=[e]:n.eventsParents=[],n.eventsListeners={},n.pre=r,n.params&&n.params.on&&Object.keys(n.params.on).forEach((function(t){n.on(t,n.params.on[t])}))}var e=t.prototype;return e.on=function(t,e,r){void 0===r&&(r=!1);var n=this;if("function"!=typeof e)return n;var o=r?"unshift":"push";return t.split(" ").forEach((function(t){var r={owner:"",appName:"",handler:e};if(t.includes("app::")){var a=null;if($.isPage(n)?a=n:$.isPage(null==n?void 0:n.page)?a=n.page:$.isPage(null==n?void 0:n.parent)&&(a=n.parent),a&&a.app&&$.isApp(a.app)){r.owner=a.owner,r.appName=a.appName;var i=a.app,s=t.replace("app::","");i.eventsListeners[s]||(i.eventsListeners[s]=[]),i.eventsListeners[s][o](r)}}else n.eventsListeners[t]||(n.eventsListeners[t]=[]),n.eventsListeners[t][o](r)})),n},e.once=function(t,e,r){void 0===r&&(r=!1);var n=this;if("function"!=typeof e)return n;function o(){if(n.off(t,o),o.proxy){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];o.proxy.apply(n,r),delete o.proxy}}return o.proxy=e,n.on(t,o,r)},e.off=function(t,e){var r=this;return r.eventsListeners?(t?t.split(" ").forEach((function(t){if(void 0===e)r.eventsListeners[t]=[];else if(r.eventsListeners[t])for(var n=r.eventsListeners[t],o=n.length-1;o>=0;o--){var a,i=n[o];i.handler!==e&&(null==(a=i.handler)?void 0:a.proxy)!==e||n.splice(o,1)}})):r.eventsListeners={},r):r},e.emit=function(){var t,e,r,n,o,a=this;if(!a.eventsListeners)return a;for(var i=!1,s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];var f=c[0];if(!f)return a;"string"==typeof f||Array.isArray(f)?(f=f.split(" "),a.pre?(e=[],f.forEach((function(t){e.push("."+t),e.push(""+a.pre+t[0].toUpperCase()+t.substr(1))}))):e=f,r=c.slice(1,c.length),n=a,o=a.eventsParents):(i=f.pop,e=f.events,r=f.data,n=f.context||a,o=f.local?[]:f.parents||a.eventsParents);var l=Array.isArray(e)?e:e.split(" "),d=l.map((function(t){return t.replace(/local::|^[.]/,"")})),p=null;if(i)p=f;else{var m=l.filter((function(t){return!t.match(/^local::|^[.]/)}));null!=m&&m.length&&(p={pop:!0,events:m,context:a,data:r,owner:"",appName:""})}return p&&$.isPage(a)&&(p.owner=null==a?void 0:a.owner,p.appName=null==a?void 0:a.appName),d.forEach((function(t){if(a.eventsListeners&&a.eventsListeners[t]){var e=[];a.eventsListeners[t].forEach((function(r){r.owner&&r.appName?i&&r.owner===t.owner&&r.appName===t.appName&&e.push(r.handler):e.push(r.handler)})),e.forEach((function(t){t.apply(n,r)}))}})),p&&(null==(t=o)?void 0:t.length)>0&&o.forEach((function(t){return t.emit(p)})),a},t}(),V=function(t){function e(e,r,n,o){var a;return(a=t.call(this,null,[e])||this).app=e,a.cfg=e.cfg,a.name=r,a.title=n,a.style=o||"./page/"+r+".css",a.owner="",a.appName="",a.path="",a.view=null,a.dom=null,a.$el=null,a.el=null,a.html="",a.css="",a.js="",a.data={},a.param={},a}c(e,t);var r=e.prototype;return r.load=function(t){this.emit("local::load pageLoad",t),this.emit("pageLoad",this)},r.ready=function(t,e,r){this.init(),this.emit("local::ready",t,e,r),this.emit("pageReady",this)},r.init=function(t){var e=this.view;t=t?$(t):e},r.show=function(t,e){t.qus("[name$=-tp]").hide(),t.qus('a[href=""]').attr("href","javascript:;"),this.reset&&this.reset(),this.emit("local::show",t,e),this.emit("pageShow",this)},r.back=function(t,e){t.qus("[name$=-tp]").hide(),t.qus('a[href=""]').attr("href","javascript:;"),this.emit("local::back",t,e),this.emit("pageBack",this)},r.hide=function(t){this.emit("local::hide",t),this.emit("pageHide",this)},r.unload=function(t){this.emit("local::unload",t),this.emit("pageUnload",this)},e}(W),G=function(t){function e(e,r){var n;return void 0===e&&(e={}),void 0===r&&(r=[]),i(n=t.call(this,e,r)||this).params=e,n}c(e,t);var r=e.prototype;return r.useModuleParams=function(t,e){if(t.params){var r={};Object.keys(t.params).forEach((function(t){void 0!==e[t]&&(r[t]=$.extend({},e[t]))})),$.extend(e,t.params),Object.keys(r).forEach((function(t){$.extend(e[t],r[t])}))}},r.useModulesParams=function(t){var e=this;e.modules&&Object.keys(e.modules).forEach((function(r){var n=e.modules[r];n.params&&$.extend(t,n.params)}))},r.useModule=function(t,e){void 0===t&&(t=""),void 0===e&&(e={});var r=this;if(r.modules){var n="string"==typeof t?r.modules[t]:t;n&&(n.instance&&Object.keys(n.instance).forEach((function(t){var e=n.instance[t];r[t]="function"==typeof e?e.bind(r):e})),n.on&&r.on&&Object.keys(n.on).forEach((function(t){r.on(t,n.on[t])})),n.vnode&&(r.vnodeHooks||(r.vnodeHooks={}),Object.keys(n.vnode).forEach((function(t){Object.keys(n.vnode[t]).forEach((function(e){var o=n.vnode[t][e];r.vnodeHooks[e]||(r.vnodeHooks[e]={}),r.vnodeHooks[e][t]||(r.vnodeHooks[e][t]=[]),r.vnodeHooks[e][t].push(o.bind(r))}))}))),n.create&&n.create.bind(r)(e))}},r.useModules=function(t){void 0===t&&(t={});var e=this;e.modules&&Object.keys(e.modules).forEach((function(r){var n=t[r]||{};e.useModule(r,n)}))},e.installModule=function(t){var e=this;e.prototype.modules||(e.prototype.modules={});var r=t.name||Object.keys(e.prototype.modules).length+"_"+$.now();if(e.prototype.modules[r]=t,t.proto&&Object.keys(t.proto).forEach((function(r){e.prototype[r]=t.proto[r]})),t.static&&Object.keys(t.static).forEach((function(r){e[r]=t.static[r]})),t.install){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];t.install.apply(e,o)}return e},e.use=function(t){var e=this;if(Array.isArray(t))return t.forEach((function(t){return e.installModule(t)})),e;for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return e.installModule.apply(e,[t].concat(n))},a(e,null,[{key:"components",set:function(t){this.use&&this.use(t)}}]),e}(W);function Y(t,e,r){return Y=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}}()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&s(o,r.prototype),o},Y.apply(null,arguments)}function J(t){void 0===t&&(t={});var e=t,r=e.defaultSelector,n=e.constructor,o=e.domProp,a=e.app,i=e.addMethods,s={create:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Y(n,a?[a].concat(e):e)},get:function(t){if(void 0===t&&(t=r),t instanceof n)return t;var e=$(t);return 0!==e.length?e[0][o]:void 0},destroy:function(t){var e=s.get(t);if(e&&e.destroy)return e.destroy()}};return i&&Array.isArray(i)&&i.forEach((function(t){s[t]=function(e){void 0===e&&(e=r);for(var n=s.get(e),o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];if(n&&n[t])return n[t].apply(n,a)}})),s}function X(t){void 0===t&&(t={});var e=t,r=e.defaultSelector,n=e.constructor,o=e.app;return $.extend(J({defaultSelector:r,constructor:n,app:o,domProp:"f7Modal"}),{open:function(t,e,r){var a=$(t);if(a.length>1&&r){var i=$(r).parents(".page");i.length&&a.each((function(t){var e=$(t);e.parents(i)[0]===i[0]&&(a=e)}))}if(a.length>1&&(a=a.eq(a.length-1)),a.length){var s=a[0].f7Modal;if(!s){var c=a.dataset();s=new n(o,u({el:a},c))}return s.open(e)}},close:function(t,e,a){void 0===t&&(t=r);var i=$(t);if(i.length){if(i.length>1){var s;if(a){var c=$(a);c.length&&(s=c.parents(i))}i=s&&s.length>0?s:i.eq(i.length-1)}var f=i[0].f7Modal;if(!f){var l=i.dataset();f=new n(o,u({el:i},l))}return f.close(e)}}})}var Q=[];function Z(t){var e=this;return new Promise((function(r,n){var o,a,i,s=e.instance;if(t){if("string"==typeof t){var c=t.match(/([a-z0-9-]*)/i);if(t.indexOf(".")<0&&c&&c[0].length===t.length){if(!s||s&&!s.params.lazyModulesPath)return void n(new Error('Wia: "lazyModulesPath" app parameter must be specified to fetch module by name'));o=s.params.lazyModulesPath+"/"+t+".js"}else o=t}else"function"==typeof t?i=t:a=t;if(i){var u=i(e,!1);if(!u)return void n(new Error("Wia: Can't find Wia component in specified component function"));if(e.prototype.modules&&e.prototype.modules[u.name])return void r();p(u),r()}if(a){var f=a;if(!f)return void n(new Error("Wia: Can't find Wia component in specified component"));if(e.prototype.modules&&e.prototype.modules[f.name])return void r();p(f),r()}if(o){if(Q.indexOf(o)>=0)return void r();Q.push(o);var l=new Promise((function(t,r){e.request.get(o,(function(n){var a="wia_component_loader_callback_"+$.id(),i=document.createElement("script");i.innerHTML="window."+a+" = function (Wia, WiaAutoInstallComponent) {return "+n.trim()+"}",$("head").append(i);var s=window[a];delete window[a],$(i).remove();var c=s(e,!1);c?(e.prototype.modules&&e.prototype.modules[c.name]||p(c),t()):r(new Error("Wia: Can't find Wia component in "+o+" file"))}),(function(t,e){r(t,e)}))})),d=new Promise((function(t){e.request.get(o.replace(".js",s.rtl?".rtl.css":".css"),(function(e){var r=document.createElement("style");r.innerHTML=e,$("head").append(r),t()}),(function(){t()}))}));Promise.all([l,d]).then((function(){r()})).catch((function(t){n(t)}))}}else n(new Error("Wia: Lazy module must be specified"));function p(t){e.use(t),s&&(s.useModuleParams(t,s.params),s.useModule(t))}}))}function K(t,e){for(var r=e||{},n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];var i=o||[],s=Object.keys(r).map((function(t){return"_"===t[0]?r[t]?t.replace("_",""):"":t+'="'+r[t]+'"'})).filter((function(t){return!!t})).join(" ");return["path","img","circle","polygon","line","input"].indexOf(t)>=0?("<"+t+" "+s+" />").trim():("<"+t+" "+s+">"+i.filter((function(t){return!!t})).map((function(t){return Array.isArray(t)?t.join(""):t})).join("")+"</"+t+">").trim()}var tt={name:"resize",instance:{getSize:function(){var t=this;if(!t.root[0])return{width:0,height:0,left:0,top:0};var e=t.root.offset(),r=[t.root[0].offsetWidth,t.root[0].offsetHeight,e.left,e.top],n=r[0],o=r[1],a=r[2],i=r[3];return t.width=n,t.height=o,t.left=a,t.top=i,{width:n,height:o,left:a,top:i}}},on:{init:function(){var t=this;t.getSize(),window.addEventListener("resize",(function(){t.emit("resize")}),!1),window.addEventListener("orientationchange",(function(){t.emit("orientationchange")}))},orientationchange:function(){this.device.ipad&&(document.body.scrollLeft=0,setTimeout((function(){document.body.scrollLeft=0}),0))},resize:function(){this.getSize()}}};function et(t){var e,r,n;e=function(e){t.emit({events:"click",data:[e]})},$.support.touch?(document.addEventListener("touchstart",(function(t){r=t.changedTouches[0].clientX,n=t.changedTouches[0].clientY}),!0),document.addEventListener("touchend",(function(t){var o=Math.abs(t.changedTouches[0].clientX-r),a=Math.abs(t.changedTouches[0].clientY-n);o<=5&&a<=5&&e.call(this,t)}),!0)):document.addEventListener("click",e,!0),t.on("click",(function(e){var r=$(e.target),n=r.closest("a");n.length>0&&n.attr("href"),Object.keys(t.modules).forEach((function(n){var o=t.modules[n].clicks;o&&(e.preventF7Router||Object.keys(o).forEach((function(n){var a=r.closest(n).eq(0);a.length>0&&o[n].call(t,a,a.dataset(),e)})))}))}))}var rt={name:"clicks",params:{clicks:{externalLinks:".ext"}},on:{init:function(){et(this)}}},nt={registrations:[],register:function(t,e){var r=this;return"serviceWorker"in window.navigator&&r.serviceWorker.container?new Promise((function(n,o){r.serviceWorker.container.register(t,e?{scope:e}:{}).then((function(t){nt.registrations.push(t),r.emit("serviceWorkerRegisterSuccess",t),n(t)})).catch((function(t){r.emit("serviceWorkerRegisterError",t),o(t)}))})):new Promise((function(t,e){e(new Error("Service worker is not supported"))}))},unregister:function(t){var e,r=this;return"serviceWorker"in window.navigator&&r.serviceWorker.container?(e=t?Array.isArray(t)?t:[t]:nt.registrations,Promise.all(e.map((function(t){return new Promise((function(e,n){t.unregister().then((function(){nt.registrations.indexOf(t)>=0&&nt.registrations.splice(nt.registrations.indexOf(t),1),r.emit("serviceWorkerUnregisterSuccess",t),e()})).catch((function(e){r.emit("serviceWorkerUnregisterError",t,e),n(e)}))}))})))):new Promise((function(t,e){e(new Error("Service worker is not supported"))}))}},ot={name:"sw",params:{serviceWorker:{path:void 0,scope:void 0}},create:function(){var t=this;$.extend(t,{serviceWorker:{container:"serviceWorker"in window.navigator?window.navigator.serviceWorker:void 0,registrations:nt.registrations,register:nt.register.bind(t),unregister:nt.unregister.bind(t)}})},on:{init:function(){if("serviceWorker"in window.navigator){var t=this;if(!(t.device.cordova||window.Capacitor&&window.Capacitor.isNative)&&t.serviceWorker.container){var e=t.params.serviceWorker.path,r=t.params.serviceWorker.scope;!e||Array.isArray(e)&&!e.length||(Array.isArray(e)?e:[e]).forEach((function(e){t.serviceWorker.register(e,r)}))}}}}},at=U.extend,it=U.nextFrame,st=$,ct=st.Support,ut=st.Device,ft={version:"1.0.1",el:"body",root:"body",theme:"auto",language:window.navigator.language,routes:[],name:"App",lazyModulesPath:null,initOnDeviceReady:!0,darkMode:void 0,iosTranslucentBars:!0,iosTranslucentModals:!0,component:void 0,componentUrl:void 0,userAgent:null,url:null,colors:{primary:"#007aff",red:"#ff3b30",green:"#4cd964",blue:"#2196f3",pink:"#ff2d55",yellow:"#ffcc00",orange:"#ff9500",purple:"#9c27b0",deeppurple:"#673ab7",lightblue:"#5ac8fa",teal:"#009688",lime:"#cddc39",deeporange:"#ff6b22",white:"#ffffff",black:"#000000"}},lt=function(t){function e(r){var n;if(void 0===r&&(r={}),n=t.call(this,r)||this,e.instance&&"undefined"!=typeof window)throw new Error("App is already initialized and can't be initialized more than once");var o=at({},r),a=i(n);return $.App=e,e.instance=a,a.device=ut,a.support=ct,console.log("App constructor",{Device:ut,Support:ct}),a.useModulesParams(ft),a.params=at(ft,r),r.root&&!r.el&&(a.params.el=r.root),$.isPage=function(t){return t instanceof V},$.isApp=function(t){return t instanceof e},at(a,{owner:a.params.owner,name:a.params.name,id:a.params.owner+"."+a.params.name,version:a.params.version,routes:a.params.routes,language:a.params.language,cfg:a.params.cfg,api:a.params.api,theme:"auto"===a.params.theme?ut.ios?"ios":ut.desktop?"pc":"md":a.params.theme,passedParams:o,online:window.navigator.onLine,colors:a.params.colors,darkMode:a.params.darkMode}),r.store&&(a.params.store=params.store),a.touchEvents={start:ct.touch?"touchstart":ct.pointerEvents?"pointerdown":"mousedown",move:ct.touch?"touchmove":ct.pointerEvents?"pointermove":"mousemove",end:ct.touch?"touchend":ct.pointerEvents?"pointerup":"mouseup"},a.useModules(),a.initData(),a.params.init&&(ut.cordova&&a.params.initOnDeviceReady?$(document).on("deviceready",(function(){a.init()})):a.init()),a||i(n)}c(e,t);var r=e.prototype;return r.load=function(t){this.emit("local::load appLoad",t)},r.show=function(t,e){this.emit("local::show appShow",t,e)},r.hide=function(){this.emit("local::hide appHide")},r.unload=function(){this.emit("local::unload appUnload")},r.setColorTheme=function(t){t&&(this.colors.primary=t,this.setColors())},r.setColors=function(){var t=this;t.colorsStyleEl||(t.colorsStyleEl=document.createElement("style"),document.head.appendChild(t.colorsStyleEl)),t.colorsStyleEl.textContent=t.utils.colorThemeCSSStyles(t.colors)},r.mount=function(t){var e=this,r=$(t||e.params.el).eq(0);at(e,{root:r,$el:r,el:null==r?void 0:r[0],rtl:"rtl"===r.css("direction")}),e.root&&e.root[0]&&(e.root[0].wia=e),e.$el&&e.$el[0]&&(e.$el[0].wia=e),e.el.f7=e;var n="(prefers-color-scheme: dark)",o="(prefers-color-scheme: light)";e.mq={},window.matchMedia&&(e.mq.dark=window.matchMedia(n),e.mq.light=window.matchMedia(o)),e.colorSchemeListener=function(t){var r=t.matches,a=t.media;if(r){var i=document.querySelector("html");a===n?(i.classList.add("dark"),e.darkMode=!0,e.emit("darkModeChange",!0)):a===o&&(i.classList.remove("dark"),e.darkMode=!1,e.emit("darkModeChange",!1))}},e.emit("mount")},r.initData=function(){var t=this;t.data={},t.params.data&&"function"==typeof t.params.data?$.extend(t.data,t.params.data.bind(t)()):t.params.data&&$.extend(t.data,t.params.data),t.methods={},t.params.methods&&Object.keys(t.params.methods).forEach((function(e){"function"==typeof t.params.methods[e]?t.methods[e]=t.params.methods[e].bind(t):t.methods[e]=t.params.methods[e]}))},r.enableAutoDarkTheme=function(){if(window.matchMedia){var t=this,e=document.querySelector("html");t.mq.dark&&t.mq.light&&(t.mq.dark.addListener(t.colorSchemeListener),t.mq.light.addListener(t.colorSchemeListener)),t.mq.dark&&t.mq.dark.matches?(e.classList.add("dark"),t.darkMode=!0,t.emit("darkModeChange",!0)):t.mq.light&&t.mq.light.matches&&(e.classList.remove("dark"),t.darkMode=!1,t.emit("darkModeChange",!1))}},r.disableAutoDarkTheme=function(){if(window.matchMedia){var t=this;t.mq.dark&&t.mq.dark.removeListener(t.colorSchemeListener),t.mq.light&&t.mq.light.removeListener(t.colorSchemeListener)}},r.setDarkMode=function(t){var e=this;"auto"===t?e.enableAutoDarkMode():(e.disableAutoDarkMode(),$("html")[t?"addClass":"removeClass"]("dark"),e.darkMode=t)},r.initAppComponent=function(t){var e=this;e.router.componentLoader(e.params.component,e.params.componentUrl,{componentOptions:{el:e.$el[0]}},(function(r){e.$el=$(r),e.$el[0].wia=e,e.$elComponent=r.f7Component,e.el=e.$el[0],t&&t()}),(function(){}))},r.init=function(t){var e=this;e.setColors(),e.mount(t);var r=function(){if(e.initialized)return e;var t,r,n;e.$el.addClass("framework7-initializing"),e.rtl&&$("html").attr("dir","rtl"),void 0===e.params.darkMode?e.darkMode=$("html").hasClass("dark"):e.setDarkMode(e.params.darkMode),window.addEventListener("offline",(function(){e.online=!1,e.emit("offline"),e.emit("connection",!1)})),window.addEventListener("online",(function(){e.online=!0,e.emit("online"),e.emit("connection",!0)})),e.$el.addClass("framework7-root"),$("html").removeClass("ios md pc").addClass(e.theme),e.params.iosTranslucentBars&&"ios"===e.theme&&$("html").addClass("ios-translucent-bars"),e.params.iosTranslucentModals&&"ios"===e.theme&&$("html").addClass("ios-translucent-modals"),it((function(){e.$el.removeClass("framework7-initializing")})),t=[],r=document.querySelector("html"),n=document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]'),r&&(ut.standalone&&ut.ios&&n&&"black-translucent"===n.content&&t.push("device-full-viewport"),t.push("device-pixel-ratio-"+Math.floor(ut.pixelRatio)),ut.os&&!ut.desktop?t.push("device-"+ut.os):ut.desktop&&(t.push("device-desktop"),ut.os&&t.push("device-"+ut.os)),(ut.cordova||ut.phonegap)&&t.push("device-cordova"),t.forEach((function(t){r.classList.add(t)}))),e.initialized=!0,e.emit("init")};return e.params.component||e.params.componentUrl?e.initAppComponent((function(){r()})):r(),e},r.loadModule=function(t){e.loadModule(t),this[t.name].init&&this[t.name].init()},r.loadModules=function(){return e.loadModules.apply(e,arguments)},r.getVnodeHooks=function(t,e){var r=this;return r.vnodeHooks&&r.vnodeHooks[t]&&r.vnodeHooks[t][e]||[]},a(e,[{key:"$",get:function(){return $}}],[{key:"Dom",get:function(){return $}},{key:"$",get:function(){return $}},{key:"Module",get:function(){return G}},{key:"Event",get:function(){return W}},{key:"Class",get:function(){return G}},{key:"Events",get:function(){return W}}]),e}(G);lt.apps={},lt.jsx=K,lt.ModalMethods=X,lt.ConstructorMethods=J,lt.loadModule=Z,lt.loadModules=function(t){return Promise.all(t.map((function(t){return lt.loadModule(t)})))},lt.support=ct,lt.device=ut,lt.utils=U,lt.use([tt,rt,ot]);var dt,pt,mt,ht,vt={normal:"nor",retina:"ret",srcset:"set",threshold:0},yt=window.innerHeight,gt=kt(),bt=document.body.classList.contains("srcset")||"srcset"in document.createElement("img"),wt=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI,Ct=function(){function t(t){dt=$.assign({},vt,t)}var e=t.prototype;return e.start=function(t){return["scroll","resize"].forEach((function(e){return t.addEventListener(e,Mt)})),ht=t,this},e.stop=function(){return["scroll","resize"].forEach((function(t){return ht.removeEventListener(t,Mt)})),this},e.update=function(){setTimeout((function(){Et(),At()}),1)},t}();function kt(){return window.scrollY||window.pageYOffset}function Mt(){gt=kt(),pt||(window.requestAnimationFrame((function(){return At()})),pt=!0)}function St(t){var e=gt,r=e+yt,n=function(t){return t.getBoundingClientRect().top+gt}(t),o=n+t.offsetHeight,a=dt.threshold/100*yt;return o>=e-a&&n<=r+a}function At(){if(mt)return yt=window.innerHeight,mt.forEach((function(t){return St(t)&&function(t){if($.emit("lazy:src:before",t),bt&&t.hasAttribute(dt.srcset))t.setAttribute("srcset",t.getAttribute(dt.srcset));else{var e=wt>1&&t.getAttribute(dt.retina)||t.getAttribute(dt.normal);t.setAttribute("src",e),console.log("set src:"+e)}$.emit("lazy:src:after",t),[dt.normal,dt.retina,dt.srcset].forEach((function(e){return t.removeAttribute(e)})),Et()}(t)})),pt=!1,this}function Et(t){return mt=t?Array.prototype.slice.call(t.querySelectorAll("["+dt.normal+"]")):Array.prototype.slice.call(document.querySelectorAll("["+dt.normal+"]")),this}var Ot=[],$t=[],Lt=function(t){function e(e,r){var n,o=i(n=t.call(this,r,[e])||this);return o.params=U.extend({},r),o.opened=!1,i(n)||i(n)}c(e,t);var r=e.prototype;return r.onOpen=function(){var t=this;t.opened=!0,Ot.push(t),$("html").addClass("with-modal-"+t.type.toLowerCase()),t.$el.trigger("modal:open "+t.type.toLowerCase()+":open"),t.emit("local::open modalOpen "+t.type+"Open",t)},r.onOpened=function(){var t=this;t.$el.trigger("modal:opened "+t.type.toLowerCase()+":opened"),t.emit("local::opened modalOpened "+t.type+"Opened",t)},r.onClose=function(){var t=this;t.opened=!1,t.type&&t.$el&&(Ot.splice(Ot.indexOf(t),1),$("html").removeClass("with-modal-"+t.type.toLowerCase()),t.$el.trigger("modal:close "+t.type.toLowerCase()+":close"),t.emit("local::close modalClose "+t.type+"Close",t))},r.onClosed=function(){var t=this;t.type&&t.$el&&(t.$el.removeClass("modal-out"),t.$el.hide(),t.$el.trigger("modal:closed "+t.type.toLowerCase()+":closed"),t.emit("local::closed modalClosed "+t.type+"Closed",t))},r.open=function(t){var e,r=this,n=r.app,o=r.$el,a=r.type,i=r.$backdropEl,s=r.params.moveToRoot,c=!0;if(void 0!==t?c=t:void 0!==r.params.animate&&(c=r.params.animate),!o||o.hasClass("modal-in"))return r;if("dialog"===a&&n.params.modal.queueDialogs&&($(".dialog.modal-in").length>0?e=!0:Ot.length>0&&Ot.forEach((function(t){"dialog"===t.type&&(e=!0)})),e))return $t.push(r),r;var u=o.parent(),f=o.parents(document).length>0;function l(){o.hasClass("modal-out")?r.onClosed():o.hasClass("modal-in")&&r.onOpened()}return s&&n.params.modal.moveToRoot&&!u.is(n.root)&&(n.root.append(o),r.once(a+"Closed",(function(){f?u.append(o):o.remove()}))),o.show(),r._clientLeft=o[0].clientLeft,c?(i&&(i.removeClass("not-animated"),i.addClass("backdrop-in")),o.animationEnd((function(){l()})),o.transitionEnd((function(){l()})),o.removeClass("modal-out not-animated").addClass("modal-in"),r.onOpen()):(i&&i.addClass("backdrop-in not-animated"),o.removeClass("modal-out").addClass("modal-in not-animated"),r.onOpen(),r.onOpened()),r},r.close=function(t){var e=this,r=e.$el,n=e.$backdropEl,o=!0;if(void 0!==t?o=t:void 0!==e.params.animate&&(o=e.params.animate),!r||!r.hasClass("modal-in"))return $t.indexOf(e)>=0&&$t.splice($t.indexOf(e),1),e;if(n){var a=!0;"popup"===e.type&&e.$el.prevAll(".popup.modal-in").each((function(t,r){var n=r.f7Modal;n&&n.params.closeByBackdropClick&&n.params.backdrop&&n.backdropEl===e.backdropEl&&(a=!1)})),a&&(n[o?"removeClass":"addClass"]("not-animated"),n.removeClass("backdrop-in"))}function i(){r.hasClass("modal-out")?e.onClosed():r.hasClass("modal-in")&&e.onOpened()}return r[o?"removeClass":"addClass"]("not-animated"),o?(r.animationEnd((function(){i()})),r.transitionEnd((function(){i()})),r.removeClass("modal-in").addClass("modal-out"),e.onClose()):(r.addClass("not-animated").removeClass("modal-in").addClass("modal-out"),e.onClose(),e.onClosed()),"dialog"===e.type&&0!==$t.length&&$t.shift().open(),e},r.destroy=function(){var t=this;t.destroyed||(t.emit("local::beforeDestroy modalBeforeDestroy "+t.type+"BeforeDestroy",t),t.$el&&(t.$el.trigger("modal:beforedestroy "+t.type.toLowerCase()+":beforedestroy"),t.$el.length&&t.$el[0].f7Modal&&delete t.$el[0].f7Modal),U.deleteProps(t),t.destroyed=!0)},e}(W),Pt=$.support,Tt=$.device;t.Ajax=e,t.App=lt,t.Constructors=J,t.Device=Tt,t.Event=W,t.Lazy=Ct,t.Modal=Lt,t.Modals=X,t.Module=G,t.Page=V,t.Resize=tt,t.SW=ot,t.Support=Pt,t.Utils=U,t.jsx=K,t.loadModule=Z},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@wiajs/core"]={});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wiajs/core",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "wia app core package. refer to Framework7.",
5
5
  "main": "index.js",
6
6
  "types": "dist/core.d.ts",