@veltdev/sdk-dev 6.0.50-beta.6 → 6.0.50-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/{chunk-TIAQKD26.js → chunk-2H4DL52P.js} +1 -1
  2. package/{chunk-IWNLZTY7.js → chunk-2JFJI3DC.js} +1 -1
  3. package/{chunk-DQRA6TYX.js → chunk-33ZS34QJ.js} +1 -1
  4. package/{chunk-AF2PV57S.js → chunk-3WB3BUWC.js} +1 -1
  5. package/{chunk-YOXKQAJM.js → chunk-3WXIGHGN.js} +1 -1
  6. package/{chunk-NTUJPDO3.js → chunk-4CINO45J.js} +1 -1
  7. package/{chunk-PNGL2BK2.js → chunk-4NZNVJTV.js} +1 -1
  8. package/{chunk-MQWR574P.js → chunk-4WIHCQU7.js} +1 -1
  9. package/{chunk-TV5RRJEX.js → chunk-657IV2KH.js} +1 -1
  10. package/{chunk-RQ7JAEYC.js → chunk-6G2ICUXE.js} +1 -1
  11. package/{chunk-4F4E7EFW.js → chunk-6IR3PDIC.js} +1 -1
  12. package/{chunk-OC27IKXX.js → chunk-72S4UPBF.js} +1 -1
  13. package/{chunk-S7GV42W6.js → chunk-BFUH7HEN.js} +1 -1
  14. package/{chunk-ZHFA5BHC.js → chunk-BPM67NOV.js} +1 -1
  15. package/{chunk-Y2R3M2JH.js → chunk-CALYS2G3.js} +1 -1
  16. package/{chunk-ZGDIZTBA.js → chunk-CPCHZZ7V.js} +1 -1
  17. package/{chunk-ZB27UMZA.js → chunk-HBJ5IVFA.js} +1 -1
  18. package/{chunk-ZJ2MICFG.js → chunk-INBCYUDU.js} +1 -1
  19. package/{chunk-22I4DH53.js → chunk-JHDUVGCI.js} +1 -1
  20. package/{chunk-2UZN24LU.js → chunk-JX43UJQL.js} +1 -1
  21. package/{chunk-5GGSP4VM.js → chunk-LI4FXCND.js} +1 -1
  22. package/{chunk-VJ47SA66.js → chunk-NOLNZPWU.js} +1 -1
  23. package/{chunk-77YRJB6U.js → chunk-OV5GW4YY.js} +1 -1
  24. package/{chunk-WIO7FLS6.js → chunk-PJUFGZR7.js} +1 -1
  25. package/{chunk-U65L5XOP.js → chunk-PNNL26EX.js} +1 -1
  26. package/{chunk-7XUMHBJU.js → chunk-R2EZ42SF.js} +1 -1
  27. package/{chunk-A3NJZPJU.js → chunk-S2ZNDY4I.js} +1 -1
  28. package/{chunk-XBR7WTYL.js → chunk-UHOQLH2N.js} +1 -1
  29. package/{chunk-ZZE4KN4N.js → chunk-UNOFCZM6.js} +1 -1
  30. package/{chunk-V5JKL7XI.js → chunk-VLI3G7IC.js} +1 -1
  31. package/{chunk-U5WQDAMR.js → chunk-WGALG5TF.js} +1 -1
  32. package/{chunk-RSU53L4Z.js → chunk-X4ALZV4C.js} +1 -1
  33. package/{chunk-JNWDY6EC.js → chunk-XYQBNHRM.js} +1 -1
  34. package/{chunk-AZPZ6YNE.js → chunk-YULDCU6J.js} +1 -1
  35. package/{chunk-NPHXJUYD.js → chunk-YZAH6DC5.js} +1 -1
  36. package/{chunk-6YADUX5R.js → chunk-Z6NAGTTS.js} +1 -1
  37. package/package.json +1 -1
  38. package/velt-activity-log.js +1 -1
  39. package/velt-area.js +1 -1
  40. package/velt-arrow.js +1 -1
  41. package/velt-comment.js +1 -1
  42. package/velt-crdt.js +1 -1
  43. package/velt-cursor.js +1 -1
  44. package/velt-huddle.js +1 -1
  45. package/velt-live-state-sync.js +1 -1
  46. package/velt-notification.js +1 -1
  47. package/velt-portable.js +1 -1
  48. package/velt-presence.js +1 -1
  49. package/velt-reaction.js +1 -1
  50. package/velt-recorder.js +1 -1
  51. package/velt-rewriter.js +1 -1
  52. package/velt-selection.js +1 -1
  53. package/velt-tag.js +1 -1
  54. package/velt-user-invite.js +1 -1
  55. package/velt-user-request.js +1 -1
  56. package/velt-video-player.js +1 -1
  57. package/velt-views.js +1 -1
  58. package/velt.js +2 -2
