| 3 !function(t,e){function a(t,a,i){var r=e.createEvent("CustomEvent");return r.ini
tCustomEvent(t,!1,!0,a),i.dispatchEvent(r)}function i(e){var i=m.parseUrl(t.loca
tion.href,e.getAttribute("mode"));if(i.hash!==A.hash&&i.path===A.path&&i.search=
==A.search&&i.isHashPath===A.isHashPath)return g(i.hash),void 0;A=i;var n={path:
i.path};if(a("state-change",n,e)){for(var s=e.firstElementChild;s;){if("APP-ROUT
E"===s.tagName&&m.testRoute(s.getAttribute("path"),i.path,e.getAttribute("traili
ngSlash"),s.hasAttribute("regex")))return r(e,s,i),void 0;s=s.nextSibling}a("not
-found",n,e)}}function r(t,e,i){if(e.hasAttribute("redirect"))return t.go(e.getA
ttribute("redirect"),{replace:!0}),void 0;if(e!==t.activeRoute||"noop"!==e.getAt
tribute("onUrlChange")){var r={path:i.path,route:e,oldRoute:t.activeRoute};a("ac
tivate-route-start",r,t)&&a("activate-route-start",r,e)&&(t.loadingRoute=e,e===t
.activeRoute&&"updateModel"===e.getAttribute("onUrlChange")?n(t,e,i,r):e.hasAttr
ibute("import")?s(t,e.getAttribute("import"),e,i,r):e.hasAttribute("element")?u(
t,e.getAttribute("element"),e,i,r):e.firstElementChild&&"TEMPLATE"===e.firstElem
entChild.tagName&&(e.isInlineTemplate=!0,h(t,e.firstElementChild,e,i,r)))}}funct
ion n(t,e,i,r){var n=l(t,e,i,r);e.hasAttribute("template")||e.isInlineTemplate?c
(e.lastElementChild.templateInstance.model,n):c(e.firstElementChild,n),a("activa
te-route-end",r,t),a("activate-route-end",r,r.route)}function s(t,a,i,r,n){funct
ion s(){u.loaded=!0,o(t,u,a,i,r,n)}var u;b.hasOwnProperty(a)?(u=b[a],u.loaded?o(
t,u,a,i,r,n):u.addEventListener("load",s)):(u=e.createElement("link"),u.setAttri
bute("rel","import"),u.setAttribute("href",a),u.setAttribute("async","async"),u.
addEventListener("load",s),u.loaded=!1,e.head.appendChild(u),b[a]=u)}function o(
t,e,a,i,r,n){if(i.importLink=e,i===t.loadingRoute)if(i.hasAttribute("template"))
{var s,o=i.getAttribute("template");s=o?e.import.getElementById(o):e.import.quer
ySelector("template"),h(t,s,i,r,n)}else u(t,i.getAttribute("element")||a.split("
/").slice(-1)[0].replace(".html",""),i,r,n)}function u(t,a,i,r,n){var s=e.create
Element(a),o=l(t,i,r,n);c(s,o),p(t,s,r,n)}function h(t,a,i,r,n){var s;if("create
Instance"in a){var o=l(t,i,r,n);s=a.createInstance(o)}else s=e.importNode(a.cont
ent,!0);p(t,s,r,n)}function l(t,e,i,r){var n=m.routeArguments(e.getAttribute("pa
th"),i.path,i.search,e.hasAttribute("regex"),"auto"===t.getAttribute("typecast")
);return(e.hasAttribute("bindRouter")||t.hasAttribute("bindRouter"))&&(n.router=
t),r.model=n,a("before-data-binding",r,t),a("before-data-binding",r,r.route),r.m
odel}function c(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])}function p(
t,e,i,r){d(t.previousRoute),t.previousRoute=t.activeRoute,t.activeRoute=t.loadin
gRoute,t.loadingRoute=null,t.previousRoute&&t.previousRoute.removeAttribute("act
ive"),t.activeRoute.setAttribute("active","active"),t.hasAttribute("core-animate
d-pages")&&r.route!==r.oldRoute||d(t.previousRoute),t.activeRoute.appendChild(e)
,t.hasAttribute("core-animated-pages")&&(t.coreAnimatedPages.selected=t.activeRo
ute.getAttribute("path")),i.hash&&!t.hasAttribute("core-animated-pages")&&g(i.ha
sh),a("activate-route-end",r,t),a("activate-route-end",r,r.route)}function d(t){
if(t){var e=t.firstChild;for(t.isInlineTemplate&&(e=t.querySelector("template").
nextSibling);e;){var a=e;e=e.nextSibling,t.removeChild(a)}}}function g(t){t&&set
Timeout(function(){var a=e.querySelector("html /deep/ "+t)||e.querySelector('htm
l /deep/ [name="'+t.substring(1)+'"]');a&&a.scrollIntoView&&a.scrollIntoView(!0)
},0)}function v(t,e,a,i,r){var n=t[e],s=a[i];if("**"===n&&e===t.length-1)return!
0;if("undefined"==typeof n||"undefined"==typeof s)return n===s;if(n===s||"*"===n
||":"===n.charAt(0))return":"===n.charAt(0)&&"undefined"!=typeof r&&(r[n.substri
ng(1)]=a[i]),v(t,e+1,a,i+1,r);if("**"===n)for(var o=i;o<a.length;o++)if(v(t,e+1,
a,o,r))return!0;return!1}var m={},b={},f="ActiveXObject"in t,A={},E=Object.creat
e(HTMLElement.prototype);E.util=m,e.registerElement("app-route",{prototype:Objec
t.create(HTMLElement.prototype)}),E.attachedCallback=function(){"manual"!==this.
getAttribute("init")&&this.init()},E.init=function(){var a=this;a.isInitialized|
|(a.isInitialized=!0,a.hasAttribute("trailingSlash")||a.setAttribute("trailingSl
ash","strict"),a.hasAttribute("mode")||a.setAttribute("mode","auto"),a.hasAttrib
ute("typecast")||a.setAttribute("typecast","auto"),a.hasAttribute("core-animated
-pages")&&(a.createShadowRoot(),a.coreAnimatedPages=e.createElement("core-animat
ed-pages"),a.coreAnimatedPages.appendChild(e.createElement("content")),a.coreAni
matedPages.style.position="static",a.coreAnimatedPages.setAttribute("valueattr",
"path"),a.coreAnimatedPages.setAttribute("transitions",a.getAttribute("transitio
ns")),a.shadowRoot.appendChild(a.coreAnimatedPages),a.coreAnimatedPages.addEvent
Listener("core-animated-pages-transition-end",function(){a.previousRoute&&!a.pre
viousRoute.hasAttribute("active")&&d(a.previousRoute)})),a.stateChangeHandler=i.
bind(null,a),t.addEventListener("popstate",a.stateChangeHandler,!1),f&&t.addEven
tListener("hashchange",a.stateChangeHandler,!1),i(a))},E.detachedCallback=functi
on(){t.removeEventListener("popstate",this.stateChangeHandler,!1),f&&t.removeEve
ntListener("hashchange",this.stateChangeHandler,!1)},E.go=function(a,i){"pushsta
te"!==this.getAttribute("mode")&&(a="hashbang"===this.getAttribute("mode")?"#!"+
a:"#"+a),i&&i.replace===!0?t.history.replaceState(null,null,a):t.history.pushSta
te(null,null,a);try{var r=new PopStateEvent("popstate",{bubbles:!1,cancelable:!1
,state:{}});"dispatchEvent_"in t?t.dispatchEvent_(r):t.dispatchEvent(r)}catch(n)
{var s=e.createEvent("CustomEvent");s.initCustomEvent("popstate",!1,!1,{state:{}
}),t.dispatchEvent(s)}},m.parseUrl=function(t,a){var i={isHashPath:"hash"===a};i
f("function"==typeof URL){var r=new URL(t);i.path=r.pathname,i.hash=r.hash,i.sea
rch=r.search}else{var n=e.createElement("a");n.href=t,i.path=n.pathname,"/"!==i.
path.charAt(0)&&(i.path="/"+i.path),i.hash=n.hash,i.search=n.search}if("pushstat
e"!==a&&("#/"===i.hash.substring(0,2)?(i.isHashPath=!0,i.path=i.hash.substring(1
)):"#!/"===i.hash.substring(0,3)?(i.isHashPath=!0,i.path=i.hash.substring(2)):i.
isHashPath&&(i.path=0===i.hash.length?"/":i.hash.substring(1)),i.isHashPath)){i.
hash="";var s=i.path.indexOf("#");-1!==s&&(i.hash=i.path.substring(s),i.path=i.p
ath.substring(0,s));var o=i.path.indexOf("?");-1!==o&&(i.search=i.path.substring
(o),i.path=i.path.substring(0,o))}return i},m.testRoute=function(t,e,a,i){return
"ignore"===a&&("/"===e.slice(-1)&&(e=e.slice(0,-1)),"/"!==t.slice(-1)||i||(t=t.s
lice(0,-1))),i?m.testRegExString(t,e):t===e||"*"===t?!0:("/"!==t.charAt(0)&&(t="
/**/"+t),v(t.split("/"),1,e.split("/"),1))},m.routeArguments=function(t,e,a,i,r)
{var n={};i||("/"!==t.charAt(0)&&(t="/**/"+t),v(t.split("/"),1,e.split("/"),1,n)
);var s=a.substring(1).split("&");1===s.length&&""===s[0]&&(s=[]);for(var o=0;o<
s.length;o++){var u=s[o],h=u.split("=");n[h[0]]=h.splice(1,h.length-1).join("=")
}if(r)for(var l in n)n[l]=m.typecast(n[l]);return n},m.typecast=function(t){retu
rn"true"===t?!0:"false"===t?!1:isNaN(t)||""===t||"0"===t.charAt(0)?decodeURIComp
onent(t):+t},m.testRegExString=function(t,e){if("/"!==t.charAt(0))return!1;t=t.s
lice(1);var a="";if("/"===t.slice(-1))t=t.slice(0,-1);else{if("/i"!==t.slice(-2)
)return!1;t=t.slice(0,-2),a="i"}return new RegExp(t,a).test(e)},e.registerElemen
t("app-router",{prototype:E})}(window,document); |