UNPKG

p3x-redis-ui-material

Version:

💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity

14 lines • 101 kB
import{a as Jt}from"./chunk-IZOMIYRD.js";import{a as ii}from"./chunk-NCBSDZX3.js";import{a as ni}from"./chunk-PVS3PBYN.js";import{a as Qe}from"./chunk-YPZ33LVT.js";import{a as Ge,b as He,c as ze}from"./chunk-BN33DLGQ.js";import{a as Ne,b as Ue}from"./chunk-SQBBDTZO.js";import"./chunk-KLZILXP3.js";import"./chunk-DCOXSL4B.js";import"./chunk-IDORGLM3.js";import{b as Je}from"./chunk-VQDF6UGR.js";import"./chunk-OTFMRDKW.js";import{a as ti,b as ei}from"./chunk-W7VPRHTK.js";import"./chunk-YBLUFXNR.js";import{b as We,c as Ze}from"./chunk-3QQZQR3D.js";import{e as Xe}from"./chunk-TEXSADK3.js";import{a as Be,b as qe}from"./chunk-AN7C4JCR.js";import{v as Ae}from"./chunk-ICUC3WIE.js";import{a as st}from"./chunk-YA4NX3C4.js";import{b as Le,c as Ve,e as Ye}from"./chunk-VMTBY4VN.js";import{b as $e,c as Ke}from"./chunk-HFDIHHHN.js";import{c as rt}from"./chunk-7JNYLOAK.js";import{$a as Y,$b as J,Ac as Zt,Ba as Bt,Bb as p,Bc as N,Ca as ve,Cb as g,D as me,Da as F,Db as M,Eb as qt,Ec as Ee,Fa as Se,Hc as Pe,Ia as Pt,Ja as be,Jc as ke,Ka as kt,Kb as It,Lb as Wt,N as Kt,Nd as Oe,O as ue,Od as Fe,P as dt,Pd as Me,Q as ge,Rd as je,U as A,V as fe,Vc as Ie,Wa as T,X as nt,Xa as C,Y as ot,Ya as x,Z as y,Zb as ht,_c as Yt,a as it,ab as X,ac as we,ba as b,bb as v,c as $t,ca as w,cb as l,d as E,db as a,dd as Te,e as de,eb as S,fa as Dt,fd as Xt,g as _e,ga as yt,id as Re,ja as V,jb as D,ka as _t,lb as u,n as pe,na as jt,nb as d,pa as Ce,ra as Et,uc as De,v as he,vc as ye,w as wt,wc as Tt,xa as c,yc as mt,za as xe,zb as pt}from"./chunk-KQUCMSSK.js";import"./chunk-FCVD6SGJ.js";import{a as Ht,b as zt,h as P}from"./chunk-O7S4L63H.js";var oi=(()=>{class o{dialog;constructor(t){this.dialog=t}show(t){return P(this,null,function*(){let{AclUserDialogComponent:e}=yield import("./chunk-DWCMOPSZ.js"),i=this.dialog.open(e,st({data:t,width:"600px"}));return new Promise(r=>{i.afterClosed().subscribe(s=>r(s))})})}static \u0275fac=function(e){return new(e||o)(ot(rt))};static \u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function ee(o){let n=o.cloneNode(!0),t=n.querySelectorAll("[id]"),e=o.nodeName.toLowerCase();n.removeAttribute("id");for(let i=0;i<t.length;i++)t[i].removeAttribute("id");return e==="canvas"?li(o,n):(e==="input"||e==="select"||e==="textarea")&&si(o,n),ri("canvas",o,n,li),ri("input, textarea, select",o,n,si),n}function ri(o,n,t,e){let i=n.querySelectorAll(o);if(i.length){let r=t.querySelectorAll(o);for(let s=0;s<i.length;s++)e(i[s],r[s])}}var Ui=0;function si(o,n){n.type!=="file"&&(n.value=o.value),n.type==="radio"&&n.name&&(n.name=`mat-clone-${n.name}-${Ui++}`)}function li(o,n){let t=n.getContext("2d");if(t)try{t.drawImage(o,0,0)}catch(e){}}function ae(o){let n=o.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:n.width,height:n.height,x:n.x,y:n.y}}function ie(o,n,t){let{top:e,bottom:i,left:r,right:s}=o;return t>=e&&t<=i&&n>=r&&n<=s}function Gi(o,n){let t=n.left<o.left,e=n.left+n.width>o.right,i=n.top<o.top,r=n.top+n.height>o.bottom;return t||e||i||r}function ft(o,n,t){o.top+=n,o.bottom=o.top+o.height,o.left+=t,o.right=o.left+o.width}function ai(o,n,t,e){let{top:i,right:r,bottom:s,left:_,width:h,height:m}=o,f=h*n,k=m*n;return e>i-k&&e<s+k&&t>_-f&&t<r+f}var Ot=class{_document;positions=new Map;constructor(n){this._document=n}clear(){this.positions.clear()}cache(n){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),n.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:ae(t)})})}handleScroll(n){let t=mt(n),e=this.positions.get(t);if(!e)return null;let i=e.scrollPosition,r,s;if(t===this._document){let m=this.getViewportScrollPosition();r=m.top,s=m.left}else r=t.scrollTop,s=t.scrollLeft;let _=i.top-r,h=i.left-s;return this.positions.forEach((m,f)=>{m.clientRect&&t!==f&&t.contains(f)&&ft(m.clientRect,_,h)}),i.top=r,i.left=s,{top:_,left:h}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function vi(o,n){let t=o.rootNodes;if(t.length===1&&t[0].nodeType===n.ELEMENT_NODE)return t[0];let e=n.createElement("div");return t.forEach(i=>e.appendChild(i)),e}function ce(o,n,t){for(let e in n)if(n.hasOwnProperty(e)){let i=n[e];i?o.setProperty(e,i,t?.has(e)?"important":""):o.removeProperty(e)}return o}function lt(o,n){let t=n?"":"none";ce(o.style,{"touch-action":n?"":"none","-webkit-user-drag":n?"":"none","-webkit-tap-highlight-color":n?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function ci(o,n,t){ce(o.style,{position:n?"":"fixed",top:n?"":"0",opacity:n?"":"0",left:n?"":"-999em"},t)}function Ft(o,n){return n&&n!="none"?o+" "+n:o}function di(o,n){o.style.width=`${n.width}px`,o.style.height=`${n.height}px`,o.style.transform=Ct(n.left,n.top)}function Ct(o,n){return`translate3d(${Math.round(o)}px, ${Math.round(n)}px, 0)`}var ut={capture:!0},Qt={passive:!1,capture:!0},Hi=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Pt({type:o,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(e,i){},styles:[`@layer cdk-resets { .cdk-drag-preview { background: none; border: none; padding: 0; color: inherit; inset: auto; } } .cdk-drag-placeholder *, .cdk-drag-preview * { pointer-events: none !important; } `],encapsulation:2,changeDetection:0})}return o})(),Lt=(()=>{class o{_ngZone=y(_t);_document=y(yt);_styleLoader=y(Ee);_renderer=y(Bt).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new E;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=jt([]);_globalListeners;_draggingPredicate=t=>t.isDragging();_domNodesToDirectives=null;pointerMove=new E;pointerUp=new E;constructor(){}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,Qt)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(t,e){if(!(this._activeDragInstances().indexOf(t)>-1)&&(this._styleLoader.load(Hi),this._activeDragInstances.update(i=>[...i,t]),this._activeDragInstances().length===1)){let i=e.type.startsWith("touch"),r=_=>this.pointerUp.next(_),s=[["scroll",_=>this._scroll.next(_),ut],["selectstart",this._preventDefaultWhileDragging,Qt]];i?s.push(["touchend",r,ut],["touchcancel",r,ut]):s.push(["mouseup",r,ut]),i||s.push(["mousemove",_=>this.pointerMove.next(_),Qt]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=s.map(([_,h,m])=>this._renderer.listen(this._document,_,h,m))})}}stopDragging(t){this._activeDragInstances.update(e=>{let i=e.indexOf(t);return i>-1?(e.splice(i,1),[...e]):e}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances().indexOf(t)>-1}scrolled(t){let e=[this._scroll];return t&&t!==this._document&&e.push(new $t(i=>this._ngZone.runOutsideAngular(()=>{let r=this._renderer.listen(t,"scroll",s=>{this._activeDragInstances().length&&i.next(s)},ut);return()=>{r()}}))),wt(...e)}registerDirectiveNode(t,e){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(t,e)}removeDirectiveNode(t){this._domNodesToDirectives?.delete(t)}getDragDirectiveForNode(t){return this._domNodesToDirectives?.get(t)||null}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=t=>{this._activeDragInstances().length>0&&t.preventDefault()};_persistentTouchmoveListener=t=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&t.preventDefault(),this.pointerMove.next(t))};_clearGlobalListeners(){this._globalListeners?.forEach(t=>t()),this._globalListeners=void 0}static \u0275fac=function(e){return new(e||o)};static \u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();function _i(o){let n=o.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(o)*n}function zi(o){let n=getComputedStyle(o),t=te(n,"transition-property"),e=t.find(_=>_==="transform"||_==="all");if(!e)return 0;let i=t.indexOf(e),r=te(n,"transition-duration"),s=te(n,"transition-delay");return _i(r[i])+_i(s[i])}function te(o,n){return o.getPropertyValue(n).split(",").map(e=>e.trim())}var $i=new Set(["position"]),ne=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(n,t,e,i,r,s,_,h,m,f){this._document=n,this._rootElement=t,this._direction=e,this._initialDomRect=i,this._previewTemplate=r,this._previewClass=s,this._pickupPositionOnPage=_,this._initialTransform=h,this._zIndex=m,this._renderer=f}attach(n){this._preview=this._createPreview(),n.appendChild(this._preview),pi(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(n){this._preview.style.transform=n}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(n){this._preview.classList.add(n)}getTransitionDuration(){return zi(this._preview)}addEventListener(n,t){return this._renderer.listen(this._preview,n,t)}_createPreview(){let n=this._previewTemplate,t=this._previewClass,e=n?n.template:null,i;if(e&&n){let r=n.matchSize?this._initialDomRect:null,s=n.viewContainer.createEmbeddedView(e,n.context);s.detectChanges(),i=vi(s,this._document),this._previewEmbeddedView=s,n.matchSize?di(i,r):i.style.transform=Ct(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else i=ee(this._rootElement),di(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return ce(i.style,{"pointer-events":"none",margin:pi(i)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},$i),lt(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("popover","manual"),i.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(r=>i.classList.add(r)):i.classList.add(t)),i}};function pi(o){return"showPopover"in o}var Ki={passive:!0},hi={passive:!1},ji={passive:!1,capture:!0},Bi=800,mi="cdk-drag-placeholder",ui=new Set(["position"]);function Si(o,n,t={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){let e=o.get(ve,null,{optional:!0})||o.get(Bt).createRenderer(null,null);return new oe(n,t,o.get(yt),o.get(_t),o.get(Xt),o.get(Lt),e)}var oe=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=jt(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new E;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=it.EMPTY;_pointerUpSubscription=it.EMPTY;_scrollSubscription=it.EMPTY;_resizeSubscription=it.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(n){n!==this._disabled&&(this._disabled=n,this._toggleNativeDragInteractions(),this._handles.forEach(t=>lt(t,n)))}_disabled=!1;beforeStarted=new E;started=new E;released=new E;ended=new E;entered=new E;exited=new E;dropped=new E;moved=this._moveEvents;data;constrainPosition;constructor(n,t,e,i,r,s,_){this._config=t,this._document=e,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=s,this._renderer=_,this.withRootElement(n).withParent(t.parentDragRef||null),this._parentPositions=new Ot(e),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(n){this._handles=n.map(e=>N(e)),this._handles.forEach(e=>lt(e,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(e=>{this._handles.indexOf(e)>-1&&t.add(e)}),this._disabledHandles=t,this}withPreviewTemplate(n){return this._previewTemplate=n,this}withPlaceholderTemplate(n){return this._placeholderTemplate=n,this}withRootElement(n){let t=N(n);if(t!==this._rootElement){this._removeRootElementListeners();let e=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[e.listen(t,"mousedown",this._pointerDown,hi),e.listen(t,"touchstart",this._pointerDown,Ki),e.listen(t,"dragstart",this._nativeDragStart,hi)]),this._initialTransform=void 0,this._rootElement=t}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(n){return this._boundaryElement=n?N(n):null,this._resizeSubscription.unsubscribe(),n&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(n){return this._parentDragRef=n,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&Gi(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let n=this._boundaryElement.getBoundingClientRect(),t=this._rootElement.getBoundingClientRect(),e=0,i=0;t.left<n.left?e=n.left-t.left:t.right>n.right&&(e=n.right-t.right),t.top<n.top?i=n.top-t.top:t.bottom>n.bottom&&(i=n.bottom-t.bottom);let r=this._activeTransform.x,s=this._activeTransform.y,_=r+e,h=s+i;this._rootElement.style.transform=Ct(_,h),this._activeTransform={x:_,y:h},this._passiveTransform={x:_,y:h}}}disableHandle(n){!this._disabledHandles.has(n)&&this._handles.indexOf(n)>-1&&(this._disabledHandles.add(n),lt(n,!0))}enableHandle(n){this._disabledHandles.has(n)&&(this._disabledHandles.delete(n),lt(n,this.disabled))}withDirection(n){return this._direction=n,this}_withDropContainer(n){this._dropContainer=n}getFreeDragPosition(){let n=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:n.x,y:n.y}}setFreeDragPosition(n){return this._activeTransform={x:0,y:0},this._passiveTransform.x=n.x,this._passiveTransform.y=n.y,this._dropContainer||this._applyRootElementTransform(n.x,n.y),this}withPreviewContainer(n){return this._previewContainer=n,this}_sortFromLastPointerPosition(){let n=this._lastKnownPointerPosition;n&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(n),n)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=n=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(n);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,n)}else this.disabled||this._initializeDragSequence(this._rootElement,n)};_pointerMove=n=>{let t=this._getPointerPositionOnPage(n);if(!this._hasStartedDragging()){let i=Math.abs(t.x-this._pickupPositionOnPage.x),r=Math.abs(t.y-this._pickupPositionOnPage.y);if(i+r>=this._config.dragStartThreshold){let _=Date.now()>=this._dragStartTime+this._getDragStartDelay(n),h=this._dropContainer;if(!_){this._endDragSequence(n);return}(!h||!h.isDragging()&&!h.isReceiving())&&(n.cancelable&&n.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(n)))}return}n.cancelable&&n.preventDefault();let e=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(e),this._dropContainer)this._updateActiveDropContainer(e,t);else{let i=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=e.x-i.x+this._passiveTransform.x,r.y=e.y-i.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:e,event:n,distance:this._getDragDistance(e),delta:this._pointerDirectionDelta})})};_pointerUp=n=>{this._endDragSequence(n)};_endDragSequence(n){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:n}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(n),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(n);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:n})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(n){gt(n)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),e=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(t,"selectstart",qi,ji)}),e){let i=this._rootElement,r=i.parentNode,s=this._placeholder=this._createPlaceholderElement(),_=this._marker=this._marker||this._document.createComment("");r.insertBefore(_,i),this._initialTransform=i.style.transform||"",this._preview=new ne(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,t)),ci(i,!1,ui),this._document.body.appendChild(r.replaceChild(s,i)),this.started.next({source:this,event:n}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this,event:n}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(n,t){this._parentDragRef&&t.stopPropagation();let e=this.isDragging(),i=gt(t),r=!i&&t.button!==0,s=this._rootElement,_=mt(t),h=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+Bi>Date.now(),m=i?ye(t):De(t);if(_&&_.draggable&&t.type==="mousedown"&&t.preventDefault(),e||r||h||m)return;if(this._handles.length){let O=s.style;this._rootElementTapHighlight=O.webkitTapHighlightColor||"",O.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(O=>this._updateOnScroll(O)),this._boundaryElement&&(this._boundaryRect=ae(this._boundaryElement));let f=this._previewTemplate;this._pickupPositionInElement=f&&f.template&&!f.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,n,t);let k=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:k.x,y:k.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(n){ci(this._rootElement,!0,ui),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,e=t.getItemIndex(this),i=this._getPointerPositionOnPage(n),r=this._getDragDistance(i),s=t._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:r,dropPoint:i,event:n}),this.dropped.next({item:this,currentIndex:e,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:r,dropPoint:i,event:n}),t.drop(this,e,this._initialIndex,this._initialContainer,s,r,i,n),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:n,y:t},{x:e,y:i}){let r=this._initialContainer._getSiblingContainerFromPosition(this,n,t);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(n,t)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{let s=this._dropContainer.getItemIndex(this),_=this._dropContainer.getItemAtIndex(s+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,_),this._dropContainer=r,this._dropContainer.enter(this,n,t,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(e,i),this._dropContainer._sortItem(this,n,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(n,t):this._applyPreviewTransform(n-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let n=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(n.left,n.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(e=>{let i=_=>{(!_||this._preview&&mt(_)===this._preview.element&&_.propertyName==="transform")&&(s(),e(),clearTimeout(r))},r=setTimeout(i,t*1.5),s=this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){let n=this._placeholderTemplate,t=n?n.template:null,e;return t?(this._placeholderRef=n.viewContainer.createEmbeddedView(t,n.context),this._placeholderRef.detectChanges(),e=vi(this._placeholderRef,this._document)):e=ee(this._rootElement),e.style.pointerEvents="none",e.classList.add(mi),e}_getPointerPositionInElement(n,t,e){let i=t===this._rootElement?null:t,r=i?i.getBoundingClientRect():n,s=gt(e)?e.targetTouches[0]:e,_=this._getViewportScrollPosition(),h=s.pageX-r.left-_.left,m=s.pageY-r.top-_.top;return{x:r.left-n.left+h,y:r.top-n.top+m}}_getPointerPositionOnPage(n){let t=this._getViewportScrollPosition(),e=gt(n)?n.touches[0]||n.changedTouches[0]||{pageX:0,pageY:0}:n,i=e.pageX-t.left,r=e.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let _=this._ownerSVGElement.createSVGPoint();return _.x=i,_.y=r,_.matrixTransform(s.inverse())}}return{x:i,y:r}}_getConstrainedPointerPosition(n){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:e,y:i}=this.constrainPosition?this.constrainPosition(n,this,this._initialDomRect,this._pickupPositionInElement):n;if(this.lockAxis==="x"||t==="x"?i=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(e=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:r,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,_=this._boundaryRect,{width:h,height:m}=this._getPreviewRect(),f=_.top+s,k=_.bottom-(m-s),O=_.left+r,U=_.right-(h-r);e=gi(e,O,U),i=gi(i,f,k)}return{x:e,y:i}}_updatePointerDirectionDelta(n){let{x:t,y:e}=n,i=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-r.x),_=Math.abs(e-r.y);return s>this._config.pointerDirectionChangeThreshold&&(i.x=t>r.x?1:-1,r.x=t),_>this._config.pointerDirectionChangeThreshold&&(i.y=e>r.y?1:-1,r.y=e),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let n=this._handles.length>0||!this.isDragging();n!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=n,lt(this._rootElement,n))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(n=>n()),this._rootElementCleanups=void 0}_applyRootElementTransform(n,t){let e=1/this.scale,i=Ct(n*e,t*e),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=Ft(i,this._initialTransform)}_applyPreviewTransform(n,t){let e=this._previewTemplate?.template?void 0:this._initialTransform,i=Ct(n,t);this._preview.setTransform(Ft(i,e))}_getDragDistance(n){let t=this._pickupPositionOnPage;return t?{x:n.x-t.x,y:n.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:n,y:t}=this._passiveTransform;if(n===0&&t===0||this.isDragging()||!this._boundaryElement)return;let e=this._rootElement.getBoundingClientRect(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||e.width===0&&e.height===0)return;let r=i.left-e.left,s=e.right-i.right,_=i.top-e.top,h=e.bottom-i.bottom;i.width>e.width?(r>0&&(n+=r),s>0&&(n-=s)):n=0,i.height>e.height?(_>0&&(t+=_),h>0&&(t-=h)):t=0,(n!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:n})}_getDragStartDelay(n){let t=this.dragStartDelay;return typeof t=="number"?t:gt(n)?t.touch:t?t.mouse:0}_updateOnScroll(n){let t=this._parentPositions.handleScroll(n);if(t){let e=mt(n);this._boundaryRect&&e!==this._boundaryElement&&e.contains(this._boundaryElement)&&ft(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=Tt(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(n,t){let e=this._previewContainer||"global";if(e==="parent")return n;if(e==="global"){let i=this._document;return t||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return N(e)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=n=>{if(this._handles.length){let t=this._getTargetHandle(n);t&&!this._disabledHandles.has(t)&&!this.disabled&&n.preventDefault()}else this.disabled||n.preventDefault()};_getTargetHandle(n){return this._handles.find(t=>n.target&&(n.target===t||t.contains(n.target)))}_conditionallyInsertAnchor(n,t,e){if(n===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(t===this._initialContainer&&t.hasAnchor){let i=this._anchor??=ee(this._placeholder);i.classList.remove(mi),i.classList.add("cdk-drag-anchor"),i.style.transform="",e?e.before(i):N(t.element).appendChild(i)}}};function gi(o,n,t){return Math.max(n,Math.min(t,o))}function gt(o){return o.type[0]==="t"}function qi(o){o.preventDefault()}function at(o,n,t){let e=fi(n,o.length-1),i=fi(t,o.length-1);if(e===i)return;let r=o[e],s=i<e?-1:1;for(let _=e;_!==i;_+=s)o[_]=o[_+s];o[i]=r}function fi(o,n){return Math.max(0,Math.min(n,o))}var Mt=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction="ltr";constructor(n){this._dragDropRegistry=n}_previousSwap={drag:null,delta:0,overlaps:!1};start(n){this.withItems(n)}sort(n,t,e,i){let r=this._itemPositions,s=this._getItemIndexFromPointerPosition(n,t,e,i);if(s===-1&&r.length>0)return null;let _=this.orientation==="horizontal",h=r.findIndex(I=>I.drag===n),m=r[s],f=r[h].clientRect,k=m.clientRect,O=h>s?1:-1,U=this._getItemOffsetPx(f,k,O),Q=this._getSiblingOffsetPx(h,r,O),G=r.slice();return at(r,h,s),r.forEach((I,tt)=>{if(G[tt]===I)return;let ct=I.drag===n,H=ct?U:Q,W=ct?n.getPlaceholderElement():I.drag.getRootElement();I.offset+=H;let Z=Math.round(I.offset*(1/I.drag.scale));_?(W.style.transform=Ft(`translate3d(${Z}px, 0, 0)`,I.initialTransform),ft(I.clientRect,0,H)):(W.style.transform=Ft(`translate3d(0, ${Z}px, 0)`,I.initialTransform),ft(I.clientRect,H,0))}),this._previousSwap.overlaps=ie(k,t,e),this._previousSwap.drag=m.drag,this._previousSwap.delta=_?i.x:i.y,{previousIndex:h,currentIndex:s}}enter(n,t,e,i){let r=this._activeDraggables,s=r.indexOf(n),_=n.getPlaceholderElement();s>-1&&r.splice(s,1);let h=i==null||i<0?this._getItemIndexFromPointerPosition(n,t,e):i,m=r[h];if(m===n&&(m=r[h+1]),!m&&(h==null||h===-1||h<r.length-1)&&this._shouldEnterAsFirstChild(t,e)&&(m=r[0]),m&&!this._dragDropRegistry.isDragging(m)){let f=m.getRootElement();f.parentElement.insertBefore(_,f),r.splice(h,0,n)}else this._element.appendChild(_),r.push(n);_.style.transform="",this._cacheItemPositions()}withItems(n){this._activeDraggables=n.slice(),this._cacheItemPositions()}withSortPredicate(n){this._sortPredicate=n}reset(){this._activeDraggables?.forEach(n=>{let t=n.getRootElement();if(t){let e=this._itemPositions.find(i=>i.drag===n)?.initialTransform;t.style.transform=e||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(n){return this._getVisualItemPositions().findIndex(t=>t.drag===n)}getItemAtIndex(n){return this._getVisualItemPositions()[n]?.drag||null}updateOnScroll(n,t){this._itemPositions.forEach(({clientRect:e})=>{ft(e,n,t)}),this._itemPositions.forEach(({drag:e})=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(n){this._element=n}_cacheItemPositions(){let n=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let e=t.getVisibleElement();return{drag:t,offset:0,initialTransform:e.style.transform||"",clientRect:ae(e)}}).sort((t,e)=>n?t.clientRect.left-e.clientRect.left:t.clientRect.top-e.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(n,t,e){let i=this.orientation==="horizontal",r=i?t.left-n.left:t.top-n.top;return e===-1&&(r+=i?t.width-n.width:t.height-n.height),r}_getSiblingOffsetPx(n,t,e){let i=this.orientation==="horizontal",r=t[n].clientRect,s=t[n+e*-1],_=r[i?"width":"height"]*e;if(s){let h=i?"left":"top",m=i?"right":"bottom";e===-1?_-=s.clientRect[h]-r[m]:_+=r[h]-s.clientRect[m]}return _}_shouldEnterAsFirstChild(n,t){if(!this._activeDraggables.length)return!1;let e=this._itemPositions,i=this.orientation==="horizontal";if(e[0].drag!==this._activeDraggables[0]){let s=e[e.length-1].clientRect;return i?n>=s.right:t>=s.bottom}else{let s=e[0].clientRect;return i?n<=s.left:t<=s.top}}_getItemIndexFromPointerPosition(n,t,e,i){let r=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:_,clientRect:h})=>{if(_===n)return!1;if(i){let m=r?i.x:i.y;if(_===this._previousSwap.drag&&this._previousSwap.overlaps&&m===this._previousSwap.delta)return!1}return r?t>=Math.floor(h.left)&&t<Math.floor(h.right):e>=Math.floor(h.top)&&e<Math.floor(h.bottom)});return s===-1||!this._sortPredicate(s,n)?-1:s}},re=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(n,t){this._document=n,this._dragDropRegistry=t}start(n){let t=this._element.childNodes;this._relatedNodes=[];for(let e=0;e<t.length;e++){let i=t[e];this._relatedNodes.push([i,i.nextSibling])}this.withItems(n)}sort(n,t,e,i){let r=this._getItemIndexFromPointerPosition(n,t,e),s=this._previousSwap;if(r===-1||this._activeItems[r]===n)return null;let _=this._activeItems[r];if(s.drag===_&&s.overlaps&&s.deltaX===i.x&&s.deltaY===i.y)return null;let h=this.getItemIndex(n),m=n.getPlaceholderElement(),f=_.getRootElement();r>h?f.after(m):f.before(m),at(this._activeItems,h,r);let k=this._getRootNode().elementFromPoint(t,e);return s.deltaX=i.x,s.deltaY=i.y,s.drag=_,s.overlaps=f===k||f.contains(k),{previousIndex:h,currentIndex:r}}enter(n,t,e,i){let r=this._activeItems.indexOf(n);r>-1&&this._activeItems.splice(r,1);let s=i==null||i<0?this._getItemIndexFromPointerPosition(n,t,e):i;s===-1&&(s=this._getClosestItemIndexToPointer(n,t,e));let _=this._activeItems[s];_&&!this._dragDropRegistry.isDragging(_)?(this._activeItems.splice(s,0,n),_.getRootElement().before(n.getPlaceholderElement())):(this._activeItems.push(n),this._element.appendChild(n.getPlaceholderElement()))}withItems(n){this._activeItems=n.slice()}withSortPredicate(n){this._sortPredicate=n}reset(){let n=this._element,t=this._previousSwap;for(let e=this._relatedNodes.length-1;e>-1;e--){let[i,r]=this._relatedNodes[e];i.parentNode===n&&i.nextSibling!==r&&(r===null?n.appendChild(i):r.parentNode===n&&n.insertBefore(i,r))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(n){return this._activeItems.indexOf(n)}getItemAtIndex(n){return this._activeItems[n]||null}updateOnScroll(){this._activeItems.forEach(n=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(n){n!==this._element&&(this._element=n,this._rootNode=void 0)}_getItemIndexFromPointerPosition(n,t,e){let i=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(e)),r=i?this._activeItems.findIndex(s=>{let _=s.getRootElement();return i===_||_.contains(i)}):-1;return r===-1||!this._sortPredicate(r,n)?-1:r}_getRootNode(){return this._rootNode||(this._rootNode=Tt(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(n,t,e){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let i=1/0,r=-1;for(let s=0;s<this._activeItems.length;s++){let _=this._activeItems[s];if(_!==n){let{x:h,y:m}=_.getRootElement().getBoundingClientRect(),f=Math.hypot(t-h,e-m);f<i&&(i=f,r=s)}}return r}},Ci=.05,bi=.05,L=(function(o){return o[o.NONE=0]="NONE",o[o.UP=1]="UP",o[o.DOWN=2]="DOWN",o})(L||{}),R=(function(o){return o[o.NONE=0]="NONE",o[o.LEFT=1]="LEFT",o[o.RIGHT=2]="RIGHT",o})(R||{});function wi(o,n){return new se(n,o.get(Lt),o.get(yt),o.get(_t),o.get(Xt))}var se=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis=null;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new E;entered=new E;exited=new E;dropped=new E;sorted=new E;receivingStarted=new E;receivingStopped=new E;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=it.EMPTY;_verticalScrollDirection=L.NONE;_horizontalScrollDirection=R.NONE;_scrollNode;_stopScrollTimers=new E;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(n,t,e,i,r){this._dragDropRegistry=t,this._ngZone=i,this._viewportRuler=r;let s=this.element=N(n);this._document=e,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new Ot(e)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(n,t,e,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(n)),this._sortStrategy.enter(n,t,e,i),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:n,container:this,currentIndex:this.getItemIndex(n)})}exit(n){this._reset(),this.exited.next({item:n,container:this})}drop(n,t,e,i,r,s,_,h={}){this._reset(),this.dropped.next({item:n,currentIndex:t,previousIndex:e,container:this,previousContainer:i,isPointerOverContainer:r,distance:s,dropPoint:_,event:h})}withItems(n){let t=this._draggables;return this._draggables=n,n.forEach(e=>e._withDropContainer(this)),this.isDragging()&&(t.filter(i=>i.isDragging()).every(i=>n.indexOf(i)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(n){return this._direction=n,this._sortStrategy instanceof Mt&&(this._sortStrategy.direction=n),this}connectedTo(n){return this._siblings=n.slice(),this}withOrientation(n){if(n==="mixed")this._sortStrategy=new re(this._document,this._dragDropRegistry);else{let t=new Mt(this._dragDropRegistry);t.direction=this._direction,t.orientation=n,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,e)=>this.sortPredicate(t,e,this)),this}withScrollableParents(n){let t=this._container;return this._scrollableElements=n.indexOf(t)===-1?[t,...n]:n.slice(),this}withElementContainer(n){if(n===this._container)return this;let t=N(this.element),e=this._scrollableElements.indexOf(this._container),i=this._scrollableElements.indexOf(n);return e>-1&&this._scrollableElements.splice(e,1),i>-1&&this._scrollableElements.splice(i,1),this._sortStrategy&&this._sortStrategy.withElementContainer(n),this._cachedShadowRoot=null,this._scrollableElements.unshift(n),this._container=n,this}getScrollableParents(){return this._scrollableElements}getItemIndex(n){return this._isDragging?this._sortStrategy.getItemIndex(n):this._draggables.indexOf(n)}getItemAtIndex(n){return this._isDragging?this._sortStrategy.getItemAtIndex(n):this._draggables[n]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(n,t,e,i){if(this.sortingDisabled||!this._domRect||!ai(this._domRect,Ci,t,e))return;let r=this._sortStrategy.sort(n,t,e,i);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:n})}_startScrollingIfNecessary(n,t){if(this.autoScrollDisabled)return;let e,i=L.NONE,r=R.NONE;if(this._parentPositions.positions.forEach((s,_)=>{_===this._document||!s.clientRect||e||ai(s.clientRect,Ci,n,t)&&([i,r]=Wi(_,s.clientRect,this._direction,n,t),(i||r)&&(e=_))}),!i&&!r){let{width:s,height:_}=this._viewportRuler.getViewportSize(),h={width:s,height:_,top:0,right:s,bottom:_,left:0};i=Di(h,t),r=yi(h,n),e=window}e&&(i!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||e!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=r,this._scrollNode=e,(i||r)&&e?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let n=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=n.msScrollSnapType||n.scrollSnapType||"",n.scrollSnapType=n.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let n=this._container.style;n.scrollSnapType=n.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),he(0,_e).pipe(dt(this._stopScrollTimers)).subscribe(()=>{let n=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===L.UP?n.scrollBy(0,-t):this._verticalScrollDirection===L.DOWN&&n.scrollBy(0,t),this._horizontalScrollDirection===R.LEFT?n.scrollBy(-t,0):this._horizontalScrollDirection===R.RIGHT&&n.scrollBy(t,0)})};_isOverContainer(n,t){return this._domRect!=null&&ie(this._domRect,n,t)}_getSiblingContainerFromPosition(n,t,e){return this._siblings.find(i=>i._canReceive(n,t,e))}_canReceive(n,t,e){if(!this._domRect||!ie(this._domRect,t,e)||!this.enterPredicate(n,this))return!1;let i=this._getShadowRoot().elementFromPoint(t,e);return i?i===this._container||this._container.contains(i):!1}_startReceiving(n,t){let e=this._activeSiblings;!e.has(n)&&t.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(e.add(n),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:n,receiver:this,items:t}))}_stopReceiving(n){this._activeSiblings.delete(n),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:n,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(n=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(n);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let n=Tt(this._container);this._cachedShadowRoot=n||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let n=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,n))}};function Di(o,n){let{top:t,bottom:e,height:i}=o,r=i*bi;return n>=t-r&&n<=t+r?L.UP:n>=e-r&&n<=e+r?L.DOWN:L.NONE}function yi(o,n){let{left:t,right:e,width:i}=o,r=i*bi;return n>=t-r&&n<=t+r?R.LEFT:n>=e-r&&n<=e+r?R.RIGHT:R.NONE}function Wi(o,n,t,e,i){let r=Di(n,i),s=yi(n,e),_=L.NONE,h=R.NONE;if(r){let m=o.scrollTop;r===L.UP?m>0&&(_=L.UP):o.scrollHeight-m>o.clientHeight&&(_=L.DOWN)}if(s){let m=o.scrollLeft;t==="rtl"?s===R.RIGHT?m<0&&(h=R.RIGHT):o.scrollWidth+m>o.clientWidth&&(h=R.LEFT):s===R.LEFT?m>0&&(h=R.LEFT):o.scrollWidth-m>o.clientWidth&&(h=R.RIGHT)}return[_,h]}var Zi=(()=>{class o{_injector=y(Dt);constructor(){}createDrag(t,e){return Si(this._injector,t,e)}createDropList(t){return wi(this._injector,t)}static \u0275fac=function(e){return new(e||o)};static \u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),le=new nt("CDK_DRAG_PARENT");var Ei=new nt("CdkDragHandle"),Pi=(()=>{class o{element=y(Et);_parentDrag=y(le,{optional:!0,skipSelf:!0});_dragDropRegistry=y(Lt);_stateChanges=new E;get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._stateChanges.next(this)}_disabled=!1;constructor(){this._parentDrag?._addHandle(this)}ngAfterViewInit(){if(!this._parentDrag){let t=this.element.nativeElement.parentElement;for(;t;){let e=this._dragDropRegistry.getDragDirectiveForNode(t);if(e){this._parentDrag=e,e._addHandle(this);break}t=t.parentElement}}}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}static \u0275fac=function(e){return new(e||o)};static \u0275dir=kt({type:o,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[2,"cdkDragHandleDisabled","disabled",J]},features:[It([{provide:Ei,useExisting:o}])]})}return o})(),ki=new nt("CDK_DRAG_CONFIG"),Ii=new nt("CdkDropList"),Ti=(()=>{class o{element=y(Et);dropContainer=y(Ii,{optional:!0,skipSelf:!0});_ngZone=y(_t);_viewContainerRef=y(Se);_dir=y(Yt,{optional:!0});_changeDetectorRef=y(ht);_selfHandle=y(Ei,{optional:!0,self:!0});_parentDrag=y(le,{optional:!0,skipSelf:!0});_dragDropRegistry=y(Lt);_destroyed=new E;_handles=new de([]);_previewTemplate=null;_placeholderTemplate=null;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled}_disabled=!1;constrainPosition;previewClass;previewContainer;scale=1;started=new V;released=new V;ended=new V;entered=new V;exited=new V;dropped=new V;moved=new $t(t=>{let e=this._dragRef.moved.pipe(pe(i=>({source:this,pointerPosition:i.pointerPosition,event:i.event,delta:i.delta,distance:i.distance}))).subscribe(t);return()=>{e.unsubscribe()}});_injector=y(Dt);constructor(){let t=this.dropContainer,e=y(ki,{optional:!0});this._dragRef=Si(this._injector,this.element,{dragStartThreshold:e&&e.dragStartThreshold!=null?e.dragStartThreshold:5,pointerDirectionChangeThreshold:e&&e.pointerDirectionChangeThreshold!=null?e.pointerDirectionChangeThreshold:5,zIndex:e?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),e&&this._assignDefaults(e),t&&(t.addItem(this),t._dropListRef.beforeStarted.pipe(dt(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}resetToBoundary(){this._dragRef.resetToBoundary()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t)}ngAfterViewInit(){xe(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(t){let e=t.rootElementSelector,i=t.freeDragPosition;e&&!e.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(t){let e=this._handles.getValue();e.push(t),this._handles.next(e)}_removeHandle(t){let e=this._handles.getValue(),i=e.indexOf(t);i>-1&&(e.splice(i,1),this._handles.next(e))}_setPreviewTemplate(t){this._previewTemplate=t}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(t){this._placeholderTemplate=t}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let t=this.element.nativeElement,e=t;this.rootElementSelector&&(e=t.closest!==void 0?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(e||t)}_getBoundaryElement(){let t=this.boundaryElement;return t?typeof t=="string"?this.element.nativeElement.closest(t):N(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){let e=this._dir,i=this.dragStartDelay,r=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.scale=this.scale,t.dragStartDelay=typeof i=="object"&&i?i:Zt(i),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),e&&t.withDirection(e.value)}}),t.beforeStarted.pipe(me(1)).subscribe(()=>{if(this._parentDrag){t.withParent(this._parentDrag._dragRef);return}let e=this.element.nativeElement.p