├── .gitignore ├── README.md ├── aot ├── 0.chunk.js ├── 1.chunk.js ├── 2.chunk.js ├── 3.chunk.js ├── 4.chunk.js ├── 5.chunk.js ├── 6.chunk.js ├── 7.chunk.js ├── 8.chunk.js ├── app.bundle.js ├── polyfills.bundle.js └── vendor.bundle.js ├── index.html ├── package-lock.json ├── package.json ├── src ├── app │ ├── app.component.ts │ ├── app.module.ts │ ├── app.router.ts │ ├── components │ │ ├── about │ │ │ ├── about.component.ts │ │ │ └── about.module.ts │ │ ├── colors │ │ │ ├── colors.component.ts │ │ │ ├── colors.directive.ts │ │ │ └── colors.module.ts │ │ ├── contact │ │ │ └── contact.component.ts │ │ ├── d3 │ │ │ └── d3.module.ts │ │ ├── dialog │ │ │ ├── dialog.component.ts │ │ │ └── dialog.module.ts │ │ ├── echarts │ │ │ ├── echarts.module.ts │ │ │ └── options.ts │ │ ├── footer │ │ │ └── footer.component.ts │ │ ├── header │ │ │ └── header.component.ts │ │ ├── home │ │ │ ├── detail │ │ │ │ └── detail.component.ts │ │ │ ├── home.component.ts │ │ │ ├── home.module.ts │ │ │ ├── home.router.ts │ │ │ └── list │ │ │ │ └── list.component.ts │ │ ├── http │ │ │ ├── http.component.html │ │ │ ├── http.component.ts │ │ │ ├── http.module.ts │ │ │ ├── http.service.ts │ │ │ ├── img.pipe.ts │ │ │ └── user │ │ │ │ ├── user.component.html │ │ │ │ └── user.component.ts │ │ ├── map │ │ │ └── baidu_map.module.ts │ │ ├── news │ │ │ ├── news.component.ts │ │ │ └── news.module.ts │ │ ├── ngcontent │ │ │ ├── ngcontent.component.ts │ │ │ └── ngcontent.module.ts │ │ ├── range │ │ │ └── range.module.ts │ │ ├── sidebar │ │ │ └── sidebat.component.ts │ │ └── tabs │ │ │ ├── tab.directive.ts │ │ │ ├── tabs.component.ts │ │ │ └── tabs.module.ts │ ├── dynamic-ad │ │ ├── ad-banner.component.ts │ │ ├── ad-item.ts │ │ ├── ad.component.ts │ │ ├── ad.directive.ts │ │ ├── ad.module.ts │ │ ├── ad.service.ts │ │ ├── hero-job-ad.component.ts │ │ └── hero-profile.component.ts │ ├── model │ │ └── index.ts │ ├── pipes │ │ ├── moment.pipe.ts │ │ └── pipe.module.ts │ └── service │ │ ├── baiduMap.service.ts │ │ └── loadScript.service.ts ├── custom-typings.d.ts ├── main.hmr.ts ├── main.ts ├── polyfills.ts ├── styles.css ├── styles.styl └── vendor.ts ├── tsconfig.json ├── webpack.aot.ts └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | jspm_packages 4 | npm-debug.* 5 | link-checker-results.txt 6 | *.js.map 7 | *.mesatata.json 8 | e2e/**/*.js 9 | e2e/**/*.js.map 10 | _test-output 11 | _temp 12 | aot 13 | ngc 14 | dist 15 | yarn.lock -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 迁移到 https://kunl-angular-demos.stackblitz.io/ 2 | 本项目不再更新,可以继续在 issues 讨论 3 | # Angular Webpack demo 4 | 5 | 1. Dynamic create NgModule(动态创建模块) 6 | 2. BaiduMap(百度地图) 7 | 3. Lazyload router(懒加载路由) 8 | 4. children router(多级路由) 9 | 5. http demo(http 请求) 10 | 11 | 12 | ## Create a new project 13 | 14 | Clone this repo into new project folder (e.g., `my-proj`). 15 | ```bash 16 | git clone https://github.com/kunl/ng2.git my-proj 17 | cd my-proj 18 | ``` 19 | 20 | ## Install npm packages 21 | 22 | > See npm and nvm version notes above 23 | 24 | Install the npm packages described in the `package.json` and verify that it works: 25 | 26 | ```bash 27 | npm install 28 | npm run dev 29 | ``` 30 | 31 | The `npm run dev` command first compiles the application and run webpack-dev-server, 32 | Both the compiler and the server watch for file changes. 33 | 34 | Shut it down manually with `Ctrl-C`. 35 | 36 | You're ready to write your application. 37 | 38 | 39 | ### npm scripts 40 | 41 | npm scripts defined in the `package.json`: 42 | 43 | * `npm build` - runs the ngc and webpack compiler to build the program. 44 | * `npm run dev` - runs the webpack-dev-server and watch all files 45 | -------------------------------------------------------------------------------- /aot/2.chunk.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([2],{395:function(n,l,u){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),u.d(l,"HomeModuleNgFactory",function(){return f});var t=u(5),i=u(715),o=u(716),e=u(718),r=u(32),c=u(43),a=u(511),_=u(512),f=t._25(i.a,[],function(n){return t._38([t._39(512,t.o,t._18,[[8,[o.a,e.a]],[3,t.o],t.K]),t._39(4608,r.j,r.i,[t.F,[2,r.n]]),t._39(512,r.b,r.b,[]),t._39(512,c.n,c.n,[[2,c.s],[2,c.k]]),t._39(512,i.a,i.a,[]),t._39(1024,c.i,function(){return[[{path:"",component:a.a,children:[{path:"detail/:id",component:_.a}]}]]},[])])})},510:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=(u(5),function(){function n(){this.list=[1,2,3,4,5,6,7]}return n.prototype.ngOnInit=function(){},n}())},511:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=(u(5),function(){function n(){}return n.prototype.ngOnInit=function(){},n}())},512:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=(u(5),u(43),function(){function n(n,l){this._route=n,this._router=l}return n.prototype.goBack=function(){this._router.navigate(["/home"])},n.prototype.ngOnInit=function(){var n=this;this._route.params.map(function(n){return n.id}).subscribe(function(l){n.id=l})},n}())},715:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},716:function(n,l,u){"use strict";function t(n){return o._54(0,[(n()(),o._52(-1,null,["\n "])),(n()(),o._28(1,0,null,null,1,"h2",[],null,null,null,null,null)),(n()(),o._52(-1,null,["home page"])),(n()(),o._52(-1,null,["\n "])),(n()(),o._28(4,0,null,null,4,"div",[["class","list"]],null,null,null,null,null)),(n()(),o._52(-1,null,["\n "])),(n()(),o._28(6,0,null,null,1,"list",[],null,null,null,e.b,e.a)),o._27(7,114688,null,0,r.a,[],null,null),(n()(),o._52(-1,null,["\n "])),(n()(),o._52(-1,null,["\n "])),(n()(),o._28(10,0,null,null,4,"div",[["class","detail"]],null,null,null,null,null)),(n()(),o._52(-1,null,["\n "])),(n()(),o._28(12,16777216,null,null,1,"router-outlet",[],null,null,null,null,null)),o._27(13,212992,null,0,c.o,[c.b,o._9,o.o,[8,null],o.k],null,null),(n()(),o._52(-1,null,["\n "])),(n()(),o._52(-1,null,["\n "]))],function(n,l){n(l,7,0),n(l,13,0)},null)}function i(n){return o._54(0,[(n()(),o._28(0,0,null,null,1,"home",[],null,null,null,t,f)),o._27(1,114688,null,0,a.a,[],null,null)],function(n,l){n(l,1,0)},null)}u.d(l,"a",function(){return s});var o=u(5),e=u(717),r=u(510),c=u(43),a=u(511),_=["home[_ngcontent-%COMP%] {\n overflow: hidden;\n }\n .list[_ngcontent-%COMP%] {\n width: 30%;\n margin-right: 20px;\n border-right: 1px solid #ccc;\n }\n .list[_ngcontent-%COMP%], .detail[_ngcontent-%COMP%] {\n display: inline-block;\n vertical-align: top\n }"],f=o._26({encapsulation:0,styles:_,data:{}}),s=o._24("home",a.a,i,{},{},[])},717:function(n,l,u){"use strict";function t(n){return e._54(0,[(n()(),e._28(0,0,null,null,9,"li",[],null,null,null,null,null)),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(2,0,null,null,6,"a",[["routerLinkActive","active"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(n,l,u){var t=!0;if("click"===l){t=!1!==e._42(n,3).onClick(u.button,u.ctrlKey,u.metaKey,u.shiftKey)&&t}return t},null,null)),e._27(3,671744,[[2,4]],0,r.m,[r.k,r.a,c.g],{routerLink:[0,"routerLink"]},null),e._44(4,3),e._27(5,1720320,null,2,r.l,[r.k,e.s,e.V,e.k],{routerLinkActive:[0,"routerLinkActive"]},null),e._49(603979776,1,{links:1}),e._49(603979776,2,{linksWithHrefs:1}),(n()(),e._52(8,null,["\n ","\n "])),(n()(),e._52(-1,null,["\n "]))],function(n,l){n(l,3,0,n(l,4,0,"/home","detail",l.context.$implicit));n(l,5,0,"active")},function(n,l){n(l,2,0,e._42(l,3).target,e._42(l,3).href),n(l,8,0,l.context.$implicit)})}function i(n){return e._54(0,[(n()(),e._52(-1,null,["\n "])),(n()(),e._28(1,0,null,null,4,"ul",[],null,null,null,null,null)),(n()(),e._52(-1,null,["\n "])),(n()(),e._23(16777216,null,null,1,null,t)),e._27(4,802816,null,0,c.h,[e._9,e._6,e.D],{ngForOf:[0,"ngForOf"]},null),(n()(),e._52(-1,null,["\n "])),(n()(),e._52(-1,null,[" \n\n "]))],function(n,l){n(l,4,0,l.component.list)},null)}function o(n){return e._54(0,[(n()(),e._28(0,0,null,null,1,"list",[],null,null,null,i,f)),e._27(1,114688,null,0,a.a,[],null,null)],function(n,l){n(l,1,0)},null)}u.d(l,"a",function(){return f}),l.b=i;var e=u(5),r=u(43),c=u(32),a=u(510),_=["a[_ngcontent-%COMP%]{\n padding: 0 10px;\n }\n a.active[_ngcontent-%COMP%]{\n color: #fff;\n background: pink\n }"],f=e._26({encapsulation:0,styles:_,data:{}});e._24("list",a.a,o,{},{},[])},718:function(n,l,u){"use strict";function t(n){return o._54(0,[(n()(),o._52(-1,null,["\n "])),(n()(),o._28(1,0,null,null,1,"h2",[],null,null,null,null,null)),(n()(),o._52(2,null,["detail "," page"])),(n()(),o._52(-1,null,["\n "])),(n()(),o._28(4,0,null,null,1,"button",[],null,[[null,"click"]],function(n,l,u){var t=!0,i=n.component;if("click"===l){t=!1!==i.goBack()&&t}return t},null,null)),(n()(),o._52(-1,null,["back"])),(n()(),o._52(-1,null,["\n "]))],null,function(n,l){n(l,2,0,l.component.id)})}function i(n){return o._54(0,[(n()(),o._28(0,0,null,null,1,"detail",[],null,null,null,t,a)),o._27(1,114688,null,0,e.a,[r.a,r.k],null,null)],function(n,l){n(l,1,0)},null)}u.d(l,"a",function(){return _});var o=u(5),e=u(512),r=u(43),c=[],a=o._26({encapsulation:2,styles:c,data:{}}),_=o._24("detail",e.a,i,{},{},[])}}); -------------------------------------------------------------------------------- /aot/3.chunk.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([3],{399:function(l,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),u.d(n,"TabsModuleNgFactory",function(){return o});var t=u(5),a=u(726),e=u(727),i=u(32),_=u(43),c=u(517),o=t._25(a.a,[],function(l){return t._38([t._39(512,t.o,t._18,[[8,[e.a]],[3,t.o],t.K]),t._39(4608,i.j,i.i,[t.F,[2,i.n]]),t._39(512,i.b,i.b,[]),t._39(512,_.n,_.n,[[2,_.s],[2,_.k]]),t._39(512,a.a,a.a,[]),t._39(1024,_.i,function(){return[[{path:"",component:c.a}]]},[])])})},516:function(l,n,u){"use strict";u.d(n,"a",function(){return t}),u.d(n,"b",function(){return a});var t=(u(5),function(){function l(){this.active=!1}return l}()),a=function(){function l(){}return l.prototype.ngAfterContentInit=function(){0===this.tabs.filter(function(l){return l.active}).length&&this.selectTab(this.tabs.first)},l.prototype.selectTab=function(l){this.tabs.map(function(l){return l.active=!1}),l.active=!0},l}()},517:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=function(){function l(){}return l}()},726:function(l,n,u){"use strict";u.d(n,"a",function(){return t});var t=function(){function l(){}return l}()},727:function(l,n,u){"use strict";function t(l){return e._54(0,[(l()(),e._52(-1,null,["\n "])),(l()(),e._28(1,0,null,null,33,"tabs",[],null,null,null,i.d,i.b)),e._27(2,1097728,null,1,_.b,[],null,null),e._49(603979776,1,{tabs:1}),(l()(),e._52(-1,0,["\n "])),(l()(),e._28(5,0,null,0,8,"tab",[["tabTitle","下雨"]],null,null,null,i.c,i.a)),e._27(6,49152,[[1,4]],0,_.a,[],{title:[0,"title"]},null),(l()(),e._52(-1,0,["\n 我市最近几天出现强降雨 "])),(l()(),e._28(8,0,null,0,0,"br",[],null,null,null,null,null)),(l()(),e._52(-1,0,["\n 我市最近几天出现强降雨 "])),(l()(),e._28(10,0,null,0,0,"br",[],null,null,null,null,null)),(l()(),e._52(-1,0,["\n 我市最近几天出现强降雨 "])),(l()(),e._28(12,0,null,0,0,"br",[],null,null,null,null,null)),(l()(),e._52(-1,0,["\n 我市最近几天出现强降雨\n "])),(l()(),e._52(-1,0,["\n "])),(l()(),e._28(15,0,null,0,8,"tab",[["tabTitle","夏天"]],null,null,null,i.c,i.a)),e._27(16,49152,[[1,4]],0,_.a,[],{title:[0,"title"]},null),(l()(),e._52(-1,0,["\n 下周我市将正式开启夏天模式 "])),(l()(),e._28(18,0,null,0,0,"br",[],null,null,null,null,null)),(l()(),e._52(-1,0,["\n 下周我市将正式开启夏天模式 "])),(l()(),e._28(20,0,null,0,0,"br",[],null,null,null,null,null)),(l()(),e._52(-1,0,["\n 下周我市将正式开启夏天模式 "])),(l()(),e._28(22,0,null,0,0,"br",[],null,null,null,null,null)),(l()(),e._52(-1,0,["\n 下周我市将正式开启夏天模式\n "])),(l()(),e._52(-1,0,["\n "])),(l()(),e._28(25,0,null,0,8,"tab",[["tabTitle","闷热"]],null,null,null,i.c,i.a)),e._27(26,49152,[[1,4]],0,_.a,[],{title:[0,"title"]},null),(l()(),e._52(-1,0,["\n 五月多雨闷热 "])),(l()(),e._28(28,0,null,0,0,"br",[],null,null,null,null,null)),(l()(),e._52(-1,0,["\n 五月多雨闷热 "])),(l()(),e._28(30,0,null,0,0,"br",[],null,null,null,null,null)),(l()(),e._52(-1,0,["\n 五月多雨闷热 "])),(l()(),e._28(32,0,null,0,0,"br",[],null,null,null,null,null)),(l()(),e._52(-1,0,["\n 五月多雨闷热\n "])),(l()(),e._52(-1,0,["\n "])),(l()(),e._52(-1,null,["\n "])),(l()(),e._28(36,0,null,null,1,"a",[["href","https://github.com/kunl/ng2/blob/gh-pages/app/example/tabs/tabs.demo.ts"],["target","_blank"]],null,null,null,null,null)),(l()(),e._52(-1,null,["https://github.com/kunl/ng2/blob/gh-pages/app/example/tabs/tabs.demo.ts"])),(l()(),e._52(-1,null,["\n "])),(l()(),e._28(39,0,null,null,1,"a",[["href","https://github.com/kunl/ng2/blob/gh-pages/app/component/tabs/tabs.component.ts"],["target","_blank"]],null,null,null,null,null)),(l()(),e._52(-1,null,["https://github.com/kunl/ng2/blob/gh-pages/app/component/tabs/tabs.component.ts"])),(l()(),e._52(-1,null,["\n "]))],function(l,n){l(n,6,0,"下雨");l(n,16,0,"夏天");l(n,26,0,"闷热")},null)}function a(l){return e._54(0,[(l()(),e._28(0,0,null,null,1,"tabs-demo",[],null,null,null,t,r)),e._27(1,49152,null,0,c.a,[],null,null)],null,null)}u.d(n,"a",function(){return s});var e=u(5),i=u(728),_=u(516),c=u(517),o=[],r=e._26({encapsulation:2,styles:o,data:{}}),s=e._24("tabs-demo",c.a,a,{},{},[])},728:function(l,n,u){"use strict";function t(l){return c._54(0,[(l()(),c._52(-1,null,["\n "])),(l()(),c._28(1,0,null,null,3,"div",[],[[8,"hidden",0]],null,null,null,null)),(l()(),c._52(-1,null,["\n "])),c._41(null,0),(l()(),c._52(-1,null,["\n "])),(l()(),c._52(-1,null,["\n "]))],null,function(l,n){l(n,1,0,!n.component.active)})}function a(l){return c._54(0,[(l()(),c._28(0,0,null,null,1,"tab",[],null,null,null,t,b)),c._27(1,49152,null,0,o.a,[],null,null)],null,null)}function e(l){return c._54(0,[(l()(),c._28(0,0,null,null,1,"button",[["class","btn btn-secondary"]],[[2,"active",null]],[[null,"click"]],function(l,n,u){var t=!0,a=l.component;if("click"===n){t=!1!==a.selectTab(l.context.$implicit)&&t}return t},null,null)),(l()(),c._52(1,null,["\n ","\n "]))],null,function(l,n){l(n,0,0,n.context.$implicit.active),l(n,1,0,n.context.$implicit.title)})}function i(l){return c._54(0,[(l()(),c._52(-1,null,["\n "])),(l()(),c._28(1,0,null,null,4,"div",[["class","tab btn-group-sm"]],null,null,null,null,null)),(l()(),c._52(-1,null,["\n "])),(l()(),c._23(16777216,null,null,1,null,e)),c._27(4,802816,null,0,r.h,[c._9,c._6,c.D],{ngForOf:[0,"ngForOf"]},null),(l()(),c._52(-1,null,["\n "])),(l()(),c._52(-1,null,["\n "])),(l()(),c._28(7,0,null,null,6,"div",[["class","card"]],null,null,null,null,null)),(l()(),c._52(-1,null,["\n "])),(l()(),c._28(9,0,null,null,3,"div",[["class","card-block"]],null,null,null,null,null)),(l()(),c._52(-1,null,["\n "])),c._41(null,0),(l()(),c._52(-1,null,["\n "])),(l()(),c._52(-1,null,["\n "])),(l()(),c._52(-1,null,["\n "]))],function(l,n){l(n,4,0,n.component.tabs)},null)}function _(l){return c._54(0,[(l()(),c._28(0,0,null,null,2,"tabs",[],null,null,null,i,p)),c._27(1,1097728,null,1,o.b,[],null,null),c._49(603979776,1,{tabs:1})],null,null)}u.d(n,"a",function(){return b}),n.c=t,u.d(n,"b",function(){return p}),n.d=i;var c=u(5),o=u(516),r=u(32),s=[],b=c._26({encapsulation:2,styles:s,data:{}}),f=(c._24("tab",o.a,a,{title:"tabTitle",active:"active"},{},["*"]),[]),p=c._26({encapsulation:2,styles:f,data:{}});c._24("tabs",o.b,_,{},{},["*"])}}); -------------------------------------------------------------------------------- /aot/4.chunk.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([4],{398:function(n,l,u){"use strict";Object.defineProperty(l,"__esModule",{value:!0}),u.d(l,"ColorsModuleNgFactory",function(){return s});var o=u(5),e=u(723),t=u(724),r=u(43),c=u(515),s=o._25(e.a,[],function(n){return o._38([o._39(512,o.o,o._18,[[8,[t.a]],[3,o.o],o.K]),o._39(512,r.n,r.n,[[2,r.s],[2,r.k]]),o._39(512,e.a,e.a,[]),o._39(1024,r.i,function(){return[[{path:"",component:c.a}]]},[])])})},515:function(n,l,u){"use strict";u.d(l,"a",function(){return o});var o=function(){function n(){this.myColor="#333"}return n.prototype.setColor=function(){this.myColor="red"==this.myColor?"#999":"red",console.log(this.myColor)},n}()},723:function(n,l,u){"use strict";u.d(l,"a",function(){return o});var o=function(){function n(){}return n}()},724:function(n,l,u){"use strict";function o(n){return t._54(0,[(n()(),t._52(-1,null,["\n "])),(n()(),t._28(1,0,null,null,2,"p",[["color",""]],[[4,"color",null]],[[null,"mouseenter"],[null,"mouseleave"]],function(n,l,u){var o=!0;if("mouseenter"===l){o=!1!==t._42(n,2).onMouseEnter()&&o}if("mouseleave"===l){o=!1!==t._42(n,2).onMouseLeave()&&o}return o},null,null)),t._27(2,16384,null,0,r.a,[t.s,t.U],{color:[0,"color"]},null),(n()(),t._52(-1,null,["红色文字"])),(n()(),t._52(-1,null,["\n "])),(n()(),t._28(5,0,null,null,2,"p",[["color","blue"]],[[4,"color",null]],[[null,"mouseenter"],[null,"mouseleave"]],function(n,l,u){var o=!0;if("mouseenter"===l){o=!1!==t._42(n,6).onMouseEnter()&&o}if("mouseleave"===l){o=!1!==t._42(n,6).onMouseLeave()&&o}return o},null,null)),t._27(6,16384,null,0,r.a,[t.s,t.U],{color:[0,"color"]},null),(n()(),t._52(-1,null,["蓝色文字"])),(n()(),t._52(-1,null,["\n "])),(n()(),t._28(9,0,null,null,2,"p",[["color","#f00"]],[[4,"color",null]],[[null,"mouseenter"],[null,"mouseleave"]],function(n,l,u){var o=!0;if("mouseenter"===l){o=!1!==t._42(n,10).onMouseEnter()&&o}if("mouseleave"===l){o=!1!==t._42(n,10).onMouseLeave()&&o}return o},null,null)),t._27(10,16384,null,0,r.a,[t.s,t.U],{color:[0,"color"]},null),(n()(),t._52(-1,null,["蓝色文字"])),(n()(),t._52(-1,null,["\n \n "])),(n()(),t._28(13,0,null,null,3,"p",[],null,null,null,null,null)),(n()(),t._28(14,0,null,null,1,"span",[],[[4,"color",null]],null,null,null,null)),(n()(),t._52(-1,null,["黑色文字"])),(n()(),t._52(16,null,[" 点击更换文字颜色 ",""])),(n()(),t._52(-1,null,["\n "])),(n()(),t._28(18,0,null,null,1,"button",[["class","btn btn-sma btn-success-outline"]],null,[[null,"click"]],function(n,l,u){var o=!0,e=n.component;if("click"===l){o=!1!==e.setColor()&&o}return o},null,null)),(n()(),t._52(-1,null,["换色"])),(n()(),t._52(-1,null,["\n "]))],function(n,l){n(l,2,0,"");n(l,6,0,"blue");n(l,10,0,"#f00")},function(n,l){var u=l.component;n(l,1,0,t._42(l,2).c),n(l,5,0,t._42(l,6).c),n(l,9,0,t._42(l,10).c),n(l,14,0,u.myColor),n(l,16,0,u.myColor)})}function e(n){return t._54(0,[(n()(),t._28(0,0,null,null,1,"colors",[],null,null,null,o,i)),t._27(1,49152,null,0,c.a,[],null,null)],null,null)}u.d(l,"a",function(){return _});var t=u(5),r=u(725),c=u(515),s=[],i=t._26({encapsulation:2,styles:s,data:{}}),_=t._24("colors",c.a,e,{},{},[])},725:function(n,l,u){"use strict";u.d(l,"a",function(){return o});var o=(u(5),function(){function n(n,l){this._render=l,this._defaultColor="yellow",this._element=n.nativeElement}return Object.defineProperty(n.prototype,"c",{get:function(){return this.color||this._defaultColor},enumerable:!0,configurable:!0}),n.prototype.onMouseEnter=function(){this._render.setElementStyle(this._element,"color","green")},n.prototype.onMouseLeave=function(){this._render.setElementStyle(this._element,"color",this.color)},n}())}}); -------------------------------------------------------------------------------- /aot/5.chunk.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([5],{397:function(n,u,l){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),l.d(u,"NewsModuleNgFactory",function(){return i});var t=l(5),e=l(721),r=l(722),o=l(43),c=l(514),i=t._25(e.a,[],function(n){return t._38([t._39(512,t.o,t._18,[[8,[r.a]],[3,t.o],t.K]),t._39(512,o.n,o.n,[[2,o.s],[2,o.k]]),t._39(512,e.a,e.a,[]),t._39(1024,o.i,function(){return[[{path:"",component:c.a}]]},[])])})},514:function(n,u,l){"use strict";l.d(u,"a",function(){return t});var t=(l(5),function(){function n(){}return n.prototype.ngOnInit=function(){},n}())},721:function(n,u,l){"use strict";l.d(u,"a",function(){return t});var t=function(){function n(){}return n}()},722:function(n,u,l){"use strict";function t(n){return r._54(0,[(n()(),r._52(-1,null,["\n "])),(n()(),r._28(1,0,null,null,1,"h2",[],null,null,null,null,null)),(n()(),r._52(-1,null,["news page"])),(n()(),r._52(-1,null,["\n "]))],null,null)}function e(n){return r._54(0,[(n()(),r._28(0,0,null,null,1,"news",[],null,null,null,t,i)),r._27(1,114688,null,0,o.a,[],null,null)],function(n,u){n(u,1,0)},null)}l.d(u,"a",function(){return a});var r=l(5),o=l(514),c=[],i=r._26({encapsulation:2,styles:c,data:{}}),a=r._24("news",o.a,e,{},{},[])}}); -------------------------------------------------------------------------------- /aot/6.chunk.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([6],{101:function(n,t,o){"use strict";o.d(t,"a",function(){return u});var u=function(){function n(){this.doc=document}return n.prototype.load=function(n){var t=this;return new Promise(function(o,u){var e=t.doc.createElement("script");n||new Error("src"),e.src=n,t.doc.querySelector("head").appendChild(e),e.onload=function(){o(),e.remove()},e.onerror=function(){u()}})},n}()},160:function(n,t,o){"use strict";o.d(t,"a",function(){return u});var u=(o(101),function(){function n(n){this._loadScript=n}return n.prototype.init=function(n){return this._load(n)},n.prototype._load=function(n){var t=this,o="__baidu_map_cb_"+Math.random().toString().slice(2,6),u="http://api.map.baidu.com/api?v=2.0&ak="+n+"&callback="+o;return new Promise(function(n,e){t._loadScript.load(u).catch(function(n){return e(n)}),window[o]=function(t){n(),console.log("baidu map callback"),delete window[o]}})},n}())},402:function(n,t,o){"use strict";function u(n){return i._54(0,[(n()(),i._52(-1,null,["\n "])),(n()(),i._28(1,0,null,null,0,"div",[["id","map"]],null,null,null,null,null)),(n()(),i._52(-1,null,["\n "]))],null,null)}function e(n){return i._54(0,[(n()(),i._28(0,0,null,null,1,"baidu-demo",[],null,null,null,u,p)),i._27(1,114688,null,0,r.a,[i.s,c.a],null,null)],function(n,t){n(t,1,0)},null)}Object.defineProperty(t,"__esModule",{value:!0}),o.d(t,"BaiduMapModuleNgFactory",function(){return l}),o.d(t,"RenderType_BaiduMapComponent",function(){return p}),t.View_BaiduMapComponent_0=u,t.View_BaiduMapComponent_Host_0=e,o.d(t,"BaiduMapComponentNgFactory",function(){return f});var i=o(5),r=o(738),a=o(43),c=o(160),l=i._25(r.b,[],function(n){return i._38([i._39(512,i.o,i._18,[[8,[f]],[3,i.o],i.K]),i._39(512,a.n,a.n,[[2,a.s],[2,a.k]]),i._39(512,r.b,r.b,[]),i._39(1024,a.i,function(){return[[{path:"",component:r.a}]]},[])])}),d=["#map[_ngcontent-%COMP%] {\n width: 400px;\n height: 400px;\n }"],p=i._26({encapsulation:0,styles:d,data:{}}),f=i._24("baidu-demo",r.a,e,{},{},[])},738:function(n,t,o){"use strict";o.d(t,"a",function(){return u}),o.d(t,"b",function(){return e});var u=(o(5),o(160),function(){function n(n,t){this._elRef=n,this._baiduMap=t}return n.prototype.ngOnInit=function(){var n=this;this._baiduMap.init("C78b0c2c170e47e6f8e074e592785837").then(function(){n.initMap(window.BMap)})},n.prototype.initMap=function(n){var t=new n.Map("map"),o=new n.Point(116.404,39.915);t.centerAndZoom(o,15),t.enableScrollWheelZoom(!0),t.addControl(new n.ScaleControl),t.setDefaultCursor("Crosshair")},n}()),e=function(){function n(){}return n}()}}); -------------------------------------------------------------------------------- /aot/7.chunk.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([7],{396:function(n,u,t){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),t.d(u,"AboutModuleNgFactory",function(){return a});var l=t(5),o=t(719),r=t(720),e=t(43),c=t(513),a=l._25(o.a,[],function(n){return l._38([l._39(512,l.o,l._18,[[8,[r.a]],[3,l.o],l.K]),l._39(512,e.n,e.n,[[2,e.s],[2,e.k]]),l._39(512,o.a,o.a,[]),l._39(1024,e.i,function(){return[[{path:"",component:c.a}]]},[])])})},513:function(n,u,t){"use strict";t.d(u,"a",function(){return l});var l=(t(5),function(){function n(){}return n.prototype.ngOnInit=function(){},n}())},719:function(n,u,t){"use strict";t.d(u,"a",function(){return l});var l=function(){function n(){}return n}()},720:function(n,u,t){"use strict";function l(n){return r._54(0,[(n()(),r._52(-1,null,["\n "])),(n()(),r._28(1,0,null,null,1,"h2",[],null,null,null,null,null)),(n()(),r._52(-1,null,["about page"])),(n()(),r._52(-1,null,["\n "]))],null,null)}function o(n){return r._54(0,[(n()(),r._28(0,0,null,null,1,"about",[],null,null,null,l,a)),r._27(1,114688,null,0,e.a,[],null,null)],function(n,u){n(u,1,0)},null)}t.d(u,"a",function(){return i});var r=t(5),e=t(513),c=[],a=r._26({encapsulation:2,styles:c,data:{}}),i=r._24("about",e.a,o,{},{},[])}}); -------------------------------------------------------------------------------- /aot/8.chunk.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([8],{101:function(n,t,o){"use strict";o.d(t,"a",function(){return e});var e=function(){function n(){this.doc=document}return n.prototype.load=function(n){var t=this;return new Promise(function(o,e){var r=t.doc.createElement("script");n||new Error("src"),r.src=n,t.doc.querySelector("head").appendChild(r),r.onload=function(){o(),r.remove()},r.onerror=function(){e()}})},n}()},401:function(n,t,o){"use strict";function e(n){return u._54(0,[],null,null)}function r(n){return u._54(0,[(n()(),u._28(0,0,null,null,1,"d3-demo",[],null,null,null,e,s)),u._27(1,114688,null,0,i.a,[u.s,l.a],null,null)],function(n,t){n(t,1,0)},null)}Object.defineProperty(t,"__esModule",{value:!0}),o.d(t,"D3ModuleNgFactory",function(){return d}),o.d(t,"RenderType_D3Component",function(){return s}),t.View_D3Component_0=e,t.View_D3Component_Host_0=r,o.d(t,"D3ComponentNgFactory",function(){return f});var u=o(5),i=o(737),c=o(43),l=o(101),d=u._25(i.b,[],function(n){return u._38([u._39(512,u.o,u._18,[[8,[f]],[3,u.o],u.K]),u._39(512,c.n,c.n,[[2,c.s],[2,c.k]]),u._39(512,i.b,i.b,[]),u._39(1024,c.i,function(){return[[{path:"",component:i.a}]]},[])])}),a=[],s=u._26({encapsulation:2,styles:a,data:{}}),f=u._24("d3-demo",i.a,r,{},{},[])},737:function(n,t,o){"use strict";o.d(t,"a",function(){return e}),o.d(t,"b",function(){return r});var e=(o(5),o(101),function(){function n(n,t){this._elRef=n,this._loadScript=t}return n.prototype.ngOnInit=function(){var n=this;this._loadScript.load("https://unpkg.com/d3@4.4.0").then(function(){console.log("done"),n.initD3(window.d3)}),console.log(this._elRef)},n.prototype.initD3=function(n){n.select(this._elRef.nativeElement).append("div").html("d3 生成").style("background-color","#1be2a6").style("padding","1rem")},n}()),r=function(){function n(){}return n}()}}); -------------------------------------------------------------------------------- /aot/app.bundle.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([10],{101:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=function(){function n(){this.doc=document}return n.prototype.load=function(n){var l=this;return new Promise(function(u,t){var o=l.doc.createElement("script");n||new Error("src"),o.src=n,l.doc.querySelector("head").appendChild(o),o.onload=function(){u(),o.remove()},o.onerror=function(){t()}})},n}()},152:function(n,l,u){"use strict";u.d(l,"a",function(){return o});var t=(u(5),u(43),[{path:"/home",nick:"home"},{path:"/tabs",nick:"tabs"},{path:"/colors",nick:"color directive"},{path:"/http",nick:"http"},{path:"/d3",nick:"D3"},{path:"/map",nick:"map"},{path:"/echarts",nick:"Echarts"},{path:"/about",nick:"About"}]),o=function(){function n(n){this._route=n,this.name="Angular",this.routers=t,console.log(this._route)}return n}()},153:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=(u(5),function(){function n(){this.data=null}return n}())},154:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=(u(5),function(){function n(){}return n}())},155:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=(u(5),function(){function n(n){this.compiler=n}return n.prototype.openDialogBox=function(){var n=this.tpl||"

