From 78b7aca90447176ce03b1f87fc67a860bc142a72 Mon Sep 17 00:00:00 2001 From: ikeq <9206414+ikeq@users.noreply.github.com> Date: Sat, 2 Nov 2019 17:17:06 +0800 Subject: [PATCH] update to hexo@4.0 (#166) * Update .npmignore * Update dependency uglify-js to v3.6.3 (#158) * Update dependency uglify-js to v3.6.4 (#162) * upgrade to hexo@4.0 * Update dependency uglify-js to v3.6.5 (#163) * drop angular i18n * update badage * Update dependency uglify-js to v3.6.7 (#164) * support string as content_width --- .npmignore | 1 - README.md | 6 +- README_zh-Hans.md | 6 +- languages/default.yml | 51 ------------ layout/index.ejs | 30 ------- layout/index.swig | 33 ++++++++ lib/config.js | 3 +- lib/configSchema.json | 7 +- lib/filter/post.js | 20 ++++- lib/generator/entries/archives.js | 78 ++++++++++--------- lib/generator/entries/properties.js | 10 +-- lib/theme-processor/index.js | 3 - lib/theme-processor/localized-script.js | 17 ---- package.json | 6 +- scripts/index.js | 1 - source/_resources.json | 2 +- source/_theme.js | 2 +- source/main.0c926d87f8cb6ab96db0.js | 1 + source/main.5ac6b548dbff945e028b.zh-Hant.js | 1 - source/main.7773219322474154c9eb.zh-Hans.js | 1 - source/main.a6ef31dc523c76e5118c.js | 1 - source/main.c145738ea9113b8ce68e.ja.js | 1 - source/polyfills.14df1390f4da8e838f05.js | 1 + source/polyfills.28555e618578fe61f50a.js | 1 - ...c5a.js => runtime.ee6f73bc31187f12810a.js} | 0 source/styles.6d727dade1159bc77736.css | 1 + source/styles.d1f4718a192abf1f2afd.css | 24 ------ test/scripts/filters/post.js | 2 +- test/scripts/filters/template.js | 7 +- 29 files changed, 127 insertions(+), 190 deletions(-) delete mode 100644 languages/default.yml delete mode 100644 layout/index.ejs create mode 100644 layout/index.swig delete mode 100644 lib/theme-processor/index.js delete mode 100644 lib/theme-processor/localized-script.js create mode 100644 source/main.0c926d87f8cb6ab96db0.js delete mode 100644 source/main.5ac6b548dbff945e028b.zh-Hant.js delete mode 100644 source/main.7773219322474154c9eb.zh-Hans.js delete mode 100644 source/main.a6ef31dc523c76e5118c.js delete mode 100644 source/main.c145738ea9113b8ce68e.ja.js create mode 100644 source/polyfills.14df1390f4da8e838f05.js delete mode 100644 source/polyfills.28555e618578fe61f50a.js rename source/{runtime.caef73fae70e33459c5a.js => runtime.ee6f73bc31187f12810a.js} (100%) create mode 100644 source/styles.6d727dade1159bc77736.css delete mode 100644 source/styles.d1f4718a192abf1f2afd.css diff --git a/.npmignore b/.npmignore index c30a216..9cd73ff 100644 --- a/.npmignore +++ b/.npmignore @@ -2,4 +2,3 @@ test/ .travis.yml .github/ .DS_Store -renovate.json diff --git a/README.md b/README.md index 47735ce..9fc37fb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # Inside -[![build-img]][travis] [![release-img]][releases] [![license-img]](LICENSE) +[![build-img]][travis] +[![release-img]][releases] +[![hexo-image]][hexo] +[![license-img]](LICENSE) ❤️ SPA, flat and clean theme for [Hexo]. @@ -92,3 +95,4 @@ Licensed under [MIT](LICENSE). [releases]: https://github.com/ikeq/hexo-theme-inside/releases [travis]: https://travis-ci.org/ikeq/hexo-theme-inside [documentation]: https://blog.oniuo.com/theme-inside +[hexo-image]: https://img.shields.io/badge/hexo-%3E%3D%204.0-blue.svg?longCache=true&style=flat-square diff --git a/README_zh-Hans.md b/README_zh-Hans.md index ccbda9d..548ba49 100644 --- a/README_zh-Hans.md +++ b/README_zh-Hans.md @@ -1,6 +1,9 @@ # Inside -[![build-img]][travis] [![release-img]][releases] [![license-img]](LICENSE) +[![build-img]][travis] +[![release-img]][releases] +[![license-img]](LICENSE) +[![hexo-image]][hexo] ❤️ SPA, flat and clean theme for [Hexo]. @@ -91,3 +94,4 @@ Licensed under [MIT](LICENSE). [releases]: https://github.com/ikeq/hexo-theme-inside/releases [travis]: https://travis-ci.org/ikeq/hexo-theme-inside [documentation]: https://blog.oniuo.com/theme-inside +[hexo-image]: https://img.shields.io/badge/hexo-%3E%3D%204.0-blue.svg?longCache=true&style=flat-square diff --git a/languages/default.yml b/languages/default.yml deleted file mode 100644 index 4732bc2..0000000 --- a/languages/default.yml +++ /dev/null @@ -1,51 +0,0 @@ -menu: - archives: Archives - categories: Categories - tags: Tags - -title: - archives: Archive - categories: Category - tags: Tag - search: Search - -footer: - powered: Powered by %s - theme: Theme - -reward: - paypal: Paypal - wechat: WeChat - alipay: 支 - bitcoin: Bitcoin - -comments: - load: Load %s - load_faild: Faild to load %s, click to retry - livere: Livere - disqus: Disqus - -post: - copyright: - author: Author - link: Link - license: Copyright - published: Published - updated: Updated - -page: - tags: - zero: No tags - one: 1 tag in total - other: "%d tags in total" - - notfound: - direct_failed: Failed to direct to %s - empty: Nothing here. - - search: - placeholder: Search - hits: - zero: No result found for ":query" - one: 1 result found in :time ms - other: ":hits results found in :time ms" diff --git a/layout/index.ejs b/layout/index.ejs deleted file mode 100644 index b397771..0000000 --- a/layout/index.ejs +++ /dev/null @@ -1,30 +0,0 @@ - - - - -<%= title %> - - - - -<% if (theme.pwa.manifest) { -%> - - - -<% } -%> -<%- open_graph({ image: page.thumbnail || theme.profile.avatar }) %> -<% if (theme.seo.structured_data) { %><%- structured_data(page) %> -<% } -%> -<% if (config.feed && config.feed.path) { -%> - -<% } -%> -<%- theme.styles %> -<%- css('theme.' + theme.runtime.themeHash) %> -<%- js('config.' + theme.runtime.configHash) %> -<% if (theme.ga) { %><%- ga(theme.ga) %><% } -%> - - -<%- `<${theme.runtime.selector}>` %> -<%- theme.scripts %> - - diff --git a/layout/index.swig b/layout/index.swig new file mode 100644 index 0000000..cc676b5 --- /dev/null +++ b/layout/index.swig @@ -0,0 +1,33 @@ + + + + +{{ title }} + + + + +{% if theme.pwa.manifest %} + + + +{% endif %} +{{ open_graph({ image: page.thumbnail || theme.profile.avatar }) | safe }} +{% if theme.seo.structured_data %} +{{ structured_data(page) | safe }} +{% endif %} +{% if config.feed and config.feed.path %} + +{% endif %} +{{ theme.styles | safe }} +{{ css('theme.' + theme.runtime.themeHash) | safe }} +{{ js('config.' + theme.runtime.configHash) | safe }} +{% if theme.ga %} +{{ ga(theme.ga) | safe }} +{% endif %} + + +<{{ theme.runtime.selector }}> +{{ theme.scripts | safe }} + + diff --git a/lib/config.js b/lib/config.js index 03b6fb6..37b9d14 100644 --- a/lib/config.js +++ b/lib/config.js @@ -64,8 +64,7 @@ module.exports = function (hexo) { // plugins comes first to ensure that their libs is ready when executing dynamic code. ...(result.plugins || []), ...resources.styles, - ...resources.scripts, - resources.locales[site.language] + ...resources.scripts ]; if (theme.appearance.font && theme.appearance.font.url) diff --git a/lib/configSchema.json b/lib/configSchema.json index 247bca6..d84a017 100644 --- a/lib/configSchema.json +++ b/lib/configSchema.json @@ -30,7 +30,12 @@ "background": { "type": "string" }, "sidebar_background": { "type": "string" }, "card_background": { "type": "string" }, - "content_width": { "type": "number", "minimum": 320 }, + "content_width": { + "oneOf": [ + { "type": "number" }, + { "type": "string" } + ] + }, "font": { "type": "object", "properties": { diff --git a/lib/filter/post.js b/lib/filter/post.js index 067d28f..8764cae 100644 --- a/lib/filter/post.js +++ b/lib/filter/post.js @@ -3,6 +3,11 @@ const { date } = require('hexo/lib/plugins/helper/date'); const bounded = '
'; const table = '
'; const { snippet, parseToc, isObject, isEmptyObject, localeId, pick, trimHtml } = require('../utils'); +const date_formats = [ + 'll', // Sep 4, 1986 + 'L', // 09/04/1986 + 'MM-DD' // 06-17 +] // cache let hasComments, hasReward, hasToc, copyright, dateHelper, uriReplacer; @@ -36,6 +41,12 @@ module.exports = function (data) { (s, p) => /\//.test(s) ? s : `/${p}/${s}` : s => s; + // pre format date for i18n + data.date_formatted = date_formats.reduce((ret, format) => { + ret[format] = dateHelper(data.date, format) + return ret + }, {}) + // relative link data.link = trimHtml(data.path); // permalink link @@ -112,8 +123,13 @@ module.exports = function (data) { const $img = $(this); const src = $img.attr('src'); - // assets & post_asset_folder - src && $img.attr('src', uriReplacer(src, assetPath)); + if (src) { + // assets & post_asset_folder + $img.attr('src', uriReplacer(src, assetPath)); + + // native lazyload + // $img.attr('loading', 'lazy') + } if ( this.root // {% img %} diff --git a/lib/generator/entries/archives.js b/lib/generator/entries/archives.js index cc45b17..49c9bad 100644 --- a/lib/generator/entries/archives.js +++ b/lib/generator/entries/archives.js @@ -1,10 +1,12 @@ const { flattenDeep } = require('lodash'); -const { pick } = require('../../utils'); +const { date } = require('hexo/lib/plugins/helper/date'); +const { pick, localeId } = require('../../utils'); const { archive: archiveProps } = require('./properties'); -module.exports = function ({ theme, locals, helpers }) { +module.exports = function ({ site, theme, locals, helpers }) { const posts = locals.posts.map(pick(archiveProps)); const config = theme.archive; + const dateHelper = date.bind({ page: { lang: localeId(site.language, true) }, config }) if (!posts.length) return []; @@ -14,49 +16,49 @@ module.exports = function ({ theme, locals, helpers }) { { type: 'html', extend: { type: 'archives' } }, ]) ); -} -/** - * Classify posts with `year` and `month` - * - * @param {object} data - * @returns {data} - */ -function classify(data) { - const posts = data.data; + /** + * Classify posts with `year` and `month` + * + * @param {object} data + * @returns {data} + */ + function classify(data) { + const posts = data.data; - if (!posts.length) return []; + if (!posts.length) return []; - const desc = (a, b) => parseInt(a) < parseInt(b) ? 1 : -1; - const cfyPosts = {}; + const desc = (a, b) => parseInt(a) < parseInt(b) ? 1 : -1; + const cfyPosts = {}; - posts.forEach(post => { - const date = post.date.clone(), - year = date.year(), - month = date.month() + 1; + posts.forEach(post => { + const date = post.date.clone(), + year = date.year(), + month = date.month() + 1; - if (cfyPosts[year]) { - if (cfyPosts[year][month]) cfyPosts[year][month].push(post) - else cfyPosts[year][month] = [post] - } else { - cfyPosts[year] = { - [month]: [post] + if (cfyPosts[year]) { + if (cfyPosts[year][month]) cfyPosts[year][month].push(post) + else cfyPosts[year][month] = [post] + } else { + cfyPosts[year] = { + [month]: [post] + } } - } - }); + }); - data.data = Object.keys(cfyPosts).sort(desc).map(year => { - return { - year: year, - months: Object.keys(cfyPosts[year]).sort(desc).map(month => { - return { - month: month, - entries: cfyPosts[year][month] - } - }) - } - }) + data.data = Object.keys(cfyPosts).sort(desc).map(year => { + return { + year: year, + months: Object.keys(cfyPosts[year]).sort(desc).map(month => { + return { + month: dateHelper(month, 'MMM'), + entries: cfyPosts[year][month] + } + }) + } + }) - return data; + return data; + } } diff --git a/lib/generator/entries/properties.js b/lib/generator/entries/properties.js index 7f79243..fb8f242 100644 --- a/lib/generator/entries/properties.js +++ b/lib/generator/entries/properties.js @@ -1,11 +1,11 @@ -const listProps = ['title', 'date', 'link']; +const listProps = ['title', 'date', 'date_formatted', 'link']; module.exports = { archive: listProps, categoryPosts: listProps, tagPosts: listProps, - page: ['title', 'date', 'updated', 'content', 'link', 'comments', 'dropcap', 'plink', 'toc', 'reward', 'copyright', 'meta'], - post: ['title', 'date', 'author', 'thumbnail', 'color', 'link', 'comments', 'dropcap', 'tags', 'categories', 'updated', 'content', 'prev', 'next', 'plink', 'toc', 'reward', 'copyright'], - postList: ['title', 'date', 'author', 'thumbnail', 'color', 'excerpt', 'link', 'tags', 'categories'], - search: ['title', 'date', 'author', 'updated', 'content', 'thumbnail', 'color', 'plink'] + page: ['title', 'date', 'date_formatted', 'updated', 'content', 'link', 'comments', 'dropcap', 'plink', 'toc', 'reward', 'copyright', 'meta'], + post: ['title', 'date', 'date_formatted', 'author', 'thumbnail', 'color', 'link', 'comments', 'dropcap', 'tags', 'categories', 'updated', 'content', 'prev', 'next', 'plink', 'toc', 'reward', 'copyright'], + postList: ['title', 'date', 'date_formatted', 'author', 'thumbnail', 'color', 'excerpt', 'link', 'tags', 'categories'], + search: ['title', 'date', 'date_formatted', 'author', 'updated', 'content', 'thumbnail', 'color', 'plink'] } diff --git a/lib/theme-processor/index.js b/lib/theme-processor/index.js deleted file mode 100644 index 7459016..0000000 --- a/lib/theme-processor/index.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (hexo) { - hexo.theme.processors.push(require('./localized-script')(hexo)); -}; diff --git a/lib/theme-processor/localized-script.js b/lib/theme-processor/localized-script.js deleted file mode 100644 index 7b9db7d..0000000 --- a/lib/theme-processor/localized-script.js +++ /dev/null @@ -1,17 +0,0 @@ -const { localeId } = require('../utils'); -const { Pattern } = require('hexo-util'); -const { locales: localeScripts } = require('../../source/_resources.json'); - -module.exports = function (hexo) { - const lang = localeId(hexo.config.language); - - return { - process: function (file) { - const Asset = this.model('Asset'); - const id = file.source.substring(this.base_dir.length).replace(/\\/g, '/') - const doc = Asset.findById(id); - if (doc && (!localeScripts[lang] || !file.path.match(localeScripts[lang]))) doc.remove(); - }, - pattern: new Pattern(/source\/main.*\.js$/) - } -} diff --git a/package.json b/package.json index 2b968a1..307656f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-inside", - "version": "2.4.2", + "version": "2.5.0", "description": "❤️ SPA, flat and clean theme for Hexo.", "scripts": { "test": "jasmine --config=test/jasmine.json" @@ -26,8 +26,8 @@ "devDependencies": { "babel-core": "6.26.3", "babel-preset-env": "1.7.0", - "hexo": "3.9.0", + "hexo": "4.0.0", "jasmine": "3.5.0", - "uglify-js": "3.6.2" + "uglify-js": "3.6.7" } } diff --git a/scripts/index.js b/scripts/index.js index 1b2280a..6ce5be3 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -3,4 +3,3 @@ require('../lib/helper')(hexo); require('../lib/generator')(hexo); require('../lib/filter')(hexo); require('../lib/tag')(hexo); -require('../lib/theme-processor')(hexo); diff --git a/source/_resources.json b/source/_resources.json index 400e3df..d2d01da 100644 --- a/source/_resources.json +++ b/source/_resources.json @@ -1 +1 @@ -{"root":"is-a","styles":["styles.d1f4718a192abf1f2afd.css"],"scripts":["runtime.caef73fae70e33459c5a.js","polyfills.28555e618578fe61f50a.js"],"locales":{"zh-Hant":"main.5ac6b548dbff945e028b.zh-Hant.js","zh-Hans":"main.7773219322474154c9eb.zh-Hans.js","en":"main.a6ef31dc523c76e5118c.js","ja":"main.c145738ea9113b8ce68e.ja.js"}} +{"root":"is-a","styles":["styles.6d727dade1159bc77736.css"],"scripts":["runtime.ee6f73bc31187f12810a.js","polyfills.14df1390f4da8e838f05.js","main.0c926d87f8cb6ab96db0.js"]} diff --git a/source/_theme.js b/source/_theme.js index 24881d2..16823dc 100644 --- a/source/_theme.js +++ b/source/_theme.js @@ -1 +1 @@ -!function(o,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var t=r();for(var e in t)("object"==typeof exports?exports:o)[e]=t[e]}}(this.__inside__||(this.__inside__={}),function(){return function(o){var r={};function t(e){if(r[e])return r[e].exports;var i=r[e]={i:e,l:!1,exports:{}};return o[e].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=o,t.c=r,t.d=function(o,r,e){t.o(o,r)||Object.defineProperty(o,r,{enumerable:!0,get:e})},t.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},t.t=function(o,r){if(1&r&&(o=t(o)),8&r)return o;if(4&r&&"object"==typeof o&&o&&o.__esModule)return o;var e=Object.create(null);if(t.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:o}),2&r&&"string"!=typeof o)for(var i in o)t.d(e,i,function(r){return o[r]}.bind(null,i));return e},t.n=function(o){var r=o&&o.__esModule?function(){return o.default}:function(){return o};return t.d(r,"a",r),r},t.o=function(o,r){return Object.prototype.hasOwnProperty.call(o,r)},t.p="",t(t.s=16)}([function(o,r,t){"use strict";o.exports=function(o){var r=[];return r.toString=function(){return this.map(function(r){var t=function(o,r){var t=o[1]||"",e=o[3];if(!e)return t;if(r&&"function"==typeof btoa){var i=(h=e,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(h))))+" */"),n=e.sources.map(function(o){return"/*# sourceURL="+e.sourceRoot+o+" */"});return[t].concat(n).concat([i]).join("\n")}var h;return[t].join("\n")}(r,o);return r[2]?"@media "+r[2]+"{"+t+"}":t}).join("")},r.i=function(o,t){"string"==typeof o&&(o=[[null,o,""]]);for(var e={},i=0;idiv{box-shadow:inset 0 0 0 1px MODE_BORDER}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,".q{max-width:CONTENT_WIDTHpx}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,"::-moz-selection{background-color:COLOR;color:#fff}::selection{background-color:COLOR;color:#fff}::-webkit-scrollbar-thumb{background-color:COLOR_02}::-webkit-scrollbar-thumb:hover{background-color:COLOR_08}code{color:COLOR}.article-table tr:nth-child(2n),code{background-color:COLOR_005}@media (max-width:676px){.x{background:SIDEBAR_BACKGROUND}}.b,.e:after,.f:before,.g:active,.g:focus,.g:hover,.h:active:after,.h:focus:after,.h:hover:after,.i:active:before,.i:focus:before,.i:hover:before{background-color:COLOR}.d{background-color:COLOR_01}.c{background-color:COLOR_005}.o,.p:active,.p:focus,.p:hover{color:COLOR}.m{border-color:COLOR}.n{border-color:COLOR_04}.a a:hover{border-color:COLOR;color:COLOR}.bc{stroke:COLOR}.r{fill:COLOR}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,".j,.k:after,body{background:BACKGROUND}@media (max-width:676px){.l{background:BACKGROUND}}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,"body{font-family:FONT_BASE}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,".v{font-family:FONT_LOGO}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,".w{font-family:FONT_MENU}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,".s,h1,h2,h3,h4,h5,h6{font-family:FONT_HEADING}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,".t,.u:after{font-family:FONT_LABEL}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,".highlight figcaption,code,pre{font-family:FONT_CODE}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,"@media print{body{font-family:FONT_PRINT}}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,".highlight{border-radius:3px;color:base05}.highlight .gutter{color:base03}.highlight figcaption{color:base04}.highlight figcaption a,.highlight figcaption a:hover{color:base0C}.highlight ::-webkit-scrollbar-thumb{background-color:base01}.highlight ::-webkit-scrollbar-thumb:hover{background-color:base02}.highlight ::-moz-selection{background-color:base02;color:inherit}.highlight ::selection{background-color:base02;color:inherit}.highlight .comment,.highlight .quote{color:base03}.highlight .deletion,.highlight .name,.highlight .regexp,.highlight .selector-class,.highlight .selector-id,.highlight .tag,.highlight .template-variable,.highlight .variable{color:base08}.highlight .built_in,.highlight .builtin-name,.highlight .link,.highlight .literal,.highlight .meta,.highlight .number,.highlight .params,.highlight .type{color:base09}.highlight .attribute{color:base0A}.highlight .addition,.highlight .bullet,.highlight .string,.highlight .symbol{color:base0B}.highlight .section,.highlight .title{color:base0D}.highlight .keyword,.highlight .selector-tag{color:base0E}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,".highlight{background-color:base00}.highlight figcaption{border-radius:3px 3px 0 0;background-color:base01}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,".highlight{border:1px solid base01}.highlight figcaption{background-color:base01}",""])},function(o,r,t){(o.exports=t(0)(!1)).push([o.i,".highlight{border:1px solid;border-color:inherit}.highlight figcaption{border-bottom:1px solid;border-color:inherit}",""])},function(o,r,t){"use strict";t.r(r);var e=function(){return(e=Object.assign||function(o){for(var r,t=1,e=arguments.length;t640&&(t.content_width=f);Array.isArray(d)?(t.highlight=d.map(function(o){return l(o).hex}).filter(function(o){return o}),t.highlight.length<16&&(t.highlight=r.highlight)):t.highlight=r.highlight;return t}(o,c),t=[];if(t.push(h.mode.replace(/MODE_FG/g,r.foreground_color).replace(/MODE_CARD_BG/g,r.card_background).replace(/MODE_BORDER/g,r.border_color)),r.font){var e=r.font;e.base&&t.push(h.font.base.replace(/FONT_BASE/g,e.base)),e.logo&&t.push(h.font.logo.replace(/FONT_LOGO/g,e.logo)),e.menu&&t.push(h.font.menu.replace(/FONT_MENU/g,e.menu)),e.heading&&t.push(h.font.heading.replace(/FONT_HEADING/g,e.heading)),e.label&&t.push(h.font.label.replace(/FONT_LABEL/g,e.label)),e.code&&t.push(h.font.code.replace(/FONT_CODE/g,e.code)),e.print&&t.push(h.font.print.replace(/FONT_PRINT/g,e.print))}var i=l(r.accent_color);return t.push(h.background.replace(/BACKGROUND/g,r.background),h.accent_color.replace(/COLOR_005/g,"rgba("+i.r+","+i.g+","+i.b+",.05)").replace(/COLOR_01/g,"rgba("+i.r+","+i.g+","+i.b+",.1)").replace(/COLOR_02/g,"rgba("+i.r+","+i.g+","+i.b+",.2)").replace(/COLOR_04/g,"rgba("+i.r+","+i.g+","+i.b+",.4)").replace(/COLOR_08/g,"rgba("+i.r+","+i.g+","+i.b+",.8)").replace(/COLOR/g,i.hex).replace(/SIDEBAR_BACKGROUND/g,g(r.sidebar_background))),r.content_width&&t.push(h.content_width.replace(/CONTENT_WIDTH/g,r.content_width)),t.push(d(h.highlight.base,r.highlight)),s(r.card_background,r.highlight[0])||s(r.highlight[15],r.highlight[0])?s(r.card_background,r.highlight[1])||s(r.highlight[15],r.highlight[1])?t.push(h.highlight.bordered_mix):t.push(d(h.highlight.bordered,r.highlight)):(s(r.card_background,r.highlight[1])&&(r.highlight[1]=r.highlight[0]),t.push(d(h.highlight.flat,r.highlight))),t.join("")}}function g(o){var r=/(^data:image)|(^[^\(^'^"]*\.(jpg|png|gif|svg))/;return o.split(/\s+/).map(function(o){return o.match(r)?"url("+o+")":o}).join(" ")}function l(o,r){if(o=(o||"").trim(),i.test(o))return e({hex:o},f(o));if(n.test(o)){var t=o.match(n).slice(1,4).map(function(o){return+o}).filter(function(o){return o<256});if(3===t.length)return{hex:u.apply(null,t),r:t[0],g:t[1],b:t[2]}}return r?e({hex:r},f(r)):{}}function u(o,r,t){return"#"+((1<<24)+(o<<16)+(r<<8)+t).toString(16).slice(1)}function f(o){o=o.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(o,r,t,e){return r+r+t+t+e+e});var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null}function b(o,r){void 0===r&&(r=[]);var t=o?o.split(","):[],e=[];return t.forEach(function(o){(o=o.trim())&&!~r.indexOf(o)&&e.push(o)}),e.concat(r)}function d(o,r){return r.reduce(function(o,r,t){var e=new RegExp("base0"+t.toString(16).toUpperCase(),"g");return o.replace(e,r)},o)}function s(o,r){var t=l(o),e=l(r);return t&&e&&t.r===e.r&&t.g===e.g&&t.b===e.b}}])}); \ No newline at end of file +!function(r,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var e=o();for(var t in e)("object"==typeof exports?exports:r)[t]=e[t]}}(this.__inside__||(this.__inside__={}),function(){return function(r){var o={};function e(t){if(o[t])return o[t].exports;var i=o[t]={i:t,l:!1,exports:{}};return r[t].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=r,e.c=o,e.d=function(r,o,t){e.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:t})},e.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,o){if(1&o&&(r=e(r)),8&o)return r;if(4&o&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(e.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&o&&"string"!=typeof r)for(var i in r)e.d(t,i,function(o){return r[o]}.bind(null,i));return t},e.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(o,"a",o),o},e.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},e.p="",e(e.s=16)}([function(r,o,e){"use strict";r.exports=function(r){var o=[];return o.toString=function(){return this.map(function(o){var e=function(r,o){var e=r[1]||"",t=r[3];if(!t)return e;if(o&&"function"==typeof btoa){var i=(h=t,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(h))))+" */"),n=t.sources.map(function(r){return"/*# sourceURL="+t.sourceRoot+r+" */"});return[e].concat(n).concat([i]).join("\n")}var h;return[e].join("\n")}(o,r);return o[2]?"@media "+o[2]+"{"+e+"}":e}).join("")},o.i=function(r,e){"string"==typeof r&&(r=[[null,r,""]]);for(var t={},i=0;idiv{box-shadow:inset 0 0 0 1px MODE_BORDER}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,".b{max-width:CONTENT_WIDTH}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,"::-moz-selection{background-color:COLOR;color:#fff}::selection{background-color:COLOR;color:#fff}::-webkit-scrollbar-thumb{background-color:COLOR_02}::-webkit-scrollbar-thumb:hover{background-color:COLOR_08}code{color:COLOR}.article-table tr:nth-child(2n),code{background-color:COLOR_005}@media (max-width:676px){.v{background:SIDEBAR_BACKGROUND}}.a:active,.a:focus,.a:hover,.q:active:before,.q:focus:before,.q:hover:before,.r:active:after,.r:focus:after,.r:hover:after,.s:before,.t:after,.u{background-color:COLOR}.o{background-color:COLOR_01}.n{background-color:COLOR_005}.l:active,.l:focus,.l:hover,.m{color:COLOR}.k{border-color:COLOR}.j{border-color:COLOR_04}.h:active,.h:focus,.h:hover,.i{border-color:COLOR_02}.g a:hover{border-color:COLOR;color:COLOR}.f{stroke:COLOR}.e{fill:COLOR}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,".c:after,.d,body{background:BACKGROUND}@media (max-width:676px){.p{background:BACKGROUND}}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,"body{font-family:FONT_BASE}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,".be{font-family:FONT_LOGO}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,".bc{font-family:FONT_MENU}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,".bd,h1,h2,h3,h4,h5,h6{font-family:FONT_HEADING}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,".ba:after,.bb{font-family:FONT_LABEL}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,".highlight figcaption,code,pre{font-family:FONT_CODE}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,"@media print{body{font-family:FONT_PRINT}}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,".highlight{border-radius:3px;color:base05}.highlight .gutter{color:base03}.highlight figcaption{color:base04}.highlight figcaption a,.highlight figcaption a:hover{color:base0C}.highlight ::-webkit-scrollbar-thumb{background-color:base01}.highlight ::-webkit-scrollbar-thumb:hover{background-color:base02}.highlight ::-moz-selection{background-color:base02;color:inherit}.highlight ::selection{background-color:base02;color:inherit}.highlight .comment,.highlight .quote{color:base03}.highlight .deletion,.highlight .name,.highlight .regexp,.highlight .selector-class,.highlight .selector-id,.highlight .tag,.highlight .template-variable,.highlight .variable{color:base08}.highlight .built_in,.highlight .builtin-name,.highlight .link,.highlight .literal,.highlight .meta,.highlight .number,.highlight .params,.highlight .type{color:base09}.highlight .attribute{color:base0A}.highlight .addition,.highlight .bullet,.highlight .string,.highlight .symbol{color:base0B}.highlight .section,.highlight .title{color:base0D}.highlight .keyword,.highlight .selector-tag{color:base0E}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,".highlight{background-color:base00}.highlight figcaption{border-radius:3px 3px 0 0;background-color:base01}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,".highlight{border:1px solid base01}.highlight figcaption{background-color:base01}",""])},function(r,o,e){(r.exports=e(0)(!1)).push([r.i,".highlight{border:1px solid;border-color:inherit}.highlight figcaption{border-bottom:1px solid;border-color:inherit}",""])},function(r,o,e){"use strict";e.r(o);var t=function(){return(t=Object.assign||function(r){for(var o,e=1,t=arguments.length;e=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}}}function u(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,o,i=e.call(t),l=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)l.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return l}function a(){for(var t=[],n=0;n0?this._next(n.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},n}(M);function W(t){return t}function Q(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),q(W,t)}function Z(t,n){return n?H(t,n):new _(R(t))}function K(){return function(t){return t.lift(new G(t))}}var G=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,n){var e=this.connectable;e._refCount++;var r=new Y(t,e),o=n.subscribe(r);return r.closed||(r.connection=e.connect()),o},t}(),Y=function(t){function n(n,e){var r=t.call(this,n)||this;return r.connectable=e,r}return r.b(n,t),n.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var n=t._refCount;if(n<=0)this.connection=null;else if(t._refCount=n-1,n>1)this.connection=null;else{var e=this.connection,r=t._connection;this.connection=null,!r||e&&r!==e||r.unsubscribe()}}else this.connection=null},n}(g),J=function(t){function n(n,e){var r=t.call(this)||this;return r.source=n,r.subjectFactory=e,r._refCount=0,r._isComplete=!1,r}return r.b(n,t),n.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},n.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},n.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new a).add(this.source.subscribe(new tt(this.getSubject(),this))),t.closed&&(this._connection=null,t=a.EMPTY)),t},n.prototype.refCount=function(){return K()(this)},n}(_),X=function(){var t=J.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),tt=function(t){function n(n,e){var r=t.call(this,n)||this;return r.connectable=e,r}return r.b(n,t),n.prototype._error=function(n){this._unsubscribe(),t.prototype._error.call(this,n)},n.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},n.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var n=t._connection;t._refCount=0,t._subject=null,t._connection=null,n&&n.unsubscribe()}},n}(I);function nt(){return new E}var et="__parameters__";function rt(t,n,e){var o=function(t){return function(){for(var n=[],e=0;e ");else if("object"==typeof n){var i=[];for(var l in n)if(n.hasOwnProperty(l)){var u=n[l];i.push(l+":"+("string"==typeof u?JSON.stringify(u):ht(u)))}o="{"+i.join(", ")+"}"}return e+(r?"("+r+")":"")+"["+o+"]: "+t.replace(Et,"\n ")}var Dt=function(){return function(){}}(),Lt=function(){return function(){}}();function Mt(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function Ut(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}var Vt=function(t){return t[t.Emulated=0]="Emulated",t[t.Native=1]="Native",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({}),Ft=function(){return("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(xt)}(),Ht="ngDebugContext",zt="ngOriginalError",qt="ngErrorLogger";function Bt(t){return t[Ht]}function $t(t){return t[zt]}function Wt(t){for(var n=[],e=1;e',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='

',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(t){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return t.prototype.getInertBodyElement_XHR=function(t){t=""+t+"";try{t=encodeURI(t)}catch(r){return null}var n=new XMLHttpRequest;n.responseType="document",n.open("GET","data:text/html;charset=utf-8,"+t,!1),n.send(void 0);var e=n.response.body;return e.removeChild(e.firstChild),e},t.prototype.getInertBodyElement_DOMParser=function(t){t=""+t+"";try{var n=(new window.DOMParser).parseFromString(t,"text/html").body;return n.removeChild(n.firstChild),n}catch(e){return null}},t.prototype.getInertBodyElement_InertDocument=function(t){var n=this.inertDocument.createElement("template");return"content"in n?(n.innerHTML=t,n):(this.inertBodyElement.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)},t.prototype.stripCustomNsAttrs=function(t){for(var n=t.attributes,e=n.length-1;0"),!0},t.prototype.endElement=function(t){var n=t.nodeName.toLowerCase();sn.hasOwnProperty(n)&&!on.hasOwnProperty(n)&&(this.buf.push(""))},t.prototype.chars=function(t){this.buf.push(mn(t))},t.prototype.checkClobberedElement=function(t,n){if(n&&(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return n},t}(),gn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vn=/([^\#-~ |!])/g;function mn(t){return t.replace(/&/g,"&").replace(gn,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(vn,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}function yn(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var bn=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({}),wn=function(){return function(){}}(),_n=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|Z|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),xn=/^url\(([^)]+)\)$/,Cn=/([A-Z])/g;function Sn(t){try{return null!=t?t.toString().slice(0,30):t}catch(n){return"[ERROR] Exception while trying to serialize the value"}}var In=function(){function t(){}return t.__NG_ELEMENT_ID__=function(){return En()},t}(),En=function(){for(var t=[],n=0;n-1}(r)||"root"===o.providedIn&&r._def.isRoot))){var c=t._providers.length;return t._def.providers[c]=t._def.providersByKey[n.tokenKey]={flags:5120,value:u.factory,deps:[],index:c,token:n.token},t._providers[c]=xr,t._providers[c]=Tr(t,t._def.providersByKey[n.tokenKey])}return 4&n.flags?e:t._parent.get(n.token,e)}finally{Pt(i)}}function Tr(t,n){var e;switch(201347067&n.flags){case 512:e=function(t,n,e){var o=e.length;switch(o){case 0:return new n;case 1:return new n(kr(t,e[0]));case 2:return new n(kr(t,e[0]),kr(t,e[1]));case 3:return new n(kr(t,e[0]),kr(t,e[1]),kr(t,e[2]));default:for(var i=new Array(o),l=0;l=e.length)&&(n=e.length-1),n<0)return null;var r=e[n];return r.viewContainerParent=null,Ut(e,n),Fe.dirtyParentQueries(r),Pr(r),r}function Rr(t,n,e){var r=n?rr(n,n.def.lastRenderRootNode):t.renderElement,o=e.renderer.parentNode(r),i=e.renderer.nextSibling(r);pr(e,2,o,i,void 0)}function Pr(t){pr(t,3,null,null,void 0)}var Ar=new Object;function jr(t,n,e,r,o,i){return new Nr(t,n,e,r,o,i)}var Nr=function(t){function n(n,e,r,o,i,l){var u=t.call(this)||this;return u.selector=n,u.componentType=e,u._inputs=o,u._outputs=i,u.ngContentSelectors=l,u.viewDefFactory=r,u}return Object(r.b)(n,t),Object.defineProperty(n.prototype,"inputs",{get:function(){var t=[],n=this._inputs;for(var e in n)t.push({propName:e,templateName:n[e]});return t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"outputs",{get:function(){var t=[];for(var n in this._outputs)t.push({propName:n,templateName:this._outputs[n]});return t},enumerable:!0,configurable:!0}),n.prototype.create=function(t,n,e,r){if(!r)throw new Error("ngModule should be provided");var o=fr(this.viewDefFactory),i=o.nodes[0].element.componentProvider.nodeIndex,l=Fe.createRootView(t,n||[],e,o,r,Ar),u=Me(l,i).instance;return e&&l.renderer.setAttribute(Le(l,0).renderElement,"ng-version",ce.full),new Dr(l,new Vr(l),u)},n}(Kn),Dr=function(t){function n(n,e,r){var o=t.call(this)||this;return o._view=n,o._viewRef=e,o._component=r,o._elDef=o._view.def.nodes[0],o.hostView=e,o.changeDetectorRef=e,o.instance=r,o}return Object(r.b)(n,t),Object.defineProperty(n.prototype,"location",{get:function(){return new re(Le(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"injector",{get:function(){return new qr(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),n.prototype.destroy=function(){this._viewRef.destroy()},n.prototype.onDestroy=function(t){this._viewRef.onDestroy(t)},n}(Zn);function Lr(t,n,e){return new Mr(t,n,e)}var Mr=function(){function t(t,n,e){this._view=t,this._elDef=n,this._data=e,this._embeddedViews=[]}return Object.defineProperty(t.prototype,"element",{get:function(){return new re(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new qr(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentInjector",{get:function(){for(var t=this._view,n=this._elDef.parent;!n&&t;)n=er(t),t=t.parent;return t?new qr(t,n):new qr(this._view,null)},enumerable:!0,configurable:!0}),t.prototype.clear=function(){for(var t=this._embeddedViews.length-1;t>=0;t--){var n=Or(this._data,t);Fe.destroyView(n)}},t.prototype.get=function(t){var n=this._embeddedViews[t];if(n){var e=new Vr(n);return e.attachToViewContainerRef(this),e}return null},Object.defineProperty(t.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(t,n,e){var r=t.createEmbeddedView(n||{});return this.insert(r,e),r},t.prototype.createComponent=function(t,n,e,r,o){var i=e||this.parentInjector;o||t instanceof ne||(o=i.get(Dt));var l=t.create(i,r,void 0,o);return this.insert(l.hostView,n),l},t.prototype.insert=function(t,n){if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var e,r,o,i,l=t;return i=(e=this._data).viewContainer._embeddedViews,null==(r=n)&&(r=i.length),(o=l._view).viewContainerParent=this._view,Mt(i,r,o),function(t,n){var e=nr(n);if(e&&e!==t&&!(16&n.state)){n.state|=16;var r=e.template._projectedViews;r||(r=e.template._projectedViews=[]),r.push(n),function(t,e){if(!(4&e.flags)){n.parent.def.nodeFlags|=4,e.flags|=4;for(var r=e.parent;r;)r.childFlags|=4,r=r.parent}}(0,n.parentNodeDef)}}(e,o),Fe.dirtyParentQueries(o),Rr(e,r>0?i[r-1]:null,o),l.attachToViewContainerRef(this),t},t.prototype.move=function(t,n){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var e,r,o,i,l,u=this._embeddedViews.indexOf(t._view);return o=n,l=(i=(e=this._data).viewContainer._embeddedViews)[r=u],Ut(i,r),null==o&&(o=i.length),Mt(i,o,l),Fe.dirtyParentQueries(l),Pr(l),Rr(e,o>0?i[o-1]:null,l),t},t.prototype.indexOf=function(t){return this._embeddedViews.indexOf(t._view)},t.prototype.remove=function(t){var n=Or(this._data,t);n&&Fe.destroyView(n)},t.prototype.detach=function(t){var n=Or(this._data,t);return n?new Vr(n):null},t}();function Ur(t){return new Vr(t)}var Vr=function(){function t(t){this._view=t,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(t.prototype,"rootNodes",{get:function(){return pr(this._view,0,void 0,void 0,t=[]),t;var t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),t.prototype.markForCheck=function(){Je(this._view)},t.prototype.detach=function(){this._view.state&=-5},t.prototype.detectChanges=function(){var t=this._view.root.rendererFactory;t.begin&&t.begin();try{Fe.checkAndUpdateView(this._view)}finally{t.end&&t.end()}},t.prototype.checkNoChanges=function(){Fe.checkNoChangesView(this._view)},t.prototype.reattach=function(){this._view.state|=4},t.prototype.onDestroy=function(t){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(t)},t.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),Fe.destroyView(this._view)},t.prototype.detachFromAppRef=function(){this._appRef=null,Pr(this._view),Fe.dirtyParentQueries(this._view)},t.prototype.attachToAppRef=function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t},t.prototype.attachToViewContainerRef=function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t},t}();function Fr(t,n){return new Hr(t,n)}var Hr=function(t){function n(n,e){var r=t.call(this)||this;return r._parentView=n,r._def=e,r}return Object(r.b)(n,t),n.prototype.createEmbeddedView=function(t){return new Vr(Fe.createEmbeddedView(this._parentView,this._def,this._def.element.template,t))},Object.defineProperty(n.prototype,"elementRef",{get:function(){return new re(Le(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),n}(Ee);function zr(t,n){return new qr(t,n)}var qr=function(){function t(t,n){this.view=t,this.elDef=n}return t.prototype.get=function(t,n){return void 0===n&&(n=On.THROW_IF_NOT_FOUND),Fe.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:t,tokenKey:qe(t)},n)},t}();function Br(t,n){var e=t.def.nodes[n];if(1&e.flags){var r=Le(t,e.nodeIndex);return e.element.template?r.template:r.renderElement}if(2&e.flags)return De(t,e.nodeIndex).renderText;if(20240&e.flags)return Me(t,e.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+n)}function $r(t){return new Wr(t.renderer)}var Wr=function(){function t(t){this.delegate=t}return t.prototype.selectRootElement=function(t){return this.delegate.selectRootElement(t)},t.prototype.createElement=function(t,n){var e=Object(r.c)(yr(n),2),o=this.delegate.createElement(e[1],e[0]);return t&&this.delegate.appendChild(t,o),o},t.prototype.createViewRoot=function(t){return t},t.prototype.createTemplateAnchor=function(t){var n=this.delegate.createComment("");return t&&this.delegate.appendChild(t,n),n},t.prototype.createText=function(t,n){var e=this.delegate.createText(n);return t&&this.delegate.appendChild(t,e),e},t.prototype.projectNodes=function(t,n){for(var e=0;e0,n.provider.value,n.provider.deps);if(n.outputs.length)for(var r=0;r0,o=n.provider;switch(201347067&n.flags){case 512:return po(t,n.parent,e,o.value,o.deps);case 1024:return function(t,n,e,o,i){var l=i.length;switch(l){case 0:return o();case 1:return o(go(t,n,e,i[0]));case 2:return o(go(t,n,e,i[0]),go(t,n,e,i[1]));case 3:return o(go(t,n,e,i[0]),go(t,n,e,i[1]),go(t,n,e,i[2]));default:for(var u=Array(l),a=0;a0&&(o=setTimeout(function(){r._callbacks=r._callbacks.filter(function(t){return t.timeoutId!==o}),t(r._didWork,r.getPendingTasks())},n)),this._callbacks.push({doneCb:t,timeoutId:o,updateCb:e})},t.prototype.whenStable=function(t,n,e){if(e&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,n,e),this._runCallbacksIfReady()},t.prototype.getPendingRequestCount=function(){return this._pendingCount},t.prototype.findProviders=function(t,n,e){return[]},t}(),fi=function(){function t(){this._applications=new Map,pi.addToWindow(this)}return t.prototype.registerApplication=function(t,n){this._applications.set(t,n)},t.prototype.unregisterApplication=function(t){this._applications.delete(t)},t.prototype.unregisterAllApplications=function(){this._applications.clear()},t.prototype.getTestability=function(t){return this._applications.get(t)||null},t.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},t.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},t.prototype.findTestabilityInTree=function(t,n){return void 0===n&&(n=!0),pi.findTestabilityInTree(this,t,n)},t}(),pi=new(function(){function t(){}return t.prototype.addToWindow=function(t){},t.prototype.findTestabilityInTree=function(t,n,e){return null},t}()),hi=new Ct("AllowMultipleToken"),di=function(){return function(t,n){this.name=t,this.token=n}}();function gi(t,n,e){void 0===e&&(e=[]);var r="Platform: "+n,o=new Ct(r);return function(n){void 0===n&&(n=[]);var i=vi();if(!i||i.injector.get(hi,!1))if(t)t(e.concat(n).concat({provide:o,useValue:!0}));else{var l=e.concat(n).concat({provide:o,useValue:!0});!function(t){if(ai&&!ai.destroyed&&!ai.injector.get(hi,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");ai=t.get(mi);var n=t.get(No,null);n&&n.forEach(function(t){return t()})}(On.create({providers:l,name:r}))}return function(t){var n=vi();if(!n)throw new Error("No platform exists!");if(!n.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return n}(o)}}function vi(){return ai&&!ai.destroyed?ai:null}var mi=function(){function t(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return t.prototype.bootstrapModuleFactory=function(t,n){var e,r=this,o="noop"===(e=n?n.ngZone:void 0)?new si:("zone.js"===e?void 0:e)||new ei({enableLongStackTrace:Gt()}),i=[{provide:ei,useValue:o}];return o.run(function(){var n=On.create({providers:i,parent:r.injector,name:t.moduleType.name}),e=t.create(n),l=e.injector.get(Qt,null);if(!l)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return Vo&&ko(e.injector.get(Uo,Eo)||Eo),e.onDestroy(function(){return wi(r._modules,e)}),o.runOutsideAngular(function(){return o.onError.subscribe({next:function(t){l.handleError(t)}})}),function(t,n,o){try{var i=((l=e.injector.get(Ao)).runInitializers(),l.donePromise.then(function(){return r._moduleDoBootstrap(e),e}));return $n(i)?i.catch(function(e){throw n.runOutsideAngular(function(){return t.handleError(e)}),e}):i}catch(u){throw n.runOutsideAngular(function(){return t.handleError(u)}),u}var l}(l,o)})},t.prototype.bootstrapModule=function(t,n){var e=this;void 0===n&&(n=[]);var r=yi({},n);return function(t,n,e){return t.get(Zo).createCompiler([n]).compileModuleAsync(e)}(this.injector,r,t).then(function(t){return e.bootstrapModuleFactory(t,r)})},t.prototype._moduleDoBootstrap=function(t){var n=t.injector.get(bi);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(function(t){return n.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module "+ht(t.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');t.instance.ngDoBootstrap(n)}this._modules.push(t)},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(t){return t.destroy()}),this._destroyListeners.forEach(function(t){return t()}),this._destroyed=!0},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),t}();function yi(t,n){return Array.isArray(n)?n.reduce(yi,t):Object(r.a)({},t,n)}var bi=function(){function t(t,n,e,r,o,i){var l=this;this._zone=t,this._console=n,this._injector=e,this._exceptionHandler=r,this._componentFactoryResolver=o,this._initStatus=i,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Gt(),this._zone.onMicrotaskEmpty.subscribe({next:function(){l._zone.run(function(){l.tick()})}});var u=new _(function(t){l._stable=l._zone.isStable&&!l._zone.hasPendingMacrotasks&&!l._zone.hasPendingMicrotasks,l._zone.runOutsideAngular(function(){t.next(l._stable),t.complete()})}),a=new _(function(t){var n;l._zone.runOutsideAngular(function(){n=l._zone.onStable.subscribe(function(){ei.assertNotInAngularZone(),ni(function(){l._stable||l._zone.hasPendingMacrotasks||l._zone.hasPendingMicrotasks||(l._stable=!0,t.next(!0))})})});var e=l._zone.onUnstable.subscribe(function(){ei.assertInAngularZone(),l._stable&&(l._stable=!1,l._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){n.unsubscribe(),e.unsubscribe()}});this.isStable=function(){for(var t=[],n=0;n1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof o&&(e=t.pop()),null===r&&1===t.length&&t[0]instanceof _?t[0]:Q(e)(Z(t,r))}(u,a.pipe(function(t){return K()((n=nt,function(t){var e;e="function"==typeof n?n:function(){return n};var r=Object.create(t,X);return r.source=t,r.subjectFactory=e,r})(t));var n}))}var n;return n=t,t.prototype.bootstrap=function(t,n){var e,r=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");e=t instanceof Kn?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(e.componentType);var o=e instanceof ne?null:this._injector.get(Dt),i=e.create(On.NULL,[],n||e.selector,o);i.onDestroy(function(){r._unloadComponent(i)});var l=i.injector.get(ci,null);return l&&i.injector.get(fi).registerApplication(i.location.nativeElement,l),this._loadComponent(i),Gt()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),i},t.prototype.tick=function(){var t,e,o,i,l=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var u=n._tickScope();try{this._runningTick=!0;try{for(var a=Object(r.e)(this._views),s=a.next();!s.done;s=a.next())s.value.detectChanges()}catch(p){t={error:p}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}if(this._enforceNoNewChanges)try{for(var c=Object(r.e)(this._views),f=c.next();!f.done;f=c.next())f.value.checkNoChanges()}catch(h){o={error:h}}finally{try{f&&!f.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}}catch(d){this._zone.runOutsideAngular(function(){return l._exceptionHandler.handleError(d)})}finally{this._runningTick=!1,Xo(u)}},t.prototype.attachView=function(t){var n=t;this._views.push(n),n.attachToAppRef(this)},t.prototype.detachView=function(t){var n=t;wi(this._views,n),n.detachFromAppRef()},t.prototype._loadComponent=function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Lo,[]).concat(this._bootstrapListeners).forEach(function(n){return n(t)})},t.prototype._unloadComponent=function(t){this.detachView(t.hostView),wi(this.components,t)},t.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(t){return t.destroy()})},Object.defineProperty(t.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),t._tickScope=Jo("ApplicationRef#tick()"),t}();function wi(t,n){var e=t.indexOf(n);e>-1&&t.splice(e,1)}var _i=function(){return function(){}}(),xi=function(){return function(){}}(),Ci={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},Si=function(){function t(t,n){this._compiler=t,this._config=n||Ci}return t.prototype.load=function(t){return!Vo&&this._compiler instanceof Qo?this.loadFactory(t):this.loadAndCompile(t)},t.prototype.loadAndCompile=function(t){var n=this,o=Object(r.c)(t.split("#"),2),i=o[0],l=o[1];return void 0===l&&(l="default"),e("zn8P")(i).then(function(t){return t[l]}).then(function(t){return Ii(t,i,l)}).then(function(t){return n._compiler.compileModuleAsync(t)})},t.prototype.loadFactory=function(t){var n=Object(r.c)(t.split("#"),2),o=n[0],i=n[1],l="NgFactory";return void 0===i&&(i="default",l=""),e("zn8P")(this._config.factoryPathPrefix+o+this._config.factoryPathSuffix).then(function(t){return t[i+l]}).then(function(t){return Ii(t,o,i)})},t}();function Ii(t,n,e){if(!t)throw new Error("Cannot find '"+e+"' in '"+n+"'");return t}var Ei=function(){return function(t,n){this.name=t,this.callback=n}}(),ki=function(){function t(t,n,e){this.listeners=[],this.parent=null,this._debugContext=e,this.nativeNode=t,n&&n instanceof Ti&&n.addChild(this)}return Object.defineProperty(t.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),t}(),Ti=function(t){function n(n,e,r){var o=t.call(this,n,e,r)||this;return o.properties={},o.attributes={},o.classes={},o.styles={},o.childNodes=[],o.nativeElement=n,o}return Object(r.b)(n,t),n.prototype.addChild=function(t){t&&(this.childNodes.push(t),t.parent=this)},n.prototype.removeChild=function(t){var n=this.childNodes.indexOf(t);-1!==n&&(t.parent=null,this.childNodes.splice(n,1))},n.prototype.insertChildrenAfter=function(t,n){var e,o=this,i=this.childNodes.indexOf(t);-1!==i&&((e=this.childNodes).splice.apply(e,Object(r.d)([i+1,0],n)),n.forEach(function(n){n.parent&&n.parent.removeChild(n),t.parent=o}))},n.prototype.insertBefore=function(t,n){var e=this.childNodes.indexOf(t);-1===e?this.addChild(n):(n.parent&&n.parent.removeChild(n),n.parent=this,this.childNodes.splice(e,0,n))},n.prototype.query=function(t){return this.queryAll(t)[0]||null},n.prototype.queryAll=function(t){var n=[];return function t(n,e,r){n.childNodes.forEach(function(n){n instanceof Ti&&(e(n)&&r.push(n),t(n,e,r))})}(this,t,n),n},n.prototype.queryAllNodes=function(t){var n=[];return function t(n,e,r){n instanceof Ti&&n.childNodes.forEach(function(n){e(n)&&r.push(n),n instanceof Ti&&t(n,e,r)})}(this,t,n),n},Object.defineProperty(n.prototype,"children",{get:function(){return this.childNodes.filter(function(t){return t instanceof n})},enumerable:!0,configurable:!0}),n.prototype.triggerEventHandler=function(t,n){this.listeners.forEach(function(e){e.name==t&&e.callback(n)})},n}(ki),Oi=new Map,Ri=function(t){return Oi.get(t)||null};function Pi(t){Oi.set(t.nativeNode,t)}var Ai=gi(null,"core",[{provide:Do,useValue:"unknown"},{provide:mi,deps:[On]},{provide:fi,deps:[]},{provide:Mo,deps:[]}]);function ji(){return Se}function Ni(){return Ie}function Di(t){return t?(Vo&&ko(t),t):Eo}function Li(t){var n=[];return t.onStable.subscribe(function(){for(;n.length;)n.pop()()}),function(t){n.push(t)}}var Mi=function(){return function(t){}}();function Ui(t,n,e,r,o,i){t|=1;var l=ur(n);return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:t,checkIndex:-1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:l.matchedQueries,matchedQueryIds:l.matchedQueryIds,references:l.references,ngContentIndex:e,childCount:r,bindings:[],bindingFlags:0,outputs:[],element:{ns:null,name:null,attrs:null,template:i?fr(i):null,componentProvider:null,componentView:null,componentRendererType:null,publicProviders:null,allProviders:null,handleEvent:o||He},provider:null,text:null,query:null,ngContent:null}}function Vi(t,n,e,o,i,l,u,a,s,c,f,p){var h;void 0===u&&(u=[]),c||(c=He);var d=ur(e),g=d.matchedQueries,v=d.references,m=d.matchedQueryIds,y=null,b=null;l&&(y=(h=Object(r.c)(yr(l),2))[0],b=h[1]),a=a||[];for(var w=new Array(a.length),_=0;_0)s=g,rl(g)||(c=g);else for(;s&&d===s.nodeIndex+s.childCount;){var y=s.parent;y&&(y.childFlags|=s.childFlags,y.childMatchedQueries|=s.childMatchedQueries),c=(s=y)&&rl(s)?s.renderParent:s}}return{factory:null,nodeFlags:l,rootNodeFlags:u,nodeMatchedQueries:a,flags:t,nodes:n,updateDirectives:e||He,updateRenderer:r||He,handleEvent:function(t,e,r,o){return n[e].element.handleEvent(t,r,o)},bindingCount:o,outputCount:i,lastRenderRootNode:h}}function rl(t){return 0!=(1&t.flags)&&null===t.element.name}function ol(t,n,e){var r=n.element&&n.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+n.nodeIndex+"!")}if(20224&n.flags&&0==(1&(t?t.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+n.nodeIndex+"!");if(n.query){if(67108864&n.flags&&(!t||0==(16384&t.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+n.nodeIndex+"!");if(134217728&n.flags&&t)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+n.nodeIndex+"!")}if(n.childCount){var o=t?t.nodeIndex+t.childCount:e-1;if(n.nodeIndex<=o&&n.nodeIndex+n.childCount>o)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+n.nodeIndex+"!")}}function il(t,n,e,r){var o=al(t.root,t.renderer,t,n,e);return sl(o,t.component,r),cl(o),o}function ll(t,n,e){var r=al(t,t.renderer,null,null,n);return sl(r,e,e),cl(r),r}function ul(t,n,e,r){var o,i=n.element.componentRendererType;return o=i?t.root.rendererFactory.createRenderer(r,i):t.root.renderer,al(t.root,o,t,n.element.componentProvider,e)}function al(t,n,e,r,o){var i=new Array(o.nodes.length),l=o.outputCount?new Array(o.outputCount):null;return{def:o,parent:e,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:i,state:13,root:t,renderer:n,oldValues:new Array(o.bindingCount),disposables:l,initIndex:-1}}function sl(t,n,e){t.component=n,t.context=e}function cl(t){var n;or(t)&&(n=Le(t.parent,t.parentNodeDef.parent.nodeIndex).renderElement);for(var e=t.def,r=t.nodes,o=0;o0&&qi(t,n,0,e)&&(h=!0),p>1&&qi(t,n,1,r)&&(h=!0),p>2&&qi(t,n,2,o)&&(h=!0),p>3&&qi(t,n,3,i)&&(h=!0),p>4&&qi(t,n,4,l)&&(h=!0),p>5&&qi(t,n,5,u)&&(h=!0),p>6&&qi(t,n,6,a)&&(h=!0),p>7&&qi(t,n,7,s)&&(h=!0),p>8&&qi(t,n,8,c)&&(h=!0),p>9&&qi(t,n,9,f)&&(h=!0),h}(t,n,e,r,o,i,l,u,a,s,c,f);case 2:return function(t,n,e,r,o,i,l,u,a,s,c,f){var p=!1,h=n.bindings,d=h.length;if(d>0&&Ge(t,n,0,e)&&(p=!0),d>1&&Ge(t,n,1,r)&&(p=!0),d>2&&Ge(t,n,2,o)&&(p=!0),d>3&&Ge(t,n,3,i)&&(p=!0),d>4&&Ge(t,n,4,l)&&(p=!0),d>5&&Ge(t,n,5,u)&&(p=!0),d>6&&Ge(t,n,6,a)&&(p=!0),d>7&&Ge(t,n,7,s)&&(p=!0),d>8&&Ge(t,n,8,c)&&(p=!0),d>9&&Ge(t,n,9,f)&&(p=!0),p){var g=n.text.prefix;d>0&&(g+=nl(e,h[0])),d>1&&(g+=nl(r,h[1])),d>2&&(g+=nl(o,h[2])),d>3&&(g+=nl(i,h[3])),d>4&&(g+=nl(l,h[4])),d>5&&(g+=nl(u,h[5])),d>6&&(g+=nl(a,h[6])),d>7&&(g+=nl(s,h[7])),d>8&&(g+=nl(c,h[8])),d>9&&(g+=nl(f,h[9]));var v=De(t,n.nodeIndex).renderText;t.renderer.setValue(v,g)}return p}(t,n,e,r,o,i,l,u,a,s,c,f);case 16384:return function(t,n,e,r,o,i,l,u,a,s,c,f){var p=Me(t,n.nodeIndex),h=p.instance,d=!1,g=void 0,v=n.bindings.length;return v>0&&Ke(t,n,0,e)&&(d=!0,g=mo(t,p,n,0,e,g)),v>1&&Ke(t,n,1,r)&&(d=!0,g=mo(t,p,n,1,r,g)),v>2&&Ke(t,n,2,o)&&(d=!0,g=mo(t,p,n,2,o,g)),v>3&&Ke(t,n,3,i)&&(d=!0,g=mo(t,p,n,3,i,g)),v>4&&Ke(t,n,4,l)&&(d=!0,g=mo(t,p,n,4,l,g)),v>5&&Ke(t,n,5,u)&&(d=!0,g=mo(t,p,n,5,u,g)),v>6&&Ke(t,n,6,a)&&(d=!0,g=mo(t,p,n,6,a,g)),v>7&&Ke(t,n,7,s)&&(d=!0,g=mo(t,p,n,7,s,g)),v>8&&Ke(t,n,8,c)&&(d=!0,g=mo(t,p,n,8,c,g)),v>9&&Ke(t,n,9,f)&&(d=!0,g=mo(t,p,n,9,f,g)),g&&h.ngOnChanges(g),65536&n.flags&&Ne(t,256,n.nodeIndex)&&h.ngOnInit(),262144&n.flags&&h.ngDoCheck(),d}(t,n,e,r,o,i,l,u,a,s,c,f);case 32:case 64:case 128:return function(t,n,e,r,o,i,l,u,a,s,c,f){var p=n.bindings,h=!1,d=p.length;if(d>0&&Ge(t,n,0,e)&&(h=!0),d>1&&Ge(t,n,1,r)&&(h=!0),d>2&&Ge(t,n,2,o)&&(h=!0),d>3&&Ge(t,n,3,i)&&(h=!0),d>4&&Ge(t,n,4,l)&&(h=!0),d>5&&Ge(t,n,5,u)&&(h=!0),d>6&&Ge(t,n,6,a)&&(h=!0),d>7&&Ge(t,n,7,s)&&(h=!0),d>8&&Ge(t,n,8,c)&&(h=!0),d>9&&Ge(t,n,9,f)&&(h=!0),h){var g=Ue(t,n.nodeIndex),v=void 0;switch(201347067&n.flags){case 32:v=new Array(p.length),d>0&&(v[0]=e),d>1&&(v[1]=r),d>2&&(v[2]=o),d>3&&(v[3]=i),d>4&&(v[4]=l),d>5&&(v[5]=u),d>6&&(v[6]=a),d>7&&(v[7]=s),d>8&&(v[8]=c),d>9&&(v[9]=f);break;case 64:v={},d>0&&(v[p[0].name]=e),d>1&&(v[p[1].name]=r),d>2&&(v[p[2].name]=o),d>3&&(v[p[3].name]=i),d>4&&(v[p[4].name]=l),d>5&&(v[p[5].name]=u),d>6&&(v[p[6].name]=a),d>7&&(v[p[7].name]=s),d>8&&(v[p[8].name]=c),d>9&&(v[p[9].name]=f);break;case 128:var m=e;switch(d){case 1:v=m.transform(e);break;case 2:v=m.transform(r);break;case 3:v=m.transform(r,o);break;case 4:v=m.transform(r,o,i);break;case 5:v=m.transform(r,o,i,l);break;case 6:v=m.transform(r,o,i,l,u);break;case 7:v=m.transform(r,o,i,l,u,a);break;case 8:v=m.transform(r,o,i,l,u,a,s);break;case 9:v=m.transform(r,o,i,l,u,a,s,c);break;case 10:v=m.transform(r,o,i,l,u,a,s,c,f)}}g.value=v}return h}(t,n,e,r,o,i,l,u,a,s,c,f);default:throw"unreachable"}}(t,n,o,i,l,u,a,s,c,f,p,h):function(t,n,e){switch(201347067&n.flags){case 1:return function(t,n,e){for(var r=!1,o=0;o0&&Ye(t,n,0,e),p>1&&Ye(t,n,1,r),p>2&&Ye(t,n,2,o),p>3&&Ye(t,n,3,i),p>4&&Ye(t,n,4,l),p>5&&Ye(t,n,5,u),p>6&&Ye(t,n,6,a),p>7&&Ye(t,n,7,s),p>8&&Ye(t,n,8,c),p>9&&Ye(t,n,9,f)}(t,n,r,o,i,l,u,a,s,c,f,p):function(t,n,e){for(var r=0;r0){var i=new Set(t.modules);Al.forEach(function(n,r){if(i.has(ft(r).providedIn)){var o={token:r,flags:n.flags|(e?4096:0),deps:ar(n.deps),value:n.value,index:t.providers.length};t.providers.push(o),t.providersByKey[qe(r)]=o}})}}(t=t.factory(function(){return He})),t):t}(r))}var Pl=new Map,Al=new Map,jl=new Map;function Nl(t){var n;Pl.set(t.token,t),"function"==typeof t.token&&(n=ft(t.token))&&"function"==typeof n.providedIn&&Al.set(t.token,t)}function Dl(t,n){var e=fr(n.viewDefFactory),r=fr(e.nodes[0].element.componentView);jl.set(t,r)}function Ll(){Pl.clear(),Al.clear(),jl.clear()}function Ml(t){if(0===Pl.size)return t;var n=function(t){for(var n=[],e=null,r=0;r0?n.substring(1):n},n.prototype.prepareExternalUrl=function(t){var n=Ou.joinWithSlash(this._baseHref,t);return n.length>0?"#"+n:n},n.prototype.pushState=function(t,n,e,r){var o=this.prepareExternalUrl(e+Ou.normalizeQueryParams(r));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(t,n,o)},n.prototype.replaceState=function(t,n,e,r){var o=this.prepareExternalUrl(e+Ou.normalizeQueryParams(r));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(t,n,o)},n.prototype.forward=function(){this._platformLocation.forward()},n.prototype.back=function(){this._platformLocation.back()},n}(ku),Au=function(t){function n(n,e){var r=t.call(this)||this;if(r._platformLocation=n,null==e&&(e=r._platformLocation.getBaseHrefFromDOM()),null==e)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=e,r}return Object(r.b)(n,t),n.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},n.prototype.getBaseHref=function(){return this._baseHref},n.prototype.prepareExternalUrl=function(t){return Ou.joinWithSlash(this._baseHref,t)},n.prototype.path=function(t){void 0===t&&(t=!1);var n=this._platformLocation.pathname+Ou.normalizeQueryParams(this._platformLocation.search),e=this._platformLocation.hash;return e&&t?""+n+e:n},n.prototype.pushState=function(t,n,e,r){var o=this.prepareExternalUrl(e+Ou.normalizeQueryParams(r));this._platformLocation.pushState(t,n,o)},n.prototype.replaceState=function(t,n,e,r){var o=this.prepareExternalUrl(e+Ou.normalizeQueryParams(r));this._platformLocation.replaceState(t,n,o)},n.prototype.forward=function(){this._platformLocation.forward()},n.prototype.back=function(){this._platformLocation.back()},n}(ku),ju=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),Nu=new Ct("UseV4Plurals"),Du=function(){return function(){}}(),Lu=function(t){function n(n,e){var r=t.call(this)||this;return r.locale=n,r.deprecatedPluralFn=e,r}return Object(r.b)(n,t),n.prototype.getPluralCategory=function(t,n){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(n||this.locale,t):function(t){return function(t){var n=t.toLowerCase().replace(/_/g,"-"),e=xo[n];if(e)return e;var r=n.split("-")[0];if(e=xo[r])return e;if("en"===r)return Io;throw new Error('Missing locale data for the locale "'+t+'".')}(t)[Co.PluralCase]}(n||this.locale)(t)){case ju.Zero:return"zero";case ju.One:return"one";case ju.Two:return"two";case ju.Few:return"few";case ju.Many:return"many";default:return"other"}},n}(Du),Mu=function(){return function(){}}(),Uu=function(){function t(t,n,e,r){this._iterableDiffers=t,this._keyValueDiffers=n,this._ngEl=e,this._renderer=r,this._initialClasses=[]}return t.prototype.getValue=function(){return null},t.prototype.setClass=function(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)},t.prototype.setNgClass=function(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(qn(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())},t.prototype.applyChanges=function(){if(this._iterableDiffer){var t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){var n=this._keyValueDiffer.diff(this._rawClass);n&&this._applyKeyValueChanges(n)}},t.prototype._applyKeyValueChanges=function(t){var n=this;t.forEachAddedItem(function(t){return n._toggleClass(t.key,t.currentValue)}),t.forEachChangedItem(function(t){return n._toggleClass(t.key,t.currentValue)}),t.forEachRemovedItem(function(t){t.previousValue&&n._toggleClass(t.key,!1)})},t.prototype._applyIterableChanges=function(t){var n=this;t.forEachAddedItem(function(t){if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+ht(t.item));n._toggleClass(t.item,!0)}),t.forEachRemovedItem(function(t){return n._toggleClass(t.item,!1)})},t.prototype._applyClasses=function(t){var n=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return n._toggleClass(t,!0)}):Object.keys(t).forEach(function(e){return n._toggleClass(e,!!t[e])}))},t.prototype._removeClasses=function(t){var n=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return n._toggleClass(t,!1)}):Object.keys(t).forEach(function(t){return n._toggleClass(t,!1)}))},t.prototype._toggleClass=function(t,n){var e=this;(t=t.trim())&&t.split(/\s+/g).forEach(function(t){n?e._renderer.addClass(e._ngEl.nativeElement,t):e._renderer.removeClass(e._ngEl.nativeElement,t)})},t}(),Vu=function(t){function n(n){return t.call(this,n)||this}return Object(r.b)(n,t),Object.defineProperty(n.prototype,"klass",{set:function(t){this._delegate.setClass(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"ngClass",{set:function(t){this._delegate.setNgClass(t)},enumerable:!0,configurable:!0}),n.prototype.ngDoCheck=function(){this._delegate.applyChanges()},n}(function(){function t(t){this._delegate=t}return t.prototype.getValue=function(){return this._delegate.getValue()},t.ngDirectiveDef=void 0,t}()),Fu=function(){function t(t,n,e,r){this.$implicit=t,this.ngForOf=n,this.index=e,this.count=r}return Object.defineProperty(t.prototype,"first",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"even",{get:function(){return this.index%2==0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"odd",{get:function(){return!this.even},enumerable:!0,configurable:!0}),t}(),Hu=function(){function t(t,n,e){this._viewContainer=t,this._template=n,this._differs=e,this._ngForOfDirty=!0,this._differ=null}return Object.defineProperty(t.prototype,"ngForOf",{set:function(t){this._ngForOf=t,this._ngForOfDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTrackBy",{get:function(){return this._trackByFn},set:function(t){Gt()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(t)+". See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTemplate",{set:function(t){t&&(this._template=t)},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(r){throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+((n=t).name||typeof n)+"'. NgFor only supports binding to Iterables such as Arrays.")}}var n;if(this._differ){var e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}},t.prototype._applyChanges=function(t){var n=this,e=[];t.forEachOperation(function(t,r,o){if(null==t.previousIndex){var i=n._viewContainer.createEmbeddedView(n._template,new Fu(null,n._ngForOf,-1,-1),null===o?void 0:o),l=new zu(t,i);e.push(l)}else null==o?n._viewContainer.remove(null===r?void 0:r):null!==r&&(i=n._viewContainer.get(r),n._viewContainer.move(i,o),l=new zu(t,i),e.push(l))});for(var r=0;r"};return t.replace(/&[^;]+;/g,function(t){return n[t]})},t.ngInjectableDef=ct({factory:function(){return new t(At(ta))},token:t,providedIn:"root"}),t}(),ia=function(){function t(){this.subject=new E,this.state=this.subject.asObservable(),this.busy=!1}return t.prototype.show=function(){this.busy=!0,this.subject.next(!0)},t.prototype.hide=function(){this.busy=!1,this.subject.next(!1)},t.ngInjectableDef=ct({factory:function(){return new t},token:t,providedIn:"root"}),t}(),la=function(){function t(t,n){this.loader=t,this.app=n,this.version="",this.prefix=this.app.config.data_prefix,this.version=this.app.config.hash||""}return t.prototype.get=function(t){var n=this;t=this.getFullUrl(t);var e=this.app.getCache(t.split("?")[0]);return e?Promise.resolve(e):(this.loader.show(),cu.fetch(t).then(function(t){return n.loader.hide(),t.json()}).catch(function(t){return n.loader.hide(),Promise.reject(t)}))},t.prototype.request=function(t){var n=this;return this.loader.show(),cu.fetch(t.url,t).then(function(t){return n.loader.hide(),t.json()}).catch(function(t){return n.loader.hide(),Promise.reject(t)})},t.prototype.getFullUrl=function(t){return this.prefix+"/"+function(t){var n,e,r,o,i,l,u,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="",c=0;for(t=function(t){t=t.replace(/\r\n/g,"\n");for(var n="",e=0;e127&&r<2048?(n+=String.fromCharCode(r>>6|192),n+=String.fromCharCode(63&r|128)):(n+=String.fromCharCode(r>>12|224),n+=String.fromCharCode(r>>6&63|128),n+=String.fromCharCode(63&r|128))}return n}(t);c>2,i=(3&n)<<4|(e=t.charCodeAt(c++))>>4,l=(15&e)<<2|(r=t.charCodeAt(c++))>>6,u=63&r,isNaN(e)?l=u=64:isNaN(r)&&(u=64),s=s+a.charAt(o)+a.charAt(i)+a.charAt(l)+a.charAt(u);return s.replace(/=/g,"")}(t.replace(/(^\/*|\/*$)/g,""))+".json?v="+this.version},t.ngInjectableDef=ct({factory:function(){return new t(At(ia),At(oa))},token:t,providedIn:"root"}),t}();function ua(){for(var t=[],n=0;n0)for(var e=this.count>=this.total?this.total:this.count,r=this.ring,o=0;o=2;return function(r){return r.pipe(t?ma(function(n,e){return t(n,e,r)}):W,_a(1),e?Ta(n):Sa(function(){return new sa}))}}function Aa(t){return function(n){var e=new ja(t),r=n.lift(e);return e.caught=r}}var ja=function(){function t(t){this.selector=t}return t.prototype.call=function(t,n){return n.subscribe(new Na(t,this.selector,this.caught))},t}(),Na=function(t){function n(n,e,r){var o=t.call(this,n)||this;return o.selector=e,o.caught=r,o}return r.b(n,t),n.prototype.error=function(n){if(!this.isStopped){var e=void 0;try{e=this.selector(n,this.caught)}catch(o){return void t.prototype.error.call(this,o)}this._unsubscribeAndRecycle();var r=new O(this,void 0,void 0);this.add(r),L(this,e,void 0,void 0,r)}},n}(M);function Da(t){return function(n){return 0===t?da():n.lift(new La(t))}}var La=function(){function t(t){if(this.total=t,this.total<0)throw new wa}return t.prototype.call=function(t,n){return n.subscribe(new Ma(t,this.total))},t}(),Ma=function(t){function n(n,e){var r=t.call(this,n)||this;return r.total=e,r.count=0,r}return r.b(n,t),n.prototype._next=function(t){var n=this.total,e=++this.count;e<=n&&(this.destination.next(t),e===n&&(this.destination.complete(),this.unsubscribe()))},n}(g);function Ua(t,n){var e=arguments.length>=2;return function(r){return r.pipe(t?ma(function(n,e){return t(n,e,r)}):W,Da(1),e?Ta(n):Sa(function(){return new sa}))}}var Va=function(){function t(t,n,e){this.predicate=t,this.thisArg=n,this.source=e}return t.prototype.call=function(t,n){return n.subscribe(new Fa(t,this.predicate,this.thisArg,this.source))},t}(),Fa=function(t){function n(n,e,r,o){var i=t.call(this,n)||this;return i.predicate=e,i.thisArg=r,i.source=o,i.index=0,i.thisArg=r||i,i}return r.b(n,t),n.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},n.prototype._next=function(t){var n=!1;try{n=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(e){return void this.destination.error(e)}n||this.notifyComplete(!1)},n.prototype._complete=function(){this.notifyComplete(!0)},n}(g);function Ha(t,n){return"function"==typeof n?function(e){return e.pipe(Ha(function(e,r){return z(t(e,r)).pipe(U(function(t,o){return n(e,t,r,o)}))}))}:function(n){return n.lift(new za(t))}}var za=function(){function t(t){this.project=t}return t.prototype.call=function(t,n){return n.subscribe(new qa(t,this.project))},t}(),qa=function(t){function n(n,e){var r=t.call(this,n)||this;return r.project=e,r.index=0,r}return r.b(n,t),n.prototype._next=function(t){var n,e=this.index++;try{n=this.project(t,e)}catch(r){return void this.destination.error(r)}this._innerSub(n,t,e)},n.prototype._innerSub=function(t,n,e){var r=this.innerSubscription;r&&r.unsubscribe();var o=new O(this,void 0,void 0);this.destination.add(o),this.innerSubscription=L(this,t,n,e,o)},n.prototype._complete=function(){var n=this.innerSubscription;n&&!n.closed||t.prototype._complete.call(this),this.unsubscribe()},n.prototype._unsubscribe=function(){this.innerSubscription=null},n.prototype.notifyComplete=function(n){this.destination.remove(n),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},n.prototype.notifyNext=function(t,n,e,r,o){this.destination.next(n)},n}(M);function Ba(){for(var t=[],n=0;n=2&&(e=!0),function(r){return r.lift(new Wa(t,n,e))}}var Wa=function(){function t(t,n,e){void 0===e&&(e=!1),this.accumulator=t,this.seed=n,this.hasSeed=e}return t.prototype.call=function(t,n){return n.subscribe(new Qa(t,this.accumulator,this.seed,this.hasSeed))},t}(),Qa=function(t){function n(n,e,r,o){var i=t.call(this,n)||this;return i.accumulator=e,i._seed=r,i.hasSeed=o,i.index=0,i}return r.b(n,t),Object.defineProperty(n.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),n.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},n.prototype._tryNext=function(t){var n,e=this.index++;try{n=this.accumulator(this.seed,t,e)}catch(r){this.destination.error(r)}this.seed=n,this.destination.next(n)},n}(g);function Za(t,n){return q(t,n,1)}function Ka(t,n,e){return function(r){return r.lift(new Ga(t,n,e))}}var Ga=function(){function t(t,n,e){this.nextOrObserver=t,this.error=n,this.complete=e}return t.prototype.call=function(t,n){return n.subscribe(new Ya(t,this.nextOrObserver,this.error,this.complete))},t}(),Ya=function(t){function n(n,e,r,o){var i=t.call(this,n)||this;return i._tapNext=y,i._tapError=y,i._tapComplete=y,i._tapError=r||y,i._tapComplete=o||y,l(e)?(i._context=i,i._tapNext=e):e&&(i._context=e,i._tapNext=e.next||y,i._tapError=e.error||y,i._tapComplete=e.complete||y),i}return r.b(n,t),n.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(n){return void this.destination.error(n)}this.destination.next(t)},n.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},n.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},n}(g),Ja=function(){function t(t){this.callback=t}return t.prototype.call=function(t,n){return n.subscribe(new Xa(t,this.callback))},t}(),Xa=function(t){function n(n,e){var r=t.call(this,n)||this;return r.add(new a(e)),r}return r.b(n,t),n}(g),ts=null;function ns(){return ts}var es,rs=function(t){function n(){var n=t.call(this)||this;n._animationPrefix=null,n._transitionEnd=null;try{var e=n.createElement("div",document);if(null!=n.getStyle(e,"animationName"))n._animationPrefix="";else for(var r=["Webkit","Moz","O","ms"],o=0;o0},n.prototype.tagName=function(t){return t.tagName},n.prototype.attributeMap=function(t){for(var n=new Map,e=t.attributes,r=0;r0;l||(l=t[i]=[]);var a=zs(n)?Zone.root:Zone.current;if(0===l.length)l.push({zone:a,handler:o});else{for(var s=!1,c=0;c-1},n}(_s),Gs=["alt","control","meta","shift"],Ys={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},Js=function(t){function n(n){return t.call(this,n)||this}var e;return Object(r.b)(n,t),e=n,n.prototype.supports=function(t){return null!=e.parseEventName(t)},n.prototype.addEventListener=function(t,n,r){var o=e.parseEventName(n),i=e.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return ns().onAndCancel(t,o.domEventName,i)})},n.parseEventName=function(t){var n=t.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;var o=e._normalizeKey(n.pop()),i="";if(Gs.forEach(function(t){var e=n.indexOf(t);e>-1&&(n.splice(e,1),i+=t+".")}),i+=o,0!=n.length||0===o.length)return null;var l={};return l.domEventName=r,l.fullKey=i,l},n.getEventFullKey=function(t){var n="",e=ns().getEventKey(t);return" "===(e=e.toLowerCase())?e="space":"."===e&&(e="dot"),Gs.forEach(function(r){r!=e&&(0,Ys[r])(t)&&(n+=r+".")}),n+=e},n.eventCallback=function(t,n,r){return function(o){e.getEventFullKey(o)===t&&r.runGuarded(function(){return n(o)})}},n._normalizeKey=function(t){switch(t){case"esc":return"escape";default:return t}},n}(_s),Xs=function(){return function(){}}(),tc=function(t){function n(n){var e=t.call(this)||this;return e._doc=n,e}return Object(r.b)(n,t),n.prototype.sanitize=function(t,n){if(null==n)return null;switch(t){case bn.NONE:return n;case bn.HTML:return n instanceof ec?n.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(n,"HTML"),function(t,n){var e=null;try{rn=rn||new Yt(t);var r=n?String(n):"";e=rn.getInertBodyElement(r);var o=5,i=r;do{if(0===o)throw new Error("Failed to sanitize html because the input is unstable");o--,r=i,i=e.innerHTML,e=rn.getInertBodyElement(r)}while(r!==i);var l=new dn,u=l.sanitizeChildren(yn(e)||e);return Gt()&&l.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),u}finally{if(e)for(var a=yn(e)||e;a.firstChild;)a.removeChild(a.firstChild)}}(this._doc,String(n)));case bn.STYLE:return n instanceof rc?n.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(n,"Style"),function(t){if(!(t=String(t).trim()))return"";var n=t.match(xn);return n&&tn(n[1])===n[1]||t.match(_n)&&function(t){for(var n=!0,e=!0,r=0;rt.length)return null;if("full"===e.pathMatch&&(n.hasChildren()||r.length0?t[t.length-1]:null}function Wc(t,n){for(var e in t)t.hasOwnProperty(e)&&n(t[e],e)}function Qc(t){return Wn(t)?t:$n(t)?z(Promise.resolve(t)):ua(t)}function Zc(t,n,e){return e?function(t,n){return qc(t,n)}(t.queryParams,n.queryParams)&&function t(n,e){if(!Jc(n.segments,e.segments))return!1;if(n.numberOfChildren!==e.numberOfChildren)return!1;for(var r in e.children){if(!n.children[r])return!1;if(!t(n.children[r],e.children[r]))return!1}return!0}(t.root,n.root):function(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(function(e){return n[e]===t[e]})}(t.queryParams,n.queryParams)&&function t(n,e){return function n(e,r,o){if(e.segments.length>o.length)return!!Jc(l=e.segments.slice(0,o.length),o)&&!r.hasChildren();if(e.segments.length===o.length){if(!Jc(e.segments,o))return!1;for(var i in r.children){if(!e.children[i])return!1;if(!t(e.children[i],r.children[i]))return!1}return!0}var l=o.slice(0,e.segments.length),u=o.slice(e.segments.length);return!!Jc(e.segments,l)&&!!e.children[Ac]&&n(e.children[Ac],r,u)}(n,e,e.segments)}(t.root,n.root)}var Kc=function(){function t(t,n,e){this.root=t,this.queryParams=n,this.fragment=e}return Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=Nc(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return ef.serialize(this)},t}(),Gc=function(){function t(t,n){var e=this;this.segments=t,this.children=n,this.parent=null,Wc(n,function(t,n){return t.parent=e})}return t.prototype.hasChildren=function(){return this.numberOfChildren>0},Object.defineProperty(t.prototype,"numberOfChildren",{get:function(){return Object.keys(this.children).length},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return rf(this)},t}(),Yc=function(){function t(t,n){this.path=t,this.parameters=n}return Object.defineProperty(t.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=Nc(this.parameters)),this._parameterMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return cf(this)},t}();function Jc(t,n){return t.length===n.length&&t.every(function(t,e){return t.path===n[e].path})}function Xc(t,n){var e=[];return Wc(t.children,function(t,r){r===Ac&&(e=e.concat(n(t,r)))}),Wc(t.children,function(t,r){r!==Ac&&(e=e.concat(n(t,r)))}),e}var tf=function(){return function(){}}(),nf=function(){function t(){}return t.prototype.parse=function(t){var n=new gf(t);return new Kc(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())},t.prototype.serialize=function(t){var n,e;return"/"+function t(n,e){if(!n.hasChildren())return rf(n);if(e){var r=n.children[Ac]?t(n.children[Ac],!1):"",o=[];return Wc(n.children,function(n,e){e!==Ac&&o.push(e+":"+t(n,!1))}),o.length>0?r+"("+o.join("//")+")":r}var i=Xc(n,function(e,r){return r===Ac?[t(n.children[Ac],!1)]:[r+":"+t(e,!1)]});return rf(n)+"/("+i.join("//")+")"}(t.root,!0)+(n=t.queryParams,(e=Object.keys(n).map(function(t){var e=n[t];return Array.isArray(e)?e.map(function(n){return lf(t)+"="+lf(n)}).join("&"):lf(t)+"="+lf(e)})).length?"?"+e.join("&"):"")+("string"==typeof t.fragment?"#"+encodeURI(t.fragment):"")},t}(),ef=new nf;function rf(t){return t.segments.map(function(t){return cf(t)}).join("/")}function of(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function lf(t){return of(t).replace(/%3B/gi,";")}function uf(t){return of(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function af(t){return decodeURIComponent(t)}function sf(t){return af(t.replace(/\+/g,"%20"))}function cf(t){return""+uf(t.path)+(n=t.parameters,Object.keys(n).map(function(t){return";"+uf(t)+"="+uf(n[t])}).join(""));var n}var ff=/^[^\/()?;=#]+/;function pf(t){var n=t.match(ff);return n?n[0]:""}var hf=/^[^=?&#]+/,df=/^[^?&#]+/,gf=function(){function t(t){this.url=t,this.remaining=t}return t.prototype.parseRootSegment=function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Gc([],{}):new Gc([],this.parseChildren())},t.prototype.parseQueryParams=function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t},t.prototype.parseFragment=function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null},t.prototype.parseChildren=function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));var e={};return this.peekStartsWith("(")&&(e=this.parseParens(!1)),(t.length>0||Object.keys(n).length>0)&&(e[Ac]=new Gc(t,n)),e},t.prototype.parseSegment=function(){var t=pf(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(t),new Yc(af(t),this.parseMatrixParams())},t.prototype.parseMatrixParams=function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t},t.prototype.parseParam=function(t){var n=pf(this.remaining);if(n){this.capture(n);var e="";if(this.consumeOptional("=")){var r=pf(this.remaining);r&&this.capture(e=r)}t[af(n)]=af(e)}},t.prototype.parseQueryParam=function(t){var n,e=(n=this.remaining.match(hf))?n[0]:"";if(e){this.capture(e);var r="";if(this.consumeOptional("=")){var o=function(t){var n=t.match(df);return n?n[0]:""}(this.remaining);o&&this.capture(r=o)}var i=sf(e),l=sf(r);if(t.hasOwnProperty(i)){var u=t[i];Array.isArray(u)||(t[i]=u=[u]),u.push(l)}else t[i]=l}},t.prototype.parseParens=function(t){var n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var e=pf(this.remaining),r=this.remaining[e.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error("Cannot parse url '"+this.url+"'");var o=void 0;e.indexOf(":")>-1?(o=e.substr(0,e.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=Ac);var i=this.parseChildren();n[o]=1===Object.keys(i).length?i[Ac]:new Gc([],i),this.consumeOptional("//")}return n},t.prototype.peekStartsWith=function(t){return this.remaining.startsWith(t)},t.prototype.consumeOptional=function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)},t.prototype.capture=function(t){if(!this.consumeOptional(t))throw new Error('Expected "'+t+'".')},t}(),vf=function(){function t(t){this._root=t}return Object.defineProperty(t.prototype,"root",{get:function(){return this._root.value},enumerable:!0,configurable:!0}),t.prototype.parent=function(t){var n=this.pathFromRoot(t);return n.length>1?n[n.length-2]:null},t.prototype.children=function(t){var n=mf(t,this._root);return n?n.children.map(function(t){return t.value}):[]},t.prototype.firstChild=function(t){var n=mf(t,this._root);return n&&n.children.length>0?n.children[0].value:null},t.prototype.siblings=function(t){var n=yf(t,this._root);return n.length<2?[]:n[n.length-2].children.map(function(t){return t.value}).filter(function(n){return n!==t})},t.prototype.pathFromRoot=function(t){return yf(t,this._root).map(function(t){return t.value})},t}();function mf(t,n){var e,o;if(t===n.value)return n;try{for(var i=Object(r.e)(n.children),l=i.next();!l.done;l=i.next()){var u=mf(t,l.value);if(u)return u}}catch(a){e={error:a}}finally{try{l&&!l.done&&(o=i.return)&&o.call(i)}finally{if(e)throw e.error}}return null}function yf(t,n){var e,o;if(t===n.value)return[n];try{for(var i=Object(r.e)(n.children),l=i.next();!l.done;l=i.next()){var u=yf(t,l.value);if(u.length)return u.unshift(n),u}}catch(a){e={error:a}}finally{try{l&&!l.done&&(o=i.return)&&o.call(i)}finally{if(e)throw e.error}}return[]}var bf=function(){function t(t,n){this.value=t,this.children=n}return t.prototype.toString=function(){return"TreeNode("+this.value+")"},t}();function wf(t){var n={};return t&&t.children.forEach(function(t){return n[t.value.outlet]=t}),n}var _f=function(t){function n(n,e){var r=t.call(this,n)||this;return r.snapshot=e,kf(r,n),r}return Object(r.b)(n,t),n.prototype.toString=function(){return this.snapshot.toString()},n}(vf);function xf(t,n){var e=function(t,n){var e=new If([],{},{},"",{},Ac,n,null,t.root,-1,{});return new Ef("",new bf(e,[]))}(t,n),r=new aa([new Yc("",{})]),o=new aa({}),i=new aa({}),l=new aa({}),u=new aa(""),a=new Cf(r,o,l,u,i,Ac,n,e.root);return a.snapshot=e.root,new _f(new bf(a,[]),e)}var Cf=function(){function t(t,n,e,r,o,i,l,u){this.url=t,this.params=n,this.queryParams=e,this.fragment=r,this.data=o,this.outlet=i,this.component=l,this._futureSnapshot=u}return Object.defineProperty(t.prototype,"routeConfig",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=this.params.pipe(U(function(t){return Nc(t)}))),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(U(function(t){return Nc(t)}))),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function Sf(t,n){void 0===n&&(n="emptyOnly");var e=t.pathFromRoot,o=0;if("always"!==n)for(o=e.length-1;o>=1;){var i=e[o],l=e[o-1];if(i.routeConfig&&""===i.routeConfig.path)o--;else{if(l.component)break;o--}}return function(t){return t.reduce(function(t,n){return{params:Object(r.a)({},t.params,n.params),data:Object(r.a)({},t.data,n.data),resolve:Object(r.a)({},t.resolve,n._resolvedData)}},{params:{},data:{},resolve:{}})}(e.slice(o))}var If=function(){function t(t,n,e,r,o,i,l,u,a,s,c){this.url=t,this.params=n,this.queryParams=e,this.fragment=r,this.data=o,this.outlet=i,this.component=l,this.routeConfig=u,this._urlSegment=a,this._lastPathIndex=s,this._resolve=c}return Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=Nc(this.params)),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=Nc(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"Route(url:'"+this.url.map(function(t){return t.toString()}).join("/")+"', path:'"+(this.routeConfig?this.routeConfig.path:"")+"')"},t}(),Ef=function(t){function n(n,e){var r=t.call(this,e)||this;return r.url=n,kf(r,e),r}return Object(r.b)(n,t),n.prototype.toString=function(){return Tf(this._root)},n}(vf);function kf(t,n){n.value._routerState=t,n.children.forEach(function(n){return kf(t,n)})}function Tf(t){var n=t.children.length>0?" { "+t.children.map(Tf).join(", ")+" } ":"";return""+t.value+n}function Of(t){if(t.snapshot){var n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,qc(n.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),n.fragment!==e.fragment&&t.fragment.next(e.fragment),qc(n.params,e.params)||t.params.next(e.params),function(t,n){if(t.length!==n.length)return!1;for(var e=0;e0&&Pf(e[0]))throw new Error("Root segment cannot have matrix parameters");var r=e.find(function(t){return"object"==typeof t&&null!=t&&t.outlets});if(r&&r!==$c(e))throw new Error("{outlets:{}} has to be the last command")}return t.prototype.toRoot=function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]},t}(),Nf=function(){return function(t,n,e){this.segmentGroup=t,this.processChildren=n,this.index=e}}();function Df(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets[Ac]:""+t}function Lf(t,n,e){if(t||(t=new Gc([],{})),0===t.segments.length&&t.hasChildren())return Mf(t,n,e);var r=function(t,n,e){for(var r=0,o=n,i={match:!1,pathIndex:0,commandIndex:0};o=e.length)return i;var l=t.segments[o],u=Df(e[r]),a=r0&&void 0===u)break;if(u&&a&&"object"==typeof a&&void 0===a.outlets){if(!Hf(u,a,l))return i;r+=2}else{if(!Hf(u,{},l))return i;r++}o++}return{match:!0,pathIndex:o,commandIndex:r}}(t,n,e),o=e.slice(r.commandIndex);if(r.match&&r.pathIndex0?new Gc([],((r={})[Ac]=t,r)):t;return new Kc(o,n,e)},t.prototype.expandSegmentGroup=function(t,n,e,r){return 0===e.segments.length&&e.hasChildren()?this.expandChildren(t,n,e).pipe(U(function(t){return new Gc([],t)})):this.expandSegment(t,e,n,e.segments,r,!0)},t.prototype.expandChildren=function(t,n,e){var r=this;return function(e,o){if(0===Object.keys(e).length)return ua({});var i=[],l=[],u={};return Wc(e,function(e,o){var a,s,c=(a=o,s=e,r.expandSegmentGroup(t,n,s,a)).pipe(U(function(t){return u[o]=t}));o===Ac?i.push(c):l.push(c)}),ua.apply(null,i.concat(l)).pipe(va(),Pa(),U(function(){return u}))}(e.children)},t.prototype.expandSegment=function(t,n,e,o,i,l){var u=this;return ua.apply(void 0,Object(r.d)(e)).pipe(U(function(r){return u.expandSegmentAgainstRoute(t,n,e,r,o,i,l).pipe(Aa(function(t){if(t instanceof Wf)return ua(null);throw t}))}),va(),Ua(function(t){return!!t}),Aa(function(t,e){if(t instanceof sa||"EmptyError"===t.name){if(u.noLeftoversInUrl(n,o,i))return ua(new Gc([],{}));throw new Wf(n)}throw t}))},t.prototype.noLeftoversInUrl=function(t,n,e){return 0===n.length&&!t.children[e]},t.prototype.expandSegmentAgainstRoute=function(t,n,e,r,o,i,l){return np(r)!==i?Zf(n):void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,n,r,o):l&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,n,e,r,o,i):Zf(n)},t.prototype.expandSegmentAgainstRouteUsingRedirect=function(t,n,e,r,o,i){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,r,i):this.expandRegularSegmentAgainstRouteUsingRedirect(t,n,e,r,o,i)},t.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect=function(t,n,e,r){var o=this,i=this.applyRedirectCommands([],e.redirectTo,{});return e.redirectTo.startsWith("/")?Kf(i):this.lineralizeSegments(e,i).pipe(q(function(e){var i=new Gc(e,{});return o.expandSegment(t,i,n,e,r,!1)}))},t.prototype.expandRegularSegmentAgainstRouteUsingRedirect=function(t,n,e,r,o,i){var l=this,u=Jf(n,r,o),a=u.consumedSegments,s=u.lastChild,c=u.positionalParamSegments;if(!u.matched)return Zf(n);var f=this.applyRedirectCommands(a,r.redirectTo,c);return r.redirectTo.startsWith("/")?Kf(f):this.lineralizeSegments(r,f).pipe(q(function(r){return l.expandSegment(t,n,e,r.concat(o.slice(s)),i,!1)}))},t.prototype.matchSegmentAgainstRoute=function(t,n,e,o){var i=this;if("**"===e.path)return e.loadChildren?this.configLoader.load(t.injector,e).pipe(U(function(t){return e._loadedConfig=t,new Gc(o,{})})):ua(new Gc(o,{}));var l=Jf(n,e,o),u=l.consumedSegments,a=l.lastChild;if(!l.matched)return Zf(n);var s=o.slice(a);return this.getChildConfig(t,e,o).pipe(q(function(t){var e=t.module,o=t.routes,l=function(t,n,e,o){return e.length>0&&function(t,n,e){return o.some(function(e){return tp(t,n,e)&&np(e)!==Ac})}(t,e)?{segmentGroup:Xf(new Gc(n,function(t,n){var e,o,i={};i[Ac]=n;try{for(var l=Object(r.e)(t),u=l.next();!u.done;u=l.next()){var a=u.value;""===a.path&&np(a)!==Ac&&(i[np(a)]=new Gc([],{}))}}catch(s){e={error:s}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(e)throw e.error}}return i}(o,new Gc(e,t.children)))),slicedSegments:[]}:0===e.length&&function(t,n,e){return o.some(function(e){return tp(t,n,e)})}(t,e)?{segmentGroup:Xf(new Gc(t.segments,function(t,n,e,o){var i,l,u={};try{for(var a=Object(r.e)(e),s=a.next();!s.done;s=a.next()){var c=s.value;tp(t,n,c)&&!o[np(c)]&&(u[np(c)]=new Gc([],{}))}}catch(f){i={error:f}}finally{try{s&&!s.done&&(l=a.return)&&l.call(a)}finally{if(i)throw i.error}}return Object(r.a)({},o,u)}(t,e,o,t.children))),slicedSegments:e}:{segmentGroup:t,slicedSegments:e}}(n,u,s,o),a=l.segmentGroup,c=l.slicedSegments;return 0===c.length&&a.hasChildren()?i.expandChildren(e,o,a).pipe(U(function(t){return new Gc(u,t)})):0===o.length&&0===c.length?ua(new Gc(u,{})):i.expandSegment(e,a,o,c,Ac,!0).pipe(U(function(t){return new Gc(u.concat(t.segments),t.children)}))}))},t.prototype.getChildConfig=function(t,n,e){var r=this;return n.children?ua(new Uc(n.children,t)):n.loadChildren?void 0!==n._loadedConfig?ua(n._loadedConfig):function(t,n,e){var r,o=n.canLoad;return o&&0!==o.length?z(o).pipe(U(function(r){var o,i=t.get(r);if(function(t){return t&&Bf(t.canLoad)}(i))o=i.canLoad(n,e);else{if(!Bf(i))throw new Error("Invalid CanLoad guard");o=i(n,e)}return Qc(o)})).pipe(va(),(r=function(t){return!0===t},function(t){return t.lift(new Va(r,void 0,t))})):ua(!0)}(t.injector,n,e).pipe(q(function(e){return e?r.configLoader.load(t.injector,n).pipe(U(function(t){return n._loadedConfig=t,t})):function(t){return new _(function(n){return n.error(Lc("Cannot load children because the guard of the route \"path: '"+t.path+"'\" returned false"))})}(n)})):ua(new Uc([],t))},t.prototype.lineralizeSegments=function(t,n){for(var e=[],r=n.root;;){if(e=e.concat(r.segments),0===r.numberOfChildren)return ua(e);if(r.numberOfChildren>1||!r.children[Ac])return Gf(t.redirectTo);r=r.children[Ac]}},t.prototype.applyRedirectCommands=function(t,n,e){return this.applyRedirectCreatreUrlTree(n,this.urlSerializer.parse(n),t,e)},t.prototype.applyRedirectCreatreUrlTree=function(t,n,e,r){var o=this.createSegmentGroup(t,n.root,e,r);return new Kc(o,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)},t.prototype.createQueryParams=function(t,n){var e={};return Wc(t,function(t,r){if("string"==typeof t&&t.startsWith(":")){var o=t.substring(1);e[r]=n[o]}else e[r]=t}),e},t.prototype.createSegmentGroup=function(t,n,e,r){var o=this,i=this.createSegments(t,n.segments,e,r),l={};return Wc(n.children,function(n,i){l[i]=o.createSegmentGroup(t,n,e,r)}),new Gc(i,l)},t.prototype.createSegments=function(t,n,e,r){var o=this;return n.map(function(n){return n.path.startsWith(":")?o.findPosParam(t,n,r):o.findOrReturn(n,e)})},t.prototype.findPosParam=function(t,n,e){var r=e[n.path.substring(1)];if(!r)throw new Error("Cannot redirect to '"+t+"'. Cannot find '"+n.path+"'.");return r},t.prototype.findOrReturn=function(t,n){var e,o,i=0;try{for(var l=Object(r.e)(n),u=l.next();!u.done;u=l.next()){var a=u.value;if(a.path===t.path)return n.splice(i),a;i++}}catch(s){e={error:s}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(e)throw e.error}}return t},t}();function Jf(t,n,e){if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||e.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var r=(n.matcher||Mc)(e,t,n);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function Xf(t){if(1===t.numberOfChildren&&t.children[Ac]){var n=t.children[Ac];return new Gc(t.segments.concat(n.segments),n.children)}return t}function tp(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path&&void 0!==e.redirectTo}function np(t){return t.outlet||Ac}var ep=function(){return function(t){this.path=t,this.route=this.path[this.path.length-1]}}(),rp=function(){return function(t,n){this.component=t,this.route=n}}();function op(t,n,e){var r=function(t){if(!t)return null;for(var n=t.parent;n;n=n.parent){var e=n.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig}return null}(n);return(r?r.module.injector:e).get(t)}function ip(t,n,e,r,o){void 0===o&&(o={canDeactivateChecks:[],canActivateChecks:[]});var i=wf(n);return t.children.forEach(function(t){!function(t,n,e,r,o){void 0===o&&(o={canDeactivateChecks:[],canActivateChecks:[]});var i=t.value,l=n?n.value:null,u=e?e.getContext(t.value.outlet):null;if(l&&i.routeConfig===l.routeConfig){var a=function(t,n,e){if("function"==typeof e)return e(t,n);switch(e){case"pathParamsChange":return!Jc(t.url,n.url);case"pathParamsOrQueryParamsChange":return!Jc(t.url,n.url)||!qc(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Rf(t,n)||!qc(t.queryParams,n.queryParams);case"paramsChange":default:return!Rf(t,n)}}(l,i,i.routeConfig.runGuardsAndResolvers);a?o.canActivateChecks.push(new ep(r)):(i.data=l.data,i._resolvedData=l._resolvedData),ip(t,n,i.component?u?u.children:null:e,r,o),a&&o.canDeactivateChecks.push(new rp(u&&u.outlet&&u.outlet.component||null,l))}else l&&lp(n,u,o),o.canActivateChecks.push(new ep(r)),ip(t,null,i.component?u?u.children:null:e,r,o)}(t,i[t.value.outlet],e,r.concat([t.value]),o),delete i[t.value.outlet]}),Wc(i,function(t,n){return lp(t,e.getContext(n),o)}),o}function lp(t,n,e){var r=wf(t),o=t.value;Wc(r,function(t,r){lp(t,o.component?n?n.children.getContext(r):null:n,e)}),e.canDeactivateChecks.push(new rp(o.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,o))}var up=Symbol("INITIAL_VALUE");function ap(){return Ha(function(t){return(function(){for(var t=[],n=0;n0?$c(e).parameters:{};i=new If(e,a,Object.freeze(Object(r.a)({},this.urlTree.queryParams)),this.urlTree.fragment,wp(t),o,t.component,t,gp(n),vp(n)+e.length,_p(t))}else{var s=function(t,n,e){if(""===n.path){if("full"===n.pathMatch&&(t.hasChildren()||e.length>0))throw new hp;return{consumedSegments:[],lastChild:0,parameters:{}}}var o=(n.matcher||Mc)(e,t,n);if(!o)throw new hp;var i={};Wc(o.posParams,function(t,n){i[n]=t.path});var l=o.consumed.length>0?Object(r.a)({},i,o.consumed[o.consumed.length-1].parameters):i;return{consumedSegments:o.consumed,lastChild:o.consumed.length,parameters:l}}(n,t,e);l=s.consumedSegments,u=e.slice(s.lastChild),i=new If(l,s.parameters,Object.freeze(Object(r.a)({},this.urlTree.queryParams)),this.urlTree.fragment,wp(t),o,t.component,t,gp(n),vp(n)+l.length,_p(t))}var c=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),f=mp(n,l,u,c,this.relativeLinkResolution),p=f.segmentGroup,h=f.slicedSegments;if(0===h.length&&p.hasChildren()){var d=this.processChildren(c,p);return[new bf(i,d)]}if(0===c.length&&0===h.length)return[new bf(i,[])];var g=this.processSegment(c,p,h,Ac);return[new bf(i,g)]},t}();function gp(t){for(var n=t;n._sourceSegment;)n=n._sourceSegment;return n}function vp(t){for(var n=t,e=n._segmentIndexShift?n._segmentIndexShift:0;n._sourceSegment;)e+=(n=n._sourceSegment)._segmentIndexShift?n._segmentIndexShift:0;return e-1}function mp(t,n,e,o,i){if(e.length>0&&function(t,n,e){return o.some(function(e){return yp(t,n,e)&&bp(e)!==Ac})}(t,e)){var l=new Gc(n,function(t,n,e,o){var i,l,u={};u[Ac]=o,o._sourceSegment=t,o._segmentIndexShift=n.length;try{for(var a=Object(r.e)(e),s=a.next();!s.done;s=a.next()){var c=s.value;if(""===c.path&&bp(c)!==Ac){var f=new Gc([],{});f._sourceSegment=t,f._segmentIndexShift=n.length,u[bp(c)]=f}}}catch(p){i={error:p}}finally{try{s&&!s.done&&(l=a.return)&&l.call(a)}finally{if(i)throw i.error}}return u}(t,n,o,new Gc(e,t.children)));return l._sourceSegment=t,l._segmentIndexShift=n.length,{segmentGroup:l,slicedSegments:[]}}if(0===e.length&&function(t,n,e){return o.some(function(e){return yp(t,n,e)})}(t,e)){var u=new Gc(t.segments,function(t,n,e,o,i,l){var u,a,s={};try{for(var c=Object(r.e)(o),f=c.next();!f.done;f=c.next()){var p=f.value;if(yp(t,e,p)&&!i[bp(p)]){var h=new Gc([],{});h._sourceSegment=t,h._segmentIndexShift="legacy"===l?t.segments.length:n.length,s[bp(p)]=h}}}catch(d){u={error:d}}finally{try{f&&!f.done&&(a=c.return)&&a.call(c)}finally{if(u)throw u.error}}return Object(r.a)({},i,s)}(t,n,e,o,t.children,i));return u._sourceSegment=t,u._segmentIndexShift=n.length,{segmentGroup:u,slicedSegments:e}}var a=new Gc(t.segments,t.children);return a._sourceSegment=t,a._segmentIndexShift=n.length,{segmentGroup:a,slicedSegments:e}}function yp(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path&&void 0===e.redirectTo}function bp(t){return t.outlet||Ac}function wp(t){return t.data||{}}function _p(t){return t.resolve||{}}function xp(t,n,e,r){var o=op(t,n,r);return Qc(o.resolve?o.resolve(n,e):o(n,e))}function Cp(t){return function(n){return n.pipe(Ha(function(n){var e=t(n);return e?z(e).pipe(U(function(){return n})):z([n])}))}}var Sp=function(){return function(){}}(),Ip=function(){function t(){}return t.prototype.shouldDetach=function(t){return!1},t.prototype.store=function(t,n){},t.prototype.shouldAttach=function(t){return!1},t.prototype.retrieve=function(t){return null},t.prototype.shouldReuseRoute=function(t,n){return t.routeConfig===n.routeConfig},t}(),Ep=new Ct("ROUTES"),kp=function(){function t(t,n,e,r){this.loader=t,this.compiler=n,this.onLoadStartListener=e,this.onLoadEndListener=r}return t.prototype.load=function(t,n){var e=this;return this.onLoadStartListener&&this.onLoadStartListener(n),this.loadModuleFactory(n.loadChildren).pipe(U(function(r){e.onLoadEndListener&&e.onLoadEndListener(n);var o=r.create(t);return new Uc(Bc(o.injector.get(Ep)).map(zc),o)}))},t.prototype.loadModuleFactory=function(t){var n=this;return"string"==typeof t?z(this.loader.load(t)):Qc(t()).pipe(q(function(t){return t instanceof Lt?ua(t):z(n.compiler.compileModuleAsync(t))}))},t}(),Tp=function(){return function(){}}(),Op=function(){function t(){}return t.prototype.shouldProcessUrl=function(t){return!0},t.prototype.extract=function(t){return t},t.prototype.merge=function(t,n){return t},t}();function Rp(t){throw t}function Pp(t,n,e){return n.parse("/")}function Ap(t,n){return ua(null)}var jp=function(){function t(t,n,e,r,o,i,l,u){var a=this;this.rootComponentType=t,this.urlSerializer=n,this.rootContexts=e,this.location=r,this.config=u,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new E,this.errorHandler=Rp,this.malformedUriErrorHandler=Pp,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Ap,afterPreactivation:Ap},this.urlHandlingStrategy=new Op,this.routeReuseStrategy=new Ip,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=o.get(Dt),this.console=o.get(Mo);var s=o.get(ei);this.isNgZoneEnabled=s instanceof ei,this.resetConfig(u),this.currentUrlTree=new Kc(new Gc([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new kp(i,l,function(t){return a.triggerEvent(new Sc(t))},function(t){return a.triggerEvent(new Ic(t))}),this.routerState=xf(this.currentUrlTree,this.rootComponentType),this.transitions=new aa({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return t.prototype.setupNavigations=function(t){var n=this,e=this.events;return t.pipe(ma(function(t){return 0!==t.id}),U(function(t){return Object(r.a)({},t,{extractedUrl:n.urlHandlingStrategy.extract(t.rawUrl)})}),Ha(function(t){var o,i,l,u,a=!1,s=!1;return ua(t).pipe(Ka(function(t){n.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:n.lastSuccessfulNavigation?Object(r.a)({},n.lastSuccessfulNavigation,{previousNavigation:null}):null}}),Ha(function(t){var o,i,l,u,a=!n.navigated||t.extractedUrl.toString()!==n.browserUrlTree.toString();if(("reload"===n.onSameUrlNavigation||a)&&n.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return ua(t).pipe(Ha(function(t){var r=n.transitions.getValue();return e.next(new gc(t.id,n.serializeUrl(t.extractedUrl),t.source,t.restoredState)),r!==n.transitions.getValue()?ha:[t]}),Ha(function(t){return Promise.resolve(t)}),(o=n.ngModule.injector,i=n.configLoader,l=n.urlSerializer,u=n.config,function(t){return t.pipe(Ha(function(t){return function(n,e,r,o,i){return new Yf(n,e,r,t.extractedUrl,i).apply()}(o,i,l,0,u).pipe(U(function(n){return Object(r.a)({},t,{urlAfterRedirects:n})}))}))}),Ka(function(t){n.currentNavigation=Object(r.a)({},n.currentNavigation,{finalUrl:t.urlAfterRedirects})}),function(t,e,o,i,l){return function(o){return o.pipe(q(function(o){return function(t,n,e,r,o,i){return void 0===o&&(o="emptyOnly"),void 0===i&&(i="legacy"),new dp(t,n,e,r,o,i).recognize()}(t,e,o.urlAfterRedirects,(u=o.urlAfterRedirects,n.serializeUrl(u)),i,l).pipe(U(function(t){return Object(r.a)({},o,{targetSnapshot:t})}));var u}))}}(n.rootComponentType,n.config,0,n.paramsInheritanceStrategy,n.relativeLinkResolution),Ka(function(t){"eager"===n.urlUpdateStrategy&&(t.extras.skipLocationChange||n.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),n.browserUrlTree=t.urlAfterRedirects)}),Ka(function(t){var r=new bc(t.id,n.serializeUrl(t.extractedUrl),n.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(r)}));if(a&&n.rawUrlTree&&n.urlHandlingStrategy.shouldProcessUrl(n.rawUrlTree)){var s=t.extractedUrl,c=t.source,f=t.restoredState,p=t.extras,h=new gc(t.id,n.serializeUrl(s),c,f);e.next(h);var d=xf(s,n.rootComponentType).snapshot;return ua(Object(r.a)({},t,{targetSnapshot:d,urlAfterRedirects:s,extras:Object(r.a)({},p,{skipLocationChange:!1,replaceUrl:!1})}))}return n.rawUrlTree=t.rawUrl,n.browserUrlTree=t.urlAfterRedirects,t.resolve(null),ha}),Cp(function(t){var e=t.extras;return n.hooks.beforePreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!e.skipLocationChange,replaceUrl:!!e.replaceUrl})}),Ka(function(t){var e=new wc(t.id,n.serializeUrl(t.extractedUrl),n.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);n.triggerEvent(e)}),U(function(t){return Object(r.a)({},t,{guards:(e=t.targetSnapshot,o=t.currentSnapshot,i=n.rootContexts,l=e._root,ip(l,o?o._root:null,i,[l.value]))});var e,o,i,l}),function(t,n){return function(e){return e.pipe(q(function(e){var o=e.targetSnapshot,i=e.currentSnapshot,l=e.guards,u=l.canActivateChecks,a=l.canDeactivateChecks;return 0===a.length&&0===u.length?ua(Object(r.a)({},e,{guardsResult:!0})):function(t,n,e,r){return z(a).pipe(q(function(t){return function(t,n,e,r,o){var i=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return i&&0!==i.length?ua(i.map(function(i){var l,u=op(i,n,o);if(function(t){return t&&Bf(t.canDeactivate)}(u))l=Qc(u.canDeactivate(t,n,e,r));else{if(!Bf(u))throw new Error("Invalid CanDeactivate guard");l=Qc(u(t,n,e,r))}return l.pipe(Ua())})).pipe(ap()):ua(!0)}(t.component,t.route,e,n,r)}),Ua(function(t){return!0!==t},!0))}(0,o,i,t).pipe(q(function(e){return e&&"boolean"==typeof e?function(t,n,e,r){return z(u).pipe(Za(function(n){return z([cp(n.route.parent,r),sp(n.route,r),pp(t,n.path,e),fp(t,n.route,e)]).pipe(va(),Ua(function(t){return!0!==t},!0))}),Ua(function(t){return!0!==t},!0))}(o,0,t,n):ua(e)}),U(function(t){return Object(r.a)({},e,{guardsResult:t})}))}))}}(n.ngModule.injector,function(t){return n.triggerEvent(t)}),Ka(function(t){if($f(t.guardsResult)){var e=Lc('Redirecting to "'+n.serializeUrl(t.guardsResult)+'"');throw e.url=t.guardsResult,e}}),Ka(function(t){var e=new _c(t.id,n.serializeUrl(t.extractedUrl),n.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);n.triggerEvent(e)}),ma(function(t){if(!t.guardsResult){n.resetUrlToCurrentUrlTree();var r=new mc(t.id,n.serializeUrl(t.extractedUrl),"");return e.next(r),t.resolve(!1),!1}return!0}),Cp(function(t){if(t.guards.canActivateChecks.length)return ua(t).pipe(Ka(function(t){var e=new xc(t.id,n.serializeUrl(t.extractedUrl),n.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);n.triggerEvent(e)}),(e=n.paramsInheritanceStrategy,o=n.ngModule.injector,function(t){return t.pipe(q(function(t){var n=t.targetSnapshot,i=t.guards.canActivateChecks;return i.length?z(i).pipe(Za(function(t){return function(t,e,o,i){return function(t,n,e,r){var o=Object.keys(t);if(0===o.length)return ua({});if(1===o.length){var i=o[0];return xp(t[i],n,e,r).pipe(U(function(t){var n;return(n={})[i]=t,n}))}var l={};return z(o).pipe(q(function(o){return xp(t[o],n,e,r).pipe(U(function(t){return l[o]=t,t}))})).pipe(Pa(),U(function(){return l}))}(t._resolve,t,n,i).pipe(U(function(n){return t._resolvedData=n,t.data=Object(r.a)({},t.data,Sf(t,o).resolve),null}))}(t.route,0,e,o)}),function(t,n){return arguments.length>=2?function(e){return b($a(t,n),_a(1),Ta(n))(e)}:function(n){return b($a(function(n,e,r){return t(n,e,r+1)}),_a(1))(n)}}(function(t,n){return t}),U(function(n){return t})):ua(t)}))}),Ka(function(t){var e=new Cc(t.id,n.serializeUrl(t.extractedUrl),n.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);n.triggerEvent(e)}));var e,o}),Cp(function(t){var e=t.extras;return n.hooks.afterPreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!e.skipLocationChange,replaceUrl:!!e.replaceUrl})}),U(function(t){var e,o,i,l=(i=function t(n,e,o){if(o&&n.shouldReuseRoute(e.value,o.value.snapshot)){(s=o.value)._futureSnapshot=e.value;var i=function(n,e,o){return e.children.map(function(e){var i,l;try{for(var u=Object(r.e)(o.children),a=u.next();!a.done;a=u.next()){var s=a.value;if(n.shouldReuseRoute(s.value.snapshot,e.value))return t(n,e,s)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(l=u.return)&&l.call(u)}finally{if(i)throw i.error}}return t(n,e)})}(n,e,o);return new bf(s,i)}var l=n.retrieve(e.value);if(l){var u=l.route;return function t(n,e){if(n.value.routeConfig!==e.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(n.children.length!==e.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");e.value._futureSnapshot=n.value;for(var r=0;ru;){if(a-=u,!(l=l.parent))throw new Error("Invalid number of '../'");u=l.segments.length}return new Nf(l,!1,u-a)}()}(l,0,t),a=u.processChildren?Mf(u.segmentGroup,u.index,l.commands):Lf(u.segmentGroup,u.index,l.commands);return Af(u.segmentGroup,a,n,o,i)}(s,this.currentUrlTree,t,f,c)},t.prototype.navigateByUrl=function(t,n){void 0===n&&(n={skipLocationChange:!1}),Gt()&&this.isNgZoneEnabled&&!ei.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var e=$f(t)?t:this.parseUrl(t),r=this.urlHandlingStrategy.merge(e,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,n)},t.prototype.navigate=function(t,n){return void 0===n&&(n={skipLocationChange:!1}),function(t){for(var n=0;nthis.device.height?"remove":"add"]("dx")},t}(),gh=function(){function t(t,n,e){this.app=t,this.device=n,this.er=e,this.scrollTop=0,this.action=new To,this.currentId="",this.stacks={},this.linedIds=[],this.config=this.app.config.toc||{},this.syncPosition=mu(this.syncPosition.bind(this))}return t.prototype.navigate=function(t,n){if(n.preventDefault(),this.currentId!==t){this.currentId=t;var e=this.getOffset(t);e>=0&&this.action.emit(e)}},t.prototype.syncPosition=function(){var t=this.scrollTop||0;if(t=e.offset&&(void 0===r||t4&&(this.busy=!0,gu(r,function(){e.busy=!1}))},t}();function vh(){for(var t=[],n=0;n1&&(r=1),t.scrollPercent=Math.round(100*r)}else t.scrollPercent=0;t.isTocOpen&&t.tocData&&t.toc&&t.toc.syncPosition(),"home"===t.currentId&&(t.indexScrollTop=e)}),this.router.events.pipe(ma(function(t){return t instanceof vc})).subscribe(function(){t.screenType!==sh.lg&&t.isSidebarOpen&&t.toggleSb(),t.isTocOpen&&t.toggleToc(),t.device.refreshScroll();var n,e=t.route.snapshot.children[0].children.length?t.route.snapshot.children[0].children[0].data:t.route.snapshot.children[0].data;if(t.currentId=e.id,"home"===t.currentId)setTimeout(function(){t.pageRef.nativeElement.scrollTop=t.indexScrollTop||0},0);else if("post"===t.currentId||"page"===t.currentId){var r=t.route.fragment.value;r?setTimeout(function(){var n=t.doc.getElementById(r);n&&n.scrollIntoView(!0)},24):t.pageRef.nativeElement.scrollTop=0}else t.pageRef.nativeElement.scrollTop=0;t.tocData=e[t.currentId]&&e[t.currentId].toc?e[t.currentId].toc:null,t.setTitle(e),e.post&&e.post.thumbnail?e.post.color?t.themeColor=t.setColor(e.post.color):e.post.thumbnail&&(n=e.post.thumbnail,pu[n]?Promise.resolve(pu[n]):new Promise(function(t,e){var r=new Image;r.crossOrigin="anonymous",r.onload=function(){var e,o=cu.doc.createElement("canvas").getContext("2d");o.drawImage(r,0,0);var i=(e=o.getImageData(0,0,1,1).data.slice(0,3)).reduce(function(t,n){return t+n}),l=fu[1]-i;l<0?(l=Math.abs(l),l=Math.floor(l/3),e=e.map(function(t){return t-l})):ic.clientX?"left":"right",u=Math.abs(i-c.clientX),Math.abs(l-c.clientY)>=u||Math.abs(u)>n.hold&&(a=!0,o.next({start:i,offset:s(u),direction:e,isStart:r,isEnd:!1}),r=!1)},{passive:!0}),t.addEventListener("touchend",function(){a&&o.next({start:i,offset:s(u),direction:e,isEnd:!0,isStart:!1}),a=!1,i=l=u=0},{passive:!0}),o.asObservable();function s(t){return Math.ceil((t+(t>0?-n.hold:n.hold))*n.scale)}}(this.pageRef.nativeElement,{scale:.382});n.subscribe(function(n){var e,r=.06*t.device.width,o=t.sidebarWidth,i=t.isSidebarOpen,l=n.offset;!t.isSidebarOpen&&n.start>r||(l>o-1&&(l=o-1),l<1&&(l=1),e=~~(o-l),n.isEnd?lo-1&&(l=o-1),l<1&&(l=1),e=~~(o-l),n.isEnd?l0?(this.isTransiting=!0,this.isTocOpen&&this.toggleToc(),r.classList.add("bo"),this.setColor(i),gu(r,function(){0===t&&(r.classList.remove("bo"),e.setColor(e.themeColor)),r.style[wu("transitionDuration")]=r.style[wu("transitionProperty")]="",o.style[wu("transitionDuration")]=o.style[wu("transitionProperty")]="",e.isTransiting=!1})):this.isTransiting||(this.isTransiting=!0,r.classList.add("bo"),this.setColor(i)),r.style[wu("transitionProperty")]=wu("transform",!0)+",border-radius",r.style[wu("transform")]=this.transformer(t,1-.14*t/this.sidebarWidth),r.style[wu("transitionDuration")]=n+"ms",o.style.opacity=t/this.sidebarWidth,o.style[wu("transitionDuration")]=n+"ms"},t.prototype.toggleSb=function(t){this.isTransiting||(this.isSidebarOpen||t?(this.stepSb(0,~~(1.5*this.sidebarWidth)),this.isSidebarOpen=!1):(this.stepSb(this.sidebarWidth,~~(1.5*this.sidebarWidth)),this.isSidebarOpen=!0,this.isSearchOpen=!1))},t.prototype.toggleToc=function(t){this.toc.busy||(this.isTocOpen||t?(this.toc.step(this.toc.width,~~(1.5*this.toc.width)),this.isTocOpen=!1):(this.toc.refresh(),this.toc.syncPosition(),this.toc.step(0,~~(1.5*this.toc.width)),this.isTocOpen=!0,this.isSearchOpen=!1))},t.prototype.toggleSearch=function(t){this.isSearchOpen=!t&&!this.isSearchOpen},t.prototype.setTitle=function(t){var n=this,e={post:function(t){return t.post.title},page:function(t){return t.page.title},tags:function(){return n.app.i18n("title.tags")},tag:function(t){return n.app.i18n("title.tags")+" : "+t.tag.name},categories:function(){return n.app.i18n("title.categories")},category:function(t){return n.app.i18n("title.categories")+" : "+t.category.name},archives:function(){return n.app.i18n("title.archives")},search:function(){return n.app.i18n("title.search")},404:function(){return 404}}[t.id],r=e?e(t)+" - "+this.config.title:this.config.title;this.title.setTitle(r)},t.prototype.setColor=function(t){return this.meta.updateTag({name:"theme-color",content:t=t||this.app.config.color[1]||this.config.color[1]||""}),t},t.prototype.onFabAct=function(t){switch(t){case ph.toTop:this.animateTo(0);break;case ph.toBottom:this.animateTo(this.pageRef.nativeElement.scrollHeight-this.pageHeight);break;case ph.toggleSidebar:this.toggleSb();break;case ph.toggleToc:this.toggleToc();break;case ph.search:this.toggleSearch()}},t.prototype.animateTo=function(t){var n=this.scrollTop||0,e=Math.abs(~~(.618*(t-n)/1));hu(this.pageRef.nativeElement,"scrollTop",{from:n,to:t,duration:e>618?618:e})},t.prototype.onOverlay=function(){this.isSidebarOpen&&this.toggleSb(),this.isTocOpen&&this.toggleToc()},t.prototype.onkeyup=function(t,n){"Escape"!==t&&27!==n||(this.isSearchOpen&&this.toggleSearch(),this.isTocOpen&&this.toggleToc(),this.isSidebarOpen&&this.toggleSb())},t}(),wh=Qe({encapsulation:2,styles:[],data:{}});function _h(t){return el(0,[(t()(),Vi(0,16777216,null,null,1,"router-outlet",[],null,null,null,null,null)),ro(1,212992,null,0,Fp,[Vp,Te,Xn,[8,null],In],null,null)],function(t,n){t(n,1,0)},null)}function xh(t){return el(0,[(t()(),Vi(0,0,null,null,1,"ng-component",[],null,null,null,_h,wh)),ro(1,49152,null,0,Pc,[],null,null)],null,null)}var Ch=jr("ng-component",Pc,xh,{},{},[]),Sh=function(){function t(){this.ratio=.625,this.state=-1}return t.prototype.ngOnChanges=function(t){t.src&&(this.state=-1)},t.prototype.onLoad=function(){this.state=1},t.prototype.onError=function(){this.state=0},t}(),Ih=Qe({encapsulation:2,styles:[],data:{}});function Eh(t){return el(0,[(t()(),Vi(0,0,null,null,6,"span",[["class","cu"]],null,null,null,null,null)),io(512,null,Mu,Uu,[_e,xe,re,ae]),ro(2,278528,null,0,Vu,[Mu],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Yi(3,{cv:0}),io(512,null,Wu,Qu,[re,xe,ae]),ro(5,278528,null,0,Zu,[Wu],{ngStyle:[0,"ngStyle"]},null),Yi(6,{padding:0})],function(t,n){var e=n.component,r=t(n,3,0,0===e.state);t(n,2,0,"cu",r);var o=t(n,6,0,(50*e.ratio).toFixed(3)+"% 0");t(n,5,0,o)},null)}function kh(t){return el(2,[(t()(),Ui(16777216,null,null,1,null,Eh)),ro(1,16384,null,0,qu,[Te,Ee],{ngIf:[0,"ngIf"]},null),(t()(),Vi(2,0,null,null,3,"img",[["class","ct"]],[[8,"src",4],[8,"alt",0]],[[null,"load"],[null,"error"]],function(t,n,e){var r=!0,o=t.component;return"load"===n&&(r=!1!==o.onLoad()&&r),"error"===n&&(r=!1!==o.onError()&&r),r},null,null)),io(512,null,Wu,Qu,[re,xe,ae]),ro(4,278528,null,0,Zu,[Wu],{ngStyle:[0,"ngStyle"]},null),Yi(5,{display:0})],function(t,n){var e=n.component;t(n,1,0,1!==e.state);var r=t(n,5,0,1===e.state?"":"none");t(n,4,0,r)},function(t,n){var e=n.component;t(n,2,0,wr(1,"",e.src,""),wr(1,"",e.alt,""))})}var Th=function(){function t(t,n){this.er=t,this.renderer=n,this.className="is-snippet"}return t.prototype.ngAfterViewInit=function(){var t=this;setTimeout(function(){t.process()},0)},t.prototype.process=function(){var t=this,n=/^https?\:\/\/gist.github.com/,e=this.er.nativeElement&&this.er.nativeElement.getElementsByClassName(this.className);e&&e.length&&Array.from(e).forEach(function(e){var r=e.querySelector("script");if(e.classList.remove(t.className),r){var o=r.innerHTML,i=r.src;if(o||i){if(e.removeChild(r),i&&i.match(n)){var l=t.renderer.createElement("iframe");return l.style.display="none",l.onload=function(){var n=l.contentDocument;if(n){var r=t.renderer.createElement("div"),o=n.querySelector('link[rel="stylesheet"]'),i=n.querySelector(".gist");if(o&&i){var u=i.cloneNode();u.innerHTML=i.innerHTML,r.appendChild(o.cloneNode()),r.appendChild(u)}e.removeChild(l),e.appendChild(r),l=n=null}},l.srcdoc='