UNPKG

iportal

Version:

web-portal

1 lines 52.4 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ioing={})}(this,function(t){"use strict";function e(t,e){function i(){this.constructor=t}if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");T(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function i(t,s,a,u){return new(a=a||Promise)(function(i,e){function n(t){try{r(u.next(t))}catch(t){e(t)}}function o(t){try{r(u.throw(t))}catch(t){e(t)}}function r(t){var e;t.done?i(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,o)}r((u=u.apply(t,s||[])).next())})}function h(i,n){function t(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,r&&(s=2&e[0]?r.return:e[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,e[1])).done)return s;switch(r=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,r=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=n.call(i,a)}catch(t){e=[6,t],r=0}finally{o=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}var o,r,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e}function s(t,e){for(var i=0,n=e.length,o=t.length;i<n;i++,o++)t[o]=e[i];return t}function d(t,s){function e(t){var e,i,n,o=t.path||(null===(n=t.composedPath)||void 0===n?void 0:n.call(t))||[],r=function(){for(var t,e=0,i=o;e<i.length;e++)if("A"===(t=i[e]).tagName)return t}();return r&&(e=r.href||String(r))&&"self"!==r.target&&(i=r.title||"",n=r.getAttribute("preset-effect"),r=r.getAttribute("clone-as"),t.stopPropagation(),t.preventDefault(),s.pushWindow(e,i,n,r,t).catch(function(){a(e)})),!1}var a=t.open;t.addEventListener("click",e),t.open=function(t,e,i){return"string"!=typeof t||e||i?a(t,e,i):("string"==typeof t&&s.pushWindow(t,"").catch(function(){a(t)}),null)}}function p(o){var r=o.setTimeout;o.setTimeout=function(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];return t=D(t,o,!0),r.apply(void 0,s([t,e],i))}}function f(o){var r=o.setInterval;o.setInterval=function(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];return t=D(t,o),r.apply(void 0,s([t,e],i))}}function v(t,i){function e(u){var e,c=i?"string"==typeof i?i.split(" "):i:null,l=u.path||u.composedPath()||[];l.splice(-3),(e=function(){for(var t,e,i,n,o,r,s=0,a=l;s<a.length;s++)if(null!==(t=(i=a[s]).children)&&void 0!==t&&t.length){if("A"===i.tagName)return i;if(c)for(n=0,o=c;n<o.length;n++)if(r=o[n],null!=i&&i.getAttribute(r))return i}return(null!==(e=null===(e=l[0])||void 0===e?void 0:e.children)&&void 0!==e&&e.length?l[0]:l[1])||u.target}())&&(r.element=e,r.oldStyle=e.style.filter,setTimeout(function(){r.element===e&&(e.style.filter=r.oldStyle+" brightness(.8)");var t=function(){setTimeout(function(){r.element!==e?e.style.filter=r.oldStyle:t()},600)};t()},60))}function n(){var t;null!==(t=null===(t=r.element)||void 0===t?void 0:t.style)&&void 0!==t&&t.filter&&(r.element.style.filter=r.oldStyle),r.element=null,r.oldStyle=""}function o(){setTimeout(function(){n()},600)}var r={element:null,oldStyle:""};t.document.addEventListener("touchstart",e),t.addEventListener("touchstart",e),t.addEventListener("touchmove",n),t.addEventListener("touchcancel",n),t.addEventListener("touchend",o)}function m(t,e){function i(t){for(var e in t)s.setProperty(e,t[e])}function n(t){var e;i({"--application-safe-area-top":null!==(e=t[0])&&void 0!==e?e:t,"--application-safe-area-right":null!==(e=t[1])&&void 0!==e?e:t,"--application-safe-area-bottom":null!==(e=t[2])&&void 0!==e?e:t,"--application-safe-area-left":null!==(e=t[3])&&void 0!==e?e:t})}var o=e.config,r=e.application,e=r.config.globalCSSVariables,s=t.document.documentElement.style;o.safeArea?n(o.safeArea):r.config.safeArea&&n(r.config.safeArea),e&&i(e),r.on("safeAreaChange",function(t){n(t)}),r.on("globalCSSVariablesChange",function(t){i(t)})}function n(t,e){var i,n,o,r,s,a,u=e.config,c=e.application,l=u.apply||[];if(Array.isArray(l))for(i=0,n=l;i<n.length;i++)switch(o=n[i]){case"link-in-new-window":d(t,c);break;case"smart-setTimeout":p(t);break;case"smart-setInterval":f(t);break;case"tap-highlight":v(t);break;default:Array.isArray(o)&&"tap-highlight"===o[0]&&v(t,o[1])}if("function"==typeof u.inject&&u.inject(t,e),e.components)for(r=0,s=e.components;r<s.length;r++)a=s[r],t.customElements.define("code-highlight",a(t));m(t,e)}function o(n){window.addEventListener("message",function(t){var e=t.data,t=e.action,i=e.data;switch(t){case"to":n.transform.to(i.module,i.query,i.history);break;case"back":history.back();break;case"forward":history.forward()}})}var r,a,u,c,l,y,g,w,b,x,k,S,P,V,T=function(t,e){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},C=(at.prototype.on=function(t,e){var i=this,t=t.split(" ");return t.forEach(function(t){i._events[t]?i._events[t].push(e):i._events[t]=[e]}),this},at.prototype.one=function(i,n){var o=this,r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n.apply(null,t),o.off(i,r)},t=i.split(" ");return t.forEach(function(t){o._events[t]?o._events[t].push(r):o._events[t]=[r]}),this},at.prototype.off=function(t,i){var n=this,t=t.split(" ");return t.forEach(function(t){var e;!n._events[t]||-1<(e=n._events[t].indexOf(i))&&n._events[t].splice(e,1)}),this},at.prototype.trigger=function(i){for(var n=this,t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(this._events[i])return this._events[i].forEach(function(e){try{e.apply(null,t)}catch(t){n.off(i,e),n.trigger("error","Error by event["+i+"]")}}),this},at),E=(e(st,V=C),st.prototype.setDefaultConfig=function(t){var e;return null===(e=t.config)||void 0===e||e.rel,null!==(e=t.config)&&void 0!==e&&e.portal&&(t.config.free||console.error("[Module.config[free & portal]] conflit! [free] must be true when [portal] sets true")),1e4<(null!==(e=null===(e=t.config)||void 0===e?void 0:e.level)&&void 0!==e?e:0)&&console.error("[Module.config.level] needs to be less than 9999!"),t},st),_=(e(rt,P=E),Object.defineProperty(rt.prototype,"sameOrigin",{get:function(){return this.uri?new URL(this.uri,window.location.toString()).host===location.host:void 0===this.config.sandbox||!!this.config.sandbox.includes("allow-same-origin")},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"level",{get:function(){var t;return null!==(t=this.config.level)&&void 0!==t?t:0},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"viewIndex",{get:function(){var t=((null===(t=this.application.preActiveModule)||void 0===t?void 0:t.nowViewIndex)||1)+(null!==(t=this.config.level)&&void 0!==t?t:1);return this.nowViewIndex=t,(this.config.free?2e4:1e4)+t},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"rel",{get:function(){return"system"===this.id?"system":"frameworks"===this.id?"frameworks":this.config.rel||"module"},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"uri",{get:function(){var t;return(null===(t=null===(t=this.config)||void 0===t?void 0:t.source)||void 0===t?void 0:t.src)||""},enumerable:!1,configurable:!0}),Object.defineProperty(rt.prototype,"viewType",{get:function(){var t;return this.viewTypeCache||("module"!==this.rel?this.viewTypeCache="shadow":null!==(t=this.config)&&void 0!==t&&t.portal&&this.uri?this.viewTypeCache="HTMLPortalElement"in window&&this.sameOrigin?"portal":"iframe":this.viewTypeCache="iframe")},enumerable:!1,configurable:!0}),rt.prototype.setActionOrigin=function(t){this.actionOriginMap=t},rt.prototype.getActionOrigin=function(){return this.actionOriginMap},rt),O=(e(ot,S=_),ot.prototype.timeTick=function(){Date.now()-this.createTime>(this.config.timeout||36e5)&&this.view&&this.destroy()},ot.prototype.show=function(){var t,e,i;if("portal"!==this.viewType){if("iframe"===this.viewType){for(e=0,i=this.darkTask;e<i.length;e++)(0,i[e])();this.darkTask=[],this.visibility=!0,this.trigger("visible"),this.triggerWindow("module-visible","moduleVisibilityState","visible")}}else null!==(t=this.view)&&void 0!==t&&t.activate()},ot.prototype.hide=function(){this.visibility=!1,this.trigger("hidden"),this.triggerWindow("module-hidden","moduleVisibilityState","hidden")},ot.prototype.willShow=function(){this.trigger("willShow"),this.triggerWindow("module-will-show","moduleVisibilityState","willVisible")},ot.prototype.willHide=function(){this.trigger("willHidden"),this.triggerWindow("module-will-hidden","moduleVisibilityState","willHidden")},ot.prototype.triggerWindow=function(t,e,i){var n;"iframe"===this.viewType&&(n=null===(n=null==(n=this.view)?void 0:n.contentWindow)||void 0===n?void 0:n.window)&&(n.postMessage({type:t,historyDirection:this.application.transform.historyDirection},"*"),this.sameOrigin&&e&&(n[e]=i))},ot.prototype.mediaGuard=function(){var c=this;return new Promise(function(t,e){var i,n,o,r,s,a,u;try{if("iframe"!==c.viewType)return t();if(void 0===c.sandbox)return t();if(!(n=null===(i=c.view.contentDocument)||void 0===i?void 0:i.documentElement))return e();if(n.getElementsByTagName("video")[0])for(s in o=n.querySelectorAll("video"),r=function(t){var e=o[t];null!=e&&e.paused||(e.pause(),c.darkTask.push(function(){e.play()}))},o)r(s);if(n.getElementsByTagName("audio")[0])for(s in a=n.querySelectorAll("audio"),u=function(t){var e=a[t];null!=e&&e.paused||(e.pause(),c.darkTask.push(function(){e.play()}))},a)u(s)}catch(t){e()}})},ot.prototype.destroy=function(){var n=this;return new Promise(function(t,e){var i;return"module"!==n.rel||(null===(i=n.application.transform)||void 0===i?void 0:i.id)===n.id?e():("iframe"===n.viewType&&n.unload().catch(e),null!==(e=n.elements.container.parentElement)&&void 0!==e&&e.removeChild(n.elements.container),n.status.prefetch=n.status.preload=n.status.prerender=!1,n.view=null,n.status.init=!1,n.darkTask=[],null!==(e=n.events)&&void 0!==e&&e.destroy.bind(n)(),n.trigger("destroy"),void t())})},ot.prototype.observer=function(e){var t,i=this.sandbox?null===(t=this.sandbox.contentDocument)||void 0===t?void 0:t.documentElement:this.view;if(i)return(t=new MutationObserver(function(t){e(t)})).observe(i,{subtree:!0,attributes:!0,childList:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),t},ot.prototype.fate=function(){var a=this;return new Promise(function(t,e){var i,n,o,r,s;if("module"!==a.rel)return e();if(!0===a.config.background)return e();if(!1===a.config.background)return t();if("iframe"!==a.viewType)return e();if(void 0===a.sandbox)return e();if(!1===a.sameOrigin)return t();n=a.view;try{if(!(o=null===(i=n.contentDocument)||void 0===i?void 0:i.documentElement))return e();if(!1!==a.config.mediaGuard&&a.mediaGuard().catch(t),o.getElementsByTagName("object")[0])return t();if(o.getElementsByTagName("embed")[0])return t();if(o.getElementsByTagName("applet")[0])return t();if(o.getElementsByTagName("iframe")[0])return t();if(o){if(r={times:0},!(s=a.observer(function(){r.times++,1e3<r.times&&(t(),a.mutationObserver.disconnect())})))return;a.mutationObserver=s,setTimeout(function(){10<r.times&&t()},3e3)}else e()}catch(t){e()}})},ot.prototype.unfate=function(){var t;null!==(t=this.mutationObserver)&&void 0!==t&&t.disconnect()},ot.prototype.unload=function(){var s=this;return new Promise(function(t,e){var i,n,o,r;if(s.unfate(),!(n=s.view))return t();n.style.display="none",n.src="about:blank";try{o=null===(i=n.contentWindow)||void 0===i?void 0:i.window,r=n.contentDocument,null!=o&&o.location.reload(),null!=r&&r.open(),null!=r&&r.write(""),null!=r&&r.close()}catch(t){e()}null!==(e=n.parentElement)&&void 0!==e&&e.removeChild(n),t()})},ot),A=(e(nt,k=O),nt.prototype.prefetch=function(){var i=this;return new Promise(function(t,e){Promise.all([i.prefetchStatic(i.resources.script,"script"),i.prefetchStatic(i.resources.image,"image"),i.prefetchStatic(i.resources.worker,"worker"),i.prefetchStatic(i.resources.video,"video"),i.prefetchStatic(i.resources.audio,"audio"),i.prefetchStatic(i.resources.font,"font"),i.prefetchStatic(i.resources.style,"style")]).then(function(){i.status.prefetch=!0,t(!0)}).catch(e)})},nt.prototype.prefetchStatic=function(i,n){var o=this;return void 0===i&&(i=[]),void 0===n&&(n="script"),new Promise(function(t,e){Promise.all([].concat(i).map(function(t){return o.beforehandLink(t,"preload",n)})).then(t).catch(e)})},nt.prototype.beforehandLink=function(n,o,r){return void 0===o&&(o="preload"),void 0===r&&(r="worker | video | audio | font | script | style | image | document"),n?new Promise(function(t,e){var i=document.createElement("link");if(i.rel=o,i.href=n,i.as=r,i.onload=t,i.onerror=e,null===(e=i.relList)||void 0===e||!e.supports(o))return t("notSupports");document.getElementsByTagName("head")[0].appendChild(i),t()}):Promise.resolve()},nt),L=(Object.defineProperty(it.prototype,"src",{set:function(t){this.sandbox.src=t},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"unload",{set:function(t){this.contentWindow.onbeforeunload=t},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"onload",{set:function(t){this.sandbox.onload=t},enumerable:!1,configurable:!0}),Object.defineProperty(it.prototype,"onerror",{set:function(t){this.sandbox.onerror=t},enumerable:!1,configurable:!0}),it.prototype.set=function(t){this.sandbox.setAttribute("sandbox",t)},it.prototype.reset=function(t){return this.exit(),this.set(t),this},it.prototype.open=function(){return this.contentDocument.open(),this},it.prototype.write=function(t){return this.contentDocument.write(t=void 0===t?'<head><meta charset="utf-8"></head>':t),this},it.prototype.close=function(){return this.contentDocument.close(),this},it.prototype.append=function(t,e){this.enter(e),this.attach(),this.open(),this.write(t),this.close()},it.prototype.enter=function(t){t.appendChild(this.sandbox)},it.prototype.attach=function(){var t=this.sandbox.contentWindow,e=this.sandbox.contentDocument;this.contentWindow=t,this.contentDocument=e},it.prototype.exit=function(){var t=this.sandbox.parentNode;t&&t.removeChild(this.sandbox)},it),D=function(n,o,r){return function(){for(var t,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];t=function(){"function"==typeof n?n.apply(void 0,e):"string"==typeof n&&new o.Function("return "+n).apply(void 0,e)},"visible"===o.moduleVisibilityState?t():r&&o.addEventListener("module-visible",function(){t()})}},E=(e(et,x=A),et.prototype.attach=function(t){t&&(this.status.init=!0,this.elements.container=t,this.addPanMoveHolder(t))},et.prototype.addPanMoveHolder=function(t){var e,i,n,o,r,s=this.config.touchBorder;s&&(e=document.createElement("div"),i=document.createElement("div"),n=document.createElement("div"),o=document.createElement("div"),r=document.createElement("div"),e.style.cssText="position: absolute; top: 0; right: 0; left: 0; z-index: 3; height: 12px;",i.style.cssText="position: absolute; top: 0; right: 0; bottom: 0; z-index: 3; width: 12px;",n.style.cssText="position: absolute; right: 0; bottom: 0; left: 0; z-index: 3; height: 12px;",o.style.cssText="position: absolute; top: 0; bottom: 0; left: 0; z-index: 3; width: 12px;",r.style.cssText="display: none; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 4;",t.appendChild(e),t.appendChild(i),t.appendChild(n),t.appendChild(o),t.appendChild(r),s({topHolder:e,rightHolder:i,bottomHolder:n,leftHolder:o,mainHolder:r},this,this.application))},et.prototype.createSandbox=function(t,e){return this.sandbox=new L(t,e),this.sandbox.sandbox},et.prototype.createShadowbox=function(t){var e=document.createElement("shadow-view"),i=document.createElement("shadow-inner");return null!=e&&e.attachShadow({mode:"open"}),(e.shadowRoot||e).appendChild(i),t(i),this.elements.container.appendChild(e),e},et.prototype.createPortals=function(t){var e=document.createElement("portal");return e.src=t,e},et.prototype.createView=function(){return this.view||(this.config.render?this.view=this.createShadowbox(this.config.render):"module"===this.rel?("portal"===this.viewType?this.view=this.createPortals(this.uri):this.view=this.createSandbox(this.uri,this.config.sandbox),this.view):void 0)},et.prototype.loadContent=function(){var t,e=this.elements.container,i=this.view;if(i)if("portal"===this.viewType)e.appendChild(i);else this.sandbox?this.uri?(this.sandbox.enter(e),(t=i.contentWindow)&&this.sameOrigin&&(n(null==t?void 0:t.window,this),null!=t&&t.window.postMessage({type:"container-ready"},"*"))):(this.sandbox.append(null===(t=null===(t=this.config)||void 0===t?void 0:t.source)||void 0===t?void 0:t.html,e),e=this.loadContent.bind(this),this.sandbox.unload=e,n(null===(e=this.sandbox.contentWindow)||void 0===e?void 0:e.window,this)):"frameworks"===this.rel&&n(window,this)},et.prototype.mountPresetView=function(){var t=null===(t=null===(t=null===window||void 0===window?void 0:window.__application_preset)||void 0===t?void 0:t.modules)||void 0===t?void 0:t[this.id];t&&(this.view=t,this.elements.container.appendChild(t),null===(t=null===window||void 0===window?void 0:window.__application_preset)||void 0===t||delete t[this.id])},et.prototype.create=function(e){var o=this;return void 0===e&&(e=!0),this.unfate(),this.timeTick(),this.mountPresetView(),this.status.prerender?Promise.resolve("prerender"):new Promise(function(i,n){o.createTime=Date.now();var t=o.createView();return t?"shadow"===o.viewType?i("shadow"):(t.style.cssText="\n position: absolute;\n z-index: 0;\n width: 100%;\n height: 100%;\n border: 0;\n transform: translate3d(0, 0, 0);\n ",t.onload=function(t){var e;o.status.prerender=!0,null!==(e=o.events)&&void 0!==e&&e.load.bind(o)(),o.trigger("load"),setTimeout(function(){i(t)},50)},t.onerror=function(t){var e;null!==(e=o.events)&&void 0!==e&&e.loadError.bind(o)(),o.trigger("loadError"),n(t)},o.loadContent(),!1===e||!1===o.config.animation?i("instant"):void setTimeout(function(){i("timeout")},o.status.preload?800:200)):i("null")})},et.prototype.preload=function(){var r=this;return new Promise(function(i,e){var t=r.uri,n=document.head,o=new L(t,"");o.onload=function(t){var e;r.status.preload=!0,o.exit(),null!==(e=r.events)&&void 0!==e&&e.preload.bind(r)(),r.trigger("preload"),i(t)},o.onerror=function(t){o.exit(),e(t)},t?o.enter(n):o.append(null===(t=null===(t=r.config)||void 0===t?void 0:t.source)||void 0===t?void 0:t.html,n)})},et.prototype.prerender=function(){var i=this;return this.status.preload||this.status.prerender?Promise.resolve():new Promise(function(t,e){i.preload().then(t).catch(e),i.beforehandLink(i.uri,"prerender","document")})},et),j=(e(tt,b=E),tt),z={in:"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0, 1, .5, 1)",linear:"cubic-bezier(0.250, 0.250, 0.750, 0.750)","ease-in-quad":"cubic-bezier(0.550, 0.085, 0.680, 0.530)","ease-in-cubic":"cubic-bezier(0.550, 0.055, 0.675, 0.190)","ease-in-quart":"cubic-bezier(0.895, 0.030, 0.685, 0.220)","ease-in-quint":"cubic-bezier(0.755, 0.050, 0.855, 0.060)","ease-in-sine":"cubic-bezier(0.470, 0.000, 0.745, 0.715)","ease-in-expo":"cubic-bezier(0.950, 0.050, 0.795, 0.035)","ease-in-circ":"cubic-bezier(0.600, 0.040, 0.980, 0.335)","ease-in-back":"cubic-bezier(0.600, -0.280, 0.735, 0.045)","ease-out-quad":"cubic-bezier(0.250, 0.460, 0.450, 0.940)","ease-out-cubic":"cubic-bezier(0.215, 0.610, 0.355, 1.000)","ease-out-quart":"cubic-bezier(0.165, 0.840, 0.440, 1.000)","ease-out-quint":"cubic-bezier(0.230, 1.000, 0.320, 1.000)","ease-out-sine":"cubic-bezier(0.390, 0.575, 0.565, 1.000)","ease-out-expo":"cubic-bezier(0.190, 1.000, 0.220, 1.000)","ease-out-circ":"cubic-bezier(0.075, 0.820, 0.165, 1.000)","ease-out-back":"cubic-bezier(0.175, 0.885, 0.320, 1.275)","ease-in-out-quad":"cubic-bezier(0.455, 0.030, 0.515, 0.955)","ease-in-out-cubic":"cubic-bezier(0.645, 0.045, 0.355, 1.000)","ease-in-out-quart":"cubic-bezier(0.770, 0.000, 0.175, 1.000)","ease-in-out-quint":"cubic-bezier(0.860, 0.000, 0.070, 1.000)","ease-in-out-sine":"cubic-bezier(0.445, 0.050, 0.550, 0.950)","ease-in-out-expo":"cubic-bezier(1.000, 0.000, 0.000, 1.000)","ease-in-out-circ":"cubic-bezier(0.785, 0.135, 0.150, 0.860)","ease-in-out-back":"cubic-bezier(0.680, -0.550, 0.265, 1.550)"},I=null!==requestAnimationFrame&&void 0!==requestAnimationFrame?requestAnimationFrame:setTimeout,M=getComputedStyle,R=(e($,w=C),$.prototype.transform=function(t){this.transition("transform");var e=(t.match(/\w+\b/)||[])[0];return e&&(this._transforms[e]=t),this},$.prototype.skew=function(t,e){return this.transform("skew("+t+"deg, "+(e||0)+"deg)")},$.prototype.skewX=function(t){return this.transform("skewX("+t+"deg)")},$.prototype.skewY=function(t){return this.transform("skewY("+t+"deg)")},$.prototype.to=function(t,e,i){return this.transform("translate3d("+((t=void 0===t?0:t)?t+"px":0)+","+((e=void 0===e?0:e)?e+"px":0)+","+((i=void 0===i?0:i)?i+"px":0)+")"),this},$.prototype.x=function(t){return this.transform("translateX("+t+"px)")},$.prototype.y=function(t){return this.transform("translateY("+t+"px)")},$.prototype.z=function(t){return this.transform("translateZ("+t+"px)")},$.prototype.scale=function(t,e){return this.transform("scale("+t+", "+((e=void 0===e?t:e)||t)+")")},$.prototype.opacity=function(t){return this.transition("opacity"),this.style("opacity",t)},$.prototype.scaleX=function(t){return this.transform("scaleX("+t+")")},$.prototype.matrix=function(t,e,i,n,o,r){return this.transform("matrix("+[t,e,i,n,o,r].join(",")+")")},$.prototype.scaleY=function(t){return this.transform("scaleY("+t+")")},$.prototype.rotate=function(t){return this.transform("rotate("+t+"deg)")},$.prototype.rotateX=function(t){return this.transform("rotateX("+t+"deg)")},$.prototype.rotateY=function(t){return this.transform("rotateY("+t+"deg)")},$.prototype.rotateZ=function(t){return this.transform("rotateZ("+t+"deg)")},$.prototype.rotate3d=function(t,e,i,n){return this.transform("rotate3d("+t+", "+e+","+i+","+n+"deg)")},$.prototype.perspective=function(t){var e=this.el.parentElement;return e&&(e.style.setProperty("transform-style","preserve-3d"),e.style.setProperty("perspective",t+"px")),this},$.prototype.backface=function(t){return this.style("backface-visibility",(t=void 0===t?!0:t)?"visible":"hidden")},$.prototype.ease=function(t){return this.style("transition-timing-function",t=z[t]||t||"ease")},$.prototype.animate=function(t,e){for(var i in e)e.hasOwnProperty(i)&&this.style("animation-"+i,e[i]);return this.style("animation-name",t)},$.prototype.duration=function(t){return t="string"==typeof t?1e3*parseFloat(t):t,this.style("transition-duration",t+"ms")},$.prototype.getDuration=function(){return!!parseFloat(M(this.el).transitionDuration)},$.prototype.delay=function(t){return t="string"==typeof t?1e3*parseFloat(t):t,this.style("transition-delay",t+"ms")},$.prototype.origin=function(t,e){void 0===e&&(e=0);var i="center";return Array.isArray(t)&&(e=t[1]||0,t=t[0]||0),"string"==typeof t?i=t:"number"==typeof t&&(i=t+"px "+e+"px"),this.style("transform-origin",i)},$.prototype.width=function(t){return this.transition("width"),this.style("width",void 0===t?"":t+"px")},$.prototype.height=function(t){return this.transition("height"),this.style("height",void 0===t?"":t+"px")},$.prototype.add=function(e,i){var n=this;return this.on("start",function(){var t=parseInt(n.current(e),10);n.style(e,t+i+"px")})},$.prototype.subc=function(e,i){var n=this;return this.on("start",function(){var t=parseInt(n.current(e),10);n.style(e,t-i+"px")})},$.prototype.current=function(t){return M(this.el).getPropertyValue(t)},$.prototype.transition=function(t){return-1===this._transitionProps.indexOf(t)&&this._transitionProps.push(t),this},$.prototype.filter=function(t){return this.style("filter",t),this.transition("filter"),this},$.prototype.style=function(t,e){return this._props[t]=void 0===e?"":e,this},$.prototype.onceTransitionend=function(e){var i,n=this;if(!this.getDuration())return setTimeout(e,0);this.el.addEventListener("transitionend",i=function(t){if(t.target!==n.el)return!1;e(),n.el.removeEventListener("transitionend",i,!1)},!1)},$.prototype.applyTransform=function(){var t,e=[];for(t in this._transforms.translate3d||this._transforms.translateZ||(this._transforms.translateZ="translateZ(0)"),this._transforms)e.push(this._transforms[t]);return e.length&&this.style("transform",e.join(" ")),this},$.prototype.applyProperties=function(){var t,e=this,i=this._proper.shift();for(t in this._transforming=!0,i)this.el.style.setProperty(t,i[t]);return this.onceTransitionend(function(){e.clear(),e.next()}),this},$.prototype.next=function(){var t,e=this;this._caller.length&&null!=(t=this._caller.shift())&&t(),0===this._caller.length?this.init():I(function(){e.applyProperties()})},$.prototype.clear=function(){this._transforms={}},$.prototype.init=function(){return this.getDuration()&&this.el.style.setProperty("transition-duration","0ms"),this.clear(),this._transforming=!1,this},$.prototype.then=function(t){var e=this;return void 0===t&&(t=function(){}),this.applyTransform(),this.style("transition-property",this._transitionProps.join(", ")),this._proper.push(this._props),this._props={},this._caller.push(function(){return null==t?void 0:t.call(e)}),this},$.prototype.and=function(t){var e=this;if(this.then(t=void 0===t?function(){}:t),this._transforming)return this;I(function(){e.applyProperties()})},$.prototype.end=function(e){var i=this;return new Promise(function(t){e=null!=e?e:function(){return t()},i.then(e),i._transforming||I(function(){i.applyProperties()})})},$),_=function(d){return function(l){return i(void 0,void 0,void 0,function(){return h(this,function(t){return[2,new Promise(function(c){return i(void 0,void 0,void 0,function(){var e,i,n,o,r,s,a,u;return h(this,function(t){switch(t.label){case 0:switch(e="center",i=.3,n=150,r=(o=1300)/4,s=0,a=1,u=l.direction*l.historyDirection,d){case 0:e="top",s=1,a=0,r=(o=1600)/4;break;case 1:e="right";break;case 2:e="bottom",s=1,a=0,r=(o=1600)/4;break;case 3:e="left";break;case 4:e="center",n=90,i=.9,r=o=600}return[4,l.in.duration(0).ease("ease-out-expo").perspective(1e3).origin(e).to(0,0,0).backface(!1).opacity(1).rotate3d(s,a,0,n*u).scale(i).end()];case 1:return t.sent(),l.in.delay(r).duration(o).rotate3d(s,a,0,0).scale(1).end(function(){c(!1)}),l.out.duration(o).ease("ease-out-expo").perspective(1e3).origin(e).backface(!1).rotate3d(s,a,0,-n*u).scale(i).end(function(){l.out.duration(0).rotate3d(s,a,0,-n*u).opacity(0).end()}),setTimeout(function(){c(!1)},2e3),[2]}})})})]})})}},O=function(r){return function(t){var e,i,n,o;0===r?(e=1,i=0,n=t.in,o=t.out):(e=0,i=1,n=o=t.in),n.duration(0).ease("ease-out-expo").to(0,0,0).opacity(e).end(function(){o.duration(767).opacity(i).end(function(){t.callback(!1)})}),setTimeout(function(){t.callback(!1)},1200)}},A=function(n){return function(t){var e,i;switch(n){case 0:e=t.modules[1].getActionOrigin(),i=e?[e.x,e.y]:t.origin,t.in.origin(t.attach).filter("brightness(0.5)").ease("ease-out-expo").duration(0).to(0,0,0).scale(2.5).end(function(){t.out.origin(i).ease("ease-out-expo").duration(767).scale(1e-4).end(function(){t.out.origin(i).ease("ease").duration(10).scale(1e-4).opacity(0).end(function(){t.callback(!1)})}),t.in.duration(767).filter("brightness(1)").to(0,0,0).scale(1).end()});break;case 1:t.in.origin(t.origin).ease("ease-out-expo").duration(0).to(0,0,0).scale(0).end(function(){t.out.origin(t.attach).ease("ease-out-expo").filter("brightness(1)").duration(0).to(0,0,0).scale(1).end(function(){t.in.duration(767).to(0,0,0).scale(1).end(),t.out.duration(767).scale(2.5).filter("brightness(0.5)").end(function(){t.callback(!1)})})})}setTimeout(function(){t.callback(!1)},1200)}},E=function(r){return function(t){var e=0,i=0,n=0,o=0;switch(r){case 0:n=-(o=t.height),e=i=0;break;case 1:e=t.width,i=-e,n=o=0;break;case 2:n=t.height,o=-n,e=i=0;break;case 3:e=-(i=t.width),n=o=0}t.reverse?t.in.duration(0).filter("brightness(0.5)").to(.1*e,.1*n,0).end(function(){t.out.duration(767).ease("ease-out-expo").to(i,o,0).end(),t.in.duration(767).ease("ease-out-expo").filter("brightness(1)").to(0,0,0).end(function(){t.callback(!1)})}):t.in.duration(0).to(e,n,0).end(function(){t.in.duration(767).ease("ease-out-expo").to(0,0,0).end(function(){t.callback(!1)}),t.out.duration(767).ease("ease-out-expo").filter("brightness(0.5)").to(.5*i,.5*o,0).end()}),setTimeout(function(){t.callback(!1)},1200)}},U=_,W=O,B=A,H=E,E=(K.prototype.setupViewport=function(){var t;this.relativeViewport.id="relative-viewport",null!==(t=this.relativeViewport)&&void 0!==t&&t.attachShadow({mode:"open"}),this.absoluteViewport.id="absolute-viewport",null!==(t=this.absoluteViewport)&&void 0!==t&&t.attachShadow({mode:"open"}),this.resetViewport(),this.fixedViewport.id="fixed-viewport",this.fixedViewport.style.position="fixed",this.fixedViewport.style.zIndex="3",this.fixedViewport.style.width="100%",this.fixedViewport.style.height="0",this.fixedViewport.style.contain="strict",this.fixedViewport.style.overflow="visible",document.body.appendChild(this.relativeViewport),document.body.appendChild(this.absoluteViewport),document.body.appendChild(this.fixedViewport)},K.prototype.resetViewport=function(){this.relativeViewport.style.cssText="",this.relativeViewport.style.position="absolute",this.relativeViewport.style.zIndex="1",this.relativeViewport.style.width=this.relativeViewport.style.height="100%",this.relativeViewport.style.overflow="hidden",this.relativeViewport.style.contain="strict",this.absoluteViewport.style.cssText="",this.absoluteViewport.style.position="absolute",this.absoluteViewport.style.zIndex="2",this.absoluteViewport.style.width=this.absoluteViewport.style.height="100%",this.absoluteViewport.style.overflow="visible",this.absoluteViewport.style.contain="strict"},K),E=(e(J,g=E),J.prototype.bindHistoryState=function(){var e=this;addEventListener("load",function(){addEventListener("popstate",function(t){e.popstate(t.state),clearInterval(e.silentObserver)},!1)},!1)},J.prototype.obserSilent=function(){var e=this;this.silentObserver=setInterval(function(){var t;(null===(t=history.state)||void 0===t?void 0:t.id)!==e.id&&e.popstate(history.state)},100)},J.prototype.popstate=function(t){var e=(null!=t?t:{}).historyIndex,e=void 0===e?0:e;e===this.historyIndex?this.historyDirection=0:e>this.historyIndex?this.historyDirection=1:this.historyDirection=-1,this.historyIndex=e,this.back(t)},J.prototype.pushState=function(t,e,i,n){void 0===t&&(t=""),void 0===e&&(e=""),void 0===i&&(i=location.search),void 0===n&&(n=""),t=encodeURIComponent(t);var o=history.length;history.pushState({id:t,title:e,time:Date.now(),search:i,historyIndex:o},e,location.pathname+i+"#"+t+"/"+n),this.historyIndex=o+1,this.historyDirection=1,void 0===this.silentObserver&&this.obserSilent()},J.prototype.replaceState=function(t,e,i,n){void 0===t&&(t=""),void 0===e&&(e=""),void 0===i&&(i=location.search),void 0===n&&(n=""),t=encodeURIComponent(t);var o=history.length;history.replaceState({id:t,title:e,time:Date.now(),search:i,historyIndex:o},e,location.pathname+i+"#"+t+"/"+n),this.historyIndex=o,this.historyDirection=1},J.prototype.back=function(a){var u,c;return i(this,void 0,void 0,function(){var e,i,n,o,r,s;return h(this,function(t){switch(t.label){case 0:return e=this.options,s=a||history.state||this.app.route,i=decodeURIComponent(s.id)||e.index||"frameworks",n=s.search,[4,this.app.get(i)];case 1:return(o=t.sent())?this.checkSingleLock()?(this.backoutCount++,!0===(null===(u=(c=this.options).holdBack)||void 0===u?void 0:u.call(c,this.backoutCount))&&(this.pushState(i,o.config.title,n),this.app.trigger("exit",{backoutCount:this.backoutCount})),[2]):(this.backoutCount=0,r=null!==(c=o.config.level)&&void 0!==c?c:0,s=null!==(c=this.module.config.level)&&void 0!==c?c:0,e.singleFlow&&0!==o.config.level&&s<=r?[2,history.back()]:(this.app.transform.to(i,n,-1),this.app.trigger("back",{id:i,module:o}),[2])):[2]}})})},J.prototype.checkSingleLock=function(){return!(!this.options.singleLock||0!==this.module.config.level||-1!==this.historyDirection)},J),E=(e(Z,y=E),Z.prototype.getAnimationGroup=function(){var t,e;if(!this.modulu||"module"!==this.modulu.rel)return!1;if("string"==typeof(e=!0===(e=this[1!==this.history&&-1===this.historyDirection?"modulu":"module"].config.animation)||"inherit"===e?this.options.defaultAnimation:e))t=this.getAnimationByName(e);else if("function"!=typeof(null==e?void 0:e[0]))return e;return"function"==typeof(null==t?void 0:t[0])&&t},Z.prototype.getAnimationOneSide=function(t){var e=this.animation;if(0<=t)switch(typeof e){case"function":return e;case"object":return e[2===e.length?t:0];default:return}},Z.prototype.getAnimationByName=function(t){switch(t){case"flip":return[U(4),U(4)];case"flipLeft":case"flip-left":return[U(3),U(3)];case"flipDown":case"flip-down":return[U(2),U(2)];case"flipRight":case"flip-right":return[U(1),U(1)];case"flipUp":case"flip-up":return[U(0),U(0)];case"fade":return[W(1),W(0)];case"zoom":return[B(1),B(0)];case"slide":case"slideLeft":case"slideleft":case"slide-left":return[H(1),H(3)];case"slideRight":case"slideright":case"slide-right":return[H(3),H(1)];case"slideUp":case"slideup":case"slide-up":return[H(2),H(0)];case"slideDown":case"slidedown":case"slide-down":return[H(0),H(2)];default:return}},Z),E=(e(G,l=E),G.prototype.createContainer=function(t){var e;t.status.init||((e=document.createElement("module-container")).setAttribute("name",this.id),e.setAttribute("type",-1!==["frameworks","system"].indexOf(this.id)?this.id:"module"),t.attach(e),this.resetContainer(t,this.switchover||!this.animation),this.getViewport(t).appendChild(e))},G.prototype.resetContainer=function(t,e){var i,n,o,r;void 0===e&&(e=!1),i=t.config,n=t.elements.container,o=["frameworks","system"].includes(t.rel),r=this.app.properties.darkTheme,n.style.cssText="",o||(n.style.cssText="\n position: absolute;\n z-index: "+((Number(t.viewIndex)||0)+1)+";\n width: 100%;\n height: 100%;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n inset: 0;\n background: "+(i.color||(r?"#000":"#fff"))+";\n transform: "+(e?"translate3d(0, 0, 0)":"translate3d(200%, 200%, 0)")+";\n contain: strict;\n ")},G.prototype.getViewport=function(t){return"system"===(t=void 0===t?this.module:t).rel?this.fixedViewport:!1===t.config.free?this.relativeViewport.shadowRoot||this.relativeViewport:this.absoluteViewport.shadowRoot||this.absoluteViewport},G.prototype.checkSwitchover=function(t,e){return void 0===t&&(t=this.modulu),void 0===e&&(e=this.module),"module"===(null==t?void 0:t.rel)&&e.config.free!==t.config.free},G.prototype.to=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(this,void 0,void 0,function(){return h(this,function(t){return[2,this.pushPromise(this.next()||this.promise.apply(this,e),e)]})})},G.prototype.prev=function(){return this.promiseQueue[0]},G.prototype.next=function(){var i=this,n=this.prev();if(n)return new Promise(function(t,e){n.then(function(){i.promiseParamQueue[0]&&i.promise.apply(i,i.promiseParamQueue[0]).then(t).catch(e)})})},G.prototype.pushPromise=function(t,e){return this.promiseParamQueue.push(e),this.promiseQueue.push(t),t},G.prototype.shiftPromise=function(){this.promiseParamQueue.shift(),this.promiseQueue.shift()},G.prototype.limit=function(t){var e,i=Math.max((null===(n=null==this?void 0:this.options)||void 0===n?void 0:n.limit)||3,2),n=this.windowSet.indexOf(t);"module"===this.module.rel&&!0!==this.module.config.background&&(-1!==n&&this.windowSet.splice(n,1),this.windowSet.push(t),this.windowSet.length>i&&null!==(e=this.app.modules[this.windowSet.splice(0,1)[0]])&&void 0!==e&&e.destroy())},G.prototype.destroy=function(e){var i=this;e.transient&&-1===this.history?this.app.del(e).then(function(){var t=i.windowSet.indexOf(e.id);i.windowSet.splice(t,1)}):e.fate().then(function(){e.destroy().then(function(){var t=i.windowSet.indexOf(e.id);i.windowSet.splice(t,1)})})},G.prototype.checkPushState=function(){return-1!==this.history&&"portal"!==this.module.viewType},G.prototype.getActionPosition=function(t){var e=0,i=0,t=t?t.srcEvent||t:{},i=t.changedTouches?(e=t.changedTouches[0].pageX,t.changedTouches[0].pageY):(e=t.x,t.y);return{x:e,y:i}},G.prototype.promise=function(s,a,u,c){var l=this;return void 0===a&&(a=location.search),void 0===u&&(u=1),s===this.id?(this.shiftPromise(),Promise.resolve()):new Promise(function(e,t){var i=l.od,n=i?[s,i]:[s],o=l.app.modules[s],r=l.app.modules[i],i=i?[o,r]:[o];if(!o)return l.app.get(s).then(function(){l.promise(s,a,u).then(function(){l.shiftPromise(),e()}).catch(function(){t()})});l.id=s,l.ids=n,l.param=a,l.module=o,l.modulu=r,l.moduli=i,l.history=u,l.touches=l.getActionPosition(c),l.animation=l.getAnimationGroup(),l.switchover=l.checkSwitchover(),l.target=l.getViewport(),l.createContainer(o),l.start().then(function(){l.hintWillTrans(l.viewport),!0===l.checkPushState()&&l.pushState(s,o.config.title,a),l.touches&&o.setActionOrigin(l.touches),o.create(!!l.animation).then(function(){var t;document.title=null!==(t=o.config.title)&&void 0!==t?t:"",l.transform().then(function(t){l.od=s,l.end(t),l.shiftPromise(),l.limit(l.id),e()}),l.app.beforehandDependencies(null===(t=o.config)||void 0===t?void 0:t.prerender).then(function(){l.app.trigger("prerenderComplete")})})})})},G.prototype.pos=function(){var t=(null===(o=this.touches)||void 0===o?void 0:o.x)||0,e=(null===(r=this.touches)||void 0===r?void 0:r.y)||0,i="center",n="center",o=this.relativeViewport.offsetWidth,r=this.relativeViewport.offsetHeight;return t&&e&&(n=[t,e],t<o/4?t=0:3*o/4<t&&(t=o),e<r/4?e=0:3*r/4<e&&(e=r),i=[t,e]),{x:t,y:e,width:o,height:r,attach:i,origin:n}},Object.defineProperty(G.prototype,"backsetState",{get:function(){return 1===this.moduli.length?-1:this.module.level>=this.modulu.level?0:1},enumerable:!1,configurable:!0}),Object.defineProperty(G.prototype,"viewport",{get:function(){var t;return this.switchover?[!1===this.module.config.free?this.relativeViewport:this.absoluteViewport,!1===(null===(t=this.modulu)||void 0===t?void 0:t.config.free)?this.relativeViewport:this.absoluteViewport]:[this.module.elements.container,null===(t=this.modulu)||void 0===t?void 0:t.elements.container]},enumerable:!1,configurable:!0}),G.prototype.modulation=function(t){var e=this.viewport,i=this.backsetState,n=0!==i,o=this.pos(),t={x:o.x,y:o.y,in:new R(e[0]),out:new R(e[1]),view:e,width:o.width,height:o.height,viewport:[this.relativeViewport,this.absoluteViewport],modules:this.moduli,reverse:n,direction:n?-1:1,backset:i,historyDirection:this.historyDirection,origin:o.origin,attach:o.attach,touches:this.touches,callback:t};return t},G.prototype.transform=function(){var n=this;return new Promise(function(e){var t,i;return n.animation?(i=n.backsetState,t=function(t){return e(t)},(i=n.getAnimationOneSide(i))?void((i=i(n.modulation(t)))instanceof Promise&&i.then(t)):e(!1)):(n.switchViewport(),void e(!0))})},G.prototype.hintWillTrans=function(t){t[0].style.willChange="transform, opacity",t[1]&&(t[1].style.willChange="transform, opacity")},G.prototype.removeTransHint=function(t){t[0].style.willChange="auto",t[1]&&(t[1].style.willChange="auto")},G.prototype.start=function(){var n=this;return new Promise(function(t,e){n.app.trigger("transformStart",n.moduli);var i=n.module.events.transformStart;if("function"==typeof i&&!1===i.call(n.module))return e();n.animation&&!n.switchover||(n.module.elements.container.style.transform="translate3d(0, 0, 0)"),n.module.willShow(),n.modulu&&n.modulu.willHide(),t()})},G.prototype.end=function(t){void 0===t&&(t=!1);var e=this.module.events.transformEnd;this.removeTransHint(this.viewport),this.switchover&&this.switchViewport(),this.modulu&&(t||("module"===this.modulu.rel&&(this.modulu.elements.container.style.transform="translate3d(200%, 200%, 0)"),this.resetContainer(this.module,!0)),this.modulu.elements.container.style.transitionDuration="0ms",!0===this.modulu.config.background?this.modulu.hide():this.destroy(this.modulu)),this.module.show(),"function"==typeof e&&e.call(this.module),this.app.trigger("transformEnd",this.moduli)},G.prototype.switchViewport=function(){var t;this.resetViewport(),!1===(null===(t=null===(t=this.module)||void 0===t?void 0:t.config)||void 0===t?void 0:t.free)?(this.absoluteViewport.style.transform="translate3d(200%, 200%, 0)",this.relativeViewport.style.transform="translate3d(0, 0, 0)"):(this.relativeViewport.style.transform="translate3d(200%, 200%, 0)",this.absoluteViewport.style.transform="translate3d(0, 0, 0)")},G),q=(e(Y,c=E),Y.prototype.setup=function(t){this.options=t},Y),E=(e(Q,u=C),Q.prototype.setting=function(t){this.options=t},Q),N="\n* { box-sizing: border-box; margin: 0; padding: 0; text-size-adjust: 100%; tap-highlight-color: rgba(0, 0, 0, 0) } \n\nhtml, body { position: absolute; width: 100%; height: 100%; background: #fff; overflow: hidden; overscroll-behavior: none } \n\nmodule-mask, module-view { position: absolute; width: 100%; height: 100%; overflow: hidden } \n\nmodule-container[type=module] { display: block; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100% } \n\niframe { width: 100%; height: 100%; border: 0 } \n\n",C=(e(X,a=E),Object.defineProperty(X.prototype,"route",{get:function(){var t=this.routerRegExp.exec(location.hash)||[],e=t[1],i=t[2],t=location.search;return{id:e?decodeURIComponent(e):"",param:i?decodeURIComponent(i):"",search:t}},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"exists",{get:function(){try{return parseInt(sessionStorage.getItem(location.pathname+"__EXISTS")||"-1",10)===history.length}catch(t){return!1}},enumerable:!1,configurable:!0}),X.prototype.setBaseCSS=function(){var t=document.createElement("style");t.innerHTML=N,document.getElementsByTagName("head")[0].appendChild(t)},X.prototype.resolveURL=function(t){var e=new URL(t,window.location.toString()),t=e;return void 0===e.href&&(t.href=String(e)),t},X.prototype.promiseModule=function(r){var t=this;return new Promise(function(n,o){return i(t,void 0,void 0,function(){var e,i;return h(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e=n,[4,r()];case 1:return e.apply(void 0,[t.sent()]),[3,3];case 2:return i=t.sent(),o(i),[3,3];case 3:return[2]}})})})},X.prototype.moduleSrcVerify=function(t){var e,i,n,o=this.config.capture;if(o)return this.moduleSrcCapture(t,o);if(o=this.config.allowHosts,!Array.isArray(o))return this.console.warn("[Module.config.allowHosts] is not defined!","Security risks exist: ",""),!0;for(e=new URL(decodeURIComponent(t),window.location.toString()).host,i=0,n=o;i<n.length;i++)if(e===n[i])return!0;return!1},X.prototype.moduleSrcCapture=function(t,e){var i,n;if(void 0===e&&(e=this.config.capture),n=(i=this.resolveURL(t)).origin+i.pathname,"string"==typeof e){if(e===n)return!0}else if("function"==typeof e&&e(i,t))return!0;return!1},X.prototype.getModuleByURL=function(t){var e,i,n,o=this.modules,r=this.resolveURL(t),s=r.origin+r.pathname;for(e in o){if(n=(i=o[e]).config.capture,this.moduleSrcCapture(t,n))return i;if(i.uri===s)return i}},X.prototype.setExists=function(){return new Promise(function(t,e){try{sessionStorage.setItem(location.pathname+"__EXISTS",String(history.length)),t()}catch(t){e()}})},X),E=(e(F,r=C),Object.defineProperty(F.prototype,"activeModule",{get:function(){var t=this.transform.id,t=this.modules[t];return t},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"preActiveModule",{get:function(){var t=this.transform.od,t=this.modules[t];return t},enumerable:!1,configurable:!0}),F.prototype.add=function(t,e){var i;return this.modules[t]||((i=null===(i=this.config)||void 0===i?void 0:i.moduleManifestProcess)&&(e=i(e)||e),this.modules[t]=new j(t,e,this))},F.prototype.del=function(i){var n=this;return new Promise(function(t,e){delete n.modules[i.id],i.status.init?i.destroy().then(t).catch(e):t()})},F.prototype.get=function(o){var r=this;return new Promise(function(e,t){var i,n;if("object"==typeof r.modules[o])return e(r.modules[o]);switch(typeof(i=r.options.modules[o])){case"function":r.promiseModule(i).then(function(t){e(r.add(o,t))}).catch(t);break;case"object":e(r.add(o,i));break;default:if(!r.moduleSrcVerify(n=o)){t();break}(n=r.createModuleByURL(n,{},o))?e(n):t()}})},F.prototype.cloneAsNewModule=function(t,e,i){return void 0===i&&(i={}),e?(i=Object.assign({},t.model.config,i),this.add(e,Object.assign({},t.model,{config:i}))):t},F.prototype.createModuleByURL=function(t,e,i){var n=decodeURIComponent(t),o=this.modules,o=null!==(o=o[n])&&void 0!==o?o:this.getModuleByURL(t);return o?i?this.cloneAsNewModule(o,i,e):o:this.add(n,{config:Object.assign({title:"",rel:"module",level:(null!==(n=null===(n=this.activeModule)||void 0===n?void 0:n.config.level)&&void 0!==n?n:0)+1,free:!0,source:{src:t},background:"auto",timeout:0,animation:"inherit",transient:!0},e)})},F.prototype.pushWindow=function(n,o,r,s,a){var t,u,c=this;return void 0===o&&(o=""),void 0===r&&(r="slide"),t=this.resolveURL(n),u=t.search,this.moduleSrcVerify(n)?new Promise(function(t,e){var i=c.createModuleByURL(n,{title:o,animation:r},s);i&&c.transform.to(i.id,null!==(i=null===(i=i.config)||void 0===i?void 0:i.source)&&void 0!==i&&i.html?u:"",1,a).then(t).catch(e)}):Promise.reject("Illegal")},F.prototype.beforehandDependencies=function(t,n){var o,e,i,r,s=this;for(void 0===n&&(n=!0),o=[],e=function(i){o.push(new Promise(function(e,t){s.get(i).then(function(t){n?t.prerender().then(e).catch(e):e("")}).catch(t)}))},r=t=void(i=0)===t?[]:t;i<r.length;i++)e(r[i]);return new Promise(function(t,e){Promise.all(o).then(t).catch(e)})},F.prototype.updateSafeArea=function(t){this.trigger("safeAreaChange",t)},F.prototype.updateGlobalCSSVariables=function(t){this.trigger("globalCSSVariablesChange",t)},F.prototype.createWorkerURL=function(t,e){e="\n this.addEventListener('install', function(event) {\n event.waitUntil(\n caches.open('v_"+e+"').then(function(cache) {\n return cache.addAll([\""+t.join('","')+"\"])\n })\n )\n })\n this.addEventListener('fetch', function(event) {\n event.respondWith(\n caches.match(event.request).then(function() {\n return fetch(event.request).then(function(response) {\n return caches.open('v_"+e+"').then(function(cache) {\n cache.put(event.request, response.clone())\n return response\n })\n })\n })\n )\n })\n self.addEventListener('activate', function(event) {\n event.waitUntil(\n caches.keys().then(function(keyList) {\n return Promise.all(keyList.map(function(key) {\n if (['v_"+e+"'].indexOf(key) === -1) {\n return caches.delete(key)\n }\n }))\n })\n )\n })\n ";return URL.createObjectURL(new Blob([e],{type:"text/html"}))},F.prototype.install=function(t,n){var o=this,r=t.swPathUrl,e=t.scope,s=void 0===e?"":e,t=t.source,a=void 0===t?[]:t;return r||a?new Promise(function(e,i){"serviceWorker"in navigator&&navigator.serviceWorker.register(r||o.createWorkerURL(a,n),{scope:s}).then(function(t){t.installing?console.log("Service worker installing"):t.waiting?console.log("Service worker installed"):t.active&&console.log("Service worker active"),e(t)}).catch(function(t){i(t)})}):Promise.reject()},F.prototype.mountSystem=function(){var t=this;this.options.modules.system&&this.get("system").then(function(){t.transform.to("system",void 0,-1).then(function(){t.trigger("systemDidMount")})})},F.prototype.mountFramework=function(){var o=this;this.get("frameworks").then(function(t){var e=o.route,i=t.config,n=i.index||"",t=i.preindex,e=e.id||n;if(o.config=i,o.transform.setup({singleFlow:i.singleFlow,singleLock:i.singleLock,index:n,defaultIndex:e,notFound:i.notFind,limit:Math.max(i.limit||7,2),exists:o.exists,defaultAnimation:i.animation,holdBack:i.holdBack}),o.transform.to("frameworks",void 0,-1).then(function(){o.trigger("frameworksDidMount")}),e!==n&&e!==t)return t&&o.transform.pushState(t),void(e&&o.transform.to(e));e&&o.transform.to(e)}).catch(function(){o.console.error("Module frameworks must be included!","Serious!","")})},F.prototype.start=function(){this.setExists(),this.mountFramework(),this.mountSystem()},F),C=new E;function F(){var t=r.call(this)||this;return t.transform=new q(t),t.to=t.transform.to,o(t),t}function X(){var t,n=a.call(this)||this;return n.properties={darkTheme:null===(t=null===(t=window.matchMedia)||void 0===t?void 0:t.call(window,"(prefers-color-scheme: dark)"))||void 0===t?void 0:t.matches},n.console={echo:function(t,e,i,n){console[t]("%c "+(e[0]?e[0]+" ":"")+"%c "+(i[0]?i[0]+" ":"")+"%c "+(n[0]?n[0]+" ":""),"color: #ffffff; background:"+e[1],"color: #ffffff; background:"+i[1],"color: #ffffff; background:"+(n[0]?n:i)[1])},log:function(t,e,i){n.console.echo("log",[e,"#999"],[t,"#333"],[i,"#666"])},info:function(t,e,i){n.console.echo("info",[e,"#0cf"],[t,"#06c"],[i,"#0c0"])},warn:function(t,e,i){n.console.echo("warn",[e,"#f60"],[t,"#f30"],[i,"#f90"])},error:function(t,e,i){n.console.echo("warn",[e,"#f06"],[t,"#903"],[i,"#993"])}},n.setBaseCSS(),n}function Q(){var t=u.call(this)||this;return t.modules={},t.historyNodeLocation=history.length,t.routerRegExp=/([^#\/]+)(.+)?/,t.options={modules:{}},t}function Y(t){return c.call(this,t)||this}function G(t){t=l.call(this,t)||this;return t.switchov