Dynamic Module!

";this.addComponent(n)},n.prototype.ngAfterViewInit=function(){},n.prototype.addComponent=function(n){var l=function(){function n(){}return n}(),u=function(){function n(){}return n}(),t=this.compiler.compileModuleAndAllComponentsSync(u),o=t.componentFactories.find(function(n){return n.componentType==l});this.container.createComponent(o)},n}())},156:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=(u(5),function(){function n(){}return n.prototype.ngOnInit=function(){},n}())},157:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},158:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=(u(5),function(){function n(){}return n}())},159:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},160:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=(u(101),function(){function n(n){this._loadScript=n}return n.prototype.init=function(n){return this._load(n)},n.prototype._load=function(n){var l=this,u="__baidu_map_cb_"+Math.random().toString().slice(2,6),t="http://api.map.baidu.com/api?v=2.0&ak="+n+"&callback="+u;return new Promise(function(n,o){l._loadScript.load(t).catch(function(n){return o(n)}),window[u]=function(l){n(),console.log("baidu map callback"),delete window[u]}})},n}())},380:function(n,l,u){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var t=u(381);u(41).i().bootstrapModuleFactory(t.a)},381:function(n,l,u){"use strict";u.d(l,"a",function(){return v});var t=u(5),o=u(382),e=u(152),i=u(383),r=u(384),a=u(385),c=u(387),_=u(32),s=u(41),d=u(68),f=u(391),p=u(43),h=u(101),m=u(160),g=u(393),k=u(394),b=u(156),v=t._25(o.a,[e.a],function(n){return t._38([t._39(512,t.o,t._18,[[8,[i.a,r.a,a.a,c.a]],[3,t.o],t.K]),t._39(5120,t.F,t._43,[[3,t.F]]),t._39(4608,_.j,_.i,[t.F,[2,_.n]]),t._39(5120,t.c,t._30,[]),t._39(5120,t.D,t._37,[]),t._39(5120,t.E,t._40,[]),t._39(4608,s.b,s.r,[_.c]),t._39(6144,t.Y,null,[s.b]),t._39(4608,s.e,s.f,[]),t._39(5120,s.c,function(n,l,u,t,o){return[new s.j(n,l),new s.o(u),new s.m(t,o)]},[_.c,t.M,_.c,_.c,s.e]),t._39(4608,s.d,s.d,[s.c,t.M]),t._39(135680,s.l,s.l,[_.c]),t._39(4608,s.k,s.k,[s.d,s.l]),t._39(6144,t.W,null,[s.k]),t._39(6144,s.p,null,[s.l]),t._39(4608,t._7,t._7,[t.M]),t._39(4608,s.g,s.g,[_.c]),t._39(4608,s.h,s.h,[_.c]),t._39(4608,d.j,d.j,[]),t._39(4608,f.a,f.a,[]),t._39(5120,p.a,p.x,[p.k]),t._39(4608,p.d,p.d,[]),t._39(6144,p.f,null,[p.d]),t._39(135680,p.p,p.p,[p.k,t.J,t.l,t.B,p.f]),t._39(4608,p.e,p.e,[]),t._39(5120,p.h,p.A,[p.y]),t._39(5120,t.b,function(n){return[n]},[p.h]),t._39(4608,h.a,h.a,[]),t._39(4608,m.a,m.a,[h.a]),t._39(512,_.b,_.b,[]),t._39(1024,t.t,s.q,[]),t._39(1024,t.L,function(){return[p.t()]},[]),t._39(512,p.y,p.y,[t.B]),t._39(1024,t.d,function(n,l){return[s.t(n),p.z(l)]},[[2,t.L],p.y]),t._39(512,t.e,t.e,[[2,t.d]]),t._39(131584,t.g,t.g,[t.M,t._19,t.B,t.t,t.o,t.e]),t._39(512,t.f,t.f,[t.g]),t._39(512,s.a,s.a,[[3,s.a]]),t._39(512,d.h,d.h,[]),t._39(512,d.c,d.c,[]),t._39(512,g.a,g.a,[]),t._39(512,k.a,k.a,[]),t._39(1024,p.s,p.v,[[3,p.k]]),t._39(512,p.r,p.c,[]),t._39(512,p.b,p.b,[]),t._39(256,p.g,{useHash:!0},[]),t._39(1024,_.g,p.u,[_.l,[2,_.a],p.g]),t._39(512,_.f,_.f,[_.g]),t._39(512,t.l,t.l,[]),t._39(512,t.J,t._2,[t.l,[2,t._3]]),t._39(1024,p.i,function(){return[[{path:"",redirectTo:"contact",pathMatch:"full"},{path:"contact",component:b.a},{path:"home",loadChildren:"./components/home/home.module#HomeModule"},{path:"about",loadChildren:"./components/about/about.module#AboutModule"},{path:"news",loadChildren:"./components/news/news.module#NewsModule"},{path:"colors",loadChildren:"./components/colors/colors.module#ColorsModule"},{path:"tabs",loadChildren:"./components/tabs/tabs.module#TabsModule"},{path:"http",loadChildren:"./components/http/http.module#Http_Module"},{path:"d3",loadChildren:"./components/d3/d3.module#D3Module"},{path:"map",loadChildren:"./components/map/baidu_map.module#BaiduMapModule"},{path:"echarts",loadChildren:"./components/echarts/echarts.module#EchartsModule"}]]},[]),t._39(1024,p.k,p.w,[t.g,p.r,p.b,_.f,t.B,t.J,t.l,p.i,p.g,[2,p.q],[2,p.j]]),t._39(512,p.n,p.n,[[2,p.s],[2,p.k]]),t._39(512,o.a,o.a,[])])})},382:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},383:function(n,l,u){"use strict";function t(n){return e._54(0,[(n()(),e._52(-1,null,["\n "])),(n()(),e._28(1,0,null,null,4,"div",[["class","job-ad"]],null,null,null,null,null)),(n()(),e._52(-1,null,["\n 招聘 广告\n "])),(n()(),e._28(3,0,null,null,1,"h4",[],null,null,null,null,null)),(n()(),e._52(4,null,["",""])),(n()(),e._52(5,null,["\n ","\n "])),(n()(),e._52(-1,null,["\n "]))],null,function(n,l){var u=l.component;n(l,4,0,null==u.data?null:u.data.name),n(l,5,0,null==u.data?null:u.data.bio)})}function o(n){return e._54(0,[(n()(),e._28(0,0,null,null,1,"ng-component",[],null,null,null,t,a)),e._27(1,49152,null,0,i.a,[],null,null)],null,null)}u.d(l,"a",function(){return c});var e=u(5),i=u(153),r=[],a=e._26({encapsulation:2,styles:r,data:{}}),c=e._24("ng-component",i.a,o,{data:"data"},{},[])},384:function(n,l,u){"use strict";function t(n){return e._54(0,[(n()(),e._52(-1,null,["\n "])),(n()(),e._28(1,0,null,null,7,"div",[["class","hero-profile"]],null,null,null,null,null)),(n()(),e._52(-1,null,["\n 求职广告\n "])),(n()(),e._28(3,0,null,null,1,"h4",[],null,null,null,null,null)),(n()(),e._52(4,null,["",""])),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(6,0,null,null,1,"p",[],null,null,null,null,null)),(n()(),e._52(7,null,["",""])),(n()(),e._52(-1,null,["\n "])),(n()(),e._52(-1,null,["\n\n "]))],null,function(n,l){var u=l.component;n(l,4,0,u.data.name),n(l,7,0,u.data.bio)})}function o(n){return e._54(0,[(n()(),e._28(0,0,null,null,1,"ng-component",[],null,null,null,t,a)),e._27(1,49152,null,0,i.a,[],null,null)],null,null)}u.d(l,"a",function(){return c});var e=u(5),i=u(154),r=[],a=e._26({encapsulation:2,styles:r,data:{}}),c=e._24("ng-component",i.a,o,{data:"data"},{},[])},385:function(n,l,u){"use strict";function t(n){return e._54(0,[(n()(),e._52(-1,null,["\n "])),(n()(),e._28(1,0,null,null,1,"h2",[],null,null,null,null,null)),(n()(),e._52(-1,null,["contact page"])),(n()(),e._52(-1,null,["\n\n "])),(n()(),e._28(4,0,null,null,1,"dialog-demo",[],null,null,null,i.b,i.a)),e._27(5,4243456,null,0,r.a,[e.l],null,null),(n()(),e._52(-1,null,["\n "]))],null,null)}function o(n){return e._54(0,[(n()(),e._28(0,0,null,null,1,"contact",[],null,null,null,t,_)),e._27(1,114688,null,0,a.a,[],null,null)],function(n,l){n(l,1,0)},null)}u.d(l,"a",function(){return s});var e=u(5),i=u(386),r=u(155),a=u(156),c=[],_=e._26({encapsulation:2,styles:c,data:{}}),s=e._24("contact",a.a,o,{},{},[])},386:function(n,l,u){"use strict";function t(n){return e._54(0,[e._49(402653184,1,{container:0}),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(2,16777216,[[1,3],["container",1]],null,8,"div",[],null,null,null,null,null)),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(4,0,null,null,5,"input",[],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(n,l,u){var t=!0,o=n.component;if("input"===l){t=!1!==e._42(n,5)._handleInput(u.target.value)&&t}if("blur"===l){t=!1!==e._42(n,5).onTouched()&&t}if("compositionstart"===l){t=!1!==e._42(n,5)._compositionStart()&&t}if("compositionend"===l){t=!1!==e._42(n,5)._compositionEnd(u.target.value)&&t}if("ngModelChange"===l){t=!1!==(o.tpl=u)&&t}return t},null,null)),e._27(5,16384,null,0,i.b,[e.V,e.s,[2,i.a]],null,null),e._48(1024,null,i.d,function(n){return[n]},[i.b]),e._27(7,671744,null,0,i.g,[[8,null],[8,null],[8,null],[2,i.d]],{model:[0,"model"]},{update:"ngModelChange"}),e._48(2048,null,i.e,null,[i.g]),e._27(9,16384,null,0,i.f,[i.e],null,null),(n()(),e._52(-1,null,["\n "])),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(12,0,null,null,1,"div",[["class","open-button"]],null,[[null,"click"]],function(n,l,u){var t=!0,o=n.component;if("click"===l){t=!1!==o.openDialogBox()&&t}return t},null,null)),(n()(),e._52(-1,null,["Open dialog box"])),(n()(),e._52(-1,null,["\n "]))],function(n,l){n(l,7,0,l.component.tpl)},function(n,l){n(l,4,0,e._42(l,9).ngClassUntouched,e._42(l,9).ngClassTouched,e._42(l,9).ngClassPristine,e._42(l,9).ngClassDirty,e._42(l,9).ngClassValid,e._42(l,9).ngClassInvalid,e._42(l,9).ngClassPending)})}function o(n){return e._54(0,[(n()(),e._28(0,0,null,null,1,"dialog-demo",[],null,null,null,t,c)),e._27(1,4243456,null,0,r.a,[e.l],null,null)],null,null)}u.d(l,"a",function(){return c}),l.b=t;var e=u(5),i=u(68),r=u(155),a=["[_nghost-%COMP%] {\n display: flex;\n justify-content: center\n }\n .open-button[_ngcontent-%COMP%] {\n padding: 5px;\n border: 1px solid black;\n cursor: pointer;\n }"],c=e._26({encapsulation:0,styles:a,data:{}});e._24("dialog-demo",r.a,o,{},{},[])},387:function(n,l,u){"use strict";function t(n){return e._54(0,[(n()(),e._52(-1,null,["\n "])),(n()(),e._28(1,0,null,null,1,"Header",[],null,null,null,i.b,i.a)),e._27(2,49152,null,0,r.a,[],null,null),(n()(),e._52(-1,null,["\n \n "])),(n()(),e._28(4,0,null,null,10,"div",[["class","wrap"]],null,null,null,null,null)),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(6,0,null,null,1,"side-bar",[],null,null,null,a.b,a.a)),e._27(7,49152,null,0,c.a,[],{sidebar:[0,"sidebar"]},null),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(9,0,null,null,4,"div",[["class","content"]],null,null,null,null,null)),(n()(),e._52(-1,null,[" \n "])),(n()(),e._28(11,16777216,null,null,1,"router-outlet",[],null,null,null,null,null)),e._27(12,212992,null,0,_.o,[_.b,e._9,e.o,[8,null],e.k],null,null),(n()(),e._52(-1,null,["\n "])),(n()(),e._52(-1,null,["\n "])),(n()(),e._52(-1,null,["\n\n "])),(n()(),e._28(16,0,null,null,1,"Footer",[],null,null,null,s.b,s.a)),e._27(17,49152,null,0,d.a,[],null,null),(n()(),e._52(-1,null,[" \n "]))],function(n,l){n(l,7,0,l.component.routers),n(l,12,0)},null)}function o(n){return e._54(0,[(n()(),e._28(0,0,null,null,1,"my-app",[],null,null,null,t,h)),e._27(1,49152,null,0,f.a,[_.a],null,null)],null,null)}u.d(l,"a",function(){return m});var e=u(5),i=u(388),r=u(157),a=u(389),c=u(158),_=u(43),s=u(390),d=u(159),f=u(152),p=[".content[_ngcontent-%COMP%] {\n box-sizing: border-box;\n margin: 20px auto;\n width: 70vw;\n padding: 30px\n }"],h=e._26({encapsulation:0,styles:p,data:{}}),m=e._24("my-app",f.a,o,{},{},[])},388:function(n,l,u){"use strict";function t(n){return e._54(0,[(n()(),e._52(-1,null,["\n "])),(n()(),e._28(1,0,null,null,51,"header",[["class","header"]],null,null,null,null,null)),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(3,0,null,null,48,"div",[["class","header-content"]],null,null,null,null,null)),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(5,0,null,null,42,"nav",[["class","navigation"]],null,null,null,null,null)),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(7,0,null,null,6,"a",[["routerLinkActive","active"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(n,l,u){var t=!0;if("click"===l){t=!1!==e._42(n,8).onClick(u.button,u.ctrlKey,u.metaKey,u.shiftKey)&&t}return t},null,null)),e._27(8,671744,[[2,4]],0,i.m,[i.k,i.a,r.g],{routerLink:[0,"routerLink"]},null),e._44(9,1),e._27(10,1720320,null,2,i.l,[i.k,e.s,e.V,e.k],{routerLinkActive:[0,"routerLinkActive"]},null),e._49(603979776,1,{links:1}),e._49(603979776,2,{linksWithHrefs:1}),(n()(),e._52(-1,null,["\n About\n "])),(n()(),e._52(-1,null,["\n \n "])),(n()(),e._28(15,0,null,null,6,"a",[["routerLinkActive","active"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(n,l,u){var t=!0;if("click"===l){t=!1!==e._42(n,16).onClick(u.button,u.ctrlKey,u.metaKey,u.shiftKey)&&t}return t},null,null)),e._27(16,671744,[[4,4]],0,i.m,[i.k,i.a,r.g],{routerLink:[0,"routerLink"]},null),e._44(17,1),e._27(18,1720320,null,2,i.l,[i.k,e.s,e.V,e.k],{routerLinkActive:[0,"routerLinkActive"]},null),e._49(603979776,3,{links:1}),e._49(603979776,4,{linksWithHrefs:1}),(n()(),e._52(-1,null,["\n contact\n "])),(n()(),e._52(-1,null,["\n\n "])),(n()(),e._28(23,0,null,null,6,"a",[["routerLinkActive","active"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(n,l,u){var t=!0;if("click"===l){t=!1!==e._42(n,24).onClick(u.button,u.ctrlKey,u.metaKey,u.shiftKey)&&t}return t},null,null)),e._27(24,671744,[[6,4]],0,i.m,[i.k,i.a,r.g],{routerLink:[0,"routerLink"]},null),e._44(25,1),e._27(26,1720320,null,2,i.l,[i.k,e.s,e.V,e.k],{routerLinkActive:[0,"routerLinkActive"]},null),e._49(603979776,5,{links:1}),e._49(603979776,6,{linksWithHrefs:1}),(n()(),e._52(-1,null,["\n home\n "])),(n()(),e._52(-1,null,["\n\n "])),(n()(),e._28(31,0,null,null,6,"a",[["routerLinkActive","active"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(n,l,u){var t=!0;if("click"===l){t=!1!==e._42(n,32).onClick(u.button,u.ctrlKey,u.metaKey,u.shiftKey)&&t}return t},null,null)),e._27(32,671744,[[8,4]],0,i.m,[i.k,i.a,r.g],{routerLink:[0,"routerLink"]},null),e._44(33,1),e._27(34,1720320,null,2,i.l,[i.k,e.s,e.V,e.k],{routerLinkActive:[0,"routerLinkActive"]},null),e._49(603979776,7,{links:1}),e._49(603979776,8,{linksWithHrefs:1}),(n()(),e._52(-1,null,["\n news\n "])),(n()(),e._52(-1,null,["\n \n "])),(n()(),e._28(39,0,null,null,1,"a",[["href","https://github.com/kunl/ng2"],["title","github"]],null,null,null,null,null)),(n()(),e._52(-1,null,["GitHub"])),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(42,0,null,null,1,"a",[["href","https://kunl.in"],["title","blog"]],null,null,null,null,null)),(n()(),e._52(-1,null,["Blog"])),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(45,0,null,null,1,"a",[["href","https://twitter.com/le720"],["title","忆年"]],null,null,null,null,null)),(n()(),e._52(-1,null,["twitter"])),(n()(),e._52(-1,null,["\n "])),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(49,0,null,null,1,"h1",[["class","header-title"]],null,null,null,null,null)),(n()(),e._52(-1,null,["Kunl's Angular demo"])),(n()(),e._52(-1,null,["\n "])),(n()(),e._52(-1,null,["\n "])),(n()(),e._52(-1,null,["\n "]))],function(n,l){n(l,8,0,n(l,9,0,"/about"));n(l,10,0,"active"),n(l,16,0,n(l,17,0,"/contact"));n(l,18,0,"active"),n(l,24,0,n(l,25,0,"/home"));n(l,26,0,"active"),n(l,32,0,n(l,33,0,"/news"));n(l,34,0,"active")},function(n,l){n(l,7,0,e._42(l,8).target,e._42(l,8).href),n(l,15,0,e._42(l,16).target,e._42(l,16).href),n(l,23,0,e._42(l,24).target,e._42(l,24).href),n(l,31,0,e._42(l,32).target,e._42(l,32).href)})}function o(n){return e._54(0,[(n()(),e._28(0,0,null,null,1,"Header",[],null,null,null,t,_)),e._27(1,49152,null,0,a.a,[],null,null)],null,null)}u.d(l,"a",function(){return _}),l.b=t;var e=u(5),i=u(43),r=u(32),a=u(157),c=[],_=e._26({encapsulation:2,styles:c,data:{}});e._24("Header",a.a,o,{},{},[])},389:function(n,l,u){"use strict";function t(n){return i._54(0,[(n()(),i._28(0,0,null,null,9,"li",[["class","list-group-item"],["routerLinkActive","active"]],null,null,null,null,null)),i._27(1,1720320,null,2,r.l,[r.k,i.s,i.V,i.k],{routerLinkActive:[0,"routerLinkActive"]},null),i._49(603979776,1,{links:1}),i._49(603979776,2,{linksWithHrefs:1}),(n()(),i._52(-1,null,["\n "])),(n()(),i._28(5,0,null,null,3,"a",[],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(n,l,u){var t=!0;if("click"===l){t=!1!==i._42(n,6).onClick(u.button,u.ctrlKey,u.metaKey,u.shiftKey)&&t}return t},null,null)),i._27(6,671744,[[2,4]],0,r.m,[r.k,r.a,a.g],{routerLink:[0,"routerLink"]},null),i._44(7,1),(n()(),i._52(8,null,["",""])),(n()(),i._52(-1,null,["\n "]))],function(n,l){n(l,1,0,"active"),n(l,6,0,n(l,7,0,l.context.$implicit.path))},function(n,l){n(l,5,0,i._42(l,6).target,i._42(l,6).href),n(l,8,0,l.context.$implicit.nick)})}function o(n){return i._54(0,[(n()(),i._52(-1,null,["\n "])),(n()(),i._28(1,0,null,null,7,"nav",[["class","sidebar"]],null,null,null,null,null)),(n()(),i._52(-1,null,["\n "])),(n()(),i._28(3,0,null,null,4,"ul",[["class","side-list list-group"]],null,null,null,null,null)),(n()(),i._52(-1,null,["\n "])),(n()(),i._23(16777216,null,null,1,null,t)),i._27(6,802816,null,0,a.h,[i._9,i._6,i.D],{ngForOf:[0,"ngForOf"]},null),(n()(),i._52(-1,null,["\n "])),(n()(),i._52(-1,null,["\n "])),(n()(),i._52(-1,null,["\n\n "]))],function(n,l){n(l,6,0,l.component.sidebar)},null)}function e(n){return i._54(0,[(n()(),i._28(0,0,null,null,1,"side-bar",[],null,null,null,o,s)),i._27(1,49152,null,0,c.a,[],null,null)],null,null)}u.d(l,"a",function(){return s}),l.b=o;var i=u(5),r=u(43),a=u(32),c=u(158),_=["a[_ngcontent-%COMP%]{\n display: block;\n text-decoration: none;\n margin-right: 20px;\n padding: 2px 10px;\n border-bottom: 1px solid transparent;\n }\n\n .side-list[_ngcontent-%COMP%] {\n margin-right: -1px;\n }\n .list-group-item[_ngcontent-%COMP%] {\n margin-bottom: -1px;\n border: 1px solid #ccc;\n }\n\n .list-group-item.active[_ngcontent-%COMP%] {\n background: rgba(111, 111, 111, .06)\n }"],s=i._26({encapsulation:0,styles:_,data:{}});i._24("side-bar",c.a,e,{sidebar:"sidebar"},{},[])},390:function(n,l,u){"use strict";function t(n){return e._54(0,[(n()(),e._52(-1,null,["\n "])),(n()(),e._28(1,0,null,null,4,"nav",[["class","navbar navbar-fixed-bottom navbar-dark footer"]],null,null,null,null,null)),(n()(),e._52(-1,null,["\n "])),(n()(),e._28(3,0,null,null,1,"a",[["href","https://github.com/kunl/ng2"],["target","_blank"]],null,null,null,null,null)),(n()(),e._52(-1,null,["github 上有源码,或者 F12 sources 面板也可以看到"])),(n()(),e._52(-1,null,["\n "])),(n()(),e._52(-1,null,["\n "]))],null,null)}function o(n){return e._54(0,[(n()(),e._28(0,0,null,null,1,"Footer",[],null,null,null,t,a)),e._27(1,49152,null,0,i.a,[],null,null)],null,null)}u.d(l,"a",function(){return a}),l.b=t;var e=u(5),i=u(159),r=[],a=e._26({encapsulation:2,styles:r,data:{}});e._24("Footer",i.a,o,{},{},[])},391:function(n,l,u){"use strict";u.d(l,"a",function(){return i});var t=u(153),o=u(154),e=u(392),i=function(){function n(){}return n.prototype.getAds=function(){return[new e.a(t.a,{name:"测试1",bio:"测试广告1"}),new e.a(t.a,{name:"测试2",bio:"测试广告2"}),new e.a(o.a,{name:"测试3",bio:"测试广告3"}),new e.a(o.a,{name:"测试4",bio:"测试广告4"})]},n}()},392:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=function(){function n(n,l){this.component=n,this.data=l}return n}()},393:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},394:function(n,l,u){"use strict";u.d(l,"a",function(){return t});var t=function(){function n(){}return n}()}},[380]); -------------------------------------------------------------------------------- /aot/polyfills.bundle.js: -------------------------------------------------------------------------------- 1 | !function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e=window.webpackJsonp;window.webpackJsonp=function(r,i,a){for(var u,c,s,f=0,l=[];f0?o(r(t),9007199254740991):0}},,function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(4),o=e(16),i=e(13),a=e(34)("src"),u=Function.toString,c=(""+u).split("toString");e(6).inspectSource=function(t){return u.call(t)},(t.exports=function(t,n,e,u){var s="function"==typeof e;s&&(i(e,"name")||o(e,"name",n)),t[n]!==e&&(s&&(i(e,a)||o(e,a,t[n]?""+t[n]:c.join(String(n)))),t===r?t[n]=e:u?t[n]?t[n]=e:o(t,n,e):(delete t[n],o(t,n,e)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||u.call(this)})},function(t,n,e){var r=e(0),o=e(2),i=e(30),a=/"/g,u=function(t,n,e,r){var o=String(i(t)),u="<"+n;return""!==e&&(u+=" "+e+'="'+String(r).replace(a,""")+'"'),u+">"+o+""};t.exports=function(t,n){var e={};e[t]=n(u),r(r.P+r.F*o(function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3}),"String",e)}},function(t,n,e){var r=e(8),o=e(33);t.exports=e(10)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(30);t.exports=function(t){return Object(r(t))}},function(t,n,e){"use strict";var r=e(2);t.exports=function(t,n){return!!t&&r(function(){n?t.call(null,function(){},1):t.call(null)})}},function(t,n,e){var r=e(49),o=e(30);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(0),o=e(6),i=e(2);t.exports=function(t,n){var e=(o.Object||{})[t]||Object[t],a={};a[t]=n(e),r(r.S+r.F*i(function(){e(1)}),"Object",a)}},function(t,n,e){var r=e(13),o=e(17),i=e(70)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,n,e){var r=e(35),o=e(49),i=e(17),a=e(11),u=e(263);t.exports=function(t,n){var e=1==t,c=2==t,s=3==t,f=4==t,l=6==t,p=5==t||l,h=n||u;return function(n,u,v){for(var d,g,y=i(n),m=o(y),b=r(u,v,3),_=a(m.length),k=0,w=e?h(n,_):c?h(n,0):void 0;_>k;k++)if((p||k in m)&&(d=m[k],g=b(d,k,y),t))if(e)w[k]=g;else if(g)switch(t){case 3:return!0;case 5:return d;case 6:return k;case 2:w.push(d)}else if(f)return!1;return l?-1:s||f?f:w}}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){var r=e(57),o=e(33),i=e(19),a=e(27),u=e(13),c=e(103),s=Object.getOwnPropertyDescriptor;n.f=e(10)?s:function(t,n){if(t=i(t),n=a(n,!0),c)try{return s(t,n)}catch(t){}if(u(t,n))return o(!r.f.call(t,n),t[n])}},function(t,n,e){"use strict";if(e(10)){var r=e(48),o=e(4),i=e(2),a=e(0),u=e(64),c=e(89),s=e(35),f=e(53),l=e(33),p=e(16),h=e(52),v=e(23),d=e(11),g=e(135),y=e(37),m=e(27),b=e(13),_=e(73),k=e(3),w=e(17),S=e(83),T=e(38),x=e(21),E=e(39).f,O=e(84),P=e(34),M=e(7),F=e(22),j=e(69),I=e(136),D=e(61),A=e(45),R=e(85),L=e(51),N=e(86),C=e(127),z=e(8),Z=e(24),W=z.f,B=Z.f,H=o.RangeError,U=o.TypeError,V=o.Uint8Array,G=Array.prototype,q=c.ArrayBuffer,X=c.DataView,K=F(0),Y=F(2),J=F(3),$=F(4),Q=F(5),tt=F(6),nt=j(!0),et=j(!1),rt=D.values,ot=D.keys,it=D.entries,at=G.lastIndexOf,ut=G.reduce,ct=G.reduceRight,st=G.join,ft=G.sort,lt=G.slice,pt=G.toString,ht=G.toLocaleString,vt=M("iterator"),dt=M("toStringTag"),gt=P("typed_constructor"),yt=P("def_constructor"),mt=u.CONSTR,bt=u.TYPED,_t=u.VIEW,kt=F(1,function(t,n){return Et(I(t,t[yt]),n)}),wt=i(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),St=!!V&&!!V.prototype.set&&i(function(){new V(1).set({})}),Tt=function(t,n){var e=v(t);if(e<0||e%n)throw H("Wrong offset!");return e},xt=function(t){if(k(t)&&bt in t)return t;throw U(t+" is not a typed array!")},Et=function(t,n){if(!(k(t)&> in t))throw U("It is not a typed array constructor!");return new t(n)},Ot=function(t,n){return Pt(I(t,t[yt]),n)},Pt=function(t,n){for(var e=0,r=n.length,o=Et(t,r);r>e;)o[e]=n[e++];return o},Mt=function(t,n,e){W(t,n,{get:function(){return this._d[e]}})},Ft=function(t){var n,e,r,o,i,a,u=w(t),c=arguments.length,f=c>1?arguments[1]:void 0,l=void 0!==f,p=O(u);if(void 0!=p&&!S(p)){for(a=p.call(u),r=[],n=0;!(i=a.next()).done;n++)r.push(i.value);u=r}for(l&&c>2&&(f=s(f,arguments[2],2)),n=0,e=d(u.length),o=Et(this,e);e>n;n++)o[n]=l?f(u[n],n):u[n];return o},jt=function(){for(var t=0,n=arguments.length,e=Et(this,n);n>t;)e[t]=arguments[t++];return e},It=!!V&&i(function(){ht.call(new V(1))}),Dt=function(){return ht.apply(It?lt.call(xt(this)):xt(this),arguments)},At={copyWithin:function(t,n){return C.call(xt(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return $(xt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(xt(this),arguments)},filter:function(t){return Ot(this,Y(xt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(xt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(xt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){K(xt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return et(xt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return nt(xt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return st.apply(xt(this),arguments)},lastIndexOf:function(t){return at.apply(xt(this),arguments)},map:function(t){return kt(xt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ut.apply(xt(this),arguments)},reduceRight:function(t){return ct.apply(xt(this),arguments)},reverse:function(){for(var t,n=this,e=xt(n).length,r=Math.floor(e/2),o=0;o1?arguments[1]:void 0)},sort:function(t){return ft.call(xt(this),t)},subarray:function(t,n){var e=xt(this),r=e.length,o=y(t,r);return new(I(e,e[yt]))(e.buffer,e.byteOffset+o*e.BYTES_PER_ELEMENT,d((void 0===n?r:y(n,r))-o))}},Rt=function(t,n){return Ot(this,lt.call(xt(this),t,n))},Lt=function(t){xt(this);var n=Tt(arguments[1],1),e=this.length,r=w(t),o=d(r.length),i=0;if(o+n>e)throw H("Wrong length!");for(;i255?255:255&r),o.v[h](e*n+o.o,r,wt)},M=function(t,n){W(t,n,{get:function(){return O(this,n)},set:function(t){return P(this,n,t)},enumerable:!0})};b?(v=e(function(t,e,r,o){f(t,v,s,"_d");var i,a,u,c,l=0,h=0;if(k(e)){if(!(e instanceof q||"ArrayBuffer"==(c=_(e))||"SharedArrayBuffer"==c))return bt in e?Pt(v,e):Ft.call(v,e);i=e,h=Tt(r,n);var y=e.byteLength;if(void 0===o){if(y%n)throw H("Wrong length!");if((a=y-h)<0)throw H("Wrong length!")}else if((a=d(o)*n)+h>y)throw H("Wrong length!");u=a/n}else u=g(e),a=u*n,i=new q(a);for(p(t,"_d",{b:i,o:h,l:a,e:u,v:new X(i)});ldocument.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,n){var e;return null!==t?(u.prototype=r(t),e=new u,u.prototype=null,e[a]=t):e=c(),void 0===n?e:o(e,n)}},function(t,n,e){var r=e(106),o=e(71).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,n,e){"use strict";var r=e(73),o={};o[e(7)("toStringTag")]="z",o+""!="[object z]"&&e(14)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},,,,function(t,n,e){var r=e(106),o=e(71);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n){t.exports={}},function(t,n,e){var r=e(3);t.exports=function(t,n){if(!r(t)||t._t!==n)throw TypeError("Incompatible receiver, "+n+" required!");return t}},function(t,n,e){var r=e(8).f,o=e(13),i=e(7)("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n){t.exports=!1},function(t,n,e){var r=e(36);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n,e){var r=e(7)("unscopables"),o=Array.prototype;void 0==o[r]&&e(16)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,n,e){"use strict";var r=e(4),o=e(8),i=e(10),a=e(7)("species");t.exports=function(t){var n=r[t];i&&n&&!n[a]&&o.f(n,a,{configurable:!0,get:function(){return this}})}},function(t,n,e){var r=e(14);t.exports=function(t,n,e){for(var o in n)r(t,o,n[o],e);return t}},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},,function(t,n,e){var r=e(4),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(0),o=e(30),i=e(2),a=e(75),u="["+a+"]",c="​…",s=RegExp("^"+u+u+"*"),f=RegExp(u+u+"*$"),l=function(t,n,e){var o={},u=i(function(){return!!a[t]()||c[t]()!=c}),s=o[t]=u?n(p):a[t];e&&(o[e]=s),r(r.P+r.F*u,"String",o)},p=l.trim=function(t,n){return t=String(o(t)),1&n&&(t=t.replace(s,"")),2&n&&(t=t.replace(f,"")),t};t.exports=l},function(t,n,e){"use strict";var r=e(118)(!0);e(79)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})})},function(t,n,e){"use strict";var r=e(16),o=e(14),i=e(2),a=e(30),u=e(7);t.exports=function(t,n,e){var c=u(t),s=e(a,c,""[t]),f=s[0],l=s[1];i(function(){var n={};return n[c]=function(){return 7},7!=""[t](n)})&&(o(String.prototype,t,f),r(RegExp.prototype,c,2==n?function(t,n){return l.call(t,this,n)}:function(t){return l.call(t,this)}))}},function(t,n,e){"use strict";var r=e(50),o=e(128),i=e(45),a=e(19);t.exports=e(79)(Array,"Array",function(t,n){this._t=a(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,o(1)):"keys"==n?o(0,e):"values"==n?o(0,t[e]):o(0,[e,t[e]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,n,e){var r=e(35),o=e(124),i=e(83),a=e(1),u=e(11),c=e(84),s={},f={},n=t.exports=function(t,n,e,l,p){var h,v,d,g,y=p?function(){return t}:c(t),m=r(e,l,n?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(h=u(t.length);h>b;b++)if((g=n?m(a(v=t[b])[0],v[1]):m(t[b]))===s||g===f)return g}else for(d=y.call(t);!(v=d.next()).done;)if((g=o(d,m,v.value,n))===s||g===f)return g};n.BREAK=s,n.RETURN=f},function(t,n,e){"use strict";var r=e(4),o=e(0),i=e(14),a=e(52),u=e(29),c=e(62),s=e(53),f=e(3),l=e(2),p=e(85),h=e(47),v=e(76);t.exports=function(t,n,e,d,g,y){var m=r[t],b=m,_=g?"set":"add",k=b&&b.prototype,w={},S=function(t){var n=k[t];i(k,t,"delete"==t?function(t){return!(y&&!f(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!f(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!f(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})};if("function"==typeof b&&(y||k.forEach&&!l(function(){(new b).entries().next()}))){var T=new b,x=T[_](y?{}:-0,1)!=T,E=l(function(){T.has(1)}),O=p(function(t){new b(t)}),P=!y&&l(function(){for(var t=new b,n=5;n--;)t[_](n,n);return!t.has(-0)});O||(b=n(function(n,e){s(n,b,t);var r=v(new m,n,b);return void 0!=e&&c(e,g,r[_],r),r}),b.prototype=k,k.constructor=b),(E||P)&&(S("delete"),S("has"),g&&S("get")),(P||x)&&S(_),y&&k.clear&&delete k.clear}else b=d.getConstructor(n,t,g,_),a(b.prototype,e),u.NEED=!0;return h(b,t),w[t]=b,o(o.G+o.W+o.F*(b!=m),w),y||d.setStrong(b,t,g),b}},function(t,n,e){for(var r,o=e(4),i=e(16),a=e(34),u=a("typed_array"),c=a("view"),s=!(!o.ArrayBuffer||!o.DataView),f=s,l=0,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=o[p[l++]])?(i(r.prototype,u,!0),i(r.prototype,c,!0)):f=!1;t.exports={ABV:s,CONSTR:f,TYPED:u,VIEW:c}},,,function(t,n){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(e=window)}t.exports=e},,function(t,n,e){var r=e(19),o=e(11),i=e(37);t.exports=function(t){return function(n,e,a){var u,c=r(n),s=o(c.length),f=i(a,s);if(t&&e!=e){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===e)return t||f||0;return!t&&-1}}},function(t,n,e){var r=e(55)("keys"),o=e(34);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(36);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){var r=e(36),o=e(7)("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,n){try{return t[n]}catch(t){}};t.exports=function(t){var n,e,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=a(n=Object(t),o))?e:i?r(n):"Object"==(u=r(n))&&"function"==typeof n.callee?"Arguments":u}},function(t,n,e){var r=e(3),o=e(1),i=function(t,n){if(o(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{r=e(35)(Function.call,e(24).f(Object.prototype,"__proto__").set,2),r(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return i(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:i}},function(t,n){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,n,e){var r=e(3),o=e(74).set;t.exports=function(t,n,e){var i,a=n.constructor;return a!==e&&"function"==typeof a&&(i=a.prototype)!==e.prototype&&r(i)&&o&&o(t,i),t}},function(t,n){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var e=Math.expm1;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:e},function(t,n,e){"use strict";var r=e(48),o=e(0),i=e(14),a=e(16),u=e(13),c=e(45),s=e(119),f=e(47),l=e(21),p=e(7)("iterator"),h=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,n,e,d,g,y,m){s(e,n,d);var b,_,k,w=function(t){if(!h&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},S=n+" Iterator",T="values"==g,x=!1,E=t.prototype,O=E[p]||E["@@iterator"]||g&&E[g],P=!h&&O||w(g),M=g?T?w("entries"):P:void 0,F="Array"==n?E.entries||O:O;if(F&&(k=l(F.call(new t)))!==Object.prototype&&k.next&&(f(k,S,!0),r||u(k,p)||a(k,p,v)),T&&O&&"values"!==O.name&&(x=!0,P=function(){return O.call(this)}),r&&!m||!h&&!x&&E[p]||a(E,p,P),c[n]=P,c[S]=v,g)if(b={values:T?P:w("values"),keys:y?P:w("keys"),entries:M},m)for(_ in b)_ in E||i(E,_,b[_]);else o(o.P+o.F*(h||x),n,b);return b}},function(t,n,e){var r=e(81),o=e(30);t.exports=function(t,n,e){if(r(n))throw TypeError("String#"+e+" doesn't accept regex!");return String(o(t))}},function(t,n,e){var r=e(3),o=e(36),i=e(7)("match");t.exports=function(t){var n;return r(t)&&(void 0!==(n=t[i])?!!n:"RegExp"==o(t))}},function(t,n,e){var r=e(7)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,!"/./"[t](n)}catch(t){}}return!0}},function(t,n,e){var r=e(45),o=e(7)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,n,e){var r=e(73),o=e(7)("iterator"),i=e(45);t.exports=e(6).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,n,e){var r=e(7)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,n){if(!n&&!o)return!1;var e=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:e=!0}},i[r]=function(){return a},t(i)}catch(t){}return e}},function(t,n,e){"use strict";var r=e(17),o=e(37),i=e(11);t.exports=function(t){for(var n=r(this),e=i(n.length),a=arguments.length,u=o(a>1?arguments[1]:void 0,e),c=a>2?arguments[2]:void 0,s=void 0===c?e:o(c,e);s>u;)n[u++]=t;return n}},function(t,n,e){"use strict";var r=e(1);t.exports=function(){var t=r(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,e){for(var r=e(61),o=e(44),i=e(14),a=e(4),u=e(16),c=e(45),s=e(7),f=s("iterator"),l=s("toStringTag"),p=c.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=o(h),d=0;d>1,f=23===n?C(2,-24)-C(2,-77):0,l=0,p=t<0||0===t&&1/t<0?1:0;for(t=N(t),t!=t||t===R?(o=t!=t?1:0,r=c):(r=z(Z(t)/W),t*(i=C(2,-r))<1&&(r--,i*=2),t+=r+s>=1?f/i:f*C(2,1-s),t*i>=2&&(r++,i/=2),r+s>=c?(o=0,r=c):r+s>=1?(o=(t*i-1)*C(2,n),r+=s):(o=t*C(2,s-1)*C(2,n),r=0));n>=8;a[l++]=255&o,o/=256,n-=8);for(r=r<0;a[l++]=255&r,r/=256,u-=8);return a[--l]|=128*p,a}function o(t,n,e){var r,o=8*e-n-1,i=(1<>1,u=o-7,c=e-1,s=t[c--],f=127&s;for(s>>=7;u>0;f=256*f+t[c],c--,u-=8);for(r=f&(1<<-u)-1,f>>=-u,u+=n;u>0;r=256*r+t[c],c--,u-=8);if(0===f)f=1-a;else{if(f===i)return r?NaN:s?-R:R;r+=C(2,n),f-=a}return(s?-1:1)*r*C(2,f-n)}function i(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function a(t){return[255&t]}function u(t){return[255&t,t>>8&255]}function c(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function s(t){return r(t,52,8)}function f(t){return r(t,23,4)}function l(t,n,e){E(t[M],n,{get:function(){return this[e]}})}function p(t,n,e,r){var o=+e,i=T(o);if(i+n>t[H])throw A(F);var a=t[B]._b,u=i+t[U],c=a.slice(u,u+n);return r?c:c.reverse()}function h(t,n,e,r,o,i){var a=+e,u=T(a);if(u+n>t[H])throw A(F);for(var c=t[B]._b,s=u+t[U],f=r(+o),l=0;lX;)(V=q[X++])in j||m(j,V,L[V]);g||(G.constructor=j)}var K=new I(new j(2)),Y=I[M].setInt8;K.setInt8(0,2147483648),K.setInt8(1,2147483649),!K.getInt8(0)&&K.getInt8(1)||b(I[M],{setInt8:function(t,n){Y.call(this,t,n<<24>>24)},setUint8:function(t,n){Y.call(this,t,n<<24>>24)}},!0)}else j=function(t){k(this,j,"ArrayBuffer");var n=T(t);this._b=O.call(new Array(n),0),this[H]=n},I=function(t,n,e){k(this,I,"DataView"),k(t,j,"DataView");var r=t[H],o=w(n);if(o<0||o>r)throw A("Wrong offset!");if(e=void 0===e?r-o:S(e),o+e>r)throw A("Wrong length!");this[B]=t,this[U]=o,this[H]=e},d&&(l(j,"byteLength","_l"),l(I,"buffer","_b"),l(I,"byteLength","_l"),l(I,"byteOffset","_o")),b(I[M],{getInt8:function(t){return p(this,1,t)[0]<<24>>24},getUint8:function(t){return p(this,1,t)[0]},getInt16:function(t){var n=p(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t){var n=p(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function(t){return i(p(this,4,t,arguments[1]))},getUint32:function(t){return i(p(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return o(p(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return o(p(this,8,t,arguments[1]),52,8)},setInt8:function(t,n){h(this,1,t,a,n)},setUint8:function(t,n){h(this,1,t,a,n)},setInt16:function(t,n){h(this,2,t,u,n,arguments[2])},setUint16:function(t,n){h(this,2,t,u,n,arguments[2])},setInt32:function(t,n){h(this,4,t,c,n,arguments[2])},setUint32:function(t,n){h(this,4,t,c,n,arguments[2])},setFloat32:function(t,n){h(this,4,t,f,n,arguments[2])},setFloat64:function(t,n){h(this,8,t,s,n,arguments[2])}});P(j,"ArrayBuffer"),P(I,"DataView"),m(I[M],y.VIEW,!0),n.ArrayBuffer=j,n.DataView=I},,,,,,,,,,,,,function(t,n,e){"use strict";var r=e(4),o=e(13),i=e(10),a=e(0),u=e(14),c=e(29).KEY,s=e(2),f=e(55),l=e(47),p=e(34),h=e(7),v=e(105),d=e(164),g=e(165),y=e(72),m=e(1),b=e(3),_=e(19),k=e(27),w=e(33),S=e(38),T=e(109),x=e(24),E=e(8),O=e(44),P=x.f,M=E.f,F=T.f,j=r.Symbol,I=r.JSON,D=I&&I.stringify,A=h("_hidden"),R=h("toPrimitive"),L={}.propertyIsEnumerable,N=f("symbol-registry"),C=f("symbols"),z=f("op-symbols"),Z=Object.prototype,W="function"==typeof j,B=r.QObject,H=!B||!B.prototype||!B.prototype.findChild,U=i&&s(function(){return 7!=S(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,n,e){var r=P(Z,n);r&&delete Z[n],M(t,n,e),r&&t!==Z&&M(Z,n,r)}:M,V=function(t){var n=C[t]=S(j.prototype);return n._k=t,n},G=W&&"symbol"==typeof j.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof j},q=function(t,n,e){return t===Z&&q(z,n,e),m(t),n=k(n,!0),m(e),o(C,n)?(e.enumerable?(o(t,A)&&t[A][n]&&(t[A][n]=!1),e=S(e,{enumerable:w(0,!1)})):(o(t,A)||M(t,A,w(1,{})),t[A][n]=!0),U(t,n,e)):M(t,n,e)},X=function(t,n){m(t);for(var e,r=g(n=_(n)),o=0,i=r.length;i>o;)q(t,e=r[o++],n[e]);return t},K=function(t,n){return void 0===n?S(t):X(S(t),n)},Y=function(t){var n=L.call(this,t=k(t,!0));return!(this===Z&&o(C,t)&&!o(z,t))&&(!(n||!o(this,t)||!o(C,t)||o(this,A)&&this[A][t])||n)},J=function(t,n){if(t=_(t),n=k(n,!0),t!==Z||!o(C,n)||o(z,n)){var e=P(t,n);return!e||!o(C,n)||o(t,A)&&t[A][n]||(e.enumerable=!0),e}},$=function(t){for(var n,e=F(_(t)),r=[],i=0;e.length>i;)o(C,n=e[i++])||n==A||n==c||r.push(n);return r},Q=function(t){for(var n,e=t===Z,r=F(e?z:_(t)),i=[],a=0;r.length>a;)!o(C,n=r[a++])||e&&!o(Z,n)||i.push(C[n]);return i};W||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),n=function(e){this===Z&&n.call(z,e),o(this,A)&&o(this[A],t)&&(this[A][t]=!1),U(this,t,w(1,e))};return i&&H&&U(Z,t,{configurable:!0,set:n}),V(t)},u(j.prototype,"toString",function(){return this._k}),x.f=J,E.f=q,e(39).f=T.f=$,e(57).f=Y,e(56).f=Q,i&&!e(48)&&u(Z,"propertyIsEnumerable",Y,!0),v.f=function(t){return V(h(t))}),a(a.G+a.W+a.F*!W,{Symbol:j});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;tt.length>nt;)h(tt[nt++]);for(var et=O(h.store),rt=0;et.length>rt;)d(et[rt++]);a(a.S+a.F*!W,"Symbol",{for:function(t){return o(N,t+="")?N[t]:N[t]=j(t)},keyFor:function(t){if(!G(t))throw TypeError(t+" is not a symbol!");for(var n in N)if(N[n]===t)return n},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!W,"Object",{create:K,defineProperty:q,defineProperties:X,getOwnPropertyDescriptor:J,getOwnPropertyNames:$,getOwnPropertySymbols:Q}),I&&a(a.S+a.F*(!W||s(function(){var t=j();return"[null]"!=D([t])||"{}"!=D({a:t})||"{}"!=D(Object(t))})),"JSON",{stringify:function(t){for(var n,e,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(e=n=r[1],(b(n)||void 0!==t)&&!G(t))return y(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!G(n))return n}),r[1]=n,D.apply(I,r)}}),j.prototype[R]||e(16)(j.prototype,R,j.prototype.valueOf),l(j,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){t.exports=!e(10)&&!e(2)(function(){return 7!=Object.defineProperty(e(104)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(3),o=e(4).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,e){n.f=e(7)},function(t,n,e){var r=e(13),o=e(19),i=e(69)(!1),a=e(70)("IE_PROTO");t.exports=function(t,n){var e,u=o(t),c=0,s=[];for(e in u)e!=a&&r(u,e)&&s.push(e);for(;n.length>c;)r(u,e=n[c++])&&(~i(s,e)||s.push(e));return s}},function(t,n,e){var r=e(8),o=e(1),i=e(44);t.exports=e(10)?Object.defineProperties:function(t,n){o(t);for(var e,a=i(n),u=a.length,c=0;u>c;)r.f(t,e=a[c++],n[e]);return t}},function(t,n,e){var r=e(4).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(19),o=e(39).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(t){try{return o(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?u(t):o(r(t))}},function(t,n,e){"use strict";var r=e(44),o=e(56),i=e(57),a=e(17),u=e(49),c=Object.assign;t.exports=!c||e(2)(function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach(function(t){n[t]=t}),7!=c({},t)[e]||Object.keys(c({},n)).join("")!=r})?function(t,n){for(var e=a(t),c=arguments.length,s=1,f=o.f,l=i.f;c>s;)for(var p,h=u(arguments[s++]),v=f?r(h).concat(f(h)):r(h),d=v.length,g=0;d>g;)l.call(h,p=v[g++])&&(e[p]=h[p]);return e}:c},function(t,n,e){"use strict";var r=e(28),o=e(3),i=e(186),a=[].slice,u={},c=function(t,n,e){if(!(n in u)){for(var r=[],o=0;o>>0||(a.test(e)?16:10))}:r},function(t,n,e){var r=e(4).parseFloat,o=e(58).trim;t.exports=1/r(e(75)+"-0")!=-1/0?function(t){var n=o(String(t),3),e=r(n);return 0===e&&"-"==n.charAt(0)?-0:e}:r},function(t,n,e){var r=e(36);t.exports=function(t,n){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(n);return+t}},function(t,n,e){"use strict";var r=e(23),o=e(30);t.exports=function(t){var n=String(o(this)),e="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(n+=n))1&i&&(e+=n);return e}},function(t,n,e){var r=e(3),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,n){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,e){var r=e(23),o=e(30);t.exports=function(t){return function(n,e){var i,a,u=String(o(n)),c=r(e),s=u.length;return c<0||c>=s?t?"":void 0:(i=u.charCodeAt(c),i<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):i:t?u.slice(c,c+2):a-56320+(i-55296<<10)+65536)}}},function(t,n,e){"use strict";var r=e(38),o=e(33),i=e(47),a={};e(16)(a,e(7)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r(a,{next:o(1,e)}),i(t,n+" Iterator")}},function(t,n,e){e(60)("match",1,function(t,n,e){return[function(e){"use strict";var r=t(this),o=void 0==e?void 0:e[n];return void 0!==o?o.call(e,r):new RegExp(e)[n](String(r))},e]})},function(t,n,e){e(60)("replace",2,function(t,n,e){return[function(r,o){"use strict";var i=t(this),a=void 0==r?void 0:r[n];return void 0!==a?a.call(r,i,o):e.call(String(i),r,o)},e]})},function(t,n,e){e(60)("search",1,function(t,n,e){return[function(e){"use strict";var r=t(this),o=void 0==e?void 0:e[n];return void 0!==o?o.call(e,r):new RegExp(e)[n](String(r))},e]})},function(t,n,e){e(60)("split",2,function(t,n,r){"use strict";var o=e(81),i=r,a=[].push,u="length";if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[u]||2!="ab".split(/(?:ab)*/)[u]||4!=".".split(/(.?)(.?)/)[u]||".".split(/()()/)[u]>1||"".split(/.?/)[u]){var c=void 0===/()??/.exec("")[1];r=function(t,n){var e=String(this);if(void 0===t&&0===n)return[];if(!o(t))return i.call(e,t,n);var r,s,f,l,p,h=[],v=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,g=void 0===n?4294967295:n>>>0,y=new RegExp(t.source,v+"g");for(c||(r=new RegExp("^"+y.source+"$(?!\\s)",v));(s=y.exec(e))&&!((f=s.index+s[0][u])>d&&(h.push(e.slice(d,s.index)),!c&&s[u]>1&&s[0].replace(r,function(){for(p=1;p1&&s.index=g));)y.lastIndex===s.index&&y.lastIndex++;return d===e[u]?!l&&y.test("")||h.push(""):h.push(e.slice(d)),h[u]>g?h.slice(0,g):h}}else"0".split(void 0,0)[u]&&(r=function(t,n){return void 0===t&&0===n?[]:i.call(this,t,n)});return[function(e,o){var i=t(this),a=void 0==e?void 0:e[n];return void 0!==a?a.call(e,i,o):r.call(String(i),e,o)},r]})},function(t,n,e){var r=e(1);t.exports=function(t,n,e,o){try{return o?n(r(e)[0],e[1]):n(e)}catch(n){var i=t.return;throw void 0!==i&&r(i.call(t)),n}}},function(t,n,e){"use strict";var r=e(8),o=e(33);t.exports=function(t,n,e){n in t?r.f(t,n,o(0,e)):t[n]=e}},function(t,n,e){var r=e(28),o=e(17),i=e(49),a=e(11);t.exports=function(t,n,e,u,c){r(n);var s=o(t),f=i(s),l=a(s.length),p=c?l-1:0,h=c?-1:1;if(e<2)for(;;){if(p in f){u=f[p],p+=h;break}if(p+=h,c?p<0:l<=p)throw TypeError("Reduce of empty array with no initial value")}for(;c?p>=0:l>p;p+=h)p in f&&(u=n(u,f[p],p,s));return u}},function(t,n,e){"use strict";var r=e(17),o=e(37),i=e(11);t.exports=[].copyWithin||function(t,n){var e=r(this),a=i(e.length),u=o(t,a),c=o(n,a),s=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===s?a:o(s,a))-c,a-u),l=1;for(c0;)c in e?e[u]=e[c]:delete e[u],u+=l,c+=l;return e}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){e(10)&&"g"!=/./g.flags&&e(8).f(RegExp.prototype,"flags",{configurable:!0,get:e(87)})},function(t,n,e){"use strict";var r=e(131),o=e(46);t.exports=e(63)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var n=r.getEntry(o(this,"Map"),t);return n&&n.v},set:function(t,n){return r.def(o(this,"Map"),0===t?0:t,n)}},r,!0)},function(t,n,e){"use strict";var r=e(8).f,o=e(38),i=e(52),a=e(35),u=e(53),c=e(62),s=e(79),f=e(128),l=e(51),p=e(10),h=e(29).fastKey,v=e(46),d=p?"_s":"size",g=function(t,n){var e,r=h(n);if("F"!==r)return t._i[r];for(e=t._f;e;e=e.n)if(e.k==n)return e};t.exports={getConstructor:function(t,n,e,s){var f=t(function(t,r){u(t,f,n,"_i"),t._t=n,t._i=o(null),t._f=void 0,t._l=void 0,t[d]=0,void 0!=r&&c(r,e,t[s],t)});return i(f.prototype,{clear:function(){for(var t=v(this,n),e=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete e[r.i];t._f=t._l=void 0,t[d]=0},delete:function(t){var e=v(this,n),r=g(e,t);if(r){var o=r.n,i=r.p;delete e._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),e._f==r&&(e._f=o),e._l==r&&(e._l=i),e[d]--}return!!r},forEach:function(t){v(this,n);for(var e,r=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(r(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!g(v(this,n),t)}}),p&&r(f.prototype,"size",{get:function(){return v(this,n)[d]}}),f},def:function(t,n,e){var r,o,i=g(t,n);return i?i.v=e:(t._l=i={i:o=h(n,!0),k:n,v:e,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[d]++,"F"!==o&&(t._i[o]=i)),t},getEntry:g,setStrong:function(t,n,e){s(t,n,function(t,e){this._t=v(t,n),this._k=e,this._l=void 0},function(){for(var t=this,n=t._k,e=t._l;e&&e.r;)e=e.p;return t._t&&(t._l=e=e?e.n:t._t._f)?"keys"==n?f(0,e.k):"values"==n?f(0,e.v):f(0,[e.k,e.v]):(t._t=void 0,f(1))},e?"entries":"values",!e,!0),l(n)}}},function(t,n,e){"use strict";var r=e(131),o=e(46);t.exports=e(63)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},function(t,n,e){"use strict";var r,o=e(22)(0),i=e(14),a=e(29),u=e(110),c=e(134),s=e(3),f=e(2),l=e(46),p=a.getWeak,h=Object.isExtensible,v=c.ufstore,d={},g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(s(t)){var n=p(t);return!0===n?v(l(this,"WeakMap")).get(t):n?n[this._i]:void 0}},set:function(t,n){return c.def(l(this,"WeakMap"),t,n)}},m=t.exports=e(63)("WeakMap",g,y,c,!0,!0);f(function(){return 7!=(new m).set((Object.freeze||Object)(d),7).get(d)})&&(r=c.getConstructor(g,"WeakMap"),u(r.prototype,y),a.NEED=!0,o(["delete","has","get","set"],function(t){var n=m.prototype,e=n[t];i(n,t,function(n,o){if(s(n)&&!h(n)){this._f||(this._f=new r);var i=this._f[t](n,o);return"set"==t?this:i}return e.call(this,n,o)})}))},function(t,n,e){"use strict";var r=e(52),o=e(29).getWeak,i=e(1),a=e(3),u=e(53),c=e(62),s=e(22),f=e(13),l=e(46),p=s(5),h=s(6),v=0,d=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,n){return p(t.a,function(t){return t[0]===n})};g.prototype={get:function(t){var n=y(this,t);if(n)return n[1]},has:function(t){return!!y(this,t)},set:function(t,n){var e=y(this,t);e?e[1]=n:this.a.push([t,n])},delete:function(t){var n=h(this.a,function(n){return n[0]===t});return~n&&this.a.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,e,i){var s=t(function(t,r){u(t,s,n,"_i"),t._t=n,t._i=v++,t._l=void 0,void 0!=r&&c(r,e,t[i],t)});return r(s.prototype,{delete:function(t){if(!a(t))return!1;var e=o(t);return!0===e?d(l(this,n)).delete(t):e&&f(e,this._i)&&delete e[this._i]},has:function(t){if(!a(t))return!1;var e=o(t);return!0===e?d(l(this,n)).has(t):e&&f(e,this._i)}}),s},def:function(t,n,e){var r=o(i(n),!0);return!0===r?d(t).set(n,e):r[t._i]=e,t},ufstore:d}},function(t,n,e){var r=e(23),o=e(11);t.exports=function(t){if(void 0===t)return 0;var n=r(t),e=o(n);if(n!==e)throw RangeError("Wrong length!");return e}},function(t,n,e){var r=e(1),o=e(28),i=e(7)("species");t.exports=function(t,n){var e,a=r(t).constructor;return void 0===a||void 0==(e=r(a)[i])?n:o(e)}},,,,,,,,,,,,,,,,,,,,,,,,,,function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e(163),o=(e.n(r),e(166)),i=(e.n(o),e(184)),a=(e.n(i),e(189)),u=(e.n(a),e(191)),c=(e.n(u),e(193)),s=(e.n(c),e(206)),f=(e.n(s),e(225)),l=(e.n(f),e(247)),p=(e.n(l),e(255)),h=(e.n(p),e(278)),v=(e.n(h),e(281)),d=(e.n(v),e(282)),g=(e.n(d),e(283)),y=(e.n(g),e(284)),m=(e.n(y),e(286)),b=(e.n(m),e(298)),_=(e.n(b),e(314)),k=(e.n(_),e(325)),w=(e.n(k),e(326));e.n(w);e(327)},function(t,n,e){e(102),e(40),t.exports=e(6).Symbol},function(t,n,e){var r=e(4),o=e(6),i=e(48),a=e(105),u=e(8).f;t.exports=function(t){var n=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||u(n,t,{value:a.f(t)})}},function(t,n,e){var r=e(44),o=e(56),i=e(57);t.exports=function(t){var n=r(t),e=o.f;if(e)for(var a,u=e(t),c=i.f,s=0;u.length>s;)c.call(t,a=u[s++])&&n.push(a);return n}},function(t,n,e){e(102),e(167),e(168),e(169),e(170),e(171),e(172),e(173),e(174),e(175),e(176),e(177),e(178),e(179),e(180),e(181),e(183),e(40),t.exports=e(6).Object},function(t,n,e){var r=e(0);r(r.S,"Object",{create:e(38)})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(10),"Object",{defineProperty:e(8).f})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(10),"Object",{defineProperties:e(107)})},function(t,n,e){var r=e(19),o=e(24).f;e(20)("getOwnPropertyDescriptor",function(){return function(t,n){return o(r(t),n)}})},function(t,n,e){var r=e(17),o=e(21);e(20)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,n,e){var r=e(17),o=e(44);e(20)("keys",function(){return function(t){return o(r(t))}})},function(t,n,e){e(20)("getOwnPropertyNames",function(){return e(109).f})},function(t,n,e){var r=e(3),o=e(29).onFreeze;e(20)("freeze",function(t){return function(n){return t&&r(n)?t(o(n)):n}})},function(t,n,e){var r=e(3),o=e(29).onFreeze;e(20)("seal",function(t){return function(n){return t&&r(n)?t(o(n)):n}})},function(t,n,e){var r=e(3),o=e(29).onFreeze;e(20)("preventExtensions",function(t){return function(n){return t&&r(n)?t(o(n)):n}})},function(t,n,e){var r=e(3);e(20)("isFrozen",function(t){return function(n){return!r(n)||!!t&&t(n)}})},function(t,n,e){var r=e(3);e(20)("isSealed",function(t){return function(n){return!r(n)||!!t&&t(n)}})},function(t,n,e){var r=e(3);e(20)("isExtensible",function(t){return function(n){return!!r(n)&&(!t||t(n))}})},function(t,n,e){var r=e(0);r(r.S+r.F,"Object",{assign:e(110)})},function(t,n,e){var r=e(0);r(r.S,"Object",{is:e(182)})},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}},function(t,n,e){var r=e(0);r(r.S,"Object",{setPrototypeOf:e(74).set})},function(t,n,e){e(185),e(187),e(188),t.exports=e(6).Function},function(t,n,e){var r=e(0);r(r.P,"Function",{bind:e(111)})},function(t,n){t.exports=function(t,n,e){var r=void 0===e;switch(n.length){case 0:return r?t():t.call(e);case 1:return r?t(n[0]):t.call(e,n[0]);case 2:return r?t(n[0],n[1]):t.call(e,n[0],n[1]);case 3:return r?t(n[0],n[1],n[2]):t.call(e,n[0],n[1],n[2]);case 4:return r?t(n[0],n[1],n[2],n[3]):t.call(e,n[0],n[1],n[2],n[3])}return t.apply(e,n)}},function(t,n,e){var r=e(8).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||e(10)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,n,e){"use strict";var r=e(3),o=e(21),i=e(7)("hasInstance"),a=Function.prototype;i in a||e(8).f(a,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,e){e(190),t.exports=e(6).parseInt},function(t,n,e){var r=e(0),o=e(112);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(t,n,e){e(192),t.exports=e(6).parseFloat},function(t,n,e){var r=e(0),o=e(113);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(t,n,e){e(194),e(195),e(196),e(197),e(198),e(199),e(200),e(201),e(202),e(203),e(204),e(205),t.exports=e(6).Number},function(t,n,e){"use strict";var r=e(4),o=e(13),i=e(36),a=e(76),u=e(27),c=e(2),s=e(39).f,f=e(24).f,l=e(8).f,p=e(58).trim,h=r.Number,v=h,d=h.prototype,g="Number"==i(e(38)(d)),y="trim"in String.prototype,m=function(t){var n=u(t,!1);if("string"==typeof n&&n.length>2){n=y?n.trim():p(n,3);var e,r,o,i=n.charCodeAt(0);if(43===i||45===i){if(88===(e=n.charCodeAt(2))||120===e)return NaN}else if(48===i){switch(n.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+n}for(var a,c=n.slice(2),s=0,f=c.length;so)return NaN;return parseInt(c,r)}}return+n};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof h&&(g?c(function(){d.valueOf.call(e)}):"Number"!=i(e))?a(new v(m(n)),e,h):m(n)};for(var b,_=e(10)?s(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),k=0;_.length>k;k++)o(v,b=_[k])&&!o(h,b)&&l(h,b,f(v,b));h.prototype=d,d.constructor=h,e(14)(r,"Number",h)}},function(t,n,e){"use strict";var r=e(0),o=e(23),i=e(114),a=e(115),u=1..toFixed,c=Math.floor,s=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,n){for(var e=-1,r=n;++e<6;)r+=t*s[e],s[e]=r%1e7,r=c(r/1e7)},p=function(t){for(var n=6,e=0;--n>=0;)e+=s[n],s[n]=c(e/t),e=e%t*1e7},h=function(){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==s[t]){var e=String(s[t]);n=""===n?e:n+a.call("0",7-e.length)+e}return n},v=function(t,n,e){return 0===n?e:n%2==1?v(t,n-1,e*t):v(t*t,n/2,e)},d=function(t){for(var n=0,e=t;e>=4096;)n+=12,e/=4096;for(;e>=2;)n+=1,e/=2;return n};r(r.P+r.F*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e(2)(function(){u.call({})})),"Number",{toFixed:function(t){var n,e,r,u,c=i(this,f),s=o(t),g="",y="0";if(s<0||s>20)throw RangeError(f);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(g="-",c=-c),c>1e-21)if(n=d(c*v(2,69,1))-69,e=n<0?c*v(2,-n,1):c/v(2,n,1),e*=4503599627370496,(n=52-n)>0){for(l(0,e),r=s;r>=7;)l(1e7,0),r-=7;for(l(v(10,r,1),0),r=n-1;r>=23;)p(1<<23),r-=23;p(1<0?(u=y.length,y=g+(u<=s?"0."+a.call("0",s-u)+y:y.slice(0,u-s)+"."+y.slice(u-s))):y=g+y,y}})},function(t,n,e){"use strict";var r=e(0),o=e(2),i=e(114),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(t){var n=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(n):a.call(n,t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,n,e){var r=e(0),o=e(4).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{isInteger:e(116)})},function(t,n,e){var r=e(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,n,e){var r=e(0),o=e(116),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,n,e){var r=e(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,e){var r=e(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,e){var r=e(0),o=e(113);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(t,n,e){var r=e(0),o=e(112);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(t,n,e){e(207),e(208),e(209),e(210),e(211),e(212),e(213),e(214),e(216),e(217),e(218),e(219),e(220),e(221),e(222),e(223),e(224),t.exports=e(6).Math},function(t,n,e){var r=e(0),o=e(117),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},function(t,n,e){function r(t){return isFinite(t=+t)&&0!=t?t<0?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var o=e(0),i=Math.asinh;o(o.S+o.F*!(i&&1/i(0)>0),"Math",{asinh:r})},function(t,n,e){var r=e(0),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,n,e){var r=e(0),o=e(77);r(r.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,e){var r=e(0),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},function(t,n,e){var r=e(0),o=e(78);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(t,n,e){var r=e(0);r(r.S,"Math",{fround:e(215)})},function(t,n,e){var r=e(77),o=Math.pow,i=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),c=o(2,-126),s=function(t){return t+1/i-1/i};t.exports=Math.fround||function(t){var n,e,o=Math.abs(t),f=r(t);return ou||e!=e?f*(1/0):f*e)}},function(t,n,e){var r=e(0),o=Math.abs;r(r.S,"Math",{hypot:function(t,n){for(var e,r,i=0,a=0,u=arguments.length,c=0;a0?(r=e/c,i+=r*r):i+=e;return c===1/0?1/0:c*Math.sqrt(i)}})},function(t,n,e){var r=e(0),o=Math.imul;r(r.S+r.F*e(2)(function(){return-5!=o(4294967295,5)||2!=o.length}),"Math",{imul:function(t,n){var e=+t,r=+n,o=65535&e,i=65535&r;return 0|o*i+((65535&e>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log1p:e(117)})},function(t,n,e){var r=e(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,n,e){var r=e(0);r(r.S,"Math",{sign:e(77)})},function(t,n,e){var r=e(0),o=e(78),i=Math.exp;r(r.S+r.F*e(2)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},function(t,n,e){var r=e(0),o=e(78),i=Math.exp;r(r.S,"Math",{tanh:function(t){var n=o(t=+t),e=o(-t);return n==1/0?1:e==1/0?-1:(n-e)/(i(t)+i(-t))}})},function(t,n,e){var r=e(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,n,e){e(226),e(227),e(228),e(59),e(229),e(230),e(231),e(232),e(233),e(234),e(235),e(236),e(237),e(238),e(239),e(240),e(241),e(242),e(243),e(244),e(245),e(246),e(120),e(121),e(122),e(123),t.exports=e(6).String},function(t,n,e){var r=e(0),o=e(37),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var n,e=[],r=arguments.length,a=0;r>a;){if(n=+arguments[a++],o(n,1114111)!==n)throw RangeError(n+" is not a valid code point");e.push(n<65536?i(n):i(55296+((n-=65536)>>10),n%1024+56320))}return e.join("")}})},function(t,n,e){var r=e(0),o=e(19),i=e(11);r(r.S,"String",{raw:function(t){for(var n=o(t.raw),e=i(n.length),r=arguments.length,a=[],u=0;e>u;)a.push(String(n[u++])),u1?arguments[1]:void 0,r=o(n.length),u=void 0===e?r:Math.min(o(e),r),c=String(t);return a?a.call(n,c,u):n.slice(u-c.length,u)===c}})},function(t,n,e){"use strict";var r=e(0),o=e(80);r(r.P+r.F*e(82)("includes"),"String",{includes:function(t){return!!~o(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,e){var r=e(0);r(r.P,"String",{repeat:e(115)})},function(t,n,e){"use strict";var r=e(0),o=e(11),i=e(80),a="".startsWith;r(r.P+r.F*e(82)("startsWith"),"String",{startsWith:function(t){var n=i(this,t,"startsWith"),e=o(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),r=String(t);return a?a.call(n,r,e):n.slice(e,e+r.length)===r}})},function(t,n,e){"use strict";e(15)("anchor",function(t){return function(n){return t(this,"a","name",n)}})},function(t,n,e){"use strict";e(15)("big",function(t){return function(){return t(this,"big","","")}})},function(t,n,e){"use strict";e(15)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,n,e){"use strict";e(15)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,n,e){"use strict";e(15)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,n,e){"use strict";e(15)("fontcolor",function(t){return function(n){return t(this,"font","color",n)}})},function(t,n,e){"use strict";e(15)("fontsize",function(t){return function(n){return t(this,"font","size",n)}})},function(t,n,e){"use strict";e(15)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,n,e){"use strict";e(15)("link",function(t){return function(n){return t(this,"a","href",n)}})},function(t,n,e){"use strict";e(15)("small",function(t){return function(){return t(this,"small","","")}})},function(t,n,e){"use strict";e(15)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,n,e){"use strict";e(15)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,n,e){"use strict";e(15)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,n,e){e(248),e(249),e(250),e(252),e(253),t.exports=Date},function(t,n,e){var r=e(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,n,e){"use strict";var r=e(0),o=e(17),i=e(27);r(r.P+r.F*e(2)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var n=o(this),e=i(n);return"number"!=typeof e||isFinite(e)?n.toISOString():null}})},function(t,n,e){var r=e(0),o=e(251);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},function(t,n,e){"use strict";var r=e(2),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))})||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),e=t.getUTCMilliseconds(),r=n<0?"-":n>9999?"+":"";return r+("00000"+Math.abs(n)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(e>99?e:"0"+a(e))+"Z"}:i},function(t,n,e){var r=Date.prototype,o=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&e(14)(r,"toString",function(){var t=i.call(this);return t===t?o.call(this):"Invalid Date"})},function(t,n,e){var r=e(7)("toPrimitive"),o=Date.prototype;r in o||e(16)(o,r,e(254))},function(t,n,e){"use strict";var r=e(1),o=e(27);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),"number"!=t)}},function(t,n,e){e(59),e(256),e(257),e(258),e(259),e(260),e(261),e(262),e(265),e(266),e(267),e(268),e(269),e(270),e(271),e(272),e(273),e(274),e(275),e(276),e(277),e(61),t.exports=e(6).Array},function(t,n,e){var r=e(0);r(r.S,"Array",{isArray:e(72)})},function(t,n,e){"use strict";var r=e(35),o=e(0),i=e(17),a=e(124),u=e(83),c=e(11),s=e(125),f=e(84);o(o.S+o.F*!e(85)(function(t){Array.from(t)}),"Array",{from:function(t){var n,e,o,l,p=i(t),h="function"==typeof this?this:Array,v=arguments.length,d=v>1?arguments[1]:void 0,g=void 0!==d,y=0,m=f(p);if(g&&(d=r(d,v>2?arguments[2]:void 0,2)),void 0==m||h==Array&&u(m))for(n=c(p.length),e=new h(n);n>y;y++)s(e,y,g?d(p[y],y):p[y]);else for(l=m.call(p),e=new h;!(o=l.next()).done;y++)s(e,y,g?a(l,d,[o.value,y],!0):o.value);return e.length=y,e}})},function(t,n,e){"use strict";var r=e(0),o=e(125);r(r.S+r.F*e(2)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,n=arguments.length,e=new("function"==typeof this?this:Array)(n);n>t;)o(e,t,arguments[t++]);return e.length=n,e}})},function(t,n,e){"use strict";var r=e(0),o=e(19),i=[].join;r(r.P+r.F*(e(49)!=Object||!e(18)(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},function(t,n,e){"use strict";var r=e(0),o=e(108),i=e(36),a=e(37),u=e(11),c=[].slice;r(r.P+r.F*e(2)(function(){o&&c.call(o)}),"Array",{slice:function(t,n){var e=u(this.length),r=i(this);if(n=void 0===n?e:n,"Array"==r)return c.call(this,t,n);for(var o=a(t,e),s=a(n,e),f=u(s-o),l=new Array(f),p=0;p1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=e+r);r>=0;r--)if(r in n&&n[r]===t)return r||0;return-1}})},function(t,n,e){var r=e(0);r(r.P,"Array",{copyWithin:e(127)}),e(50)("copyWithin")},function(t,n,e){var r=e(0);r(r.P,"Array",{fill:e(86)}),e(50)("fill")},function(t,n,e){"use strict";var r=e(0),o=e(22)(5),i=!0;"find"in[]&&Array(1).find(function(){i=!1}),r(r.P+r.F*i,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),e(50)("find")},function(t,n,e){"use strict";var r=e(0),o=e(22)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),e(50)(i)},function(t,n,e){e(51)("Array")},function(t,n,e){e(279),e(280),e(129),e(120),e(121),e(122),e(123),t.exports=e(6).RegExp},function(t,n,e){var r=e(4),o=e(76),i=e(8).f,a=e(39).f,u=e(81),c=e(87),s=r.RegExp,f=s,l=s.prototype,p=/a/g,h=/a/g,v=new s(p)!==p;if(e(10)&&(!v||e(2)(function(){return h[e(7)("match")]=!1,s(p)!=p||s(h)==h||"/a/i"!=s(p,"i")}))){s=function(t,n){var e=this instanceof s,r=u(t),i=void 0===n;return!e&&r&&t.constructor===s&&i?t:o(v?new f(r&&!i?t.source:t,n):f((r=t instanceof s)?t.source:t,r&&i?c.call(t):n),e?this:l,s)};for(var d=a(f),g=0;d.length>g;)!function(t){t in s||i(s,t,{configurable:!0,get:function(){return f[t]},set:function(n){f[t]=n}})}(d[g++]);l.constructor=s,s.prototype=l,e(14)(r,"RegExp",s)}e(51)("RegExp")},function(t,n,e){"use strict";e(129);var r=e(1),o=e(87),i=e(10),a=/./.toString,u=function(t){e(14)(RegExp.prototype,"toString",t,!0)};e(2)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?u(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):"toString"!=a.name&&u(function(){return a.call(this)})},function(t,n,e){e(40),e(59),e(88),e(130),t.exports=e(6).Map},function(t,n,e){e(40),e(59),e(88),e(132),t.exports=e(6).Set},function(t,n,e){e(40),e(61),e(133),t.exports=e(6).WeakMap},function(t,n,e){e(40),e(88),e(285),t.exports=e(6).WeakSet},function(t,n,e){"use strict";var r=e(134),o=e(46);e(63)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,n,e){e(287),e(288),e(289),e(290),e(291),e(292),e(293),e(294),e(295),e(296),e(297),e(40),t.exports=e(6)},function(t,n,e){"use strict";var r=e(0),o=e(64),i=e(89),a=e(1),u=e(37),c=e(11),s=e(3),f=e(4).ArrayBuffer,l=e(136),p=i.ArrayBuffer,h=i.DataView,v=o.ABV&&f.isView,d=p.prototype.slice,g=o.VIEW;r(r.G+r.W+r.F*(f!==p),{ArrayBuffer:p}),r(r.S+r.F*!o.CONSTR,"ArrayBuffer",{isView:function(t){return v&&v(t)||s(t)&&g in t}}),r(r.P+r.U+r.F*e(2)(function(){return!new p(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,n){if(void 0!==d&&void 0===n)return d.call(a(this),t);for(var e=a(this).byteLength,r=u(t,e),o=u(void 0===n?e:n,e),i=new(l(this,p))(c(o-r)),s=new h(this),f=new h(i),v=0;r=e.length)return{value:void 0,done:!0}}while(!((t=e[n._i++])in n._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},function(t,n,e){function r(t,n){var e,u,f=arguments.length<3?t:arguments[2];return s(t)===f?t[n]:(e=o.f(t,n))?a(e,"value")?e.value:void 0!==e.get?e.get.call(f):void 0:c(u=i(t))?r(u,n,f):void 0}var o=e(24),i=e(21),a=e(13),u=e(0),c=e(3),s=e(1);u(u.S,"Reflect",{get:r})},function(t,n,e){var r=e(24),o=e(0),i=e(1);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,n){return r.f(i(t),n)}})},function(t,n,e){var r=e(0),o=e(21),i=e(1);r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{has:function(t,n){return n in t}})},function(t,n,e){var r=e(0),o=e(1),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{ownKeys:e(310)})},function(t,n,e){var r=e(39),o=e(56),i=e(1),a=e(4).Reflect;t.exports=a&&a.ownKeys||function(t){var n=r.f(i(t)),e=o.f;return e?n.concat(e(t)):n}},function(t,n,e){var r=e(0),o=e(1),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},function(t,n,e){function r(t,n,e){var c,p,h=arguments.length<4?t:arguments[3],v=i.f(f(t),n);if(!v){if(l(p=a(t)))return r(p,n,e,h);v=s(0)}return u(v,"value")?!(!1===v.writable||!l(h))&&(c=i.f(h,n)||s(0),c.value=e,o.f(h,n,c),!0):void 0!==v.set&&(v.set.call(h,e),!0)}var o=e(8),i=e(24),a=e(21),u=e(13),c=e(0),s=e(33),f=e(1),l=e(3);c(c.S,"Reflect",{set:r})},function(t,n,e){var r=e(0),o=e(74);o&&r(r.S,"Reflect",{setPrototypeOf:function(t,n){o.check(t,n);try{return o.set(t,n),!0}catch(t){return!1}}})},function(t,n,e){e(315),e(316),e(317),e(318),e(320),e(321),e(322),e(323),e(324),t.exports=e(6).Reflect},function(t,n,e){var r=e(26),o=e(1),i=r.key,a=r.set;r.exp({defineMetadata:function(t,n,e,r){a(t,n,o(e),i(r))}})},function(t,n,e){var r=e(26),o=e(1),i=r.key,a=r.map,u=r.store;r.exp({deleteMetadata:function(t,n){var e=arguments.length<3?void 0:i(arguments[2]),r=a(o(n),e,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var c=u.get(n);return c.delete(e),!!c.size||u.delete(n)}})},function(t,n,e){var r=e(26),o=e(1),i=e(21),a=r.has,u=r.get,c=r.key,s=function(t,n,e){if(a(t,n,e))return u(t,n,e);var r=i(n);return null!==r?s(t,r,e):void 0};r.exp({getMetadata:function(t,n){return s(t,o(n),arguments.length<3?void 0:c(arguments[2]))}})},function(t,n,e){var r=e(132),o=e(319),i=e(26),a=e(1),u=e(21),c=i.keys,s=i.key,f=function(t,n){var e=c(t,n),i=u(t);if(null===i)return e;var a=f(i,n);return a.length?e.length?o(new r(e.concat(a))):a:e};i.exp({getMetadataKeys:function(t){return f(a(t),arguments.length<2?void 0:s(arguments[1]))}})},function(t,n,e){var r=e(62);t.exports=function(t,n){var e=[];return r(t,!1,e.push,e,n),e}},function(t,n,e){var r=e(26),o=e(1),i=r.get,a=r.key;r.exp({getOwnMetadata:function(t,n){return i(t,o(n),arguments.length<3?void 0:a(arguments[2]))}})},function(t,n,e){var r=e(26),o=e(1),i=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return i(o(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,n,e){var r=e(26),o=e(1),i=e(21),a=r.has,u=r.key,c=function(t,n,e){if(a(t,n,e))return!0;var r=i(n);return null!==r&&c(t,r,e)};r.exp({hasMetadata:function(t,n){return c(t,o(n),arguments.length<3?void 0:u(arguments[2]))}})},function(t,n,e){var r=e(26),o=e(1),i=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,n){return i(t,o(n),arguments.length<3?void 0:a(arguments[2]))}})},function(t,n,e){var r=e(26),o=e(1),i=e(28),a=r.key,u=r.set;r.exp({metadata:function(t,n){return function(e,r){u(t,n,(void 0!==r?o:i)(e),a(r))}}})},function(t,n,e){(function(t){/** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | !function(t,n){n()}(0,function(){"use strict";function n(t,n){return Zone.current.wrap(t,n)}function e(t,n,e,r,o){return Zone.current.scheduleMacroTask(t,n,e,r,o)}function r(t,e){for(var r=t.length-1;r>=0;r--)"function"==typeof t[r]&&(t[r]=n(t[r],e+"_"+r));return t}function o(t,n){for(var e=t.constructor.name,o=0;o=0&&"function"==typeof i[a.cbIdx]?e(a.name,i[a.cbIdx],a,o,null):t.apply(n,i)}})}function l(t,n){t[H("OriginalDelegate")]=n}function p(){if(et)return rt;et=!0;try{var t=V.navigator.userAgent;return-1===t.indexOf("MSIE ")&&-1===t.indexOf("Trident/")&&-1===t.indexOf("Edge/")||(rt=!0),rt}catch(t){}}function h(t,n,e){for(var r=e&&e.add||L,o=e&&e.rm||N,i=e&&e.listeners||"eventListeners",a=e&&e.rmAll||"removeAllListeners",u=H(r),c="."+r+":",s="prependListener",f="."+s+":",p=function(t,n,e){if(!t.isRemoved){var r=t.callback;"object"==typeof r&&r.handleEvent&&(t.callback=function(t){return r.handleEvent(t)},t.originalDelegate=r),t.invoke(t,n,[e]);var i=t.options;if(i&&"object"==typeof i&&i.once){var a=t.originalDelegate?t.originalDelegate:t.callback;n[o].call(n,e.type,a,i)}}},h=function(n){if(n=n||t.event){var e=this||n.target||t,r=e[it[n.type][W]];if(r)if(1===r.length)p(r[0],e,n);else for(var o=r.slice(),i=0;i1?new e(t,n):new e(t),a=j(i,"onmessage");return a&&!1===a.configurable?(r=A(i),o=i,[L,N,"send","close"].forEach(function(t){r[t]=function(){var n=R.call(arguments);if(t===L||t===N){var e=n.length>0?n[0]:void 0;if(e){var o=Zone.__symbol__("ON_PROPERTY"+e);i[o]=r[o]}}return i[t].apply(i,n)}})):r=i,u(r,["close","error","message","open"],o),r};var r=n.WebSocket;for(var o in e)r[o]=e[o]}function S(t,n,e){if(!e)return n;var r=e.filter(function(n){return n.target===t});if(!r||0===r.length)return n;var o=r[0].ignoreProperties;return n.filter(function(t){return-1===o.indexOf(t)})}function T(t,n,e,r){u(t,S(t,n,e),r)}function x(t,n){if(!Y||$){var e="undefined"!=typeof WebSocket;if(E()){var r=n.__Zone_ignore_on_properties;if(J){var o=window;T(o,Ft.concat(["messageerror"]),r,D(o)),T(Document.prototype,Ft,r),void 0!==o.SVGElement&&T(o.SVGElement.prototype,Ft,r),T(Element.prototype,Ft,r),T(HTMLElement.prototype,Ft,r),T(HTMLMediaElement.prototype,mt,r),T(HTMLFrameSetElement.prototype,gt.concat(Tt),r),T(HTMLBodyElement.prototype,gt.concat(Tt),r),T(HTMLFrameElement.prototype,St,r),T(HTMLIFrameElement.prototype,St,r);var i=o.HTMLMarqueeElement;i&&T(i.prototype,xt,r);var a=o.Worker;a&&T(a.prototype,Mt,r)}T(XMLHttpRequest.prototype,Et,r);var u=n.XMLHttpRequestEventTarget;u&&T(u&&u.prototype,Et,r),"undefined"!=typeof IDBIndex&&(T(IDBIndex.prototype,Ot,r),T(IDBRequest.prototype,Ot,r),T(IDBOpenDBRequest.prototype,Ot,r),T(IDBDatabase.prototype,Ot,r),T(IDBTransaction.prototype,Ot,r),T(IDBCursor.prototype,Ot,r)),e&&T(WebSocket.prototype,Pt,r)}else O(),c("XMLHttpRequest"),e&&w(t,n)}}function E(){if((J||$)&&!j(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var t=j(Element.prototype,"onclick");if(t&&!t.configurable)return!1}var n=XMLHttpRequest.prototype,e=j(n,"onreadystatechange");if(e){I(n,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}});var r=new XMLHttpRequest,o=!!r.onreadystatechange;return I(n,"onreadystatechange",e||{}),o}var i=H("fake");I(n,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[i]},set:function(t){this[i]=t}});var r=new XMLHttpRequest,a=function(){};r.onreadystatechange=a;var o=r[i]===a;return r.onreadystatechange=null,o}function O(){for(var t=0;t",this._properties=n&&n.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,n)}return r.assertZonePatched=function(){if(t.Promise!==P.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(r,"root",{get:function(){for(var t=r.current;t.parent;)t=t.parent;return t},enumerable:!0,configurable:!0}),Object.defineProperty(r,"current",{get:function(){return F.zone},enumerable:!0,configurable:!0}),Object.defineProperty(r,"currentTask",{get:function(){return j},enumerable:!0,configurable:!0}),r.__load_patch=function(o,i){if(P.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!t["__Zone_disable_"+o]){var a="Zone:"+o;n(a),P[o]=i(t,r,M),e(a,a)}},Object.defineProperty(r.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),r.prototype.get=function(t){var n=this.getZoneWith(t);if(n)return n._properties[t]},r.prototype.getZoneWith=function(t){for(var n=this;n;){if(n._properties.hasOwnProperty(t))return n;n=n._parent}return null},r.prototype.fork=function(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)},r.prototype.wrap=function(t,n){if("function"!=typeof t)throw new Error("Expecting function got: "+t);var e=this._zoneDelegate.intercept(this,t,n),r=this;return function(){return r.runGuarded(e,this,arguments,n)}},r.prototype.run=function(t,n,e,r){void 0===n&&(n=void 0),void 0===e&&(e=null),void 0===r&&(r=null),F={parent:F,zone:this};try{return this._zoneDelegate.invoke(this,t,n,e,r)}finally{F=F.parent}},r.prototype.runGuarded=function(t,n,e,r){void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),F={parent:F,zone:this};try{try{return this._zoneDelegate.invoke(this,t,n,e,r)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{F=F.parent}},r.prototype.runTask=function(t,n,e){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||m).name+"; Execution: "+this.name+")");if(t.state!==b||t.type!==O){var r=t.state!=w;r&&t._transitionTo(w,k),t.runCount++;var o=j;j=t,F={parent:F,zone:this};try{t.type==E&&t.data&&!t.data.isPeriodic&&(t.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,t,n,e)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{t.state!==b&&t.state!==T&&(t.type==O||t.data&&t.data.isPeriodic?r&&t._transitionTo(k,w):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(b,w,b))),F=F.parent,j=o}}},r.prototype.scheduleTask=function(t){if(t.zone&&t.zone!==this)for(var n=this;n;){if(n===t.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+t.zone.name);n=n.parent}t._transitionTo(_,b);var e=[];t._zoneDelegates=e,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(n){throw t._transitionTo(T,_,b),this._zoneDelegate.handleError(this,n),n}return t._zoneDelegates===e&&this._updateTaskCount(t,1),t.state==_&&t._transitionTo(k,_),t},r.prototype.scheduleMicroTask=function(t,n,e,r){return this.scheduleTask(new p(x,t,n,e,r,null))},r.prototype.scheduleMacroTask=function(t,n,e,r,o){return this.scheduleTask(new p(E,t,n,e,r,o))},r.prototype.scheduleEventTask=function(t,n,e,r,o){return this.scheduleTask(new p(O,t,n,e,r,o))},r.prototype.cancelTask=function(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||m).name+"; Execution: "+this.name+")");t._transitionTo(S,k,w);try{this._zoneDelegate.cancelTask(this,t)}catch(n){throw t._transitionTo(T,S),this._zoneDelegate.handleError(this,n),n}return this._updateTaskCount(t,-1),t._transitionTo(b,S),t.runCount=0,t},r.prototype._updateTaskCount=function(t,n){var e=t._zoneDelegates;-1==n&&(t._zoneDelegates=null);for(var r=0;r0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:t};this.hasTask(this.zone,i)}},t}(),p=function(){function n(e,r,o,i,a,u){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=e,this.source=r,this.data=i,this.scheduleFn=a,this.cancelFn=u,this.callback=o;var c=this;e===O&&i&&i.useG?this.invoke=n.invokeTask:this.invoke=function(){return n.invokeTask.call(t,c,this,arguments)}}return n.invokeTask=function(t,n,e){t||(t=this),I++;try{return t.runCount++,t.zone.runTask(t,n,e)}finally{1==I&&o(),I--}},Object.defineProperty(n.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),n.prototype.cancelScheduleRequest=function(){this._transitionTo(b,_)},n.prototype._transitionTo=function(t,n,e){if(this._state!==n&&this._state!==e)throw new Error(this.type+" '"+this.source+"': can not transition to '"+t+"', expecting state '"+n+"'"+(e?" or '"+e+"'":"")+", was '"+this._state+"'.");this._state=t,t==b&&(this._zoneDelegates=null)},n.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId:Object.prototype.toString.call(this)},n.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},n}(),h=a("setTimeout"),v=a("Promise"),d=a("then"),g=[],y=!1,m={name:"NO ZONE"},b="notScheduled",_="scheduling",k="scheduled",w="running",S="canceling",T="unknown",x="microTask",E="macroTask",O="eventTask",P={},M={symbol:a,currentZoneFrame:function(){return F},onUnhandledError:i,microtaskDrainDone:i,scheduleMicroTask:r,showUncaughtError:function(){return!c[a("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:i,patchMethod:function(){return i},bindArguments:function(){return null},setNativePromise:function(t){t&&"function"==typeof t.resolve&&(s=t.resolve(0))}},F={parent:null,zone:new c(null,null)},j=null,I=0;e("Zone","Zone"),t.Zone=c}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||t);/** 37 | * @license 38 | * Copyright Google Inc. All Rights Reserved. 39 | * 40 | * Use of this source code is governed by an MIT-style license that can be 41 | * found in the LICENSE file at https://angular.io/license 42 | */ 43 | Zone.__load_patch("ZoneAwarePromise",function(t,n,e){function r(t){if(t&&t.toString===Object.prototype.toString){var n=t.constructor&&t.constructor.name;return(n||"")+": "+JSON.stringify(t)}return t?t.toString():Object.prototype.toString.call(t)}function o(t){e.onUnhandledError(t);try{var r=n[_];r&&"function"==typeof r&&r.call(this,t)}catch(t){}}function i(t){return t&&t.then}function a(t){return t}function u(t){return I.reject(t)}function c(t,n){return function(e){try{s(t,n,e)}catch(n){s(t,!1,n)}}}function s(t,o,i){var a=P();if(t===i)throw new TypeError(M);if(t[k]===T){var u=null;try{"object"!=typeof i&&"function"!=typeof i||(u=i&&i.then)}catch(n){return a(function(){s(t,!1,n)})(),t}if(o!==E&&i instanceof I&&i.hasOwnProperty(k)&&i.hasOwnProperty(w)&&i[k]!==T)f(i),s(t,i[k],i[w]);else if(o!==E&&"function"==typeof u)try{u.call(i,a(c(t,o)),a(c(t,!1)))}catch(n){a(function(){s(t,!1,n)})()}else{t[k]=o;var p=t[w];if(t[w]=i,o===E&&i instanceof Error){var h=n.currentTask&&n.currentTask.data&&n.currentTask.data[b];h&&v(i,F,{configurable:!0,enumerable:!1,writable:!0,value:h})}for(var d=0;d0&&(t.push(e((new l).error)),i(t,n-1))}/** 86 | * @license 87 | * Copyright Google Inc. All Rights Reserved. 88 | * 89 | * Use of this source code is governed by an MIT-style license that can be 90 | * found in the LICENSE file at https://angular.io/license 91 | */ 92 | var a="\n",u={},c="STACKTRACE TRACKING",s="__SEP_TAG__",f=s+"@[native]",l=function(){function t(){this.error=v(),this.timestamp=new Date}return t}(),p=t(),h=n(),v=p.stack?t:h.stack?n:t;Zone.longStackTraceZoneSpec={name:"long-stack-trace",longStackTraceLimit:10,getLongStackTrace:function(t){if(t){var n=t[Zone.__symbol__("currentTaskTrace")];return n?o(n,t.stack):t.stack}},onScheduleTask:function(t,n,e,r){if(Error.stackTraceLimit>0){var o=Zone.currentTask,i=o&&o.data&&o.data.__creationTrace__||[];i=[new l].concat(i),i.length>this.longStackTraceLimit&&(i.length=this.longStackTraceLimit),r.data||(r.data={}),r.data.__creationTrace__=i}return t.scheduleTask(e,r)},onHandleError:function(t,n,e,r){if(Error.stackTraceLimit>0){var i=Zone.currentTask||r.task;if(r instanceof Error&&i){var a=o(i.data&&i.data.__creationTrace__,r.stack);try{r.stack=r.longStack=a}catch(t){}}}return t.handleError(e,r)}},function(){if(!(Error.stackTraceLimit<=0)){var t=[];i(t,2);for(var n=t[0],e=t[1],r=0;r 2 | 3 | 4 | 5 | Angular webpack AOT 6 | 7 | 8 | 9 | 10 | 11 | Loading AppComponent content here ... 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Angular-webpack-AOT", 3 | "version": "2.0.0", 4 | "description": "Angular-webpack-AOT,width AOT, lazy loader", 5 | "scripts": { 6 | "dev:aot": "npx webpack-dev-server --config webpack.aot.ts --color --progress", 7 | "dev": "npx webpack-dev-server --config webpack.config.js --color --open", 8 | "webpack:aot": "npx webpack --config webpack.aot.ts --colors", 9 | "build": "npm run webpack:aot" 10 | }, 11 | "keywords": [], 12 | "author": "", 13 | "license": "MIT", 14 | "dependencies": { 15 | "@angular/common": "^6.0.0-beta.5", 16 | "@angular/compiler": "6.0.0-beta.5", 17 | "@angular/compiler-cli": "6.0.0-beta.5", 18 | "@angular/core": "6.0.0-beta.5", 19 | "@angular/forms": "6.0.0-beta.5", 20 | "@angular/http": "6.0.0-beta.5", 21 | "@angular/platform-browser": "6.0.0-beta.5", 22 | "@angular/platform-browser-dynamic": "6.0.0-beta.5", 23 | "@angular/router": "6.0.0-beta.5", 24 | "bootstrap": "^4.0.0", 25 | "core-js": "^2.5.3", 26 | "d3": "^4.13.0", 27 | "echarts": "^4.0.2", 28 | "moment": "^2.20.1", 29 | "reflect-metadata": "^0.1.12", 30 | "rxjs": "5.5.6", 31 | "zone.js": "^0.8.20" 32 | }, 33 | "devDependencies": { 34 | "@angularclass/hmr": "^2.1.3", 35 | "@angularclass/hmr-loader": "^3.0.4", 36 | "@ngtools/webpack": "^1.10.1", 37 | "@types/d3": "^5.0.0", 38 | "@types/echarts": "0.0.12", 39 | "@types/node": "^6.0.101", 40 | "angular2-router-loader": "^0.3.5", 41 | "angular2-template-loader": "^0.6.2", 42 | "awesome-typescript-loader": "^3.5.0", 43 | "compression-webpack-plugin": "^1.1.6", 44 | "css-loader": "^0.28.10", 45 | "extract-text-webpack-plugin": "^3.0.2", 46 | "html-webpack-plugin": "^2.30.1", 47 | "raw-loader": "^0.5.1", 48 | "rimraf": "^2.6.2", 49 | "style-loader": "^0.20.2", 50 | "stylus": "^0.54.5", 51 | "stylus-loader": "^3.0.2", 52 | "to-string-loader": "^1.1.5", 53 | "typescript": "2.7.2", 54 | "webpack": "^3.11.0", 55 | "webpack-cli": "^2.0.9", 56 | "webpack-dev-server": "^3.0.0", 57 | "webpack-merge": "^4.1.2", 58 | "yargs": "^11.0.0" 59 | }, 60 | "repository": {} 61 | } 62 | -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Inject } from '@angular/core'; 2 | import { ActivatedRoute } from '@angular/router'; 3 | 4 | 5 | let routers = [ 6 | { path: '/home', nick: 'home' }, 7 | { path: '/tabs', nick: 'tabs' }, 8 | // { path: '/attrs', nick: '属性 Directive' }, 9 | // { path: '/host', nick: 'host' }, 10 | { path: '/colors', nick: 'color directive' }, 11 | // { path: '/dynamic', nick: '动态组件' }, 12 | // { path: '/viewchild', nick: 'viewchild' }, 13 | { path: '/http', nick: 'http' }, 14 | // { path: '/pagination', nick: '分页' }, 15 | // { path: '/dialog', nick: '模态框' }, 16 | { path: '/d3', nick: 'D3' }, 17 | { path: '/map', nick: 'map' }, 18 | { path: '/echarts', nick: 'Echarts' }, 19 | // { path: '/forms', nick: 'Forms' } 20 | { path: '/about', nick: 'About' } 21 | ]; 22 | 23 | 24 | @Component({ 25 | selector: 'my-app', 26 | styles: [ 27 | ` 28 | .content { 29 | box-sizing: border-box; 30 | margin: 20px auto; 31 | width: 70vw; 32 | padding: 30px 33 | } 34 | 35 | 36 | ` 37 | ], 38 | template: ` 39 |
40 | 41 |
42 | 43 |
44 | 45 |
46 |
47 | 48 |
49 | `, 50 | }) 51 | export class AppComponent { 52 | name = 'Angular'; 53 | routers = routers; 54 | 55 | constructor( @Inject(ActivatedRoute) public _route: ActivatedRoute) { 56 | console.log(this._route) 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { RouterModule } from '@angular/router'; 4 | 5 | 6 | import { AppComponent } from './app.component'; 7 | import { SideBarComponent } from './components/sidebar/sidebat.component'; 8 | import { HeaderComponent } from './components/header/header.component'; 9 | import { FooterComponent } from './components/footer/footer.component'; 10 | 11 | import { contactComponent } from './components/contact/contact.component'; 12 | 13 | import { DialogModule } from './components/dialog/dialog.module'; 14 | 15 | import { AdModule } from './dynamic-ad/ad.module' 16 | 17 | 18 | 19 | import { LoadScriptService } from './service/loadScript.service' 20 | import { BaiduMaptService } from './service/baiduMap.service' 21 | import { rootRouterConfig } from './app.router' 22 | @NgModule({ 23 | imports: [ 24 | BrowserModule, 25 | DialogModule, 26 | AdModule, 27 | RouterModule.forRoot(rootRouterConfig, { useHash: true }), 28 | ], 29 | declarations: [ 30 | AppComponent, 31 | SideBarComponent, 32 | HeaderComponent, 33 | FooterComponent, 34 | contactComponent 35 | ], 36 | providers: [LoadScriptService, BaiduMaptService], 37 | bootstrap: [AppComponent] 38 | }) 39 | export class AppModule { 40 | } 41 | -------------------------------------------------------------------------------- /src/app/app.router.ts: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router'; 2 | 3 | // import { AboutComponent } from './components/about/about.component'; 4 | import { contactComponent } from './components/contact/contact.component'; 5 | import { HomeModule } from './components/home/home.module'; 6 | 7 | 8 | import { ListComponent } from './components/home/list/list.component'; 9 | import { DetailComponent } from './components/home/detail/detail.component'; 10 | 11 | 12 | export const rootRouterConfig: Routes = [ 13 | { path: '', redirectTo: 'contact', pathMatch: 'full' }, 14 | { path: 'contact', component: contactComponent }, 15 | 16 | { path: 'home', loadChildren: './components/home/home.module#HomeModule' }, 17 | { path: 'about', loadChildren: './components/about/about.module#AboutModule' }, 18 | { path: 'news', loadChildren: './components/news/news.module#NewsModule' }, 19 | 20 | 21 | { path: 'colors', loadChildren: './components/colors/colors.module#ColorsModule' }, 22 | { path: 'tabs', loadChildren: './components/tabs/tabs.module#TabsModule' }, 23 | { path: 'http', loadChildren: './components/http/http.module#Http_Module' }, 24 | { path: 'd3', loadChildren: './components/d3/d3.module#D3Module' }, 25 | { path: 'map', loadChildren: './components/map/baidu_map.module#BaiduMapModule' }, 26 | { path: 'echarts', loadChildren: './components/echarts/echarts.module#EchartsModule' }, 27 | { path: 'ngcontent', loadChildren: './components/ngcontent/ngcontent.module#NgcontentModule'}, 28 | { path: 'range', loadChildren: './components/range/range.module#RangeModule'} 29 | ]; -------------------------------------------------------------------------------- /src/app/components/about/about.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'about', 5 | template: ` 6 |

