-
Notifications
You must be signed in to change notification settings - Fork 1
/
chunk-DHDKH4SR.js
1 lines (1 loc) · 11 KB
/
chunk-DHDKH4SR.js
1
import{b as Y,c as b,d as $}from"./chunk-I3CRJTGO.js";import{a as K}from"./chunk-AU3QBWYB.js";import"./chunk-UFY6AFO4.js";import{a as W,b as X,c as Z,d as y,e as ee,f as re,g as te,h as ae,i as ne}from"./chunk-3C6TUIB6.js";import"./chunk-RAJBATEM.js";import{a as f,c as J}from"./chunk-3EQGR4CQ.js";import{M as Q}from"./chunk-E4I7JNBM.js";import{n as V,o as j,t as G}from"./chunk-6KKW6GNI.js";import"./chunk-WXI33M2S.js";import{Bb as R,Cb as S,Db as D,E as _,Ea as A,Eb as m,Fb as p,Gb as u,Gc as q,Kb as L,L as C,Nb as O,O as k,Pb as v,Sc as U,Ub as z,Va as s,Vb as H,Wb as F,Yb as N,cc as B,ga as d,hb as c,ma as w,nb as I,u as x,vb as l,wa as T,wb as P,xa as E,zb as M}from"./chunk-FNSPSJSE.js";function oe(a,n){if(a&1&&(m(0,"mat-tab",3)(1,"div",6),u(2,"docs-viewer",7),p()()),a&2){let o=n.$implicit;l("label",o.title),s(2),l("docContent",o.content)}}function ie(a,n){if(a&1){let o=L();m(0,"docs-viewer",8),O("contentLoaded",function(){T(o);let r=v();return E(r.membersCardsLoaded())}),p()}if(a&2){let o=v();P("margin-top",o.membersMarginTopInPx(),"px"),l("docContent",o.membersInnerHtml())}}var Te=(()=>{let n=class n{constructor(){this.activatedRoute=d(j),this.destroyRef=d(A),this.document=d(q),this.router=d(G),this.scrollHandler=d(ne),this.scroller=d(U),this.scrollEvent=J(this.router.events.pipe(_(e=>e instanceof V),C(1)),{initialValue:null}),this.cardsDisplayedOnInit=!1,this.ApiItemType=K,this.canDisplayCards=c(!1),this.tabs=c([]),this.headerInnerHtml=c(void 0),this.membersInnerHtml=c(void 0),this.membersMarginTopInPx=this.scrollHandler.membersMarginTopInPx,this.selectedTabIndex=c(0)}ngOnInit(){this.setPageContent()}ngAfterViewInit(){this.setActiveTab(),this.canDisplayCards()&&(this.cardsDisplayedOnInit=!0),this.listenToTabChange()}membersCardsLoaded(){let e=this.scrollEvent();this.cardsDisplayedOnInit&&e&&(e.position?this.scroller.scrollToPosition(e.position):e.anchor&&this.scroller.scrollToAnchor(e.anchor)),this.scrollHandler.setupListeners(ae)}setPageContent(){this.activatedRoute.data.pipe(x(e=>e.docContent),f(this.destroyRef)).subscribe(e=>{this.setContentForPageSections(e),this.setActiveTab()})}listenToTabChange(){this.matTabGroup.selectedIndexChange.pipe(f(this.destroyRef)).subscribe(e=>{this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{tab:this.tabs()[e].url},queryParamsHandling:"merge"})})}setContentForPageSections(e){let r=this.document.createElement("div");r.innerHTML=e?.contents;let t=r.querySelector(W);t&&this.headerInnerHtml.set(t.innerHTML);let i=r.querySelector(X);i&&this.membersInnerHtml.set(i.innerHTML);let h=Array.from(r.querySelectorAll(`[${y}]`));this.tabs.set(h.map(g=>({url:g.getAttribute(ee),title:g.getAttribute(y),content:g.innerHTML}))),r.remove()}setActiveTab(){this.activatedRoute.queryParamMap.pipe(k(),f(this.destroyRef)).subscribe(e=>{let r=e.get(te),t=this.tabs().findIndex(h=>h.url===r);this.selectedTabIndex.set(t<0?0:t),this.scrollHandler.updateMembersMarginTop(Z);let i=this.tabs()[this.selectedTabIndex()]?.title===re||this.tabs()[this.selectedTabIndex()]?.title==="CLI";this.canDisplayCards.set(i)})}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=w({type:n,selectors:[["adev-reference-page"]],viewQuery:function(r,t){if(r&1&&z(b,7),r&2){let i;H(i=F())&&(t.matTabGroup=i.first)}},standalone:!0,features:[B],decls:8,vars:3,consts:[[1,"adev-header-and-tabs","docs-scroll-track-transparent"],[1,"docs-reference-header",3,"docContent"],["animationDuration","0ms","mat-stretch-tabs","false",1,"docs-reference-tabs",3,"selectedIndex"],[3,"label"],[1,"docs-reference-members-container",3,"docContent","marginTop"],["id","jump-msg",1,"cdk-visually-hidden"],[1,"adev-reference-tab-body"],[3,"docContent"],[1,"docs-reference-members-container",3,"contentLoaded","docContent"]],template:function(r,t){r&1&&(m(0,"div",0),u(1,"docs-viewer",1),m(2,"mat-tab-group",2),S(3,oe,3,2,"mat-tab",3,R),p()(),I(5,ie,1,3,"docs-viewer",4),m(6,"div",5),N(7,"\u8DF3\u8F6C\u5230\u8BE6\u60C5"),p()),r&2&&(s(),l("docContent",t.headerInnerHtml()),s(),l("selectedIndex",t.selectedTabIndex()),s(),D(t.tabs()),s(2),M(t.canDisplayCards()&&t.membersMarginTopInPx()>0?5:-1))},dependencies:[Q,$,Y,b],styles:['[_nghost-%COMP%]{display:flex;gap:1rem;width:100%;box-sizing:border-box}@media (max-width: 1200px){[_nghost-%COMP%]{flex-direction:column}}[_nghost-%COMP%] h1[_ngcontent-%COMP%]{font-size:1.5rem}[_nghost-%COMP%] h2[_ngcontent-%COMP%]{font-size:1.25rem}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{font-size:1rem}[_nghost-%COMP%] h4[_ngcontent-%COMP%]{font-size:.95rem}[_nghost-%COMP%] h5[_ngcontent-%COMP%]{font-size:.875rem}[_nghost-%COMP%] h6[_ngcontent-%COMP%]{font-size:.6rem} .adev-header-and-tabs{padding:var(--layout-padding) 0 1rem var(--layout-padding);box-sizing:border-box}@media (min-width: 1200px){ .adev-header-and-tabs:has(.docs-reference-api-tab), .adev-header-and-tabs.adev-cli-content{position:sticky;top:0;padding-inline-end:1rem;max-height:100vh;height:max-content;overflow-y:scroll;width:50%} .adev-header-and-tabs:has(.docs-reference-api-tab){width:60%} .adev-header-and-tabs:not(:has(.docs-reference-api-tab)){width:100%;max-width:var(--page-width)}}@media (max-width: 1200px){ .adev-header-and-tabs{padding:var(--layout-padding);width:100%}} .adev-header-and-tabs::-webkit-scrollbar-thumb{background-color:var(--septenary-contrast);border-radius:10px;transition:background-color .3s ease} .docs-code pre{margin-block:0;padding-block:1rem} .docs-reference-header>p{color:var(--secondary-contrast);margin-block-start:0;margin-block-end:1.5rem} .docs-reference-header .docs-code{margin-block-end:1.5rem} .adev-reference-tab-body{margin-block-start:1.5rem} .adev-reference-tab-body docs-viewer>div :first-child{margin-top:0} .docs-reference-api-tab{display:flex;gap:1.81rem;align-items:flex-start;margin-bottom:1px}@media (max-width: 1200px){ .docs-reference-api-tab{flex-direction:column}} .docs-reference-api-tab>.docs-code{box-sizing:border-box;width:100%;overflow:hidden;padding:0}@media (max-width: 1200px){ .docs-reference-api-tab>.docs-code{width:100%;position:static}} .docs-reference-api-tab>.docs-code button{transition:background-color .3s ease;font-family:monospace} .docs-reference-api-tab>.docs-code button.hljs-ln-line{font-weight:400;text-align:left;padding-block:.25rem} .docs-reference-api-tab>.docs-code button.hljs-ln-line-highlighted{background-color:var(--senary-contrast)} .docs-reference-api-tab>.docs-code button:hover{background-color:var(--septenary-contrast)} .docs-reference-api-tab>.docs-code button:focus{background-color:var(--senary-contrast)} .docs-reference-api-tab>.docs-code button[docs-copy-source-code]{display:none} .docs-reference-api-tab code{margin-block:0} .docs-reference-api-tab pre{white-space:pre;overflow-x:auto;margin:0} .docs-reference-cli-toc{margin-bottom:1rem} .adev-reference-tab{min-width:50ch;margin-block-start:2.5rem} .docs-reference-members-container{width:40%;padding:0 var(--layout-padding) 1rem 0;box-sizing:border-box;max-width:60ch}@media (max-width: 1200px){ .docs-reference-members-container{width:100%;padding:var(--layout-padding);max-width:none;margin-block-start:0!important}} .docs-reference-members{display:flex;flex-direction:column;gap:20px}@media (max-width: 1200px){ .docs-reference-members{width:100%}} .docs-reference-title{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding-block-end:0;gap:.5rem} .docs-reference-title>div{margin-block:.67em;display:flex;flex-wrap:wrap;align-items:center;gap:.5rem} .docs-reference-title>div h1{margin-block:0} .docs-reference-title a{fill:var(--quinary-contrast);transition:fill .3s ease} .docs-reference-title a:hover{fill:var(--primary-contrast)} .adev-reference-labels{display:flex;gap:.5rem} .docs-reference-category{color:var(--gray-400);font-size:.875rem;font-weight:500;line-height:1.4rem;letter-spacing:-.00875rem} .docs-reference-member-card{border:1px solid var(--senary-contrast);border-radius:.25rem;position:relative;transition:border .3s ease} .docs-reference-member-card:before{content:"";inset:-1px;position:absolute;background:transparent;border-radius:.35rem;z-index:0} .docs-reference-member-card:focus{box-shadow:10px 4px 40px #00000003} .docs-reference-member-card:focus:before{background:var(--red-to-pink-to-purple-horizontal-gradient)} .docs-reference-member-card:has(.docs-reference-card-body) header{border-radius:.25rem .25rem 0 0;border-bottom:1px solid var(--senary-contrast)} .docs-reference-member-card header{display:flex;flex-direction:column;padding:.7rem 1rem;border-radius:.25rem;background-color:var(--octonary-contrast);position:relative;z-index:10;transition:background-color .3s ease,border .3s ease} .docs-reference-member-card header .docs-reference-header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-wrap:wrap} .docs-reference-member-card header .docs-reference-header div{display:flex;align-items:center;gap:1rem} .docs-reference-member-card header h3{display:inline-block;font-family:var(--code-font);font-size:1.25rem;letter-spacing:-.025rem;margin:0} .docs-reference-member-card header code, .docs-reference-member-card header span{font-size:.875rem} .docs-reference-member-card>p{padding-inline:1.25rem;margin-block-end:0} .docs-reference-card-body{padding:.25rem 1.25rem;background:var(--septenary-contrast);transition:background-color .3s ease;color:var(--quaternary-contrast);border-radius:0 0 .25rem .25rem;position:relative;z-index:10} .docs-reference-card-body hr{margin-block:2rem} .docs-reference-card-body .docs-code{margin-block-end:1rem} .docs-reference-card-item:has(~.docs-reference-card-item){border:1px solid var(--senary-contrast);margin-block:1rem;border-radius:.25rem;padding-inline:1rem} .docs-reference-card-item:last-child:not(:first-of-type){border:1px solid var(--senary-contrast);margin-block:1rem;border-radius:.25rem;padding-inline:1rem} .docs-reference-card-item span{display:inline-block;font-size:.875rem} .docs-reference-card-item code{font-size:.875rem} .docs-function-definition:has(*){border-block-end:1px solid var(--senary-contrast)} .docs-deprecation-message{border-block-end:1px solid var(--senary-contrast)} .docs-param-group{margin-block-start:1rem} .docs-param-group:not(:has(~.docs-param-group)){margin-block:1rem} .docs-return-type{padding-block:1rem} .docs-return-type:not(.docs-function-definition+.docs-return-type){border-block-start:1px solid var(--senary-contrast)} .docs-param-keyword{color:var(--primary-contrast);font-family:var(--code-font);margin-inline-end:.5rem} .adev-param-name{color:var(--vivid-pink);font-family:var(--code-font);margin-inline-end:.25rem} .adev-param-name:after{content:":"} .docs-deprecated{color:var(--page-background);background-color:var(--quaternary-contrast);width:max-content;border-radius:.25rem;padding:.1rem .25rem;margin-block-start:1rem} .docs-reference-header~.docs-deprecated{margin-block-start:.5rem} .docs-parameter-description p:first-child{margin-block-start:0} .docs-ref-content{padding:1rem 0} .docs-ref-content:not(:first-child){border-block-start:1px solid var(--senary-contrast)} .docs-ref-content .docs-param-keyword{display:block;margin:0 0 .5rem}'],changeDetection:0});let a=n;return a})();export{Te as default};