@@ -1,4 +1,4 @@
1
- import{G as ao,H as Bt,p as so}from"./chunk-RSU53L4Z.js";import{$a as xn,$c as Mt,$e as Xn,Aa as kn,Ac as jn,Ba as At,Bc as q,Cb as zn,D as Dt,Db as Bn,Dc as Pt,Dk as ro,E,Ee as D,F as Et,Fb as kt,Fc as Hn,G as Ot,Gb as Tt,Ha as Tn,Hb as xt,He as re,Ia as B,Ii as Ft,Ij as Se,J as wt,Ja as U,Jj as $e,Jk as zt,K as te,Ka as ne,Kj as Ie,Lb as Vn,Lj as st,M as X,Mb as it,Mf as Qn,Na as be,Nj as T,O as bn,Pa as oe,Qa as Fe,Qf as Ci,Qj as no,R as Sn,Ra as Y,S as In,Sg as eo,Ta as Ue,U as Ce,Ua as _i,Ud as Gn,V as v,Vd as Wn,Vj as Si,W as de,Wa as G,X as Dn,Xa as N,Y as Q,Ya as L,_ as En,_a as W,_c as H,_e as Kn,_f as w,_i as rt,a as m,aa as On,ab as Rt,ac as ze,ai as bi,b as k,ba as b,ca as F,da as A,db as Ne,dg as qn,di as ot,ea as P,ee as Yn,fa as u,fb as ue,fi as to,g as z,h as K,ha as Me,i as ye,j as vn,k as y,kk as Ii,l as I,n as yn,na as O,nk as oo,o as Cn,oa as M,ob as Pn,oj as Ut,pa as wn,pb as Mn,pj as io,q as bt,qj as J,r as _,ra as Le,rb as Ln,re as nt,rf as Zn,rj as Nt,s as St,sa as j,sb as Fn,tb as Un,tc as $n,ua as An,uc as yi,v as S,va as Rn,vc as Be,vg as Jn,w as tt,wa as ie,x as It,xa as he,xe as Lt,ya as R,yb as vi,za as mi,zb as Nn,zc as Ve}from"./chunk-VJ47SA66.js";function se(o,n=0){return co(o)?Number(o):arguments.length===2?n:0}function co(o){return!isNaN(parseFloat(o))&&!isNaN(Number(o))}function De(o){return o instanceof R?o.nativeElement:o}var Ir=new A("cdk-dir-doc",{providedIn:"root",factory:Dr});function Dr(){return u(M)}var Er=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function lo(o){let n=o?.toLowerCase()||"";return n==="auto"&&typeof navigator<"u"&&navigator?.language?Er.test(navigator.language)?"rtl":"ltr":n==="rtl"?"rtl":"ltr"}var ae=(()=>{class o{get value(){return this.valueSignal()}valueSignal=j("ltr");change=new B;constructor(){let t=u(Ir,{optional:!0});if(t){let e=t.body?t.body.dir:null,i=t.documentElement?t.documentElement.dir:null;this.valueSignal.set(lo(e||i||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var Z=(function(o){return o[o.NORMAL=0]="NORMAL",o[o.NEGATED=1]="NEGATED",o[o.INVERTED=2]="INVERTED",o})(Z||{}),Vt,Ee;function $t(){if(Ee==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Ee=!1,Ee;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)Ee=!0;else{let o=Element.prototype.scrollTo;o?Ee=!/\{\s*\[native code\]\s*\}/.test(o.toString()):Ee=!1}}return Ee}function je(){if(typeof document!="object"||!document)return Z.NORMAL;if(Vt==null){let o=document.createElement("div"),n=o.style;o.dir="rtl",n.width="1px",n.overflow="auto",n.visibility="hidden",n.pointerEvents="none",n.position="absolute";let t=document.createElement("div"),e=t.style;e.width="2px",e.height="1px",o.appendChild(t),document.body.appendChild(o),Vt=Z.NORMAL,o.scrollLeft===0&&(o.scrollLeft=1,Vt=o.scrollLeft===0?Z.NEGATED:Z.INVERTED),o.remove()}return Vt}var fe=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=N({type:o});static \u0275inj=F({})}return o})();var jt=class{};function ho(o){return o&&typeof o.connect=="function"&&!(o instanceof vn)}var Ht=class extends jt{_data;constructor(n){super(),this._data=n}connect(){return St(this._data)?this._data:_(this._data)}disconnect(){}},at=(function(o){return o[o.REPLACED=0]="REPLACED",o[o.INSERTED=1]="INSERTED",o[o.MOVED=2]="MOVED",o[o.REMOVED=3]="REMOVED",o})(at||{}),Di=new A("_ViewRepeater"),Gt=class{viewCacheSize=20;_viewCache=[];applyChanges(n,t,e,i,r){n.forEachOperation((s,a,c)=>{let l,d;if(s.previousIndex==null){let h=()=>e(s,a,c);l=this._insertView(h,c,t,i(s)),d=l?at.INSERTED:at.REPLACED}else c==null?(this._detachAndCacheView(a,t),d=at.REMOVED):(l=this._moveView(a,c,t,i(s)),d=at.MOVED);r&&r({context:l?.context,operation:d,record:s})})}detach(){for(let n of this._viewCache)n.destroy();this._viewCache=[]}_insertView(n,t,e,i){let r=this._insertViewFromCache(t,e);if(r){r.context.$implicit=i;return}let s=n();return e.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(n,t){let e=t.detach(n);this._maybeCacheView(e,t)}_moveView(n,t,e,i){let r=e.get(n);return e.move(r,t),r.context.$implicit=i,r}_maybeCacheView(n,t){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(n);else{let e=t.indexOf(n);e===-1?n.destroy():t.remove(e)}}_insertViewFromCache(n,t){let e=this._viewCache.pop();return e&&t.insert(e,n),e||null}};var Or=["contentWrapper"],wr=["*"],po=new A("VIRTUAL_SCROLL_STRATEGY"),Ei=class{_scrolledIndexChange=new y;scrolledIndexChange=this._scrolledIndexChange.pipe(X());_viewport=null;_itemSize;_minBufferPx;_maxBufferPx;constructor(n,t,e){this._itemSize=n,this._minBufferPx=t,this._maxBufferPx=e}attach(n){this._viewport=n,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(n,t,e){e<t,this._itemSize=n,this._minBufferPx=t,this._maxBufferPx=e,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(n,t){this._viewport&&this._viewport.scrollToOffset(n*this._itemSize,t)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let n=this._viewport.getRenderedRange(),t={start:n.start,end:n.end},e=this._viewport.getViewportSize(),i=this._viewport.getDataLength(),r=this._viewport.measureScrollOffset(),s=this._itemSize>0?r/this._itemSize:0;if(t.end>i){let c=Math.ceil(e/this._itemSize),l=Math.max(0,Math.min(s,i-c));s!=l&&(s=l,r=l*this._itemSize,t.start=Math.floor(s)),t.end=Math.max(0,Math.min(i,t.start+c))}let a=r-t.start*this._itemSize;if(a<this._minBufferPx&&t.start!=0){let c=Math.ceil((this._maxBufferPx-a)/this._itemSize);t.start=Math.max(0,t.start-c),t.end=Math.min(i,Math.ceil(s+(e+this._minBufferPx)/this._itemSize))}else{let c=t.end*this._itemSize-(r+e);if(c<this._minBufferPx&&t.end!=i){let l=Math.ceil((this._maxBufferPx-c)/this._itemSize);l>0&&(t.end=Math.min(i,t.end+l),t.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(t),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*t.start)),this._scrolledIndexChange.next(Math.floor(s))}};function Ar(o){return o._scrollStrategy}var Rr=(()=>{class o{get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=se(t)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(t){this._minBufferPx=se(t)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(t){this._maxBufferPx=se(t)}_maxBufferPx=200;_scrollStrategy=new Ei(this.itemSize,this.minBufferPx,this.maxBufferPx);ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}static \u0275fac=function(e){return new(e||o)};static \u0275dir=L({type:o,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[ze([{provide:po,useFactory:Ar,deps:[On(()=>o)]}]),ie]})}return o})(),kr=20,ct=(()=>{class o{_ngZone=u(U);_platform=u(H);_renderer=u(oe).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new y;_scrolledCount=0;scrollContainers=new Map;register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){let e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=kr){return this._platform.isBrowser?new ye(e=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=t>0?this._scrolled.pipe(Et(t)).subscribe(e):this._scrolled.subscribe(e);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):_()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((t,e)=>this.deregister(e)),this._scrolled.complete()}ancestorScrolled(t,e){let i=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(E(r=>!r||i.indexOf(r)>-1))}getAncestorScrollContainers(t){let e=[];return this.scrollContainers.forEach((i,r)=>{this._scrollableContainsElement(r,t)&&e.push(r)}),e}_scrollableContainsElement(t,e){let i=De(e),r=t.getElementRef().nativeElement;do if(i==r)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),lt=(()=>{class o{elementRef=u(R);scrollDispatcher=u(ct);ngZone=u(U);dir=u(ae,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new y;_renderer=u(Fe);_cleanupScroll;_elementScrolled=new y;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",t=>this._elementScrolled.next(t))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){let e=this.elementRef.nativeElement,i=this.dir&&this.dir.value=="rtl";t.left==null&&(t.left=i?t.end:t.start),t.right==null&&(t.right=i?t.start:t.end),t.bottom!=null&&(t.top=e.scrollHeight-e.clientHeight-t.bottom),i&&je()!=Z.NORMAL?(t.left!=null&&(t.right=e.scrollWidth-e.clientWidth-t.left),je()==Z.INVERTED?t.left=t.right:je()==Z.NEGATED&&(t.left=t.right?-t.right:t.right)):t.right!=null&&(t.left=e.scrollWidth-e.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){let e=this.elementRef.nativeElement;$t()?e.scrollTo(t):(t.top!=null&&(e.scrollTop=t.top),t.left!=null&&(e.scrollLeft=t.left))}measureScrollOffset(t){let e="left",i="right",r=this.elementRef.nativeElement;if(t=="top")return r.scrollTop;if(t=="bottom")return r.scrollHeight-r.clientHeight-r.scrollTop;let s=this.dir&&this.dir.value=="rtl";return t=="start"?t=s?i:e:t=="end"&&(t=s?e:i),s&&je()==Z.INVERTED?t==e?r.scrollWidth-r.clientWidth-r.scrollLeft:r.scrollLeft:s&&je()==Z.NEGATED?t==e?r.scrollLeft+r.scrollWidth-r.clientWidth:-r.scrollLeft:t==e?r.scrollLeft:r.scrollWidth-r.clientWidth-r.scrollLeft}static \u0275fac=function(e){return new(e||o)};static \u0275dir=L({type:o,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return o})(),Tr=20,Oe=(()=>{class o{_platform=u(H);_listeners;_viewportSize;_change=new y;_document=u(M);constructor(){let t=u(U),e=u(oe).createRenderer(null,null);t.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=r=>this._change.next(r);this._listeners=[e.listen("window","resize",i),e.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(t=>t()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){let t=this.getViewportScrollPosition(),{width:e,height:i}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+e,height:i,width:e}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let t=this._document,e=this._getWindow(),i=t.documentElement,r=i.getBoundingClientRect(),s=-r.top||t.body.scrollTop||e.scrollY||i.scrollTop||0,a=-r.left||t.body.scrollLeft||e.scrollX||i.scrollLeft||0;return{top:s,left:a}}change(t=Tr){return t>0?this._change.pipe(Et(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),uo=new A("VIRTUAL_SCROLLABLE"),xr=(()=>{class o extends lt{constructor(){super()}measureViewportSize(t){let e=this.elementRef.nativeElement;return t==="horizontal"?e.clientWidth:e.clientHeight}static \u0275fac=function(e){return new(e||o)};static \u0275dir=L({type:o,features:[W]})}return o})();function Pr(o,n){return o.start==n.start&&o.end==n.end}var Mr=typeof requestAnimationFrame<"u"?Cn:yn,go=(()=>{class o extends xr{elementRef=u(R);_changeDetectorRef=u(Ve);_scrollStrategy=u(po,{optional:!0});scrollable=u(uo,{optional:!0});_platform=u(H);_detachedSubject=new y;_renderedRangeSubject=new y;get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new ye(t=>this._scrollStrategy.scrolledIndexChange.subscribe(e=>Promise.resolve().then(()=>this.ngZone.run(()=>t.next(e)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;_totalContentSize=0;_totalContentWidth=j("");_totalContentHeight=j("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=j(!1);_runAfterChangeDetection=[];_viewportChanges=K.EMPTY;_injector=u(O);_isDestroyed=!1;constructor(){super();let t=u(Oe);this._scrollStrategy,this._viewportChanges=t.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let e=Be(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:u(Ne).injector});u(wn).onDestroy(()=>{e.destroy()})}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(Ce(null),Et(0,Mr),de(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),this._isDestroyed=!0,super.ngOnDestroy()}attach(t){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=t,this._forOf.dataStream.pipe(de(this._detachedSubject)).subscribe(e=>{let i=e.length;i!==this._dataLength&&(this._dataLength=i,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(t){return this.getElementRef().nativeElement.getBoundingClientRect()[t]}setTotalContentSize(t){this._totalContentSize!==t&&(this._totalContentSize=t,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(t){Pr(this._renderedRange,t)||(this.appendOnly&&(t={start:0,end:Math.max(this._renderedRange.end,t.end)}),this._renderedRangeSubject.next(this._renderedRange=t),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(t,e="to-start"){t=this.appendOnly&&e==="to-start"?0:t;let i=this.dir&&this.dir.value=="rtl",r=this.orientation=="horizontal",s=r?"X":"Y",c=`translate${s}(${Number((r&&i?-1:1)*t)}px)`;this._renderedContentOffset=t,e==="to-end"&&(c+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=c&&(this._renderedContentTransform=c,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(t,e="auto"){let i={behavior:e};this.orientation==="horizontal"?i.start=t:i.top=t,this.scrollable.scrollTo(i)}scrollToIndex(t,e="auto"){this._scrollStrategy.scrollToIndex(t,e)}measureScrollOffset(t){let e;return this.scrollable==this?e=i=>super.measureScrollOffset(i):e=i=>this.scrollable.measureScrollOffset(i),Math.max(0,e(t??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(t){let e,i="left",r="right",s=this.dir?.value=="rtl";t=="start"?e=s?r:i:t=="end"?e=s?i:r:t?e=t:e=this.orientation==="horizontal"?"left":"top";let a=this.scrollable.measureBoundingClientRectWithScrollOffset(e);return this.elementRef.nativeElement.getBoundingClientRect()[e]-a}measureRenderedContentSize(){let t=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?t.offsetWidth:t.offsetHeight}measureRangeSize(t){return this._forOf?this._forOf.measureRangeSize(t,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(t){t&&this._runAfterChangeDetection.push(t),!$n(this._changeDetectionNeeded)&&this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.ngZone.run(()=>{this._changeDetectionNeeded.set(!0)})})})}_doChangeDetection(){this._isDestroyed||this.ngZone.run(()=>{this._changeDetectorRef.markForCheck(),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,ne(()=>{this._changeDetectionNeeded.set(!1);let t=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let e of t)e()},{injector:this._injector})})}_calculateSpacerSize(){this._totalContentHeight.set(this.orientation==="horizontal"?"":`${this._totalContentSize}px`),this._totalContentWidth.set(this.orientation==="horizontal"?`${this._totalContentSize}px`:"")}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=G({type:o,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,i){if(e&1&&kt(Or,7),e&2){let r;Tt(r=xt())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,i){e&2&&it("cdk-virtual-scroll-orientation-horizontal",i.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",i.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",q]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[ze([{provide:lt,useFactory:(t,e)=>t||e,deps:[[new Rn,new An(uo)],o]}]),W],ngContentSelectors:wr,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(e,i){e&1&&(zn(),Ln(0,"div",1,0),Bn(2),Fn(),Un(3,"div",2)),e&2&&(Tn(3),Vn("width",i._totalContentWidth())("height",i._totalContentHeight()))},styles:[`cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}
1
+ import{G as ao,H as Bt,p as so}from"./chunk-X4ALZV4C.js";import{$a as xn,$c as Mt,$e as Xn,Aa as kn,Ac as jn,Ba as At,Bc as q,Cb as zn,D as Dt,Db as Bn,Dc as Pt,Dk as ro,E,Ee as D,F as Et,Fb as kt,Fc as Hn,G as Ot,Gb as Tt,Ha as Tn,Hb as xt,He as re,Ia as B,Ii as Ft,Ij as Se,J as wt,Ja as U,Jj as $e,Jk as zt,K as te,Ka as ne,Kj as Ie,Lb as Vn,Lj as st,M as X,Mb as it,Mf as Qn,Na as be,Nj as T,O as bn,Pa as oe,Qa as Fe,Qf as Ci,Qj as no,R as Sn,Ra as Y,S as In,Sg as eo,Ta as Ue,U as Ce,Ua as _i,Ud as Gn,V as v,Vd as Wn,Vj as Si,W as de,Wa as G,X as Dn,Xa as N,Y as Q,Ya as L,_ as En,_a as W,_c as H,_e as Kn,_f as w,_i as rt,a as m,aa as On,ab as Rt,ac as ze,ai as bi,b as k,ba as b,ca as F,da as A,db as Ne,dg as qn,di as ot,ea as P,ee as Yn,fa as u,fb as ue,fi as to,g as z,h as K,ha as Me,i as ye,j as vn,k as y,kk as Ii,l as I,n as yn,na as O,nk as oo,o as Cn,oa as M,ob as Pn,oj as Ut,pa as wn,pb as Mn,pj as io,q as bt,qj as J,r as _,ra as Le,rb as Ln,re as nt,rf as Zn,rj as Nt,s as St,sa as j,sb as Fn,tb as Un,tc as $n,ua as An,uc as yi,v as S,va as Rn,vc as Be,vg as Jn,w as tt,wa as ie,x as It,xa as he,xe as Lt,ya as R,yb as vi,za as mi,zb as Nn,zc as Ve}from"./chunk-NOLNZPWU.js";function se(o,n=0){return co(o)?Number(o):arguments.length===2?n:0}function co(o){return!isNaN(parseFloat(o))&&!isNaN(Number(o))}function De(o){return o instanceof R?o.nativeElement:o}var Ir=new A("cdk-dir-doc",{providedIn:"root",factory:Dr});function Dr(){return u(M)}var Er=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function lo(o){let n=o?.toLowerCase()||"";return n==="auto"&&typeof navigator<"u"&&navigator?.language?Er.test(navigator.language)?"rtl":"ltr":n==="rtl"?"rtl":"ltr"}var ae=(()=>{class o{get value(){return this.valueSignal()}valueSignal=j("ltr");change=new B;constructor(){let t=u(Ir,{optional:!0});if(t){let e=t.body?t.body.dir:null,i=t.documentElement?t.documentElement.dir:null;this.valueSignal.set(lo(e||i||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var Z=(function(o){return o[o.NORMAL=0]="NORMAL",o[o.NEGATED=1]="NEGATED",o[o.INVERTED=2]="INVERTED",o})(Z||{}),Vt,Ee;function $t(){if(Ee==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Ee=!1,Ee;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)Ee=!0;else{let o=Element.prototype.scrollTo;o?Ee=!/\{\s*\[native code\]\s*\}/.test(o.toString()):Ee=!1}}return Ee}function je(){if(typeof document!="object"||!document)return Z.NORMAL;if(Vt==null){let o=document.createElement("div"),n=o.style;o.dir="rtl",n.width="1px",n.overflow="auto",n.visibility="hidden",n.pointerEvents="none",n.position="absolute";let t=document.createElement("div"),e=t.style;e.width="2px",e.height="1px",o.appendChild(t),document.body.appendChild(o),Vt=Z.NORMAL,o.scrollLeft===0&&(o.scrollLeft=1,Vt=o.scrollLeft===0?Z.NEGATED:Z.INVERTED),o.remove()}return Vt}var fe=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=N({type:o});static \u0275inj=F({})}return o})();var jt=class{};function ho(o){return o&&typeof o.connect=="function"&&!(o instanceof vn)}var Ht=class extends jt{_data;constructor(n){super(),this._data=n}connect(){return St(this._data)?this._data:_(this._data)}disconnect(){}},at=(function(o){return o[o.REPLACED=0]="REPLACED",o[o.INSERTED=1]="INSERTED",o[o.MOVED=2]="MOVED",o[o.REMOVED=3]="REMOVED",o})(at||{}),Di=new A("_ViewRepeater"),Gt=class{viewCacheSize=20;_viewCache=[];applyChanges(n,t,e,i,r){n.forEachOperation((s,a,c)=>{let l,d;if(s.previousIndex==null){let h=()=>e(s,a,c);l=this._insertView(h,c,t,i(s)),d=l?at.INSERTED:at.REPLACED}else c==null?(this._detachAndCacheView(a,t),d=at.REMOVED):(l=this._moveView(a,c,t,i(s)),d=at.MOVED);r&&r({context:l?.context,operation:d,record:s})})}detach(){for(let n of this._viewCache)n.destroy();this._viewCache=[]}_insertView(n,t,e,i){let r=this._insertViewFromCache(t,e);if(r){r.context.$implicit=i;return}let s=n();return e.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(n,t){let e=t.detach(n);this._maybeCacheView(e,t)}_moveView(n,t,e,i){let r=e.get(n);return e.move(r,t),r.context.$implicit=i,r}_maybeCacheView(n,t){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(n);else{let e=t.indexOf(n);e===-1?n.destroy():t.remove(e)}}_insertViewFromCache(n,t){let e=this._viewCache.pop();return e&&t.insert(e,n),e||null}};var Or=["contentWrapper"],wr=["*"],po=new A("VIRTUAL_SCROLL_STRATEGY"),Ei=class{_scrolledIndexChange=new y;scrolledIndexChange=this._scrolledIndexChange.pipe(X());_viewport=null;_itemSize;_minBufferPx;_maxBufferPx;constructor(n,t,e){this._itemSize=n,this._minBufferPx=t,this._maxBufferPx=e}attach(n){this._viewport=n,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(n,t,e){e<t,this._itemSize=n,this._minBufferPx=t,this._maxBufferPx=e,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(n,t){this._viewport&&this._viewport.scrollToOffset(n*this._itemSize,t)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let n=this._viewport.getRenderedRange(),t={start:n.start,end:n.end},e=this._viewport.getViewportSize(),i=this._viewport.getDataLength(),r=this._viewport.measureScrollOffset(),s=this._itemSize>0?r/this._itemSize:0;if(t.end>i){let c=Math.ceil(e/this._itemSize),l=Math.max(0,Math.min(s,i-c));s!=l&&(s=l,r=l*this._itemSize,t.start=Math.floor(s)),t.end=Math.max(0,Math.min(i,t.start+c))}let a=r-t.start*this._itemSize;if(a<this._minBufferPx&&t.start!=0){let c=Math.ceil((this._maxBufferPx-a)/this._itemSize);t.start=Math.max(0,t.start-c),t.end=Math.min(i,Math.ceil(s+(e+this._minBufferPx)/this._itemSize))}else{let c=t.end*this._itemSize-(r+e);if(c<this._minBufferPx&&t.end!=i){let l=Math.ceil((this._maxBufferPx-c)/this._itemSize);l>0&&(t.end=Math.min(i,t.end+l),t.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(t),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*t.start)),this._scrolledIndexChange.next(Math.floor(s))}};function Ar(o){return o._scrollStrategy}var Rr=(()=>{class o{get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=se(t)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(t){this._minBufferPx=se(t)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(t){this._maxBufferPx=se(t)}_maxBufferPx=200;_scrollStrategy=new Ei(this.itemSize,this.minBufferPx,this.maxBufferPx);ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}static \u0275fac=function(e){return new(e||o)};static \u0275dir=L({type:o,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[ze([{provide:po,useFactory:Ar,deps:[On(()=>o)]}]),ie]})}return o})(),kr=20,ct=(()=>{class o{_ngZone=u(U);_platform=u(H);_renderer=u(oe).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new y;_scrolledCount=0;scrollContainers=new Map;register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){let e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=kr){return this._platform.isBrowser?new ye(e=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=t>0?this._scrolled.pipe(Et(t)).subscribe(e):this._scrolled.subscribe(e);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):_()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((t,e)=>this.deregister(e)),this._scrolled.complete()}ancestorScrolled(t,e){let i=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(E(r=>!r||i.indexOf(r)>-1))}getAncestorScrollContainers(t){let e=[];return this.scrollContainers.forEach((i,r)=>{this._scrollableContainsElement(r,t)&&e.push(r)}),e}_scrollableContainsElement(t,e){let i=De(e),r=t.getElementRef().nativeElement;do if(i==r)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),lt=(()=>{class o{elementRef=u(R);scrollDispatcher=u(ct);ngZone=u(U);dir=u(ae,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new y;_renderer=u(Fe);_cleanupScroll;_elementScrolled=new y;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",t=>this._elementScrolled.next(t))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){let e=this.elementRef.nativeElement,i=this.dir&&this.dir.value=="rtl";t.left==null&&(t.left=i?t.end:t.start),t.right==null&&(t.right=i?t.start:t.end),t.bottom!=null&&(t.top=e.scrollHeight-e.clientHeight-t.bottom),i&&je()!=Z.NORMAL?(t.left!=null&&(t.right=e.scrollWidth-e.clientWidth-t.left),je()==Z.INVERTED?t.left=t.right:je()==Z.NEGATED&&(t.left=t.right?-t.right:t.right)):t.right!=null&&(t.left=e.scrollWidth-e.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){let e=this.elementRef.nativeElement;$t()?e.scrollTo(t):(t.top!=null&&(e.scrollTop=t.top),t.left!=null&&(e.scrollLeft=t.left))}measureScrollOffset(t){let e="left",i="right",r=this.elementRef.nativeElement;if(t=="top")return r.scrollTop;if(t=="bottom")return r.scrollHeight-r.clientHeight-r.scrollTop;let s=this.dir&&this.dir.value=="rtl";return t=="start"?t=s?i:e:t=="end"&&(t=s?e:i),s&&je()==Z.INVERTED?t==e?r.scrollWidth-r.clientWidth-r.scrollLeft:r.scrollLeft:s&&je()==Z.NEGATED?t==e?r.scrollLeft+r.scrollWidth-r.clientWidth:-r.scrollLeft:t==e?r.scrollLeft:r.scrollWidth-r.clientWidth-r.scrollLeft}static \u0275fac=function(e){return new(e||o)};static \u0275dir=L({type:o,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return o})(),Tr=20,Oe=(()=>{class o{_platform=u(H);_listeners;_viewportSize;_change=new y;_document=u(M);constructor(){let t=u(U),e=u(oe).createRenderer(null,null);t.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=r=>this._change.next(r);this._listeners=[e.listen("window","resize",i),e.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(t=>t()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){let t=this.getViewportScrollPosition(),{width:e,height:i}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+e,height:i,width:e}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let t=this._document,e=this._getWindow(),i=t.documentElement,r=i.getBoundingClientRect(),s=-r.top||t.body.scrollTop||e.scrollY||i.scrollTop||0,a=-r.left||t.body.scrollLeft||e.scrollX||i.scrollLeft||0;return{top:s,left:a}}change(t=Tr){return t>0?this._change.pipe(Et(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),uo=new A("VIRTUAL_SCROLLABLE"),xr=(()=>{class o extends lt{constructor(){super()}measureViewportSize(t){let e=this.elementRef.nativeElement;return t==="horizontal"?e.clientWidth:e.clientHeight}static \u0275fac=function(e){return new(e||o)};static \u0275dir=L({type:o,features:[W]})}return o})();function Pr(o,n){return o.start==n.start&&o.end==n.end}var Mr=typeof requestAnimationFrame<"u"?Cn:yn,go=(()=>{class o extends xr{elementRef=u(R);_changeDetectorRef=u(Ve);_scrollStrategy=u(po,{optional:!0});scrollable=u(uo,{optional:!0});_platform=u(H);_detachedSubject=new y;_renderedRangeSubject=new y;get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new ye(t=>this._scrollStrategy.scrolledIndexChange.subscribe(e=>Promise.resolve().then(()=>this.ngZone.run(()=>t.next(e)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;_totalContentSize=0;_totalContentWidth=j("");_totalContentHeight=j("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=j(!1);_runAfterChangeDetection=[];_viewportChanges=K.EMPTY;_injector=u(O);_isDestroyed=!1;constructor(){super();let t=u(Oe);this._scrollStrategy,this._viewportChanges=t.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let e=Be(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:u(Ne).injector});u(wn).onDestroy(()=>{e.destroy()})}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(Ce(null),Et(0,Mr),de(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),this._isDestroyed=!0,super.ngOnDestroy()}attach(t){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=t,this._forOf.dataStream.pipe(de(this._detachedSubject)).subscribe(e=>{let i=e.length;i!==this._dataLength&&(this._dataLength=i,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(t){return this.getElementRef().nativeElement.getBoundingClientRect()[t]}setTotalContentSize(t){this._totalContentSize!==t&&(this._totalContentSize=t,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(t){Pr(this._renderedRange,t)||(this.appendOnly&&(t={start:0,end:Math.max(this._renderedRange.end,t.end)}),this._renderedRangeSubject.next(this._renderedRange=t),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(t,e="to-start"){t=this.appendOnly&&e==="to-start"?0:t;let i=this.dir&&this.dir.value=="rtl",r=this.orientation=="horizontal",s=r?"X":"Y",c=`translate${s}(${Number((r&&i?-1:1)*t)}px)`;this._renderedContentOffset=t,e==="to-end"&&(c+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=c&&(this._renderedContentTransform=c,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(t,e="auto"){let i={behavior:e};this.orientation==="horizontal"?i.start=t:i.top=t,this.scrollable.scrollTo(i)}scrollToIndex(t,e="auto"){this._scrollStrategy.scrollToIndex(t,e)}measureScrollOffset(t){let e;return this.scrollable==this?e=i=>super.measureScrollOffset(i):e=i=>this.scrollable.measureScrollOffset(i),Math.max(0,e(t??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(t){let e,i="left",r="right",s=this.dir?.value=="rtl";t=="start"?e=s?r:i:t=="end"?e=s?i:r:t?e=t:e=this.orientation==="horizontal"?"left":"top";let a=this.scrollable.measureBoundingClientRectWithScrollOffset(e);return this.elementRef.nativeElement.getBoundingClientRect()[e]-a}measureRenderedContentSize(){let t=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?t.offsetWidth:t.offsetHeight}measureRangeSize(t){return this._forOf?this._forOf.measureRangeSize(t,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(t){t&&this._runAfterChangeDetection.push(t),!$n(this._changeDetectionNeeded)&&this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.ngZone.run(()=>{this._changeDetectionNeeded.set(!0)})})})}_doChangeDetection(){this._isDestroyed||this.ngZone.run(()=>{this._changeDetectorRef.markForCheck(),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,ne(()=>{this._changeDetectionNeeded.set(!1);let t=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let e of t)e()},{injector:this._injector})})}_calculateSpacerSize(){this._totalContentHeight.set(this.orientation==="horizontal"?"":`${this._totalContentSize}px`),this._totalContentWidth.set(this.orientation==="horizontal"?`${this._totalContentSize}px`:"")}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=G({type:o,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,i){if(e&1&&kt(Or,7),e&2){let r;Tt(r=xt())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,i){e&2&&it("cdk-virtual-scroll-orientation-horizontal",i.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",i.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",q]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[ze([{provide:lt,useFactory:(t,e)=>t||e,deps:[[new Rn,new An(uo)],o]}]),W],ngContentSelectors:wr,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(e,i){e&1&&(zn(),Ln(0,"div",1,0),Bn(2),Fn(),Un(3,"div",2)),e&2&&(Tn(3),Vn("width",i._totalContentWidth())("height",i._totalContentHeight()))},styles:[`cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}
2
2
  `],encapsulation:2,changeDetection:0})}return o})();function fo(o,n,t){let e=t;if(!e.getBoundingClientRect)return 0;let i=e.getBoundingClientRect();return o==="horizontal"?n==="start"?i.left:i.right:n==="start"?i.top:i.bottom}var Lr=(()=>{class o{_viewContainerRef=u(Ue);_template=u(be);_differs=u(jn);_viewRepeater=u(Di);_viewport=u(go,{skipSelf:!0});viewChange=new y;_dataSourceChanges=new y;get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(t){this._cdkVirtualForOf=t,ho(t)?this._dataSourceChanges.next(t):this._dataSourceChanges.next(new Ht(St(t)?t:Array.from(t||[])))}_cdkVirtualForOf;get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(t){this._needsUpdate=!0,this._cdkVirtualForTrackBy=t?(e,i)=>t(e+(this._renderedRange?this._renderedRange.start:0),i):void 0}_cdkVirtualForTrackBy;set cdkVirtualForTemplate(t){t&&(this._needsUpdate=!0,this._template=t)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(t){this._viewRepeater.viewCacheSize=se(t)}dataStream=this._dataSourceChanges.pipe(Ce(null),bn(),v(([t,e])=>this._changeDataSource(t,e)),Sn(1));_differ=null;_data;_renderedItems;_renderedRange;_needsUpdate=!1;_destroyed=new y;constructor(){let t=u(U);this.dataStream.subscribe(e=>{this._data=e,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(de(this._destroyed)).subscribe(e=>{this._renderedRange=e,this.viewChange.observers.length&&t.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(t,e){if(t.start>=t.end)return 0;t.start<this._renderedRange.start||t.end>this._renderedRange.end;let i=t.start-this._renderedRange.start,r=t.end-t.start,s,a;for(let c=0;c<r;c++){let l=this._viewContainerRef.get(c+i);if(l&&l.rootNodes.length){s=a=l.rootNodes[0];break}}for(let c=r-1;c>-1;c--){let l=this._viewContainerRef.get(c+i);if(l&&l.rootNodes.length){a=l.rootNodes[l.rootNodes.length-1];break}}return s&&a?fo(e,"end",a)-fo(e,"start",s):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let t=this._differ.diff(this._renderedItems);t?this._applyChanges(t):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){this._renderedRange&&(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((t,e)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(t,e):e)),this._needsUpdate=!0)}_changeDataSource(t,e){return t&&t.disconnect(this),this._needsUpdate=!0,e?e.connect(this):_()}_updateContext(){let t=this._data.length,e=this._viewContainerRef.length;for(;e--;){let i=this._viewContainerRef.get(e);i.context.index=this._renderedRange.start+e,i.context.count=t,this._updateComputedContextProperties(i.context),i.detectChanges()}}_applyChanges(t){this._viewRepeater.applyChanges(t,this._viewContainerRef,(r,s,a)=>this._getEmbeddedViewArgs(r,a),r=>r.item),t.forEachIdentityChange(r=>{let s=this._viewContainerRef.get(r.currentIndex);s.context.$implicit=r.item});let e=this._data.length,i=this._viewContainerRef.length;for(;i--;){let r=this._viewContainerRef.get(i);r.context.index=this._renderedRange.start+i,r.context.count=e,this._updateComputedContextProperties(r.context)}}_updateComputedContextProperties(t){t.first=t.index===0,t.last=t.index===t.count-1,t.even=t.index%2===0,t.odd=!t.even}_getEmbeddedViewArgs(t,e){return{templateRef:this._template,context:{$implicit:t.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:e}}static ngTemplateContextGuard(t,e){return!0}static \u0275fac=function(e){return new(e||o)};static \u0275dir=L({type:o,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[ze([{provide:Di,useClass:Gt}])]})}return o})();var Oi=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=N({type:o});static \u0275inj=F({})}return o})(),wi=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=N({type:o});static \u0275inj=F({imports:[fe,Oi,fe,Oi]})}return o})();var dt=class{_attachedHost;attach(n){return this._attachedHost=n,n.attach(this)}detach(){let n=this._attachedHost;n!=null&&(this._attachedHost=null,n.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},He=class extends dt{component;viewContainerRef;injector;projectableNodes;constructor(n,t,e,i){super(),this.component=n,this.viewContainerRef=t,this.injector=e,this.projectableNodes=i}},we=class extends dt{templateRef;viewContainerRef;context;injector;constructor(n,t,e,i){super(),this.templateRef=n,this.viewContainerRef=t,this.context=e,this.injector=i}get origin(){return this.templateRef.elementRef}attach(n,t=this.context){return this.context=t,super.attach(n)}detach(){return this.context=void 0,super.detach()}},Ai=class extends dt{element;constructor(n){super(),this.element=n instanceof R?n.nativeElement:n}},Ge=class{_attachedPortal;_disposeFn;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(n){if(n instanceof He)return this._attachedPortal=n,this.attachComponentPortal(n);if(n instanceof we)return this._attachedPortal=n,this.attachTemplatePortal(n);if(this.attachDomPortal&&n instanceof Ai)return this._attachedPortal=n,this.attachDomPortal(n)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(n){this._disposeFn=n}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Wt=class extends Ge{outletElement;_appRef;_defaultInjector;constructor(n,t,e){super(),this.outletElement=n,this._appRef=t,this._defaultInjector=e}attachComponentPortal(n){let t;if(n.viewContainerRef){let e=n.injector||n.viewContainerRef.injector,i=e.get(_i,null,{optional:!0})||void 0;t=n.viewContainerRef.createComponent(n.component,{index:n.viewContainerRef.length,injector:e,ngModuleRef:i,projectableNodes:n.projectableNodes||void 0}),this.setDisposeFn(()=>t.destroy())}else{let e=this._appRef,i=n.injector||this._defaultInjector||O.NULL,r=i.get(Me,e.injector);t=Pt(n.component,{elementInjector:i,environmentInjector:r,projectableNodes:n.projectableNodes||void 0}),e.attachView(t.hostView),this.setDisposeFn(()=>{e.viewCount>0&&e.detachView(t.hostView),t.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(t)),this._attachedPortal=n,t}attachTemplatePortal(n){let t=n.viewContainerRef,e=t.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return e.rootNodes.forEach(i=>this.outletElement.appendChild(i)),e.detectChanges(),this.setDisposeFn(()=>{let i=t.indexOf(e);i!==-1&&t.remove(i)}),this._attachedPortal=n,e}attachDomPortal=n=>{let t=n.element;t.parentNode;let e=this.outletElement.ownerDocument.createComment("dom-portal");t.parentNode.insertBefore(e,t),this.outletElement.appendChild(t),this._attachedPortal=n,super.setDisposeFn(()=>{e.parentNode&&e.parentNode.replaceChild(t,e)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}};var ht=(()=>{class o extends Ge{_moduleRef=u(_i,{optional:!0});_document=u(M);_viewContainerRef=u(Ue);_isInitialized=!1;_attachedRef;constructor(){super()}get portal(){return this._attachedPortal}set portal(t){this.hasAttached()&&!t&&!this._isInitialized||(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t||null)}attached=new B;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(t){t.setAttachedHost(this);let e=t.viewContainerRef!=null?t.viewContainerRef:this._viewContainerRef,i=e.createComponent(t.component,{index:e.length,injector:t.injector||e.injector,projectableNodes:t.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return e!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=t,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(t){t.setAttachedHost(this);let e=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=e,this.attached.emit(e),e}attachDomPortal=t=>{let e=t.element;e.parentNode;let i=this._document.createComment("dom-portal");t.setAttachedHost(this),e.parentNode.insertBefore(i,e),this._getRootNode().appendChild(e),this._attachedPortal=t,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})};_getRootNode(){let t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}static \u0275fac=function(e){return new(e||o)};static \u0275dir=L({type:o,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[W]})}return o})();var Ae=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=N({type:o});static \u0275inj=F({})}return o})();var Ri;function Ur(){if(Ri==null){let o=typeof document<"u"?document.head:null;Ri=!!(o&&(o.createShadowRoot||o.attachShadow))}return Ri}function mo(o){if(Ur()){let n=o.getRootNode?o.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&n instanceof ShadowRoot)return n}return null}function Yt(){let o=typeof document<"u"&&document?document.activeElement:null;for(;o&&o.shadowRoot;){let n=o.shadowRoot.activeElement;if(n===o)break;o=n}return o}function ee(o){return o.composedPath?o.composedPath()[0]:o.target}function ki(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var Kt=new WeakMap,We=(()=>{class o{_appRef;_injector=u(O);_environmentInjector=u(Me);load(t){let e=this._appRef=this._appRef||this._injector.get(Ne),i=Kt.get(e);i||(i={loaders:new Set,refs:[]},Kt.set(e,i),e.onDestroy(()=>{Kt.get(e)?.refs.forEach(r=>r.destroy()),Kt.delete(e)})),i.loaders.has(t)||(i.loaders.add(t),i.refs.push(Pt(t,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function x(o){return o==null?"":typeof o=="string"?o:`${o}px`}var Ti={},pe=(()=>{class o{_appId=u(kn);getId(t){return this._appId!=="ng"&&(t+=this._appId),Ti.hasOwnProperty(t)||(Ti[t]=0),`${t}${Ti[t]++}`}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function ge(o,...n){return n.length?n.some(t=>o[t]):o.altKey||o.shiftKey||o.ctrlKey||o.metaKey}var _o=$t();function Ke(o){return new Xt(o.get(Oe),o.get(M))}var Xt=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(n,t){this._viewportRuler=n,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let n=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=n.style.left||"",this._previousHTMLStyles.top=n.style.top||"",n.style.left=x(-this._previousScrollPosition.left),n.style.top=x(-this._previousScrollPosition.top),n.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let n=this._document.documentElement,t=this._document.body,e=n.style,i=t.style,r=e.scrollBehavior||"",s=i.scrollBehavior||"";this._isEnabled=!1,e.left=this._previousHTMLStyles.left,e.top=this._previousHTMLStyles.top,n.classList.remove("cdk-global-scrollblock"),_o&&(e.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),_o&&(e.scrollBehavior=r,i.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let t=this._document.documentElement,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}};function Do(o,n){return new Zt(o.get(ct),o.get(U),o.get(Oe),n)}var Zt=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(n,t,e,i){this._scrollDispatcher=n,this._ngZone=t,this._viewportRuler=e,this._config=i}attach(n){this._overlayRef,this._overlayRef=n}enable(){if(this._scrollSubscription)return;let n=this._scrollDispatcher.scrolled(0).pipe(E(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=n.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=n.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var ut=class{enable(){}disable(){}attach(){}};function xi(o,n){return n.some(t=>{let e=o.bottom<t.top,i=o.top>t.bottom,r=o.right<t.left,s=o.left>t.right;return e||i||r||s})}function vo(o,n){return n.some(t=>{let e=o.top<t.top,i=o.bottom>t.bottom,r=o.left<t.left,s=o.right>t.right;return e||i||r||s})}function ti(o,n){return new Qt(o.get(ct),o.get(Oe),o.get(U),n)}var Qt=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(n,t,e,i){this._scrollDispatcher=n,this._viewportRuler=t,this._ngZone=e,this._config=i}attach(n){this._overlayRef,this._overlayRef=n}enable(){if(!this._scrollSubscription){let n=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(n).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:e,height:i}=this._viewportRuler.getViewportSize();xi(t,[{width:e,height:i,bottom:i,right:e,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},Eo=(()=>{class o{_injector=u(O);constructor(){}noop=()=>new ut;close=t=>Do(this._injector,t);block=()=>Ke(this._injector);reposition=t=>ti(this._injector,t);static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),ke=class{positionStrategy;scrollStrategy=new ut;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;constructor(n){if(n){let t=Object.keys(n);for(let e of t)n[e]!==void 0&&(this[e]=n[e])}}},Pi=class{offsetX;offsetY;panelClass;originX;originY;overlayX;overlayY;constructor(n,t,e,i,r){this.offsetX=e,this.offsetY=i,this.panelClass=r,this.originX=n.originX,this.originY=n.originY,this.overlayX=t.overlayX,this.overlayY=t.overlayY}};var qt=class{connectionPair;scrollableViewProperties;constructor(n,t){this.connectionPair=n,this.scrollableViewProperties=t}};var Oo=(()=>{class o{_attachedOverlays=[];_document=u(M);_isAttached;constructor(){}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){let e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),this._attachedOverlays.length===0&&this.detach()}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),wo=(()=>{class o extends Oo{_ngZone=u(U);_renderer=u(oe).createRenderer(null,null);_cleanupKeydown;add(t){super.add(t),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=t=>{let e=this._attachedOverlays;for(let i=e.length-1;i>-1;i--)if(e[i]._keydownEvents.observers.length>0){this._ngZone.run(()=>e[i]._keydownEvents.next(t));break}};static \u0275fac=(()=>{let t;return function(i){return(t||(t=he(o)))(i||o)}})();static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Ao=(()=>{class o extends Oo{_platform=u(H);_ngZone=u(U);_renderer=u(oe).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget;_cleanups;add(t){if(super.add(t),!this._isAttached){let e=this._document.body,i={capture:!0},r=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[r.listen(e,"pointerdown",this._pointerDownListener,i),r.listen(e,"click",this._clickListener,i),r.listen(e,"auxclick",this._clickListener,i),r.listen(e,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=e.style.cursor,e.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(t=>t()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=t=>{this._pointerDownEventTarget=ee(t)};_clickListener=t=>{let e=ee(t),i=t.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:e;this._pointerDownEventTarget=null;let r=this._attachedOverlays.slice();for(let s=r.length-1;s>-1;s--){let a=r[s];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(yo(a.overlayElement,e)||yo(a.overlayElement,i))break;let c=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>c.next(t)):c.next(t)}};static \u0275fac=(()=>{let t;return function(i){return(t||(t=he(o)))(i||o)}})();static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function yo(o,n){let t=typeof ShadowRoot<"u"&&ShadowRoot,e=n;for(;e;){if(e===o)return!0;e=t&&e instanceof ShadowRoot?e.host:e.parentNode}return!1}var Ro=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275cmp=G({type:o,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(e,i){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}
3
3
  `],encapsulation:2,changeDetection:0})}return o})(),ii=(()=>{class o{_platform=u(H);_containerElement;_document=u(M);_styleLoader=u(We);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t="cdk-overlay-container";if(this._platform.isBrowser||ki()){let i=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let r=0;r<i.length;r++)i[r].remove()}let e=this._document.createElement("div");e.classList.add(t),ki()?e.setAttribute("platform","test"):this._platform.isBrowser||e.setAttribute("platform","server"),this._document.body.appendChild(e),this._containerElement=e}_loadStyles(){this._styleLoader.load(Ro)}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Mi=class{_renderer;_ngZone;element;_cleanupClick;_cleanupTransitionEnd;_fallbackTimeout;constructor(n,t,e,i){this._renderer=t,this._ngZone=e,this.element=n.createElement("div"),this.element.classList.add("cdk-overlay-backdrop"),this._cleanupClick=t.listen(this.element,"click",i)}detach(){this._ngZone.runOutsideAngular(()=>{let n=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(n,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),n.style.pointerEvents="none",n.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}},Ye=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new y;_attachments=new y;_detachments=new y;_positionStrategy;_scrollStrategy;_locationChanges=K.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_previousHostParent;_keydownEvents=new y;_outsidePointerEvents=new y;_afterNextRenderRef;constructor(n,t,e,i,r,s,a,c,l,d=!1,h,p){this._portalOutlet=n,this._host=t,this._pane=e,this._config=i,this._ngZone=r,this._keyboardDispatcher=s,this._document=a,this._location=c,this._outsideClickDispatcher=l,this._animationsDisabled=d,this._injector=h,this._renderer=p,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}attach(n){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(n);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=ne(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let n=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),n}dispose(){let n=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,n&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(n){n!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=n,this.hasAttached()&&(n.attach(this),this.updatePosition()))}updateSize(n){this._config=m(m({},this._config),n),this._updateElementSize()}setDirection(n){this._config=k(m({},this._config),{direction:n}),this._updateElementDirection()}addPanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!0)}removePanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!1)}getDirection(){let n=this._config.direction;return n?typeof n=="string"?n:n.value:"ltr"}updateScrollStrategy(n){n!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=n,this.hasAttached()&&(n.attach(this),n.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let n=this._pane.style;n.width=x(this._config.width),n.height=x(this._config.height),n.minWidth=x(this._config.minWidth),n.minHeight=x(this._config.minHeight),n.maxWidth=x(this._config.maxWidth),n.maxHeight=x(this._config.maxHeight)}_togglePointerEvents(n){this._pane.style.pointerEvents=n?"":"none"}_attachBackdrop(){let n="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new Mi(this._document,this._renderer,this._ngZone,t=>{this._backdropClick.next(t)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(n))}):this._backdropRef.element.classList.add(n)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(n,t,e){let i=Mt(t||[]).filter(r=>!!r);i.length&&(e?n.classList.add(...i):n.classList.remove(...i))}_detachContentWhenEmpty(){let n=!1;try{this._detachContentAfterRenderRef=ne(()=>{n=!0,this._detachContent()},{injector:this._injector})}catch(t){if(n)throw t;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let n=this._scrollStrategy;n?.disable(),n?.detach?.()}},Co="cdk-overlay-connected-position-bounding-box",Nr=/([A-Za-z%]+)$/;function Ui(o,n){return new Jt(n,o.get(Oe),o.get(M),o.get(H),o.get(ii))}var Jt=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed;_boundingBox;_lastPosition;_lastScrollVisibility;_positionChanges=new y;_resizeSubscription=K.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount;positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(n,t,e,i,r){this._viewportRuler=t,this._document=e,this._platform=i,this._overlayContainer=r,this.setOrigin(n)}attach(n){this._overlayRef&&this._overlayRef,this._validatePositions(),n.hostElement.classList.add(Co),this._overlayRef=n,this._boundingBox=n.hostElement,this._pane=n.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let n=this._originRect,t=this._overlayRect,e=this._viewportRect,i=this._containerRect,r=[],s;for(let a of this._preferredPositions){let c=this._getOriginPoint(n,i,a),l=this._getOverlayPoint(c,t,a),d=this._getOverlayFit(l,t,e,a);if(d.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,c);return}if(this._canFitWithFlexibleDimensions(d,l,e)){r.push({position:a,origin:c,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(c,a)});continue}(!s||s.overlayFit.visibleArea<d.visibleArea)&&(s={overlayFit:d,overlayPoint:l,originPoint:c,position:a,overlayRect:t})}if(r.length){let a=null,c=-1;for(let l of r){let d=l.boundingBoxRect.width*l.boundingBoxRect.height*(l.position.weight||1);d>c&&(c=d,a=l)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Re(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Co),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let n=this._lastPosition;if(n){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,n);this._applyPosition(n,t)}else this.apply()}withScrollableContainers(n){return this._scrollables=n,this}withPositions(n){return this._preferredPositions=n,n.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(n){return this._viewportMargin=n,this}withFlexibleDimensions(n=!0){return this._hasFlexibleDimensions=n,this}withGrowAfterOpen(n=!0){return this._growAfterOpen=n,this}withPush(n=!0){return this._canPush=n,this}withLockedPosition(n=!0){return this._positionLocked=n,this}setOrigin(n){return this._origin=n,this}withDefaultOffsetX(n){return this._offsetX=n,this}withDefaultOffsetY(n){return this._offsetY=n,this}withTransformOriginOn(n){return this._transformOriginSelector=n,this}_getOriginPoint(n,t,e){let i;if(e.originX=="center")i=n.left+n.width/2;else{let s=this._isRtl()?n.right:n.left,a=this._isRtl()?n.left:n.right;i=e.originX=="start"?s:a}t.left<0&&(i-=t.left);let r;return e.originY=="center"?r=n.top+n.height/2:r=e.originY=="top"?n.top:n.bottom,t.top<0&&(r-=t.top),{x:i,y:r}}_getOverlayPoint(n,t,e){let i;e.overlayX=="center"?i=-t.width/2:e.overlayX==="start"?i=this._isRtl()?-t.width:0:i=this._isRtl()?0:-t.width;let r;return e.overlayY=="center"?r=-t.height/2:r=e.overlayY=="top"?0:-t.height,{x:n.x+i,y:n.y+r}}_getOverlayFit(n,t,e,i){let r=So(t),{x:s,y:a}=n,c=this._getOffset(i,"x"),l=this._getOffset(i,"y");c&&(s+=c),l&&(a+=l);let d=0-s,h=s+r.width-e.width,p=0-a,f=a+r.height-e.height,g=this._subtractOverflows(r.width,d,h),C=this._subtractOverflows(r.height,p,f),$=g*C;return{visibleArea:$,isCompletelyWithinViewport:r.width*r.height===$,fitsInViewportVertically:C===r.height,fitsInViewportHorizontally:g==r.width}}_canFitWithFlexibleDimensions(n,t,e){if(this._hasFlexibleDimensions){let i=e.bottom-t.y,r=e.right-t.x,s=bo(this._overlayRef.getConfig().minHeight),a=bo(this._overlayRef.getConfig().minWidth),c=n.fitsInViewportVertically||s!=null&&s<=i,l=n.fitsInViewportHorizontally||a!=null&&a<=r;return c&&l}return!1}_pushOverlayOnScreen(n,t,e){if(this._previousPushAmount&&this._positionLocked)return{x:n.x+this._previousPushAmount.x,y:n.y+this._previousPushAmount.y};let i=So(t),r=this._viewportRect,s=Math.max(n.x+i.width-r.width,0),a=Math.max(n.y+i.height-r.height,0),c=Math.max(r.top-e.top-n.y,0),l=Math.max(r.left-e.left-n.x,0),d=0,h=0;return i.width<=r.width?d=l||-s:d=n.x<this._viewportMargin?r.left-e.left-n.x:0,i.height<=r.height?h=c||-a:h=n.y<this._viewportMargin?r.top-e.top-n.y:0,this._previousPushAmount={x:d,y:h},{x:n.x+d,y:n.y+h}}_applyPosition(n,t){if(this._setTransformOrigin(n),this._setOverlayElementStyles(t,n),this._setBoundingBoxStyles(t,n),n.panelClass&&this._addPanelClasses(n.panelClass),this._positionChanges.observers.length){let e=this._getScrollVisibility();if(n!==this._lastPosition||!this._lastScrollVisibility||!zr(this._lastScrollVisibility,e)){let i=new qt(n,e);this._positionChanges.next(i)}this._lastScrollVisibility=e}this._lastPosition=n,this._isInitialRender=!1}_setTransformOrigin(n){if(!this._transformOriginSelector)return;let t=this._boundingBox.querySelectorAll(this._transformOriginSelector),e,i=n.overlayY;n.overlayX==="center"?e="center":this._isRtl()?e=n.overlayX==="start"?"right":"left":e=n.overlayX==="start"?"left":"right";for(let r=0;r<t.length;r++)t[r].style.transformOrigin=`${e} ${i}`}_calculateBoundingBoxRect(n,t){let e=this._viewportRect,i=this._isRtl(),r,s,a;if(t.overlayY==="top")s=n.y,r=e.height-s+this._viewportMargin;else if(t.overlayY==="bottom")a=e.height-n.y+this._viewportMargin*2,r=e.height-a+this._viewportMargin;else{let f=Math.min(e.bottom-n.y+e.top,n.y),g=this._lastBoundingBoxSize.height;r=f*2,s=n.y-f,r>g&&!this._isInitialRender&&!this._growAfterOpen&&(s=n.y-g/2)}let c=t.overlayX==="start"&&!i||t.overlayX==="end"&&i,l=t.overlayX==="end"&&!i||t.overlayX==="start"&&i,d,h,p;if(l)p=e.width-n.x+this._viewportMargin*2,d=n.x-this._viewportMargin;else if(c)h=n.x,d=e.right-n.x;else{let f=Math.min(e.right-n.x+e.left,n.x),g=this._lastBoundingBoxSize.width;d=f*2,h=n.x-f,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(h=n.x-g/2)}return{top:s,left:h,bottom:a,right:p,width:d,height:r}}_setBoundingBoxStyles(n,t){let e=this._calculateBoundingBoxRect(n,t);!this._isInitialRender&&!this._growAfterOpen&&(e.height=Math.min(e.height,this._lastBoundingBoxSize.height),e.width=Math.min(e.width,this._lastBoundingBoxSize.width));let i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{let r=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.height=x(e.height),i.top=x(e.top),i.bottom=x(e.bottom),i.width=x(e.width),i.left=x(e.left),i.right=x(e.right),t.overlayX==="center"?i.alignItems="center":i.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?i.justifyContent="center":i.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",r&&(i.maxHeight=x(r)),s&&(i.maxWidth=x(s))}this._lastBoundingBoxSize=e,Re(this._boundingBox.style,i)}_resetBoundingBoxStyles(){Re(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Re(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(n,t){let e={},i=this._hasExactPosition(),r=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(i){let d=this._viewportRuler.getViewportScrollPosition();Re(e,this._getExactOverlayY(t,n,d)),Re(e,this._getExactOverlayX(t,n,d))}else e.position="static";let a="",c=this._getOffset(t,"x"),l=this._getOffset(t,"y");c&&(a+=`translateX(${c}px) `),l&&(a+=`translateY(${l}px)`),e.transform=a.trim(),s.maxHeight&&(i?e.maxHeight=x(s.maxHeight):r&&(e.maxHeight="")),s.maxWidth&&(i?e.maxWidth=x(s.maxWidth):r&&(e.maxWidth="")),Re(this._pane.style,e)}_getExactOverlayY(n,t,e){let i={top:"",bottom:""},r=this._getOverlayPoint(t,this._overlayRect,n);if(this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,e)),n.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;i.bottom=`${s-(r.y+this._overlayRect.height)}px`}else i.top=x(r.y);return i}_getExactOverlayX(n,t,e){let i={left:"",right:""},r=this._getOverlayPoint(t,this._overlayRect,n);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,e));let s;if(this._isRtl()?s=n.overlayX==="end"?"left":"right":s=n.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;i.right=`${a-(r.x+this._overlayRect.width)}px`}else i.left=x(r.x);return i}_getScrollVisibility(){let n=this._getOriginRect(),t=this._pane.getBoundingClientRect(),e=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:vo(n,e),isOriginOutsideView:xi(n,e),isOverlayClipped:vo(t,e),isOverlayOutsideView:xi(t,e)}}_subtractOverflows(n,...t){return t.reduce((e,i)=>e-Math.max(i,0),n)}_getNarrowedViewportRect(){let n=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,e=this._viewportRuler.getViewportScrollPosition();return{top:e.top+this._viewportMargin,left:e.left+this._viewportMargin,right:e.left+n-this._viewportMargin,bottom:e.top+t-this._viewportMargin,width:n-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(n,t){return t==="x"?n.offsetX==null?this._offsetX:n.offsetX:n.offsetY==null?this._offsetY:n.offsetY}_validatePositions(){}_addPanelClasses(n){this._pane&&Mt(n).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(n=>{this._pane.classList.remove(n)}),this._appliedPanelClasses=[])}_getOriginRect(){let n=this._origin;if(n instanceof R)return n.nativeElement.getBoundingClientRect();if(n instanceof Element)return n.getBoundingClientRect();let t=n.width||0,e=n.height||0;return{top:n.y,bottom:n.y+e,left:n.x,right:n.x+t,height:e,width:t}}};function Re(o,n){for(let t in n)n.hasOwnProperty(t)&&(o[t]=n[t]);return o}function bo(o){if(typeof o!="number"&&o!=null){let[n,t]=o.split(Nr);return!t||t==="px"?parseFloat(n):null}return o||null}function So(o){return{top:Math.floor(o.top),right:Math.floor(o.right),bottom:Math.floor(o.bottom),left:Math.floor(o.left),width:Math.floor(o.width),height:Math.floor(o.height)}}function zr(o,n){return o===n?!0:o.isOriginClipped===n.isOriginClipped&&o.isOriginOutsideView===n.isOriginOutsideView&&o.isOverlayClipped===n.isOverlayClipped&&o.isOverlayOutsideView===n.isOverlayOutsideView}var Io="cdk-global-overlay-wrapper";function Xe(o){return new ei}var ei=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(n){let t=n.getConfig();this._overlayRef=n,this._width&&!t.width&&n.updateSize({width:this._width}),this._height&&!t.height&&n.updateSize({height:this._height}),n.hostElement.classList.add(Io),this._isDisposed=!1}top(n=""){return this._bottomOffset="",this._topOffset=n,this._alignItems="flex-start",this}left(n=""){return this._xOffset=n,this._xPosition="left",this}bottom(n=""){return this._topOffset="",this._bottomOffset=n,this._alignItems="flex-end",this}right(n=""){return this._xOffset=n,this._xPosition="right",this}start(n=""){return this._xOffset=n,this._xPosition="start",this}end(n=""){return this._xOffset=n,this._xPosition="end",this}width(n=""){return this._overlayRef?this._overlayRef.updateSize({width:n}):this._width=n,this}height(n=""){return this._overlayRef?this._overlayRef.updateSize({height:n}):this._height=n,this}centerHorizontally(n=""){return this.left(n),this._xPosition="center",this}centerVertically(n=""){return this.top(n),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let n=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,e=this._overlayRef.getConfig(),{width:i,height:r,maxWidth:s,maxHeight:a}=e,c=(i==="100%"||i==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(r==="100%"||r==="100vh")&&(!a||a==="100%"||a==="100vh"),d=this._xPosition,h=this._xOffset,p=this._overlayRef.getConfig().direction==="rtl",f="",g="",C="";c?C="flex-start":d==="center"?(C="center",p?g=h:f=h):p?d==="left"||d==="end"?(C="flex-end",f=h):(d==="right"||d==="start")&&(C="flex-start",g=h):d==="left"||d==="start"?(C="flex-start",f=h):(d==="right"||d==="end")&&(C="flex-end",g=h),n.position=this._cssPosition,n.marginLeft=c?"0":f,n.marginTop=l?"0":this._topOffset,n.marginBottom=this._bottomOffset,n.marginRight=c?"0":g,t.justifyContent=C,t.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let n=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,e=t.style;t.classList.remove(Io),e.justifyContent=e.alignItems=n.marginTop=n.marginBottom=n.marginLeft=n.marginRight=n.position="",this._overlayRef=null,this._isDisposed=!0}},ko=(()=>{class o{_injector=u(O);constructor(){}global(){return Xe()}flexibleConnectedTo(t){return Ui(this._injector,t)}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function ft(o,n){o.get(We).load(Ro);let t=o.get(ii),e=o.get(M),i=o.get(pe),r=o.get(Ne),s=o.get(ae),a=e.createElement("div"),c=e.createElement("div");c.id=i.getId("cdk-overlay-"),c.classList.add("cdk-overlay-pane"),a.appendChild(c),t.getContainerElement().appendChild(a);let l=new Wt(c,r,o),d=new ke(n),h=o.get(Fe,null,{optional:!0})||o.get(oe).createRenderer(null,null);return d.direction=d.direction||s.value,new Ye(l,a,c,d,o.get(U),o.get(wo),e,o.get(Hn),o.get(Ao),n?.disableAnimations??o.get(At,null,{optional:!0})==="NoopAnimations",o.get(Me),h)}var To=(()=>{class o{scrollStrategies=u(Eo);_positionBuilder=u(ko);_injector=u(O);constructor(){}create(t){return ft(this._injector,t)}position(){return this._positionBuilder}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Br=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],xo=new A("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let o=u(O);return()=>ti(o)}}),Li=(()=>{class o{elementRef=u(R);constructor(){}static \u0275fac=function(e){return new(e||o)};static \u0275dir=L({type:o,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return o})(),Vr=(()=>{class o{_dir=u(ae,{optional:!0});_injector=u(O);_overlayRef;_templatePortal;_backdropSubscription=K.EMPTY;_attachSubscription=K.EMPTY;_detachSubscription=K.EMPTY;_positionSubscription=K.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=u(xo);_disposeOnNavigation=!1;_ngZone=u(U);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(t){this._disposeOnNavigation=t}backdropClick=new B;positionChange=new B;attach=new B;detach=new B;overlayKeydown=new B;overlayOutsideClick=new B;constructor(){let t=u(be),e=u(Ue);this._templatePortal=new we(t,e),this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=Br);let t=this._overlayRef=ft(this._injector,this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(e=>{this.overlayKeydown.next(e),e.keyCode===27&&!this.disableClose&&!ge(e)&&(e.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(e=>{let i=this._getOriginElement(),r=ee(e);(!i||i!==r&&!i.contains(r))&&this.overlayOutsideClick.next(e)})}_buildConfig(){let t=this._position=this.positionStrategy||this._createPositionStrategy(),e=new ke({direction:this._dir||"ltr",positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(e.width=this.width),(this.height||this.height===0)&&(e.height=this.height),(this.minWidth||this.minWidth===0)&&(e.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(e.minHeight=this.minHeight),this.backdropClass&&(e.backdropClass=this.backdropClass),this.panelClass&&(e.panelClass=this.panelClass),e}_updatePositionStrategy(t){let e=this.positions.map(i=>({originX:i.originX,originY:i.originY,overlayX:i.overlayX,overlayY:i.overlayY,offsetX:i.offsetX||this.offsetX,offsetY:i.offsetY||this.offsetY,panelClass:i.panelClass||void 0}));return t.setOrigin(this._getOrigin()).withPositions(e).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let t=Ui(this._injector,this._getOrigin());return this._updatePositionStrategy(t),t}_getOrigin(){return this.origin instanceof Li?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof Li?this.origin.elementRef.nativeElement:this.origin instanceof R?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(Dn(()=>this.positionChange.observers.length>0)).subscribe(t=>{this._ngZone.run(()=>this.positionChange.emit(t)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}static \u0275fac=function(e){return new(e||o)};static \u0275dir=L({type:o,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",q],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",q],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",q],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",q],push:[2,"cdkConnectedOverlayPush","push",q],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",q]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[ie]})}return o})();function $r(o){let n=u(O);return()=>ti(n)}var jr={provide:xo,useFactory:$r},pt=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=N({type:o});static \u0275inj=F({providers:[To,jr],imports:[fe,Ae,wi,wi]})}return o})();var Hr=new Set(["annotation-id","class","style","id","slot","title","hidden","dark","role","tabindex","ng-reflect-annotation-id","ng-version","_nghost","_ngcontent"]),Ni="__veltContext";function Gr(o){let n={};try{if(!o?.attributes)return n;let t=o.attributes;for(let e=0;e<t.length;e++){let i=t[e].name.toLowerCase();Hr.has(i)||i.startsWith("_ng")||i.startsWith("ng-")||i.startsWith("data-")||i.startsWith("aria-")||i!=="velt-element"&&(n[i]=t[e].value)}}catch{}return n}function Wr(o,n){return m(m({},o||{}),n||{})}function Po(o){try{let n=o?.[Ni];return n&&typeof n=="object"?n:void 0}catch{return}}var zi=null,Bi=null,Vi,$i=!1;function Te(){zi=null,Bi=null,Vi=void 0,$i=!1}function Yr(o,n){try{if(!o){Te();return}zi=o,Bi=o.parentElement,Vi=n,$i=!0}catch{Te()}}function Oc(o){try{if(!o||!$i||zi!==o)return;if(Bi!==o.parentElement){Te();return}let n=Vi;return Te(),{payload:n}}catch{return}}function Mo(o){try{let n=o||null;for(;n;){let t=n.parentElement;if(!t){let i=n.getRootNode?.();if(i instanceof ShadowRoot&&i.host){n=i.host;continue}break}let e=Po(t);if(e)return{host:t,payload:e};n=t}}catch{}}function Kr(o){try{return o?!!o.annotationId||Object.keys(o.contextData||{}).length>0||o.data!==void 0||o.localUIState!==void 0||o.registry!==void 0:!1}catch{return!1}}function wc(o,n){try{if(!o)return;if(Te(),!Kr(n)){Xr(o,n.ownerRef);return}return o[Ni]=n,n}catch{return}}function Xr(o,n){try{if(!o)return;Te();let t=Po(o);if(t&&t.ownerRef!==n)return;o[Ni]=void 0}catch{}}function Ac(o){let{host:n,inherited:t,ownAnnotationId:e,ownData:i,registry:r,ownLocalUIState:s,ownerRef:a}=o,c=Gr(n),l=Wr(t?.contextData,c),d;try{d=n?.getAttribute?.("annotation-id")||void 0}catch{}return{annotationId:e||d||t?.annotationId,contextData:l,data:i??t?.data,registry:r??t?.registry,localUIState:s??t?.localUIState,ownerRef:a}}function Zr(o){try{let n=Mo(o);return Yr(o,n?.payload),n?.payload?.localUIState}catch{return}}function Rc(o){try{if(o.isRoot||o.fromExplicitInput)return!1;let n=Zr(o.host);if(!n||n===o.current)return!1;if(o.isOwner)try{o.current?.update?.(t=>m({},t))}catch{}return o.adopt(n),!0}catch{return!1}}function kc(o){try{return Mo(o)?.payload?.data}catch{return}}var ni="__veltRefreshContext",Ze=new Set;function Tc(o,n,t){try{if(!o||typeof t!="function")return;o[ni]={ownerRef:n,fn:t},Ze.add(o)}catch{}}function oi(o){try{let n=o?.[ni];return n&&typeof n.fn=="function"?n.fn:void 0}catch{return}}function xc(o,n){try{if(!o)return;let t=o[ni];if(t&&t.ownerRef!==n)return;o[ni]=void 0,Ze.delete(o)}catch{}}var Qr=64;function qr(o){let n=[];return Ze.forEach(t=>{if(!oi(t)){Ze.delete(t);return}o.contains(t)&&n.push(t)}),n.length>1&&n.sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),n}function Jr(o){let n=[];return oi(o)&&n.push(o),o.querySelectorAll("*").forEach(t=>{oi(t)&&n.push(t)}),n}function Lo(o){try{if(!o||o.nodeType!==Node.ELEMENT_NODE||(Te(),!Ze.size))return;let n=o;(Ze.size<=Qr?qr(n):Jr(n)).forEach(e=>{let i=oi(e);try{i?.()}catch{}})}catch{}}var Fo="__veltHandled",Uo="velt",Qe=new WeakSet,ri=0;function No(o){try{if(!o||Qe.has(o))return;Qe.add(o),ri++}catch{}}function si(o){try{if(!o||!Qe.has(o))return;Qe.delete(o),ri=Math.max(0,ri-1)}catch{}}function es(o){try{if(!o||ri===0)return!1;let n=typeof o.composedPath=="function"?o.composedPath():null;if(n){for(let e of n)if(Qe.has(e))return!0;return!1}let t=o.target;for(;t;){if(Qe.has(t))return!0;t=t.parentNode}return!1}catch{return!1}}function zo(o){try{if(!o||(o[Fo]=Uo,es(o)))return;o.stopPropagation()}catch{}}function Bo(o){try{return o?o[Fo]===Uo:!1}catch{return!1}}var ce=new WeakMap,Gi=new WeakSet,ts=new Set(["snippyly-user-request-tool","snippyly-sidebar-button","velt-sidebar-button","velt-comments-sidebar-button","snippyly-comment-tool","velt-comment-tool","snippyly-area-tool","velt-area-tool","snippyly-tags-tool","velt-tags-tool","velt-autocomplete-tool"]),is=new WeakSet;function Nc(o){try{return!!o}catch{return!1}}function $o(o){try{return!!o&&ts.has(o.tagName.toLowerCase())}catch{return!1}}function ns(o){try{return!!o&&o.nodeType===Node.ELEMENT_NODE}catch{return!1}}function zc(o){try{if(!o)return;if(Gi.has(o))return ce.get(o);if(Gi.add(o),$o(o)){is.add(o);return}let n=Array.from(o.childNodes).filter(ns);if(!n.length)return;let t={host:o,nodes:n,claimed:!1};return ce.set(o,t),t}catch{return}}function Bc(o){try{if(!o)return;!o.claimed&&o.nodes.some(t=>!!t.parentNode)&&ce.delete(o.host)}catch{}}var ji=null,gt=[];function os(){try{for(let o=gt.length-1;o>=0;o--){let n=gt[o];n.host.isConnected||(n.nodes.forEach(t=>{try{t.parentNode?.hasAttribute?.("data-velt-children-park")&&t.parentNode.removeChild(t)}catch{}}),gt.splice(o,1))}}catch{}}function rs(){try{if(ji?.isConnected)return ji;let o=document.createElement("div");return o.setAttribute("data-velt-children-park","true"),o.style.display="none",document.body.appendChild(o),ji=o,o}catch{return null}}function Vc(o){try{if(!o)return;let n=ce.get(o);if(!n||n.claimed||!n.nodes.some(i=>as(i,r=>r.startsWith("velt-")||r.startsWith("snippyly-"))))return;let e=rs();if(!e)return;os(),n.nodes.forEach(i=>{try{i.parentNode!==e&&e.appendChild(i)}catch{}}),gt.some(i=>i.host===o)||gt.push({host:o,nodes:n.nodes})}catch{}}function $c(o){try{if(!o)return;let n=ce.get(o);if(!n||n.claimed)return;console.warn(`[Velt] <${o.tagName.toLowerCase()}> is not rendering the markup you placed inside it. Either this primitive has no children slot, or its visibility condition is currently false \u2014 in which case your markup is being held and will render as soon as the condition becomes true. If it should render regardless, set default-condition="false".`)}catch{}}function jc(o){try{if(!o||Gi.has(o)||ce.has(o)||$o(o)||!Array.from(o.childNodes).some(t=>t.nodeType===Node.TEXT_NODE&&!!(t.textContent||"").trim()))return;console.warn(`[Velt] <${o.tagName.toLowerCase()}> was given plain text as its content, which is not supported. Wrap it in an element \u2014 for example <span>your text</span>.`)}catch{}}function Hc(o){try{if(!o)return!1;let n=ce.get(o);return!!n&&n.nodes.length>0}catch{return!1}}function Gc(o){try{let n=!!o.wireframeTemplate||!!o.hasCustomerChildren;return!n&&!!o.shadowDom||n&&!!o.isExplicitShadowDom}catch{return!1}}function Wc(o,n){try{if(!o)return;let t=ce.get(o);return!t||!t.nodes.length||t.claimed&&t.owner!==n?void 0:t}catch{return}}function ss(o,n,t){try{if(!o)return;let e=ce.get(o);if(!e)return;let i=n.toLowerCase(),r=e.nodes.findIndex(a=>a.tagName.toLowerCase()===i);if(r===-1)return;let[s]=e.nodes.splice(r,1);return e.nodes.length||(e.claimed=!0,e.owner=t),s}catch{return}}var Vo=class{constructor(n){this.triggerTagName=n}get isActive(){return!!this.element}take(n,t){try{return this.element&&si(this.element),this.element=ss(n,this.triggerTagName,t),!!this.element}catch{return!1}}place(n){try{return!this.element||!n?.parentNode?!1:(n.parentNode.insertBefore(this.element,n.nextSibling),No(this.element),Lo(this.element),!0)}catch{return!1}}release(n){try{this.element&&si(this.element),this.element&&n&&this.element.parentNode!==n&&n.appendChild(this.element),this.element=void 0}catch{}}},Hi="data-velt-hidden",ai=new WeakMap;function jo(o,n){try{if(o.getAttribute(Hi)==="true"===n)return;if(n)ai.has(o)||ai.set(o,o.style.display||""),o.setAttribute(Hi,"true"),o.style.display="none";else{o.removeAttribute(Hi);let e=ai.get(o);e?o.style.display=e:o.style.removeProperty("display"),ai.delete(o)}}catch{}}function Yc(o,n){try{return o?(o.claimed=!0,o.owner=n,jo(o.host,!1),o.nodes):[]}catch{return[]}}function Kc(o,n){try{if(!o||o.owner!==n)return;o.claimed=!1,o.owner=void 0,jo(o.host,!0),o.nodes.forEach(t=>{si(t);try{t.parentNode!==o.host&&o.host.appendChild(t)}catch{}})}catch{}}function as(o,n){try{if(n(o.tagName.toLowerCase()))return!0;let t=o.querySelectorAll("*");for(let e=0;e<t.length;e++)if(n(t[e].tagName.toLowerCase()))return!0;return!1}catch{return!1}}function Wi(o){return o.buttons===0||o.detail===0}function Yi(o){let n=o.touches&&o.touches[0]||o.changedTouches&&o.changedTouches[0];return!!n&&n.identifier===-1&&(n.radiusX==null||n.radiusX===1)&&(n.radiusY==null||n.radiusY===1)}var mt;function cs(){if(mt==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>mt=!0}))}finally{mt=mt||!1}return mt}function Ho(o){return cs()?o:!!o.capture}var Go=new A("cdk-input-modality-detector-options"),Wo={ignoreKeys:[18,17,224,91,16]},Yo=650,Ki={passive:!0,capture:!0},Ko=(()=>{class o{_platform=u(H);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new I(null);_options;_lastTouchMs=0;_onKeydown=t=>{this._options?.ignoreKeys?.some(e=>e===t.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=ee(t))};_onMousedown=t=>{Date.now()-this._lastTouchMs<Yo||(this._modality.next(Wi(t)?"keyboard":"mouse"),this._mostRecentTarget=ee(t))};_onTouchstart=t=>{if(Yi(t)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=ee(t)};constructor(){let t=u(U),e=u(M),i=u(Go,{optional:!0});if(this._options=m(m({},Wo),i),this.modalityDetected=this._modality.pipe(In(1)),this.modalityChanged=this.modalityDetected.pipe(X()),this._platform.isBrowser){let r=u(oe).createRenderer(null,null);this._listenerCleanups=t.runOutsideAngular(()=>[r.listen(e,"keydown",this._onKeydown,Ki),r.listen(e,"mousedown",this._onMousedown,Ki),r.listen(e,"touchstart",this._onTouchstart,Ki)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(t=>t())}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),_t=(function(o){return o[o.IMMEDIATE=0]="IMMEDIATE",o[o.EVENTUAL=1]="EVENTUAL",o})(_t||{}),Xo=new A("cdk-focus-monitor-default-options"),ci=Ho({passive:!0,capture:!0}),Xi=(()=>{class o{_ngZone=u(U);_platform=u(H);_inputModalityDetector=u(Ko);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=u(M);_stopInputModalityDetector=new y;constructor(){let t=u(Xo,{optional:!0});this._detectionMode=t?.detectionMode||_t.IMMEDIATE}_rootNodeFocusAndBlurListener=t=>{let e=ee(t);for(let i=e;i;i=i.parentElement)t.type==="focus"?this._onFocus(t,i):this._onBlur(t,i)};monitor(t,e=!1){let i=De(t);if(!this._platform.isBrowser||i.nodeType!==1)return _();let r=mo(i)||this._document,s=this._elementInfo.get(i);if(s)return e&&(s.checkChildren=!0),s.subject;let a={checkChildren:e,subject:new y,rootNode:r};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(t){let e=De(t),i=this._elementInfo.get(e);i&&(i.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._removeGlobalListeners(i))}focusVia(t,e,i){let r=De(t),s=this._document.activeElement;r===s?this._getClosestElementsInfo(r).forEach(([a,c])=>this._originChanged(a,e,c)):(this._setOrigin(e),typeof r.focus=="function"&&r.focus(i))}ngOnDestroy(){this._elementInfo.forEach((t,e)=>this.stopMonitoring(e))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return this._detectionMode===_t.EVENTUAL||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,e){t.classList.toggle("cdk-focused",!!e),t.classList.toggle("cdk-touch-focused",e==="touch"),t.classList.toggle("cdk-keyboard-focused",e==="keyboard"),t.classList.toggle("cdk-mouse-focused",e==="mouse"),t.classList.toggle("cdk-program-focused",e==="program")}_setOrigin(t,e=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=t,this._originFromTouchInteraction=t==="touch"&&e,this._detectionMode===_t.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?Yo:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(t,e){let i=this._elementInfo.get(e),r=ee(t);!i||!i.checkChildren&&e!==r||this._originChanged(e,this._getFocusOrigin(r),i)}_onBlur(t,e){let i=this._elementInfo.get(e);!i||i.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(i,null))}_emitOrigin(t,e){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(e))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;let e=t.rootNode,i=this._rootNodeFocusListenerCount.get(e)||0;i||this._ngZone.runOutsideAngular(()=>{e.addEventListener("focus",this._rootNodeFocusAndBlurListener,ci),e.addEventListener("blur",this._rootNodeFocusAndBlurListener,ci)}),this._rootNodeFocusListenerCount.set(e,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(de(this._stopInputModalityDetector)).subscribe(r=>{this._setOrigin(r,!0)}))}_removeGlobalListeners(t){let e=t.rootNode;if(this._rootNodeFocusListenerCount.has(e)){let i=this._rootNodeFocusListenerCount.get(e);i>1?this._rootNodeFocusListenerCount.set(e,i-1):(e.removeEventListener("focus",this._rootNodeFocusAndBlurListener,ci),e.removeEventListener("blur",this._rootNodeFocusAndBlurListener,ci),this._rootNodeFocusListenerCount.delete(e))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,e,i){this._setClasses(t,e),this._emitOrigin(i,e),this._lastFocusOrigin=e}_getClosestElementsInfo(t){let e=[];return this._elementInfo.forEach((i,r)=>{(r===t||i.checkChildren&&r.contains(t))&&e.push([r,i])}),e}_isLastInteractionFromInputLabel(t){let{_mostRecentTarget:e,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!e||e===t||t.nodeName!=="INPUT"&&t.nodeName!=="TEXTAREA"||t.disabled)return!1;let r=t.labels;if(r){for(let s=0;s<r.length;s++)if(r[s].contains(e))return!0}return!1}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var Zo=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275cmp=G({type:o,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(e,i){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
4
4
  `],encapsulation:2,changeDetection:0})}return o})();var ls=(()=>{class o{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var Qo=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=N({type:o});static \u0275inj=F({providers:[ls]})}return o})();var qi=(()=>{class o{_platform=u(H);constructor(){}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return hs(t)&&getComputedStyle(t).visibility==="visible"}isTabbable(t){if(!this._platform.isBrowser)return!1;let e=ds(ys(t));if(e&&(qo(e)===-1||!this.isVisible(e)))return!1;let i=t.nodeName.toLowerCase(),r=qo(t);return t.hasAttribute("contenteditable")?r!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!_s(t)?!1:i==="audio"?t.hasAttribute("controls")?r!==-1:!1:i==="video"?r===-1?!1:r!==null?!0:this._platform.FIREFOX||t.hasAttribute("controls"):t.tabIndex>=0}isFocusable(t,e){return vs(t)&&!this.isDisabled(t)&&(e?.ignoreVisibility||this.isVisible(t))}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function ds(o){try{return o.frameElement}catch{return null}}function hs(o){return!!(o.offsetWidth||o.offsetHeight||typeof o.getClientRects=="function"&&o.getClientRects().length)}function us(o){let n=o.nodeName.toLowerCase();return n==="input"||n==="select"||n==="button"||n==="textarea"}function fs(o){return gs(o)&&o.type=="hidden"}function ps(o){return ms(o)&&o.hasAttribute("href")}function gs(o){return o.nodeName.toLowerCase()=="input"}function ms(o){return o.nodeName.toLowerCase()=="a"}function tr(o){if(!o.hasAttribute("tabindex")||o.tabIndex===void 0)return!1;let n=o.getAttribute("tabindex");return!!(n&&!isNaN(parseInt(n,10)))}function qo(o){if(!tr(o))return null;let n=parseInt(o.getAttribute("tabindex")||"",10);return isNaN(n)?-1:n}function _s(o){let n=o.nodeName.toLowerCase(),t=n==="input"&&o.type;return t==="text"||t==="password"||n==="select"||n==="textarea"}function vs(o){return fs(o)?!1:us(o)||ps(o)||o.hasAttribute("contenteditable")||tr(o)}function ys(o){return o.ownerDocument&&o.ownerDocument.defaultView||window}var Qi=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(n){this._enabled=n,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_enabled=!0;constructor(n,t,e,i,r=!1,s){this._element=n,this._checker=t,this._ngZone=e,this._document=i,this._injector=s,r||this.attachAnchors()}destroy(){let n=this._startAnchor,t=this._endAnchor;n&&(n.removeEventListener("focus",this.startAnchorListener),n.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(n)))})}focusFirstTabbableElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(n)))})}focusLastTabbableElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(n)))})}_getRegionBoundary(n){let t=this._element.querySelectorAll(`[cdk-focus-region-${n}], [cdkFocusRegion${n}], [cdk-focus-${n}]`);return n=="start"?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(n){let t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){let e=this._getFirstTabbableElement(t);return e?.focus(n),!!e}return t.focus(n),!0}return this.focusFirstTabbableElement(n)}focusFirstTabbableElement(n){let t=this._getRegionBoundary("start");return t&&t.focus(n),!!t}focusLastTabbableElement(n){let t=this._getRegionBoundary("end");return t&&t.focus(n),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(n){if(this._checker.isFocusable(n)&&this._checker.isTabbable(n))return n;let t=n.children;for(let e=0;e<t.length;e++){let i=t[e].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[e]):null;if(i)return i}return null}_getLastTabbableElement(n){if(this._checker.isFocusable(n)&&this._checker.isTabbable(n))return n;let t=n.children;for(let e=t.length-1;e>=0;e--){let i=t[e].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[e]):null;if(i)return i}return null}_createAnchor(){let n=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,n),n.classList.add("cdk-visually-hidden"),n.classList.add("cdk-focus-trap-anchor"),n.setAttribute("aria-hidden","true"),n}_toggleAnchorTabIndex(n,t){n?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(n){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_executeOnStable(n){this._injector?ne(n,{injector:this._injector}):setTimeout(n)}},Ji=(()=>{class o{_checker=u(qi);_ngZone=u(U);_document=u(M);_injector=u(O);constructor(){u(We).load(Zo)}create(t,e=!1){return new Qi(t,this._checker,this._ngZone,this._document,e,this._injector)}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var me=(function(o){return o[o.NONE=0]="NONE",o[o.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",o[o.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",o})(me||{}),Jo="cdk-high-contrast-black-on-white",er="cdk-high-contrast-white-on-black",Zi="cdk-high-contrast-active",li=(()=>{class o{_platform=u(H);_hasCheckedHighContrastMode;_document=u(M);_breakpointSubscription;constructor(){this._breakpointSubscription=u(Wn).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return me.NONE;let t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);let e=this._document.defaultView||window,i=e&&e.getComputedStyle?e.getComputedStyle(t):null,r=(i&&i.backgroundColor||"").replace(/ /g,"");switch(t.remove(),r){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return me.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return me.BLACK_ON_WHITE}return me.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let t=this._document.body.classList;t.remove(Zi,Jo,er),this._hasCheckedHighContrastMode=!0;let e=this.getHighContrastMode();e===me.BLACK_ON_WHITE?t.add(Zi,Jo):e===me.WHITE_ON_BLACK&&t.add(Zi,er)}}static \u0275fac=function(e){return new(e||o)};static \u0275prov=b({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),en=(()=>{class o{constructor(){u(li)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(e){return new(e||o)};static \u0275mod=N({type:o});static \u0275inj=F({imports:[Qo]})}return o})();function Cs(o,n){}var _e=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;disableAnimations=!1;providers;container;templateContext};var nn=(()=>{class o extends Ge{_elementRef=u(R);_focusTrapFactory=u(Ji);_config;_interactivityChecker=u(qi);_ngZone=u(U);_focusMonitor=u(Xi);_renderer=u(Fe);_changeDetectorRef=u(Ve);_injector=u(O);_platform=u(H);_document=u(M);_portalOutlet;_focusTrapped=new y;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=u(_e,{optional:!0})||new _e,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(t){this._ariaLabelledByQueue.push(t),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(t){let e=this._ariaLabelledByQueue.indexOf(t);e>-1&&(this._ariaLabelledByQueue.splice(e,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();let e=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),e}attachTemplatePortal(t){this._portalOutlet.hasAttached();let e=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),e}attachDomPortal=t=>{this._portalOutlet.hasAttached();let e=this._portalOutlet.attachDomPortal(t);return this._contentAttached(),e};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,e){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{r(),s(),t.removeAttribute("tabindex")},r=this._renderer.listen(t,"blur",i),s=this._renderer.listen(t,"mousedown",i)})),t.focus(e)}_focusByCssSelector(t,e){let i=this._elementRef.nativeElement.querySelector(t);i&&this._forceFocus(i,e)}_trapFocus(t){this._isDestroyed||ne(()=>{let e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus(t);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(t)||this._focusDialogContainer(t);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',t);break;default:this._focusByCssSelector(this._config.autoFocus,t);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let t=this._config.restoreFocus,e=null;if(typeof t=="string"?e=this._document.querySelector(t):typeof t=="boolean"?e=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(e=t),this._config.restoreFocus&&e&&typeof e.focus=="function"){let i=Yt(),r=this._elementRef.nativeElement;(!i||i===this._document.body||i===r||r.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(e,this._closeInteractionType),this._closeInteractionType=null):e.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(t){this._elementRef.nativeElement.focus?.(t)}_containsFocus(){let t=this._elementRef.nativeElement,e=Yt();return t===e||t.contains(e)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Yt()))}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=G({type:o,selectors:[["cdk-dialog-container"]],viewQuery:function(e,i){if(e&1&&kt(ht,7),e&2){let r;Tt(r=xt())&&(i._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,i){e&2&&ue("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledByQueue[0])("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[W],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){e&1&&Rt(0,Cs,0,0,"ng-template",0)},dependencies:[ht],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}
@@ -1 +1 @@
1
- import{$ as w,_ as V,aa as j,ba as T,ca as Z}from"./chunk-ZHFA5BHC.js";import{D as E,Ja as R,La as S,Ma as F,Oa as l,V as b,db as C,i as g,m as y,na as I,ta as v}from"./chunk-VJ47SA66.js";var _={schedule(n,t){let e=setTimeout(n,t);return()=>clearTimeout(e)}};function O(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function k(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}var h;function N(n,t){if(!h){let e=Element.prototype;h=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE?h.call(n,t):!1}function z(n){let t={};return n.forEach(({propName:e,templateName:s,transform:u})=>{t[O(s)]=[e,u]}),t}function A(n,t){return t.get(l).resolveComponentFactory(n).inputs}function P(n,t){let e=n.childNodes,s=t.map(()=>[]),u=-1;t.some((r,o)=>r==="*"?(u=o,!0):!1);for(let r=0,o=e.length;r<o;++r){let i=e[r],c=L(i,t,u);c!==-1&&s[c].push(i)}return s}function L(n,t,e){let s=e;return k(n)&&t.some((u,r)=>u!=="*"&&N(n,u)?(s=r,!0):!1),s}var Y=10,p=class{componentFactory;inputMap=new Map;constructor(t,e){this.componentFactory=e.get(l).resolveComponentFactory(t);for(let s of this.componentFactory.inputs)this.inputMap.set(s.propName,s.templateName)}create(t){return new m(this.componentFactory,t,this.inputMap)}},m=class{componentFactory;injector;inputMap;eventEmitters=new y(1);events=this.eventEmitters.pipe(b(t=>E(...t)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(t,e,s){this.componentFactory=t,this.injector=e,this.inputMap=s,this.ngZone=this.injector.get(R),this.appRef=this.injector.get(C),this.cdScheduler=e.get(v),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=_.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},Y))})}getInputValue(t){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){if(this.componentRef===null){this.initialInputValues.set(t,e);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(t)??t,e),S(this.componentRef.hostView)&&(F(this.componentRef.changeDetectorRef),this.cdScheduler.notify(6))})}initializeComponent(t){let e=I.create({providers:[],parent:this.injector}),s=P(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,s,t),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[t,e]of this.initialInputValues)this.setInputValue(t,e);this.initialInputValues.clear()}initializeOutputs(t){let e=this.componentFactory.outputs.map(({propName:s,templateName:u})=>{let r=t.instance[s];return new g(o=>{let i=r.subscribe(c=>o.next({name:u,value:c}));return()=>i.unsubscribe()})});this.eventEmitters.next(e)}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}},f=class extends HTMLElement{ngElementEventsSubscription=null};function D(n,t){let e=A(n,t.injector),s=t.strategyFactory||new p(n,t.injector),u=z(e);class r extends f{injector;static observedAttributes=Object.keys(u);get ngElementStrategy(){if(!this._ngElementStrategy){let i=this._ngElementStrategy=s.create(this.injector||t.injector);e.forEach(({propName:c,transform:a})=>{if(!this.hasOwnProperty(c))return;let d=this[c];delete this[c],i.setInputValue(c,d,a)})}return this._ngElementStrategy}_ngElementStrategy;constructor(i){super(),this.injector=i}attributeChangedCallback(i,c,a,d){let[M,x]=u[i];this.ngElementStrategy.setInputValue(M,a,x)}connectedCallback(){let i=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),i=!0),this.ngElementStrategy.connect(this),i||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(i=>{let c=new CustomEvent(i.name,{detail:i.value});this.dispatchEvent(c)})}}return e.forEach(({propName:o,transform:i})=>{Object.defineProperty(r.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(c){this.ngElementStrategy.setInputValue(o,c,i)},configurable:!0,enumerable:!0})}),r}function K(n,t){let e=D(n,{injector:t});class s extends e{connectedCallback(){let r;try{let o=this;Z(o),r=V(o)}catch{}super.connectedCallback?.();try{if(w(r),r){let o=this;setTimeout(()=>{j(o),T(o)},0)}}catch{}}}return s}export{K as a};
1
+ import{$ as w,_ as V,aa as j,ba as T,ca as Z}from"./chunk-BPM67NOV.js";import{D as E,Ja as R,La as S,Ma as F,Oa as l,V as b,db as C,i as g,m as y,na as I,ta as v}from"./chunk-NOLNZPWU.js";var _={schedule(n,t){let e=setTimeout(n,t);return()=>clearTimeout(e)}};function O(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function k(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}var h;function N(n,t){if(!h){let e=Element.prototype;h=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE?h.call(n,t):!1}function z(n){let t={};return n.forEach(({propName:e,templateName:s,transform:u})=>{t[O(s)]=[e,u]}),t}function A(n,t){return t.get(l).resolveComponentFactory(n).inputs}function P(n,t){let e=n.childNodes,s=t.map(()=>[]),u=-1;t.some((r,o)=>r==="*"?(u=o,!0):!1);for(let r=0,o=e.length;r<o;++r){let i=e[r],c=L(i,t,u);c!==-1&&s[c].push(i)}return s}function L(n,t,e){let s=e;return k(n)&&t.some((u,r)=>u!=="*"&&N(n,u)?(s=r,!0):!1),s}var Y=10,p=class{componentFactory;inputMap=new Map;constructor(t,e){this.componentFactory=e.get(l).resolveComponentFactory(t);for(let s of this.componentFactory.inputs)this.inputMap.set(s.propName,s.templateName)}create(t){return new m(this.componentFactory,t,this.inputMap)}},m=class{componentFactory;injector;inputMap;eventEmitters=new y(1);events=this.eventEmitters.pipe(b(t=>E(...t)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(t,e,s){this.componentFactory=t,this.injector=e,this.inputMap=s,this.ngZone=this.injector.get(R),this.appRef=this.injector.get(C),this.cdScheduler=e.get(v),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=_.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},Y))})}getInputValue(t){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){if(this.componentRef===null){this.initialInputValues.set(t,e);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(t)??t,e),S(this.componentRef.hostView)&&(F(this.componentRef.changeDetectorRef),this.cdScheduler.notify(6))})}initializeComponent(t){let e=I.create({providers:[],parent:this.injector}),s=P(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,s,t),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[t,e]of this.initialInputValues)this.setInputValue(t,e);this.initialInputValues.clear()}initializeOutputs(t){let e=this.componentFactory.outputs.map(({propName:s,templateName:u})=>{let r=t.instance[s];return new g(o=>{let i=r.subscribe(c=>o.next({name:u,value:c}));return()=>i.unsubscribe()})});this.eventEmitters.next(e)}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}},f=class extends HTMLElement{ngElementEventsSubscription=null};function D(n,t){let e=A(n,t.injector),s=t.strategyFactory||new p(n,t.injector),u=z(e);class r extends f{injector;static observedAttributes=Object.keys(u);get ngElementStrategy(){if(!this._ngElementStrategy){let i=this._ngElementStrategy=s.create(this.injector||t.injector);e.forEach(({propName:c,transform:a})=>{if(!this.hasOwnProperty(c))return;let d=this[c];delete this[c],i.setInputValue(c,d,a)})}return this._ngElementStrategy}_ngElementStrategy;constructor(i){super(),this.injector=i}attributeChangedCallback(i,c,a,d){let[M,x]=u[i];this.ngElementStrategy.setInputValue(M,a,x)}connectedCallback(){let i=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),i=!0),this.ngElementStrategy.connect(this),i||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(i=>{let c=new CustomEvent(i.name,{detail:i.value});this.dispatchEvent(c)})}}return e.forEach(({propName:o,transform:i})=>{Object.defineProperty(r.prototype,o,{get(){return this.ngElementStrategy.getInputValue(o)},set(c){this.ngElementStrategy.setInputValue(o,c,i)},configurable:!0,enumerable:!0})}),r}function K(n,t){let e=D(n,{injector:t});class s extends e{connectedCallback(){let r;try{let o=this;Z(o),r=V(o)}catch{}super.connectedCallback?.();try{if(w(r),r){let o=this;setTimeout(()=>{j(o),T(o)},0)}}catch{}}}return s}export{K as a};
@@ -1 +1 @@
1
- import{Fa as F}from"./chunk-ZHFA5BHC.js";import{G as C,H as w}from"./chunk-RSU53L4Z.js";import{E as h,G as d,He as $,Ii as D,Jk as U,K as v,M as l,Qj as k,V as n,_f as g,ba as A,di as I,ea as s,l as p,nf as M,pj as E,qj as R,r as u,rj as y,v as c,we as a,xe as m}from"./chunk-VJ47SA66.js";var Z=(()=>{let o=class o{constructor(e,t,r,b,f,W,T,j){this.analyticsService=e,this.authService=t,this.contactService=r,this.databaseService=b,this.docService=f,this.configService=W,this.loggingService=T,this.commonDbService=j,this.documentIAM$=new p(null),this.workspaceIAM$=new p(null),this.roles$=new p([]),this.getDocumentIamSubscription=null,this.getOrganizationIamSubscription=null,this.getWorkspaceIamSubscription=null;try{this.authService.setIamService(this),this.getUser(),this.databaseService.getDb().pipe(h(i=>!!i),v(1)).subscribe(i=>{i&&(this.user&&this.getDocumentIam(),this.getDocumentPaths())},i=>{this.loggingService.catch("Error in CommentService getDb subscription: ",i)}),this.getRole$().pipe(v(1)).subscribe(i=>{this.authService?.getUser()&&!i&&this.analyticsService.trackEvent(D.Events.Iam.USER_ACCESS_DENIED)}),this.documentIAM$.subscribe(i=>{i?.accessType&&this.contactService.setDocumentAccessType(i.accessType)})}catch(i){this.loggingService.catch("Error in IamService constructor: ",i)}}clearCache(){this.loggingService.log("%c[WB] Calling FUNCTION: clearCache in IamService","color: green;");try{this.documentIAM$.next(null),this.workspaceIAM$.next(null),this.roles$.next([]),this.documentPaths=null}catch(e){this.loggingService.catch("Error in IamService clearCache: ",e)}}getUser(){try{this.authService.getUser$().pipe(h(e=>!!e)).subscribe(e=>{this.user=e,this.user?this.databaseService.getDbValue()&&this.getDocumentIam():(this.getDocumentIamSubscription?.unsubscribe(),this.getOrganizationIamSubscription?.unsubscribe(),this.getWorkspaceIamSubscription?.unsubscribe())},e=>{this.loggingService.catch("Error in IamService getUser$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getUser: ",e)}}getDocumentPaths(){try{this.docService.getDocumentPaths$().pipe(h(e=>!!e)).subscribe(e=>{this.documentPaths=e,this.getDocumentIam(),this.getWorkspaceIam()},e=>{this.loggingService.catch("Error in IamService getDocumentPaths$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getDocumentPaths: ",e)}}getDocumentIam(){try{this.getDocumentIamSubscription&&(this.getDocumentIamSubscription.unsubscribe(),this.getDocumentIamSubscription=null),this.user?this.getDocumentIamSubscription=this.docService.getDocumentIam$().subscribe(e=>{let t=e||new M;this.documentIAM$.next(t)},e=>{this.loggingService.catch("Error in IamService getDocumentIam$ subscription: ",e)}):this.documentIAM$.next(null)}catch(e){this.loggingService.catch("Error in IamService getDocumentIam: ",e)}}getWorkspaceIam(){try{this.getWorkspaceIamSubscription||(this.getWorkspaceIamSubscription=this.commonDbService.dbListener({feature:"workspaceIam",properties:{skipFirestore:!0}}).pipe(d(e=>u(null))).subscribe(e=>{this.workspaceIAM$.next(e?.data),this.roles$.next(e?.data?.roles||[])}))}catch(e){this.loggingService.catch("Error in IamService getWorkspaceIam: ",e)}}isUserAllowed$(){return this.getRole$().pipe(c(e=>!!e),l())}getDocumentIAM$(){return this.documentIAM$.asObservable()}getRoles$(){return this.roles$.asObservable().pipe(c(e=>e?.length?e:$.WorkspaceRoles))}getFeaturesAccessLevel$(){return this.documentIAM$.asObservable().pipe(c(e=>e?.features),n(e=>this.getRole$().pipe(c(t=>(t===a.ADMIN&&(e=e&&JSON.parse(JSON.stringify(e||{})),e?.all?.disabled&&(e.all.disabled=!1)),e)))))}hasRole(e){try{return e===this.getRole()}catch(t){return this.loggingService.catch("Error in IamService hasRole: ",t),!1}}hasRoleAny(e=[]){try{return e?.includes(this.getRole()||"")}catch(t){return this.loggingService.catch("Error in IamService hasRoleAny: ",t),!1}}hasRole$(e){try{return this.authService.getUser$().pipe(n(()=>this.documentIAM$.pipe(h(t=>!!t),n(()=>this.workspaceIAM$.pipe(c(()=>e===this.getRole()))))))}catch(t){return this.loggingService.catch("Error in IamService hasRole$: ",t),u(!1)}}getRole$(){try{return this.authService.getUser$().pipe(n(()=>this.configService.getSF$()),n(()=>this.configService.getSF()?this.contactService.isUserGlobalContact$():u(null)),n(()=>this.configService.getSF()?this.documentIAM$.pipe(h(e=>!!e),l(I)):u(null)),n(()=>this.workspaceIAM$.pipe(l(I))),c(()=>this.getRole()))}catch(e){return this.loggingService.catch("Error in IamService getRole$: ",e),u(null)}}getRole(){try{let e=this.configService.getSF();if(this.user?.isAdmin)return a.ADMIN;return a.COMMENTER;if(this.user)switch((this.documentIAM$.value?this.documentIAM$.value?.features?.all?.restricted:!1)?m.RESTRICTED:this.documentIAM$.value?this.documentIAM$.value?.documentAccessType||m.PUBLIC:null){case m.PUBLIC:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||a.COMMENTER;break;case m.RESTRICTED:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||null;break;default:break}}catch(e){this.loggingService.catch("Error in IamService getRole: ",e)}return null}isUserAdmin$(){return this.getRole$().pipe(c(e=>e===a.ADMIN),l())}isUserAdmin(){try{return this.getRole()===a.ADMIN}catch(e){return this.loggingService.catch("Error in IamService isUserAdmin: ",e),!1}}getUserFromDocumentIAM(e,t){try{if(e||t){let r;return e&&(r=this.documentIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.documentIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromDocumentIAM: ",r)}}getUserFromWorkspaceIAM(e,t){try{if(e||t){let r;return e&&(r=this.workspaceIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.workspaceIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromWorkspaceIAM: ",r)}}};o.\u0275fac=function(t){return new(t||o)(s(E),s(U),s(F),s(k),s(w),s(y),s(R),s(C))},o.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"});let S=o;return S})();export{Z as a};
1
+ import{Fa as F}from"./chunk-BPM67NOV.js";import{G as C,H as w}from"./chunk-X4ALZV4C.js";import{E as h,G as d,He as $,Ii as D,Jk as U,K as v,M as l,Qj as k,V as n,_f as g,ba as A,di as I,ea as s,l as p,nf as M,pj as E,qj as R,r as u,rj as y,v as c,we as a,xe as m}from"./chunk-NOLNZPWU.js";var Z=(()=>{let o=class o{constructor(e,t,r,b,f,W,T,j){this.analyticsService=e,this.authService=t,this.contactService=r,this.databaseService=b,this.docService=f,this.configService=W,this.loggingService=T,this.commonDbService=j,this.documentIAM$=new p(null),this.workspaceIAM$=new p(null),this.roles$=new p([]),this.getDocumentIamSubscription=null,this.getOrganizationIamSubscription=null,this.getWorkspaceIamSubscription=null;try{this.authService.setIamService(this),this.getUser(),this.databaseService.getDb().pipe(h(i=>!!i),v(1)).subscribe(i=>{i&&(this.user&&this.getDocumentIam(),this.getDocumentPaths())},i=>{this.loggingService.catch("Error in CommentService getDb subscription: ",i)}),this.getRole$().pipe(v(1)).subscribe(i=>{this.authService?.getUser()&&!i&&this.analyticsService.trackEvent(D.Events.Iam.USER_ACCESS_DENIED)}),this.documentIAM$.subscribe(i=>{i?.accessType&&this.contactService.setDocumentAccessType(i.accessType)})}catch(i){this.loggingService.catch("Error in IamService constructor: ",i)}}clearCache(){this.loggingService.log("%c[WB] Calling FUNCTION: clearCache in IamService","color: green;");try{this.documentIAM$.next(null),this.workspaceIAM$.next(null),this.roles$.next([]),this.documentPaths=null}catch(e){this.loggingService.catch("Error in IamService clearCache: ",e)}}getUser(){try{this.authService.getUser$().pipe(h(e=>!!e)).subscribe(e=>{this.user=e,this.user?this.databaseService.getDbValue()&&this.getDocumentIam():(this.getDocumentIamSubscription?.unsubscribe(),this.getOrganizationIamSubscription?.unsubscribe(),this.getWorkspaceIamSubscription?.unsubscribe())},e=>{this.loggingService.catch("Error in IamService getUser$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getUser: ",e)}}getDocumentPaths(){try{this.docService.getDocumentPaths$().pipe(h(e=>!!e)).subscribe(e=>{this.documentPaths=e,this.getDocumentIam(),this.getWorkspaceIam()},e=>{this.loggingService.catch("Error in IamService getDocumentPaths$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getDocumentPaths: ",e)}}getDocumentIam(){try{this.getDocumentIamSubscription&&(this.getDocumentIamSubscription.unsubscribe(),this.getDocumentIamSubscription=null),this.user?this.getDocumentIamSubscription=this.docService.getDocumentIam$().subscribe(e=>{let t=e||new M;this.documentIAM$.next(t)},e=>{this.loggingService.catch("Error in IamService getDocumentIam$ subscription: ",e)}):this.documentIAM$.next(null)}catch(e){this.loggingService.catch("Error in IamService getDocumentIam: ",e)}}getWorkspaceIam(){try{this.getWorkspaceIamSubscription||(this.getWorkspaceIamSubscription=this.commonDbService.dbListener({feature:"workspaceIam",properties:{skipFirestore:!0}}).pipe(d(e=>u(null))).subscribe(e=>{this.workspaceIAM$.next(e?.data),this.roles$.next(e?.data?.roles||[])}))}catch(e){this.loggingService.catch("Error in IamService getWorkspaceIam: ",e)}}isUserAllowed$(){return this.getRole$().pipe(c(e=>!!e),l())}getDocumentIAM$(){return this.documentIAM$.asObservable()}getRoles$(){return this.roles$.asObservable().pipe(c(e=>e?.length?e:$.WorkspaceRoles))}getFeaturesAccessLevel$(){return this.documentIAM$.asObservable().pipe(c(e=>e?.features),n(e=>this.getRole$().pipe(c(t=>(t===a.ADMIN&&(e=e&&JSON.parse(JSON.stringify(e||{})),e?.all?.disabled&&(e.all.disabled=!1)),e)))))}hasRole(e){try{return e===this.getRole()}catch(t){return this.loggingService.catch("Error in IamService hasRole: ",t),!1}}hasRoleAny(e=[]){try{return e?.includes(this.getRole()||"")}catch(t){return this.loggingService.catch("Error in IamService hasRoleAny: ",t),!1}}hasRole$(e){try{return this.authService.getUser$().pipe(n(()=>this.documentIAM$.pipe(h(t=>!!t),n(()=>this.workspaceIAM$.pipe(c(()=>e===this.getRole()))))))}catch(t){return this.loggingService.catch("Error in IamService hasRole$: ",t),u(!1)}}getRole$(){try{return this.authService.getUser$().pipe(n(()=>this.configService.getSF$()),n(()=>this.configService.getSF()?this.contactService.isUserGlobalContact$():u(null)),n(()=>this.configService.getSF()?this.documentIAM$.pipe(h(e=>!!e),l(I)):u(null)),n(()=>this.workspaceIAM$.pipe(l(I))),c(()=>this.getRole()))}catch(e){return this.loggingService.catch("Error in IamService getRole$: ",e),u(null)}}getRole(){try{let e=this.configService.getSF();if(this.user?.isAdmin)return a.ADMIN;return a.COMMENTER;if(this.user)switch((this.documentIAM$.value?this.documentIAM$.value?.features?.all?.restricted:!1)?m.RESTRICTED:this.documentIAM$.value?this.documentIAM$.value?.documentAccessType||m.PUBLIC:null){case m.PUBLIC:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||a.COMMENTER;break;case m.RESTRICTED:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||null;break;default:break}}catch(e){this.loggingService.catch("Error in IamService getRole: ",e)}return null}isUserAdmin$(){return this.getRole$().pipe(c(e=>e===a.ADMIN),l())}isUserAdmin(){try{return this.getRole()===a.ADMIN}catch(e){return this.loggingService.catch("Error in IamService isUserAdmin: ",e),!1}}getUserFromDocumentIAM(e,t){try{if(e||t){let r;return e&&(r=this.documentIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.documentIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromDocumentIAM: ",r)}}getUserFromWorkspaceIAM(e,t){try{if(e||t){let r;return e&&(r=this.workspaceIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.workspaceIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromWorkspaceIAM: ",r)}}};o.\u0275fac=function(t){return new(t||o)(s(E),s(U),s(F),s(k),s(w),s(y),s(R),s(C))},o.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"});let S=o;return S})();export{Z as a};