about page

7 | ` 8 | }) 9 | export class AboutComponent implements OnInit { 10 | constructor() { } 11 | 12 | ngOnInit() { } 13 | 14 | } -------------------------------------------------------------------------------- /src/app/components/about/about.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule } from '@angular/router'; 3 | 4 | import { AboutComponent } from './about.component'; 5 | 6 | @NgModule({ 7 | imports: [RouterModule.forChild([ 8 | { 9 | path: '', component: AboutComponent 10 | } 11 | ])], 12 | exports: [], 13 | declarations: [AboutComponent], 14 | providers: [], 15 | }) 16 | export class AboutModule { } 17 | -------------------------------------------------------------------------------- /src/app/components/colors/colors.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'colors', 5 | template: ` 6 |

红色文字

7 |

蓝色文字

8 |

蓝色文字

9 | 10 |

黑色文字 点击更换文字颜色 {{myColor}}

11 | 12 | ` 13 | }) 14 | 15 | export class ColorsComponent{ 16 | myColor: string = '#333'; 17 | 18 | setColor(){ 19 | this.myColor = this.myColor == 'red' ? '#999' : 'red'; 20 | console.log(this.myColor) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/app/components/colors/colors.directive.ts: -------------------------------------------------------------------------------- 1 | import {Directive, Input, ElementRef, Renderer , HostBinding, HostListener} from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: '[color]' 5 | }) 6 | 7 | export class ColorDirective { 8 | private _element: HTMLElement; 9 | private _defaultColor:string = 'yellow'; 10 | @Input() color: string; 11 | 12 | constructor(elRef: ElementRef, private _render: Renderer){ 13 | this._element = elRef.nativeElement; 14 | } 15 | 16 | @HostBinding('style.color' ) get c() { return this.color || this._defaultColor}; 17 | 18 | @HostListener('mouseenter') onMouseEnter(){ 19 | this._render.setElementStyle(this._element, 'color', 'green'); 20 | } 21 | @HostListener('mouseleave') onMouseLeave(){ 22 | this._render.setElementStyle(this._element, 'color', this.color); 23 | } 24 | 25 | // ngOnInit(){ 26 | // this._render.setElementStyle(this._ele.nativeElement, 'color', this.color); 27 | // } 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/app/components/colors/colors.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule } from '@angular/router'; 3 | 4 | import { ColorsComponent } from './colors.component'; 5 | import { ColorDirective } from './colors.directive' 6 | 7 | @NgModule({ 8 | imports: [RouterModule.forChild([{path: '', component: ColorsComponent}])], 9 | exports: [], 10 | declarations: [ColorsComponent, ColorDirective], 11 | providers: [], 12 | }) 13 | export class ColorsModule { } 14 | -------------------------------------------------------------------------------- /src/app/components/contact/contact.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'contact', 5 | template: ` 6 |

