-
Notifications
You must be signed in to change notification settings - Fork 2
/
13-es2015.c01b167f8ce20a15a1fb.js
2 lines (2 loc) · 6.18 KB
/
13-es2015.c01b167f8ce20a15a1fb.js
1
2
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{s8K4:function(l,n,e){"use strict";e.r(n);var t=e("8Y7J"),i=e("XNiG"),o=e("itXk"),u=e("7Hc7"),c=e("1G5W"),s=e("HDdC"),r=e("Y7HM");class a extends s.a{constructor(l,n=0,e=u.a){super(),this.source=l,this.delayTime=n,this.scheduler=e,(!Object(r.a)(n)||n<0)&&(this.delayTime=0),e&&"function"==typeof e.schedule||(this.scheduler=u.a)}static create(l,n=0,e=u.a){return new a(l,n,e)}static dispatch(l){const{source:n,subscriber:e}=l;return this.add(n.subscribe(e))}_subscribe(l){return this.scheduler.schedule(a.dispatch,this.delayTime,{source:this.source,subscriber:l})}}class d{constructor(l,n){this.scheduler=l,this.delay=n}call(l,n){return new a(n,this.delay,this.scheduler).subscribe(l)}}var b=e("JX91");class p{constructor(l,n,e){this.scrollService=l,this.tocService=e,this.activeIndex=null,this.type="None",this.isCollapsed=!0,this.isEmbedded=!1,this.onDestroy=new i.a,this.primaryMax=4,this.isEmbedded=-1!==n.nativeElement.className.indexOf("embedded")}ngOnInit(){this.tocService.tocList.pipe(Object(c.a)(this.onDestroy)).subscribe(l=>{this.tocList=l;const n=function(l,n){return l.reduce((l,n)=>(l=>"h1"!==l.level)(n)?l+1:l,0)}(this.tocList);this.type=n>0?this.isEmbedded?n>this.primaryMax?"EmbeddedExpandable":"EmbeddedSimple":"Floating":"None"})}ngAfterViewInit(){this.isEmbedded||Object(o.a)(this.tocService.activeItemIndex.pipe(function(l,n=0){return function(e){return e.lift(new d(l,n))}}(u.a)),this.items.changes.pipe(Object(b.a)(this.items))).pipe(Object(c.a)(this.onDestroy)).subscribe(([l,n])=>{if(this.activeIndex=l,null===l||l>=n.length)return;const e=n.toArray()[l].nativeElement,t=e.offsetParent,i=e.getBoundingClientRect(),o=t.getBoundingClientRect();i.top>=o.top&&i.bottom<=o.bottom||(t.scrollTop+=i.top-o.top-t.clientHeight/2)})}ngOnDestroy(){this.onDestroy.next()}toggle(l=!0){this.isCollapsed=!this.isCollapsed,l&&this.isCollapsed&&this.toTop()}toTop(){this.scrollService.scrollToTop()}}class h{constructor(){this.customElementComponent=p}}var m=e("Mr+X"),f=e("Gi4r"),g=e("SVse"),y=e("Faly"),v=e("TNhP"),x=t.mb({encapsulation:2,styles:[],data:{}});function E(l){return t.Gb(0,[(l()(),t.ob(0,0,null,null,1,"div",[["class","toc-heading embedded"]],null,null,null,null,null)),(l()(),t.Eb(-1,null,[" \u76ee\u5f55 "]))],null,null)}function w(l){return t.Gb(0,[(l()(),t.ob(0,0,null,null,3,"button",[["aria-label","Expand/collapse contents"],["class","toc-heading embedded secondary"],["title","Expand/collapse contents"],["type","button"]],[[1,"aria-pressed",0]],[[null,"click"]],function(l,n,e){var t=!0;return"click"===n&&(t=!1!==l.component.toggle(!1)&&t),t},null,null)),(l()(),t.Eb(-1,null,[" \u76ee\u5f55 "])),(l()(),t.ob(2,0,null,null,1,"mat-icon",[["class","rotating-icon mat-icon notranslate"],["role","img"],["svgIcon","keyboard_arrow_right"]],[[2,"collapsed",null],[2,"mat-icon-inline",null],[2,"mat-icon-no-color",null]],null,null,m.b,m.a)),t.nb(3,9158656,null,0,f.b,[t.k,f.d,[8,null],[2,f.a]],{svgIcon:[0,"svgIcon"]},null)],function(l,n){l(n,3,0,"keyboard_arrow_right")},function(l,n){var e=n.component;l(n,0,0,!e.isCollapsed),l(n,2,0,e.isCollapsed,t.yb(n,3).inline,"primary"!==t.yb(n,3).color&&"accent"!==t.yb(n,3).color&&"warn"!==t.yb(n,3).color)})}function I(l){return t.Gb(0,[(l()(),t.ob(0,0,[[1,0],["tocItem",1]],null,1,"li",[],[[8,"title",0],[8,"className",0],[2,"secondary",null],[2,"active",null]],null,null,null,null)),(l()(),t.ob(1,0,null,null,0,"a",[],[[8,"href",4],[8,"innerHTML",1]],null,null,null,null))],null,function(l,n){var e=n.component;l(n,0,0,t.qb(1,"",n.parent.context.$implicit.title,""),t.qb(1,"",n.parent.context.$implicit.level,""),"EmbeddedExpandable"===e.type&&n.parent.context.index>=e.primaryMax,n.parent.context.index===e.activeIndex),l(n,1,0,n.parent.context.$implicit.href,n.parent.context.$implicit.content)})}function k(l){return t.Gb(0,[(l()(),t.ob(0,0,null,null,2,null,null,null,null,null,null,null)),(l()(),t.eb(16777216,null,null,1,null,I)),t.nb(2,16384,null,0,g.k,[t.O,t.L],{ngIf:[0,"ngIf"]},null),(l()(),t.eb(0,null,null,0))],function(l,n){l(n,2,0,"Floating"===n.component.type||"h1"!==n.context.$implicit.level)},null)}function O(l){return t.Gb(0,[(l()(),t.ob(0,0,null,null,0,"button",[["aria-label","Expand/collapse contents"],["class","toc-more-items embedded material-icons"],["title","Expand/collapse contents"],["type","button"]],[[2,"collapsed",null],[1,"aria-pressed",0]],[[null,"click"]],function(l,n,e){var t=!0;return"click"===n&&(t=!1!==l.component.toggle()&&t),t},null,null))],null,function(l,n){var e=n.component;l(n,0,0,e.isCollapsed,!e.isCollapsed)})}function C(l){return t.Gb(0,[(l()(),t.ob(0,0,null,null,9,"div",[["class","toc-inner no-print"]],[[2,"collapsed",null]],null,null,null,null)),(l()(),t.eb(16777216,null,null,1,null,E)),t.nb(2,16384,null,0,g.k,[t.O,t.L],{ngIf:[0,"ngIf"]},null),(l()(),t.eb(16777216,null,null,1,null,w)),t.nb(4,16384,null,0,g.k,[t.O,t.L],{ngIf:[0,"ngIf"]},null),(l()(),t.ob(5,0,null,null,2,"ul",[["class","toc-list"]],[[2,"embedded",null]],null,null,null,null)),(l()(),t.eb(16777216,null,null,1,null,k)),t.nb(7,278528,null,0,g.j,[t.O,t.L,t.r],{ngForOf:[0,"ngForOf"]},null),(l()(),t.eb(16777216,null,null,1,null,O)),t.nb(9,16384,null,0,g.k,[t.O,t.L],{ngIf:[0,"ngIf"]},null)],function(l,n){var e=n.component;l(n,2,0,"EmbeddedSimple"===e.type),l(n,4,0,"EmbeddedExpandable"===e.type),l(n,7,0,e.tocList),l(n,9,0,"EmbeddedExpandable"===e.type)},function(l,n){var e=n.component;l(n,0,0,e.isCollapsed),l(n,5,0,"Floating"!==e.type)})}function L(l){return t.Gb(0,[t.Cb(671088640,1,{items:1}),(l()(),t.eb(16777216,null,null,1,null,C)),t.nb(2,16384,null,0,g.k,[t.O,t.L],{ngIf:[0,"ngIf"]},null)],function(l,n){l(n,2,0,"None"!==n.component.type)},null)}function G(l){return t.Gb(0,[(l()(),t.ob(0,0,null,null,1,"aio-toc",[],null,null,null,L,x)),t.nb(1,4440064,null,0,p,[y.a,t.k,v.a],null,null)],function(l,n){l(n,1,0)},null)}var T=t.kb("aio-toc",p,G,{},{},[]),j=e("IP0z"),N=e("Xd0L"),S=e("cUpR");e.d(n,"TocModuleNgFactory",function(){return F});var F=t.lb(h,[],function(l){return t.vb([t.wb(512,t.j,t.Z,[[8,[T]],[3,t.j],t.w]),t.wb(4608,g.m,g.l,[t.t,[2,g.B]]),t.wb(1073742336,g.c,g.c,[]),t.wb(1073742336,j.a,j.a,[]),t.wb(1073742336,N.c,N.c,[[2,N.a],[2,S.f]]),t.wb(1073742336,f.c,f.c,[]),t.wb(1073742336,h,h,[])])})}}]);
//# sourceMappingURL=13-es2015.c01b167f8ce20a15a1fb.js.map