contact page

7 | 8 | 9 | ` 10 | }) 11 | export class contactComponent implements OnInit { 12 | constructor() { } 13 | 14 | ngOnInit() { } 15 | 16 | } -------------------------------------------------------------------------------- /src/app/components/d3/d3.module.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ElementRef, NgModule } from '@angular/core'; 2 | import { RouterModule } from '@angular/router'; 3 | 4 | import { LoadScriptService } from '../../service/loadScript.service' 5 | // import * as d3 from 'd3'; 6 | 7 | @Component({ 8 | selector: 'd3-demo', 9 | template: '' 10 | }) 11 | export class D3Component implements OnInit { 12 | constructor(private _elRef: ElementRef, private _loadScript: LoadScriptService) { 13 | 14 | } 15 | 16 | ngOnInit() { 17 | let src = 'https://unpkg.com/d3@4.4.0' 18 | this._loadScript.load(src).then(() => { 19 | console.log('done') 20 | 21 | this.initD3(window['d3']) 22 | }) 23 | 24 | console.log(this._elRef); 25 | 26 | 27 | } 28 | 29 | initD3(d3) { 30 | let test = d3.select(this._elRef.nativeElement); 31 | 32 | test. 33 | append('div') 34 | .html('d3 生成') 35 | .style("background-color", "#1be2a6") 36 | .style('padding', '1rem') 37 | } 38 | 39 | } 40 | 41 | @NgModule({ 42 | imports: [RouterModule.forChild([{ path: '', component: D3Component }])], 43 | declarations: [D3Component] 44 | }) 45 | export class D3Module { } -------------------------------------------------------------------------------- /src/app/components/dialog/dialog.component.ts: -------------------------------------------------------------------------------- 1 | import { 2 | NgModule, 3 | Component, 4 | Directive, 5 | ViewContainerRef, 6 | ComponentRef, 7 | ComponentFactoryResolver, 8 | ViewChild, 9 | AfterViewInit, 10 | Compiler, 11 | ComponentFactory 12 | } from '@angular/core'; 13 | 14 | 15 | 16 | @Component({ 17 | selector: 'dialog-demo', 18 | template: ` 19 |
20 | 21 |
22 |
Open dialog box
23 | `, 24 | styles: [` 25 | :host { 26 | display: flex; 27 | justify-content: center 28 | } 29 | .open-button { 30 | padding: 5px; 31 | border: 1px solid black; 32 | cursor: pointer; 33 | } 34 | `] 35 | }) 36 | 37 | export class DialogComponent implements AfterViewInit { 38 | 39 | @ViewChild('container', { read: ViewContainerRef }) container: ViewContainerRef; 40 | 41 | tpl:string; 42 | 43 | constructor(public compiler: Compiler) { 44 | 45 | } 46 | 47 | openDialogBox() { 48 | let tpl = this.tpl || '

Dynamic Module!

' 49 | this.addComponent(tpl); 50 | } 51 | 52 | ngAfterViewInit() { 53 | 54 | 55 | } 56 | 57 | addComponent(template: string) { 58 | 59 | 60 | @Component({ template: template }) 61 | class TemplateComponent { } 62 | 63 | @NgModule({ 64 | declarations: [TemplateComponent] 65 | }) 66 | class TemplateModule { } 67 | 68 | const mod = this.compiler.compileModuleAndAllComponentsSync(TemplateModule); 69 | const factory = mod.componentFactories.find(comp => { 70 | return comp.componentType == TemplateComponent 71 | }); 72 | const compoent = this.container.createComponent(factory); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/app/components/dialog/dialog.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { DialogComponent } from './dialog.component'; 3 | import { FormsModule } from '@angular/forms' 4 | 5 | @NgModule({ 6 | imports: [FormsModule], 7 | declarations: [ DialogComponent ], 8 | exports: [DialogComponent] 9 | 10 | }) 11 | 12 | export class DialogModule {} -------------------------------------------------------------------------------- /src/app/components/echarts/echarts.module.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, AfterViewInit, ElementRef, Renderer, NgModule } from '@angular/core'; 2 | import { RouterModule } from '@angular/router'; 3 | 4 | import * as echarts from 'echarts'; 5 | import { option } from './options'; 6 | 7 | @Component({ 8 | selector: 'echarts-demo', 9 | template: '' 10 | }) 11 | export class EchartsComponent implements OnInit { 12 | ele:any = null; 13 | 14 | constructor(private _elRef: ElementRef, private _rn: Renderer) { 15 | this.ele = _elRef.nativeElement; 16 | 17 | } 18 | 19 | ngOnInit() { 20 | this.initEcharts(); 21 | 22 | } 23 | 24 | initEcharts(){ 25 | // var div = this.ele.querySelector('div'); 26 | 27 | this._rn.setElementStyle(this.ele, 'color', 'green'); 28 | this._rn.setElementStyle(this.ele, 'width', '800px'); 29 | this._rn.setElementStyle(this.ele, 'height', '600px'); 30 | 31 | 32 | var myChart = echarts.init(this.ele); 33 | 34 | console.log(myChart) 35 | 36 | // 指定图表的配置项和数据 37 | // var option = { 38 | // title: { 39 | // text: 'ECharts 入门示例' 40 | // }, 41 | // tooltip: {}, 42 | // legend: { 43 | // data:['销量'] 44 | // }, 45 | // xAxis: { 46 | // data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"] 47 | // }, 48 | // yAxis: {}, 49 | // series: [{ 50 | // name: '销量', 51 | // type: 'bar', 52 | // data: [5, 20, 36, 10, 10, 20] 53 | // }] 54 | // }; 55 | 56 | setInterval(function (){ 57 | option.series[0].data[0].value = (Math.random()*100).toFixed(2) - 0; 58 | option.series[1].data[0].value = (Math.random()*7).toFixed(2) - 0; 59 | option.series[2].data[0].value = (Math.random()*2).toFixed(2) - 0; 60 | option.series[3].data[0].value = (Math.random()*2).toFixed(2) - 0; 61 | myChart.setOption(option,true); 62 | },2000); 63 | 64 | myChart.setOption(option); 65 | 66 | myChart.on('click', (params: any) => { 67 | console.log(params) 68 | }) 69 | } 70 | 71 | } 72 | 73 | 74 | @NgModule({ 75 | imports: [RouterModule.forChild([{path: '', component: EchartsComponent}])], 76 | declarations: [EchartsComponent] 77 | }) 78 | export class EchartsModule {} -------------------------------------------------------------------------------- /src/app/components/echarts/options.ts: -------------------------------------------------------------------------------- 1 | export const option = { 2 | tooltip : { 3 | formatter: "{a}
{c} {b}" 4 | }, 5 | toolbox: { 6 | show: true, 7 | feature: { 8 | restore: {show: true}, 9 | saveAsImage: {show: true} 10 | } 11 | }, 12 | series : [ 13 | { 14 | name: '速度', 15 | type: 'gauge', 16 | z: 3, 17 | min: 0, 18 | max: 220, 19 | splitNumber: 11, 20 | radius: '50%', 21 | axisLine: { // 坐标轴线 22 | lineStyle: { // 属性lineStyle控制线条样式 23 | width: 10 24 | } 25 | }, 26 | axisTick: { // 坐标轴小标记 27 | length: 15, // 属性length控制线长 28 | lineStyle: { // 属性lineStyle控制线条样式 29 | color: 'auto' 30 | } 31 | }, 32 | splitLine: { // 分隔线 33 | length: 20, // 属性length控制线长 34 | lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式 35 | color: 'auto' 36 | } 37 | }, 38 | title : { 39 | textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE 40 | fontWeight: 'bolder', 41 | fontSize: 20, 42 | fontStyle: 'italic' 43 | } 44 | }, 45 | detail : { 46 | textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE 47 | fontWeight: 'bolder' 48 | } 49 | }, 50 | data:[{value: 40, name: 'km/h'}] 51 | }, 52 | { 53 | name: '转速', 54 | type: 'gauge', 55 | center: ['20%', '55%'], // 默认全局居中 56 | radius: '35%', 57 | min:0, 58 | max:7, 59 | endAngle:45, 60 | splitNumber:7, 61 | axisLine: { // 坐标轴线 62 | lineStyle: { // 属性lineStyle控制线条样式 63 | width: 8 64 | } 65 | }, 66 | axisTick: { // 坐标轴小标记 67 | length:12, // 属性length控制线长 68 | lineStyle: { // 属性lineStyle控制线条样式 69 | color: 'auto' 70 | } 71 | }, 72 | splitLine: { // 分隔线 73 | length:20, // 属性length控制线长 74 | lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式 75 | color: 'auto' 76 | } 77 | }, 78 | pointer: { 79 | width:5 80 | }, 81 | title: { 82 | offsetCenter: [0, '-30%'], // x, y,单位px 83 | }, 84 | detail: { 85 | textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE 86 | fontWeight: 'bolder' 87 | } 88 | }, 89 | data:[{value: 1.5, name: 'x1000 r/min'}] 90 | }, 91 | { 92 | name: '油表', 93 | type: 'gauge', 94 | center: ['77%', '50%'], // 默认全局居中 95 | radius: '25%', 96 | min: 0, 97 | max: 2, 98 | startAngle: 135, 99 | endAngle: 45, 100 | splitNumber: 2, 101 | axisLine: { // 坐标轴线 102 | lineStyle: { // 属性lineStyle控制线条样式 103 | width: 8 104 | } 105 | }, 106 | axisTick: { // 坐标轴小标记 107 | splitNumber: 5, 108 | length: 10, // 属性length控制线长 109 | lineStyle: { // 属性lineStyle控制线条样式 110 | color: 'auto' 111 | } 112 | }, 113 | axisLabel: { 114 | formatter:function(v:any){ 115 | switch (v + '') { 116 | case '0' : return 'E'; 117 | case '1' : return 'Gas'; 118 | case '2' : return 'F'; 119 | } 120 | } 121 | }, 122 | splitLine: { // 分隔线 123 | length: 15, // 属性length控制线长 124 | lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式 125 | color: 'auto' 126 | } 127 | }, 128 | pointer: { 129 | width:2 130 | }, 131 | title : { 132 | show: false 133 | }, 134 | detail : { 135 | show: false 136 | }, 137 | data:[{value: 0.5, name: 'gas'}] 138 | }, 139 | { 140 | name: '水表', 141 | type: 'gauge', 142 | center : ['77%', '50%'], // 默认全局居中 143 | radius : '25%', 144 | min: 0, 145 | max: 2, 146 | startAngle: 315, 147 | endAngle: 225, 148 | splitNumber: 2, 149 | axisLine: { // 坐标轴线 150 | lineStyle: { // 属性lineStyle控制线条样式 151 | width: 8 152 | } 153 | }, 154 | axisTick: { // 坐标轴小标记 155 | show: false 156 | }, 157 | axisLabel: { 158 | formatter:function(v:any){ 159 | switch (v + '') { 160 | case '0' : return 'H'; 161 | case '1' : return 'Water'; 162 | case '2' : return 'C'; 163 | } 164 | } 165 | }, 166 | splitLine: { // 分隔线 167 | length: 15, // 属性length控制线长 168 | lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式 169 | color: 'auto' 170 | } 171 | }, 172 | pointer: { 173 | width:2 174 | }, 175 | title: { 176 | show: false 177 | }, 178 | detail: { 179 | show: false 180 | }, 181 | data:[{value: 0.5, name: 'gas'}] 182 | } 183 | ] 184 | }; -------------------------------------------------------------------------------- /src/app/components/footer/footer.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import {Component} from '@angular/core'; 3 | 4 | @Component({ 5 | selector: 'Footer', 6 | template: ` 7 | 10 | ` 11 | }) 12 | 13 | export class FooterComponent{} 14 | -------------------------------------------------------------------------------- /src/app/components/header/header.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import {Component} from '@angular/core'; 3 | 4 | @Component({ 5 | selector: 'Header', 6 | template: ` 7 |
8 |
9 | 30 |

Kunl's Angular demo

31 |
32 |
33 | ` 34 | }) 35 | 36 | export class HeaderComponent{ 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/app/components/home/detail/detail.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, Inject } from '@angular/core'; 2 | import { ActivatedRoute, Router } from '@angular/router'; 3 | 4 | import {Observable} from 'rxjs/Rx'; 5 | 6 | @Component({ 7 | selector: 'detail', 8 | template: ` 9 |

detail {{id}} page

10 | 11 | ` 12 | }) 13 | export class DetailComponent implements OnInit { 14 | id:number; 15 | 16 | constructor( @Inject(ActivatedRoute) public _route: ActivatedRoute, @Inject(Router) public _router: Router) { 17 | } 18 | 19 | goBack(){ 20 | this._router.navigate(['/home']) 21 | } 22 | ngOnInit() { 23 | this._route.params.map(p => p['id']).subscribe(params => { 24 | this.id = params 25 | }) 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/app/components/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { ActivatedRoute } from '@angular/router'; 3 | 4 | @Component({ 5 | selector: 'home', 6 | styles: [ 7 | ` 8 | home { 9 | overflow: hidden; 10 | } 11 | .list { 12 | width: 30%; 13 | margin-right: 20px; 14 | border-right: 1px solid #ccc; 15 | } 16 | .list, .detail { 17 | display: inline-block; 18 | vertical-align: top 19 | } 20 | 21 | ` 22 | ], 23 | template: ` 24 |

home page

25 |
26 | 27 |
28 |
29 | 30 |
31 | ` 32 | }) 33 | export class HomeComponent implements OnInit { 34 | 35 | 36 | ngOnInit() { } 37 | 38 | } -------------------------------------------------------------------------------- /src/app/components/home/home.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { RouterModule } from '@angular/router'; 4 | 5 | import { RouterConfig } from './home.router' 6 | 7 | import { HomeComponent } from './home.component'; 8 | import { ListComponent } from './list/list.component'; 9 | import { DetailComponent } from './detail/detail.component'; 10 | @NgModule({ 11 | imports: [ CommonModule, 12 | // RouterModule 13 | RouterModule.forChild(RouterConfig) 14 | ], 15 | declarations: [ HomeComponent, ListComponent, DetailComponent ], 16 | exports: [ HomeComponent ], 17 | bootstrap: [ ] 18 | }) 19 | export class HomeModule { } 20 | -------------------------------------------------------------------------------- /src/app/components/home/home.router.ts: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router'; 2 | 3 | import { HomeComponent } from './home.component'; 4 | import { ListComponent } from './list/list.component'; 5 | import { DetailComponent } from './detail/detail.component'; 6 | 7 | export const RouterConfig: Routes = [ 8 | 9 | 10 | { 11 | path: '', component: HomeComponent, 12 | children: [ 13 | { path: 'detail/:id', component: DetailComponent }, 14 | 15 | ] 16 | }, 17 | 18 | 19 | ]; -------------------------------------------------------------------------------- /src/app/components/home/list/list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | @Component({ 3 | selector: 'list', 4 | styles: [ 5 | ` 6 | a{ 7 | padding: 0 10px; 8 | } 9 | a.active{ 10 | color: #fff; 11 | background: pink 12 | } 13 | ` 14 | ], 15 | template: ` 16 | 23 | 24 | ` 25 | }) 26 | export class ListComponent implements OnInit { 27 | 28 | public list: number[] = [ 29 | 1, 2, 3, 4, 5, 6, 7 30 | ] 31 | constructor() { } 32 | 33 | ngOnInit() { } 34 | 35 | } -------------------------------------------------------------------------------- /src/app/components/http/http.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 |
6 |
7 |
8 |
9 | {{it.name}} 10 |
11 |

{{it.createdAt | moment_pipe : 'YYYY-MM-DD, h:mm:ss' }}

12 |

{{it.name}}/{{it.age}}

13 |

Some quick example text to build on the card title and make up the bulk of the card's content.

14 | 15 | 编辑 16 | 17 |
18 |
19 |
20 | 21 |
22 |
-------------------------------------------------------------------------------- /src/app/components/http/http.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | import { UserComponent, User } from './user/user.component'; 4 | import { HttpService } from './http.service'; 5 | 6 | @Component({ 7 | selector: 'http', 8 | templateUrl: 'http.component.html', 9 | styles: [` 10 | .card-img-top{ 11 | max-height: 100px; 12 | } 13 | .input-group-addon { 14 | width: 80px 15 | } 16 | .input-group { 17 | margin-bottom: 16px 18 | } 19 | `] 20 | }) 21 | 22 | export class HttpComponent implements OnInit { 23 | users: User[] = []; 24 | 25 | 26 | constructor(private http_service: HttpService) { 27 | 28 | } 29 | 30 | ngOnInit() { 31 | console.log(1) 32 | this.http_service.getUsers().subscribe(data => this.users = data); 33 | } 34 | 35 | del(it:User){ 36 | 37 | this.http_service.del(it.id).subscribe( 38 | data => {this.users = this.users.filter(item => item!=it)}, 39 | 40 | err => alert(err) 41 | ); 42 | } 43 | 44 | 45 | } -------------------------------------------------------------------------------- /src/app/components/http/http.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { HttpModule} from '@angular/http'; 4 | import { FormsModule } from '@angular/forms'; 5 | import { RouterModule } from '@angular/router'; 6 | 7 | 8 | import { HttpService } from './http.service'; 9 | import { HttpComponent } from './http.component'; 10 | import { UserComponent } from './user/user.component'; 11 | 12 | import { ImgPipe } from './img.pipe' 13 | import { PipeModule } from '../../pipes/pipe.module'; 14 | 15 | @NgModule({ 16 | imports: [RouterModule.forChild([ 17 | { 18 | path: '', component: HttpComponent, 19 | children: [ 20 | // { path: '', redirectTo: 'list', pathMatch: 'full' }, 21 | { path: 'list', component: HttpComponent}, 22 | { path: 'user/:id', component: UserComponent } 23 | ] 24 | } 25 | ]),HttpModule, CommonModule, FormsModule, PipeModule], 26 | 27 | declarations: [HttpComponent, UserComponent, ImgPipe], 28 | providers: [HttpService] 29 | }) 30 | 31 | export class Http_Module { 32 | 33 | } -------------------------------------------------------------------------------- /src/app/components/http/http.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Http, Response } from '@angular/http'; 3 | 4 | import { Observable } from 'rxjs/Rx'; 5 | 6 | import { User } from './user/user.component'; 7 | 8 | @Injectable() 9 | export class HttpService { 10 | 11 | url = 'http://5737ef8cc0a1be11000e6895.mockapi.io/' 12 | 13 | users = this.url + 'users'; 14 | 15 | constructor(private http: Http) { 16 | 17 | } 18 | 19 | getUsers(): Observable{ 20 | return this.http.get( this.users).map(res => res.json()); 21 | } 22 | 23 | getUserPromise(): Promise{ 24 | return this.http.get( this.users).toPromise().then(response => response.json().data as User[]) 25 | } 26 | 27 | getUser(id:string): Observable{ 28 | return this.http.get(this.users +`/${id}`).map(res => res.json()); 29 | } 30 | 31 | del(id:string){ 32 | return this.http.delete(this.users + `/${id}`).map(res => res.json()); 33 | } 34 | } -------------------------------------------------------------------------------- /src/app/components/http/img.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | @Pipe({ 4 | name: 'img_pipe' 5 | }) 6 | 7 | export class ImgPipe implements PipeTransform { 8 | transform(value: any, args: any[]): any { 9 | let no_img_url = 'http://tva4.sinaimg.cn/crop.8.26.613.613.180/6efef90djw8eo4z1ul47zj20hs0hsjsc.jpg' 10 | if(value){ 11 | return value.match('^http*') ? value : no_img_url; 12 | }else{ 13 | return no_img_url; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/app/components/http/user/user.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | name 5 | 6 |
7 | 8 |
9 | age 10 | 11 |
12 | 13 |
14 | image 15 | 16 |
17 | 18 | 19 |
20 |
21 | 22 | -------------------------------------------------------------------------------- /src/app/components/http/user/user.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, Input } from '@angular/core'; 2 | import { ActivatedRoute } from '@angular/router'; 3 | 4 | import { HttpService } from '../http.service'; 5 | import { User } from '../../../model/'; 6 | export { User } 7 | 8 | @Component({ 9 | selector: 'user', 10 | templateUrl: 'user.component.html' 11 | }) 12 | export class UserComponent implements OnInit { 13 | private id: string = '10'; 14 | user: User = { 15 | name: '', 16 | age: 0, 17 | imageUrl: '', 18 | createdAt: 0, 19 | id: '' 20 | }; 21 | 22 | constructor(private _service: HttpService, public _route: ActivatedRoute) { 23 | // console.log(_route) 24 | // console.log('当前的 id:',.getParam('id')) 25 | // this.id = params.getParam('id'); 26 | } 27 | 28 | 29 | 30 | ngOnInit() { 31 | this._route.params.map(params => params['id']) 32 | .subscribe(id => { 33 | this.getUserById(id); 34 | }) 35 | } 36 | 37 | getUserById(id) { 38 | this._service.getUser(id).subscribe(user => { 39 | this.user = user 40 | console.log(user) 41 | }); 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /src/app/components/map/baidu_map.module.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ElementRef, NgModule } from '@angular/core'; 2 | import { RouterModule } from '@angular/router'; 3 | 4 | import { BaiduMaptService } from '../../service/baiduMap.service' 5 | // import * as d3 from 'd3'; 6 | 7 | @Component({ 8 | selector: 'baidu-demo', 9 | styles: [` 10 | #map { 11 | width: 400px; 12 | height: 400px; 13 | } 14 | `], 15 | template: ` 16 |
17 | ` 18 | }) 19 | export class BaiduMapComponent implements OnInit { 20 | constructor(private _elRef: ElementRef, private _baiduMap: BaiduMaptService) { 21 | 22 | } 23 | 24 | ngOnInit() { 25 | let key = 'C78b0c2c170e47e6f8e074e592785837'; 26 | 27 | let src = 'http://api.map.baidu.com/api?v=2.0&ak=${key}&callback=initialize' 28 | 29 | this._baiduMap.init(key).then(() => { 30 | this.initMap(window['BMap']) 31 | }) 32 | 33 | } 34 | 35 | initMap(BMap) { 36 | var map = new BMap.Map("map"); // 创建地图实例 37 | var point = new BMap.Point(116.404, 39.915); // 创建点坐标 38 | map.centerAndZoom(point, 15); 39 | map.enableScrollWheelZoom(true); 40 | map.addControl(new BMap.ScaleControl()); // 右下比例尺 41 | map.setDefaultCursor("Crosshair");//鼠标样式 42 | } 43 | 44 | } 45 | 46 | @NgModule({ 47 | imports: [RouterModule.forChild([{ path: '', component: BaiduMapComponent }])], 48 | declarations: [BaiduMapComponent] 49 | }) 50 | export class BaiduMapModule { } -------------------------------------------------------------------------------- /src/app/components/news/news.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'news', 5 | template: ` 6 |

news page

7 | ` 8 | }) 9 | export class NewsComponent implements OnInit { 10 | constructor() { } 11 | 12 | ngOnInit() { } 13 | 14 | } -------------------------------------------------------------------------------- /src/app/components/news/news.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule } from '@angular/router'; 3 | 4 | import { NewsComponent } from './news.component'; 5 | 6 | @NgModule({ 7 | imports: [ 8 | RouterModule.forChild([ 9 | { 10 | path: '', component: NewsComponent 11 | } 12 | ]) 13 | ], 14 | declarations: [ NewsComponent ] 15 | }) 16 | export class NewsModule { } 17 | -------------------------------------------------------------------------------- /src/app/components/ngcontent/ngcontent.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ContentChild, TemplateRef } from '@angular/core'; 2 | 3 | let num = 0; 4 | 5 | @Component({ 6 | selector: 'counter', 7 | template: '

{{this.id}}

' 8 | }) 9 | 10 | export class CounterComponent { 11 | id: number 12 | 13 | constructor() { 14 | this.id = ++num; 15 | } 16 | } 17 | 18 | @Component({ 19 | selector: 'wrapper', 20 | template: ` 21 |
22 | 23 | 外部 24 | 25 | 26 | 27 | 28 |
29 | 30 |
31 | ` 32 | }) 33 | export class WrapperContent { 34 | @ContentChild(TemplateRef) template: TemplateRef; 35 | } 36 | 37 | @Component({ 38 | template: ` 39 | 40 | 41 | 42 | 43 |
44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |
58 | ` 59 | }) 60 | export class NgcontentComponent{} -------------------------------------------------------------------------------- /src/app/components/ngcontent/ngcontent.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { RouterModule } from '@angular/router'; 3 | import { NgModule } from '@angular/core'; 4 | import { CounterComponent, WrapperContent, NgcontentComponent } from './ngcontent.component'; 5 | @NgModule({ 6 | imports: [ 7 | CommonModule, 8 | RouterModule.forChild([ 9 | { 10 | path: '', 11 | component: NgcontentComponent 12 | } 13 | ]) 14 | ], 15 | declarations: [ 16 | CounterComponent, 17 | WrapperContent, 18 | NgcontentComponent 19 | ] 20 | }) 21 | export class NgcontentModule {} -------------------------------------------------------------------------------- /src/app/components/range/range.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { Directive, Input, ViewContainerRef, TemplateRef, NgModule, Component } from '@angular/core'; 3 | @Directive({ 4 | selector: '[range]' 5 | }) 6 | export class RangeDirective { 7 | _range: number[] 8 | 9 | @Input() 10 | set range(value: number) { 11 | this.vcr.clear(); 12 | this._range = this.generateRange(value[0], value[1]); 13 | 14 | this._range.forEach(num => { 15 | this.vcr.createEmbeddedView(this.tpl, { 16 | $implicit: num 17 | }) 18 | }) 19 | 20 | } 21 | 22 | constructor( 23 | private vcr: ViewContainerRef, 24 | private tpl: TemplateRef 25 | ){} 26 | 27 | 28 | private generateRange(from: number, to: number) : number[] { 29 | let numbers: number[] = []; 30 | 31 | for(let i = from; i<= to; i++) { 32 | numbers.push(i); 33 | } 34 | return numbers; 35 | } 36 | 37 | } 38 | 39 | 40 | @Component({ 41 | selector: 'app-range', 42 | template: ` 43 |
44 | 45 |

Your age:

46 | 51 | 52 |
53 | ` 54 | }) 55 | export class RangeComponent {} 56 | 57 | @NgModule({ 58 | imports: [CommonModule], 59 | declarations: [ 60 | RangeDirective, 61 | RangeComponent 62 | ], 63 | exports: [RangeComponent], 64 | schemas: [] 65 | }) 66 | export class RangeModule {} -------------------------------------------------------------------------------- /src/app/components/sidebar/sidebat.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'side-bar', 5 | styles: [ 6 | ` 7 | a{ 8 | display: block; 9 | text-decoration: none; 10 | margin-right: 20px; 11 | padding: 2px 10px; 12 | border-bottom: 1px solid transparent; 13 | } 14 | 15 | .side-list { 16 | margin-right: -1px; 17 | } 18 | .list-group-item { 19 | margin-bottom: -1px; 20 | border: 1px solid #ccc; 21 | } 22 | 23 | .list-group-item.active { 24 | background: rgba(111, 111, 111, .06) 25 | } 26 | 27 | ` 28 | ], 29 | template: ` 30 | 37 | 38 | ` 39 | }) 40 | export class SideBarComponent { 41 | 42 | @Input() sidebar; 43 | } -------------------------------------------------------------------------------- /src/app/components/tabs/tab.directive.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, Input, AfterContentInit, ContentChildren, QueryList } from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'tab', 6 | template: ` 7 |
8 | 9 |
10 | ` 11 | }) 12 | 13 | export class TabDirective { 14 | @Input('tabTitle') title: string; 15 | @Input() active = false; 16 | } 17 | 18 | 19 | @Component({ 20 | selector: 'tabs', 21 | template: ` 22 |
23 | 26 |
27 |
28 |
29 | 30 |
31 |
32 | ` 33 | }) 34 | 35 | 36 | export class TabsDirective implements AfterContentInit { 37 | // 获取所有 TabComponent 38 | @ContentChildren(TabDirective) tabs: QueryList; 39 | 40 | ngAfterContentInit() { 41 | 42 | let activeTabs = this.tabs.filter((tab)=>tab.active); 43 | // content 初始化之后,判断是否有默认显示的 tab 44 | if(activeTabs.length === 0) { 45 | this.selectTab(this.tabs.first); 46 | } 47 | 48 | } 49 | 50 | selectTab(tab: TabDirective){ 51 | 52 | // 隐藏所有 53 | this.tabs.map(tab => tab.active = false); 54 | // 显示当前 55 | tab.active = true; 56 | } 57 | 58 | } 59 | 60 | 61 | export const TABS_DIRECTIVES = [TabsDirective, TabDirective]; -------------------------------------------------------------------------------- /src/app/components/tabs/tabs.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'tabs-demo', 6 | template: ` 7 | 8 | 9 | 我市最近几天出现强降雨
10 | 我市最近几天出现强降雨
11 | 我市最近几天出现强降雨
12 | 我市最近几天出现强降雨 13 |
14 | 15 | 下周我市将正式开启夏天模式
16 | 下周我市将正式开启夏天模式
17 | 下周我市将正式开启夏天模式
18 | 下周我市将正式开启夏天模式 19 |
20 | 21 | 五月多雨闷热
22 | 五月多雨闷热
23 | 五月多雨闷热
24 | 五月多雨闷热 25 |
26 |
27 | https://github.com/kunl/ng2/blob/gh-pages/app/example/tabs/tabs.demo.ts 28 | https://github.com/kunl/ng2/blob/gh-pages/app/component/tabs/tabs.component.ts 29 | ` 30 | }) 31 | 32 | export class TabsComponent{} -------------------------------------------------------------------------------- /src/app/components/tabs/tabs.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import { RouterModule } from '@angular/router'; 4 | 5 | import {TabsComponent} from './tabs.component'; 6 | import {TABS_DIRECTIVES} from './tab.directive'; 7 | 8 | 9 | @NgModule({ 10 | imports: [CommonModule, 11 | RouterModule.forChild([ 12 | {path: '', component: TabsComponent} 13 | ])], 14 | declarations: [ TabsComponent, TABS_DIRECTIVES], 15 | exports: [ TabsComponent ] 16 | }) 17 | 18 | export class TabsModule {} -------------------------------------------------------------------------------- /src/app/dynamic-ad/ad-banner.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, AfterViewInit, ViewChild, ComponentFactoryResolver, OnDestroy, ChangeDetectorRef } from '@angular/core'; 2 | 3 | import { AdItem } from './ad-item'; 4 | import { AdDirective } from './ad.directive'; 5 | 6 | @Component({ 7 | selector: 'ad-banner', 8 | template: ` 9 |
10 |

侧栏广告位

11 | 12 |
13 | ` 14 | }) 15 | 16 | export class AdBannerComponent implements AfterViewInit, OnDestroy { 17 | interval: any; 18 | @Input() ads: AdItem[]; 19 | currentAddIndex: number = -1; 20 | @ViewChild(AdDirective) adHost: AdDirective; 21 | 22 | constructor(private _componentFactoryResolver: ComponentFactoryResolver, private _cdr: ChangeDetectorRef) { } 23 | 24 | ngAfterViewInit() { 25 | 26 | this.loadComponent(); 27 | this.getAds(); 28 | 29 | } 30 | 31 | loadComponent() { 32 | this.currentAddIndex = (this.currentAddIndex + 1) % this.ads.length; 33 | 34 | let adItem = this.ads[this.currentAddIndex]; 35 | 36 | let componentFactory = this._componentFactoryResolver.resolveComponentFactory(adItem.component); 37 | 38 | let viewContainerRef = this.adHost.viewContainerRef; 39 | viewContainerRef.clear(); 40 | 41 | let componentRef = viewContainerRef.createComponent(componentFactory); 42 | 43 | componentRef.instance.data = adItem.data; 44 | 45 | this._cdr.detectChanges(); 46 | } 47 | 48 | getAds() { 49 | this.interval = setInterval(() => { 50 | this.loadComponent(); 51 | }, 2000); 52 | } 53 | 54 | ngOnDestroy() { 55 | clearInterval(this.interval); 56 | } 57 | } -------------------------------------------------------------------------------- /src/app/dynamic-ad/ad-item.ts: -------------------------------------------------------------------------------- 1 | import { Type } from '@angular/core'; 2 | 3 | export class AdItem { 4 | constructor(public component: Type, public data: any) {} 5 | } -------------------------------------------------------------------------------- /src/app/dynamic-ad/ad.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | import { AdService } from './ad.service'; 4 | import { AdItem } from './ad-item'; 5 | 6 | @Component({ 7 | selector: 'ad', 8 | template: ` 9 | 10 |
11 | 12 |
13 | 14 | ` 15 | }) 16 | 17 | export class AdComponent implements OnInit { 18 | ads: AdItem[]; 19 | 20 | constructor(private adService: AdService) {} 21 | 22 | ngOnInit() { 23 | this.ads = this.adService.getAds(); 24 | 25 | } 26 | } -------------------------------------------------------------------------------- /src/app/dynamic-ad/ad.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, ViewContainerRef } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: '[ad-host]' 5 | }) 6 | 7 | export class AdDirective { 8 | constructor(public viewContainerRef: ViewContainerRef) { } 9 | } -------------------------------------------------------------------------------- /src/app/dynamic-ad/ad.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | 4 | import { AdComponent } from './ad.component'; 5 | import { AdDirective } from './ad.directive'; 6 | 7 | import { AdBannerComponent } from './ad-banner.component'; 8 | import { HeroJobAdComponent } from './hero-job-ad.component'; 9 | import { HeroProfileComponent } from './hero-profile.component'; 10 | 11 | import { AdService } from './ad.service'; 12 | 13 | @NgModule({ 14 | imports: [BrowserModule], 15 | exports: [AdComponent], 16 | entryComponents: [HeroJobAdComponent, HeroProfileComponent], 17 | declarations: [AdComponent, AdDirective, AdBannerComponent, HeroJobAdComponent, HeroProfileComponent], 18 | providers: [AdService], 19 | }) 20 | export class AdModule { } 21 | 22 | -------------------------------------------------------------------------------- /src/app/dynamic-ad/ad.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | import { HeroJobAdComponent } from './hero-job-ad.component'; 4 | import { HeroProfileComponent } from './hero-profile.component'; 5 | import { AdItem } from './ad-item'; 6 | 7 | @Injectable() 8 | export class AdService { 9 | getAds() { 10 | return [ 11 | 12 | new AdItem(HeroJobAdComponent, { name: '测试1', bio: '测试广告1' }), 13 | new AdItem(HeroJobAdComponent, { name: '测试2', bio: '测试广告2' }), 14 | 15 | new AdItem(HeroProfileComponent, { name: '测试3', bio: '测试广告3' }), 16 | new AdItem(HeroProfileComponent, { name: '测试4', bio: '测试广告4' }), 17 | ] 18 | } 19 | } -------------------------------------------------------------------------------- /src/app/dynamic-ad/hero-job-ad.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, AfterViewInit } from '@angular/core'; 2 | 3 | export interface AdComponent { 4 | data: any; 5 | } 6 | 7 | @Component({ 8 | template: ` 9 |
10 | 招聘 广告 11 |

{{data?.name}}

12 | {{data?.bio}} 13 |
14 | ` 15 | }) 16 | export class HeroJobAdComponent implements AdComponent { 17 | 18 | @Input() data: any = null; 19 | 20 | 21 | } -------------------------------------------------------------------------------- /src/app/dynamic-ad/hero-profile.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | export interface AdComponent { 4 | data: any; 5 | } 6 | 7 | 8 | @Component({ 9 | template: ` 10 |
11 | 求职广告 12 |

{{data.name}}

13 |

{{data.bio}}

14 |
15 | 16 | ` 17 | }) 18 | 19 | export class HeroProfileComponent implements AdComponent { 20 | @Input() data: any; 21 | 22 | 23 | } -------------------------------------------------------------------------------- /src/app/model/index.ts: -------------------------------------------------------------------------------- 1 | export interface User { 2 | id: string; 3 | createdAt: number; 4 | name: string; 5 | imageUrl: string; 6 | age: number; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/pipes/moment.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | import * as moment from 'moment'; 3 | 4 | @Pipe({ 5 | name: 'moment_pipe' 6 | }) 7 | 8 | export class MomentPipe implements PipeTransform{ 9 | transform(value: any, args: any) { 10 | // let time = moment(value, args); 11 | 12 | // console.log(time) 13 | 14 | console.log(args) 15 | return moment(value).format(args); 16 | } 17 | } -------------------------------------------------------------------------------- /src/app/pipes/pipe.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { MomentPipe } from './moment.pipe'; 4 | 5 | 6 | @NgModule({ 7 | declarations: [ 8 | MomentPipe 9 | ], 10 | exports: [ 11 | MomentPipe 12 | ] 13 | }) 14 | 15 | export class PipeModule { 16 | 17 | } -------------------------------------------------------------------------------- /src/app/service/baiduMap.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { LoadScriptService } from './loadScript.service'; 3 | @Injectable() 4 | export class BaiduMaptService { 5 | 6 | constructor( 7 | private _loadScript: LoadScriptService 8 | ) { } 9 | 10 | init(key) { 11 | return this._load(key); 12 | } 13 | private _load(key: string) { 14 | let _callback_str = '__baidu_map_cb_' + (Math.random().toString()).slice(2, 6), 15 | 16 | url = `http://api.map.baidu.com/api?v=2.0&ak=${key}&callback=${_callback_str}`; 17 | 18 | return new Promise((resolve, reject) => { 19 | 20 | this._loadScript.load(url).catch((err) => reject(err)); 21 | 22 | window[_callback_str] = (map) => { 23 | 24 | resolve(); 25 | console.log('baidu map callback') 26 | delete window[_callback_str]; 27 | } 28 | }) 29 | 30 | } 31 | 32 | 33 | 34 | } -------------------------------------------------------------------------------- /src/app/service/loadScript.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable() 4 | export class LoadScriptService { 5 | doc = document; 6 | 7 | constructor() { } 8 | 9 | load(src):Promise{ 10 | return new Promise((resolve, reject) => { 11 | 12 | let script = this.doc.createElement('script'); 13 | 14 | if (!src) { 15 | new Error('src'); 16 | } 17 | script.src = src; 18 | this.doc.querySelector('head').appendChild(script); 19 | 20 | script.onload = function(){ 21 | resolve(); 22 | script.remove() 23 | } 24 | 25 | script.onerror = function() { 26 | reject() 27 | } 28 | 29 | }) 30 | 31 | 32 | 33 | } 34 | } -------------------------------------------------------------------------------- /src/custom-typings.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Custom Type Definitions 3 | * When including 3rd party modules you also need to include the type definition for the module 4 | * if they don't provide one within the module. You can try to install it with typings 5 | typings install node --save 6 | * If you can't find the type definition in the registry we can make an ambient definition in 7 | * this file for now. For example 8 | declare module "my-module" { 9 | export function doesSomething(value: string): string; 10 | } 11 | * 12 | * If you're prototying and you will fix the types later you can also declare it as type any 13 | * 14 | declare var assert: any; 15 | * 16 | * If you're importing a module that uses Node.js modules which are CommonJS you need to import as 17 | * 18 | import * as _ from 'lodash' 19 | * You can include your type definitions in this file until you create one for the typings registry 20 | * see https://github.com/typings/registry 21 | * 22 | */ 23 | 24 | // Extra variables that live on Global that will be replaced by webpack DefinePlugin 25 | declare var ENV: string; 26 | declare var HMR: boolean; 27 | declare var System: SystemJS; 28 | declare var d3: any; 29 | 30 | 31 | interface SystemJS { 32 | import: (path?: string) => Promise; 33 | } 34 | 35 | interface GlobalEnvironment { 36 | ENV; 37 | HMR; 38 | SystemJS: SystemJS; 39 | System: SystemJS; 40 | } 41 | 42 | interface WebpackModule { 43 | hot: { 44 | data?: any, 45 | idle: any, 46 | accept(dependencies?: string | string[], callback?: (updatedDependencies?: any) => void): void; 47 | decline(dependencies?: any | string | string[]): void; 48 | dispose(callback?: (data?: any) => void): void; 49 | addDisposeHandler(callback?: (data?: any) => void): void; 50 | removeDisposeHandler(callback?: (data?: any) => void): void; 51 | check(autoApply?: any, callback?: (err?: Error, outdatedModules?: any[]) => void): void; 52 | apply(options?: any, callback?: (err?: Error, outdatedModules?: any[]) => void): void; 53 | status(callback?: (status?: string) => void): void | string; 54 | removeStatusHandler(callback?: (status?: string) => void): void; 55 | }; 56 | } 57 | interface WebpackRequire extends NodeRequireFunction { 58 | context(file: string, flag?: boolean, exp?: RegExp): any; 59 | } 60 | 61 | 62 | // interface ErrorStackTraceLimit { 63 | // stackTraceLimit: number; 64 | // } 65 | 66 | 67 | // Extend typings 68 | interface NodeRequire extends WebpackRequire {} 69 | // interface ErrorConstructor extends ErrorStackTraceLimit {} 70 | interface NodeModule extends WebpackModule {} 71 | interface Global extends GlobalEnvironment {} 72 | -------------------------------------------------------------------------------- /src/main.hmr.ts: -------------------------------------------------------------------------------- 1 | import { removeNgStyles, createNewHosts, bootloader, createInputTransfer } from '@angularclass/hmr'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | import { NgModule, ApplicationRef } from '@angular/core' 4 | 5 | import { AppModule } from './app/app.module'; 6 | import { AppComponent } from './app/app.component'; 7 | 8 | @NgModule({ 9 | imports: [ 10 | AppModule 11 | ], 12 | bootstrap: [AppComponent] 13 | }) 14 | class MainModule { 15 | constructor(public appRef: ApplicationRef) {} 16 | hmrOnInit(store) { 17 | if (!store || !store.state) return; 18 | console.log('HMR store', store); 19 | console.log('store.state.data:', store.state.data) 20 | // inject AppStore here and update it 21 | // this.AppStore.update(store.state) 22 | if ('restoreInputValues' in store) { 23 | store.restoreInputValues(); 24 | } 25 | // change detection 26 | this.appRef.tick(); 27 | delete store.state; 28 | delete store.restoreInputValues; 29 | } 30 | hmrOnDestroy(store) { 31 | var cmpLocation = this.appRef.components.map(cmp => cmp.location.nativeElement); 32 | // recreate elements 33 | store.disposeOldHosts = createNewHosts(cmpLocation) 34 | // inject your AppStore and grab state then set it on store 35 | // var appState = this.AppStore.get() 36 | store.state = {data: 'yolo'}; 37 | // store.state = Object.assign({}, appState) 38 | // save input values 39 | store.restoreInputValues = createInputTransfer(); 40 | // remove styles 41 | removeNgStyles(); 42 | } 43 | hmrAfterDestroy(store) { 44 | // display new elements 45 | store.disposeOldHosts() 46 | delete store.disposeOldHosts; 47 | // anything you need done the component is removed 48 | } 49 | } 50 | 51 | export function main() { 52 | return platformBrowserDynamic().bootstrapModule(MainModule); 53 | } 54 | 55 | // boot on document ready 56 | bootloader(main); -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | 3 | import { AppModule } from './app/app.module'; 4 | 5 | platformBrowserDynamic().bootstrapModule(AppModule, { 6 | ngZone: 'noop' 7 | }); 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/polyfills.ts: -------------------------------------------------------------------------------- 1 | // import 'ie-shim'; // Internet Explorer 9 support 2 | 3 | // import 'core-js/es6'; 4 | // Added parts of es6 which are necessary for your project or your browser support requirements. 5 | import 'core-js/es6/symbol'; 6 | import 'core-js/es6/object'; 7 | import 'core-js/es6/function'; 8 | import 'core-js/es6/parse-int'; 9 | import 'core-js/es6/parse-float'; 10 | import 'core-js/es6/number'; 11 | import 'core-js/es6/math'; 12 | import 'core-js/es6/string'; 13 | import 'core-js/es6/date'; 14 | import 'core-js/es6/array'; 15 | import 'core-js/es6/regexp'; 16 | import 'core-js/es6/map'; 17 | import 'core-js/es6/set'; 18 | import 'core-js/es6/weak-map'; 19 | import 'core-js/es6/weak-set'; 20 | import 'core-js/es6/typed'; 21 | import 'core-js/es6/reflect'; 22 | // see issue https://github.com/AngularClass/angular2-webpack-starter/issues/709 23 | // import 'core-js/es6/promise'; 24 | 25 | import 'core-js/es7/reflect'; 26 | import 'zone.js/dist/zone'; 27 | import 'zone.js/dist/long-stack-trace-zone'; 28 | 29 | 30 | require('./styles.css') 31 | // import 'bootstrap/dist/css/bootstrap.min.css'; 32 | // import './styles.styl'; 33 | -------------------------------------------------------------------------------- /src/styles.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | color: #369; 3 | font-size: 2em; 4 | } 5 | * { 6 | box-sizing: border-box; 7 | } 8 | body { 9 | font-family: "Helvetica", "Arial", sans-serif; 10 | } 11 | body, 12 | ul, 13 | h1, 14 | h2, 15 | h3, 16 | h4 { 17 | margin: 0; 18 | padding: 0; 19 | } 20 | li { 21 | list-style: none; 22 | } 23 | a { 24 | color: #ff4081; 25 | } 26 | .layout-content { 27 | padding-top: 70px; 28 | } 29 | .header { 30 | height: 70px; 31 | width: 100%; 32 | border-bottom: 1px solid #ffd5e2; 33 | background: #f8f8f8; 34 | } 35 | .header .header-title { 36 | line-height: 2; 37 | text-indent: 200px; 38 | display: inline-block; 39 | color: #353535; 40 | } 41 | .header nav { 42 | margin: 1em; 43 | float: right; 44 | } 45 | .sidebar { 46 | position: fixed; 47 | top: 70px; 48 | left: 0; 49 | bottom: 0; 50 | width: 200px; 51 | padding-left: 30px; 52 | border-right: 1px solid #ffd5e2; 53 | background: #fff; 54 | } 55 | .side-list { 56 | padding: 10px 0 10px 20px; 57 | } 58 | .side-list li { 59 | padding: 10px 0; 60 | } 61 | .wrap { 62 | min-height: 90vh; 63 | margin-left: 210px; 64 | } 65 | .content { 66 | padding: 20px; 67 | } 68 | .footer { 69 | background: #fff; 70 | border-top: 1px solid #ddd; 71 | text-align: center; 72 | } 73 | .footer a { 74 | text-decoration: none; 75 | } 76 | -------------------------------------------------------------------------------- /src/styles.styl: -------------------------------------------------------------------------------- 1 | top_height = 70px 2 | main-color=#369 3 | side_menu_width = 200px 4 | 5 | border_color = #ffd5e2 6 | title_color = #353535 7 | font_color = #ff4081 8 | font_family = "Helvetica","Arial",sans-serif 9 | 10 | h1 11 | color: main-color; 12 | font-size: 2em; 13 | 14 | body 15 | box-sizing: border-box; 16 | font-family: font_family; 17 | body, ul, h1, h2, h3, h4 18 | margin: 0; 19 | padding: 0; 20 | li 21 | list-style: none; 22 | a 23 | color: font_color; 24 | 25 | 26 | .layout-content 27 | padding-top: top_height; 28 | .header 29 | height: top_height; 30 | width: 100%; 31 | border-bottom: 1px solid border_color; 32 | background: #f8f8f8; 33 | .header-title 34 | line-height: 2; 35 | text-indent: side_menu_width; 36 | display: inline-block; 37 | color: title_color; 38 | nav 39 | margin: 1em; 40 | float: right; 41 | 42 | 43 | .sidebar 44 | position: fixed; 45 | top: top_height; 46 | left: 0; 47 | bottom: 0; 48 | width: side_menu_width; 49 | padding-left: 30px; 50 | border-right: 1px solid border_color; 51 | background: #fff; 52 | 53 | .side-list 54 | padding: 10px 0 10px 20px; 55 | 56 | li 57 | padding: 10px 0; 58 | 59 | 60 | 61 | .wrap 62 | min-height: 80vh; 63 | margin-left: side_menu_width + 10; 64 | 65 | .content 66 | padding: 20px; 67 | 68 | 69 | 70 | .footer 71 | background: #fff; 72 | border-top: 1px solid #ddd; 73 | text-align: center; 74 | a 75 | text-decoration: none; 76 | -------------------------------------------------------------------------------- /src/vendor.ts: -------------------------------------------------------------------------------- 1 | // Angular 2 2 | import '@angular/platform-browser'; 3 | import '@angular/platform-browser-dynamic'; 4 | import '@angular/core'; 5 | import '@angular/common'; 6 | import '@angular/forms'; 7 | import '@angular/http'; 8 | import '@angular/router'; 9 | 10 | 11 | 12 | 13 | // RxJS 14 | import {Observable} from 'rxjs/Rx'; 15 | import 'rxjs/add/operator/map'; 16 | import 'rxjs/add/operator/mergeMap'; 17 | import 'rxjs/add/operator/toPromise'; 18 | 19 | //import './styles.css' -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": false, 4 | "emitDecoratorMetadata": true, 5 | "experimentalDecorators": true, 6 | "target": "es5", 7 | "module": "es2015", 8 | "moduleResolution": "node", 9 | "sourceMap": true, 10 | "baseUrl": "", 11 | "noEmitHelpers": false, 12 | "lib": [ 13 | "es2015", 14 | "dom" 15 | ] 16 | } 17 | } -------------------------------------------------------------------------------- /webpack.aot.ts: -------------------------------------------------------------------------------- 1 | let webpack = require('webpack'); 2 | let path = require('path'); 3 | let webpackMerge = require('webpack-merge'); 4 | // let CompressionPlugin = require("compression-webpack-plugin"); 5 | let ngtools = require('@ngtools/webpack'); 6 | 7 | 8 | let webpackConfig = { 9 | entry: { 10 | polyfills: './src/polyfills.ts', 11 | vendor: './src/vendor.ts', 12 | app: './src/main.ts' 13 | }, 14 | externals: { 15 | 'd3': 'd3' 16 | }, 17 | 18 | output: { 19 | publicPath: 'aot/', 20 | path: path.resolve(__dirname, './aot') 21 | }, 22 | 23 | plugins: [ 24 | new ngtools.AngularCompilerPlugin({ 25 | tsConfigPath: 'tsconfig.json', 26 | // skipMetadataEmit: true, 27 | entryModule: 'src/app/app.module#AppModule' 28 | }), 29 | // new webpack.optimize.CommonsChunkPlugin({ 30 | // name: ['app', 'vendor', 'polyfills'] 31 | // }), 32 | // new CompressionPlugin({ 33 | // asset: "[path].gz[query]", 34 | // algorithm: "gzip", 35 | // test: /\.js$|\.html$/, 36 | // threshold: 10240, 37 | // minRatio: 0.3 38 | // }), 39 | new webpack.optimize.UglifyJsPlugin() 40 | ], 41 | 42 | module: { 43 | rules: [ 44 | { 45 | test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/, 46 | loaders: [ 47 | '@ngtools/webpack' 48 | ] 49 | }, 50 | { 51 | test: /\.css$/, 52 | loaders: ['to-string-loader', 'css-loader'] 53 | }, 54 | { 55 | test: /\.html$/, 56 | loader: 'raw-loader' 57 | } 58 | ] 59 | } 60 | 61 | }; 62 | 63 | let defaultConfig = { 64 | devtool: 'inline-source-map', 65 | output: { 66 | filename: '[name].bundle.js', 67 | chunkFilename: '[id].chunk.js' 68 | }, 69 | resolve: { 70 | extensions: ['.ts', '.js'], 71 | modules: [path.resolve(__dirname, 'node_modules')] 72 | }, 73 | devServer: { 74 | contentBase: './', 75 | port: 3000, 76 | inline: true, 77 | stats: 'errors-only', 78 | historyApiFallback: true, 79 | watchOptions: { aggregateTimeout: 100, poll: 500 } 80 | }, 81 | 82 | node: { 83 | global: true, 84 | crypto: 'empty', 85 | __dirname: true, 86 | __filename: true, 87 | Buffer: false, 88 | clearImmediate: false, 89 | setImmediate: false 90 | } 91 | }; 92 | 93 | module.exports = webpackMerge(defaultConfig, webpackConfig); -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | let path = require("path"); 2 | let webpack = require("webpack"); 3 | let HtmlWebpackPlugin = require("html-webpack-plugin"); 4 | // let ExtractTextPlugin = require("extract-text-webpack-plugin"); 5 | let webpackMerge = require("webpack-merge"); 6 | 7 | let webpackConfig = { 8 | entry: { 9 | polyfills: "./src/polyfills.ts", 10 | vendor: "./src/vendor.ts", 11 | app: "./src/main.hmr.ts" 12 | }, 13 | output: { 14 | publicPath: "aot/", 15 | path: path.resolve(__dirname, "./aot") 16 | }, 17 | plugins: [ 18 | // new ExtractTextPlugin("./style.css"), 19 | 20 | // new HtmlWebpackPlugin({ 21 | // template: 'index.html' 22 | // }) 23 | // new webpack.optimize.UglifyJsPlugin() 24 | ], 25 | 26 | module: { 27 | rules: [ 28 | { 29 | test: /\.ts$/, 30 | loaders: [ 31 | "@angularclass/hmr-loader", 32 | "awesome-typescript-loader", 33 | "angular2-router-loader", 34 | "angular2-template-loader" 35 | ] 36 | }, 37 | { 38 | test: /\.css$/, 39 | use: ['style-loader', 'css-loader'] 40 | }, 41 | { 42 | test: /\.styl$/, 43 | use: ["css-loader", "stylus-loader"] 44 | }, 45 | { 46 | test: /\.html$/, 47 | use: "raw-loader" 48 | } 49 | ] 50 | } 51 | }; 52 | 53 | let defaultConfig = { 54 | output: { 55 | filename: "[name].bundle.js", 56 | sourceMapFilename: "[name].map", 57 | chunkFilename: "[id].chunk.js" 58 | }, 59 | resolve: { 60 | extensions: [".ts", ".js"] 61 | }, 62 | devServer: { 63 | contentBase: "./", 64 | port: 3001, 65 | inline: true, 66 | stats: "errors-only", 67 | historyApiFallback: true, 68 | watchOptions: { 69 | aggregateTimeout: 100, 70 | poll: 500 71 | } 72 | }, 73 | 74 | node: { 75 | global: true, 76 | crypto: "empty", 77 | __dirname: true, 78 | __filename: true, 79 | Buffer: false, 80 | clearImmediate: false, 81 | setImmediate: false 82 | } 83 | }; 84 | 85 | module.exports = webpackMerge(defaultConfig, webpackConfig); 86 | --------------------------------------------------------------------------------