@mxtommy/kip 3.4.0-beta.1 → 3.4.0-beta.2
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.
- package/package.json +1 -1
- package/public/{chunk-XF4K3Q53.js → chunk-4DNKNA4U.js} +1 -1
- package/public/{chunk-ADHMKF4B.js → chunk-C42RPSVS.js} +1 -1
- package/public/{chunk-HKXXE6OQ.js → chunk-E6YSSMCH.js} +1 -1
- package/public/{chunk-Z2C7DJZW.js → chunk-M3G7SUBP.js} +1 -1
- package/public/{chunk-KTH4Z2KU.js → chunk-QHOUNSNZ.js} +1 -1
- package/public/{chunk-3TTRJSM2.js → chunk-QLP3O34L.js} +1 -1
- package/public/{chunk-GOJOQ6L7.js → chunk-R7DZQ52H.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-SZ5B6ZZ5.js → main-PFYYOPMD.js} +4 -4
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as xi,b as wi,c as Ai,d as Di}from"./chunk-5K7TBZVE.js";import{a as nt}from"./chunk-JGQZHRVH.js";import{a as ot,b as Gi,c as Ei,d as ki}from"./chunk-ECOFSL27.js";import{a as ke,b as Rt}from"./chunk-ZKAVJSP3.js";import{b as Ci,c as vi,d as Nt,e as Mi,f as W,g as yi,h as Ti,i as bt,j as le,k as Bt}from"./chunk-AADA4WFK.js";import{g as Da,i as Fa,n as Oa,o as N,p as oe,q as _i,u as Si}from"./chunk-GCRU2MQN.js";import{a as oi,b as ni,c as ri,d as Te,e as Se,g as li,h as xe,i as we,j as Ae,k as Qe,l as Ge}from"./chunk-S3ZVIKLY.js";import{a as Ze}from"./chunk-
|
|
1
|
+
import{a as xi,b as wi,c as Ai,d as Di}from"./chunk-5K7TBZVE.js";import{a as nt}from"./chunk-JGQZHRVH.js";import{a as ot,b as Gi,c as Ei,d as ki}from"./chunk-ECOFSL27.js";import{a as ke,b as Rt}from"./chunk-ZKAVJSP3.js";import{b as Ci,c as vi,d as Nt,e as Mi,f as W,g as yi,h as Ti,i as bt,j as le,k as Bt}from"./chunk-AADA4WFK.js";import{g as Da,i as Fa,n as Oa,o as N,p as oe,q as _i,u as Si}from"./chunk-GCRU2MQN.js";import{a as oi,b as ni,c as ri,d as Te,e as Se,g as li,h as xe,i as we,j as Ae,k as Qe,l as Ge}from"./chunk-S3ZVIKLY.js";import{a as Ze}from"./chunk-QHOUNSNZ.js";import{a as bi}from"./chunk-7MAW5JUV.js";import{B as U,C as Vt,a as Oe,d as Ga,e as Ea,f as ka,g as Gt,h as Xt,i as Et,o as Ia,q as O,r as Lt,s as gi,t as at,v as hi,x as L,y as it}from"./chunk-ENKPORJ2.js";import{$b as _,$d as Ua,$e as ti,Aa as y,Ab as ha,Ac as ya,Ae as za,Af as et,Bc as Ta,Be as ye,Bf as P,Cb as ae,Cc as Sa,Da as Ue,De as Ha,Df as tt,E as la,Eb as J,Ee as ne,Ef as R,Fb as ba,Ff as I,Gb as _a,Gc as Ie,Ge as Ka,H as Zt,Ic as gt,J as Ne,Ja as V,Jc as wt,K as ge,Ke as $a,Le as Ya,Mc as Ke,Md as Pa,N as sa,Na as We,Nc as $e,O as Mt,Q as Be,Qa as dt,Qd as La,Rb as me,Rd as Va,Sb as u,Sd as Na,Se as Za,T as ca,Tb as f,Te as Xa,Ub as G,Uc as xa,Vb as St,Ve as Qa,Wb as T,Wc as wa,We as Jt,Xb as S,Xc as ve,Xd as Ba,Xe as Ja,Yb as p,Yc as b,Zb as n,Zd as Ra,_b as o,_e as ei,a as X,ac as Ca,ad as Ye,ae as kt,af as ai,b as ce,bc as va,cc as Ma,dc as w,df as ii,ed as k,ef as Pt,f as de,fa as Re,fc as C,ff as B,g as vt,ga as yt,gc as g,hc as qe,he as ht,hf as D,ia as da,ic as je,ie as Xe,j as $t,jc as pt,je as Wa,kc as ut,kf as F,lb as s,lc as _e,le as Qt,lf as K,m as st,mc as Ce,me as Dt,mf as si,na as Tt,nb as pa,nf as ci,o as ct,oa as te,oe as Ft,of as di,pa as he,pb as ua,pe as z,pf as mi,qc as ie,qf as $,ra as Q,rc as xt,re as pe,rf as pi,sb as fa,sc as q,sd as Aa,se as Me,sf as It,t as Yt,ta as m,tc as ze,tf as Ee,uc as ft,uf as re,vc as r,vf as Y,wb as v,wc as A,wd as At,wf as ui,xa as ma,xb as be,xc as ee,xe as qa,xf as fi,yb as mt,yc as He,ye as ja,yf as Je,z as Ve,za as M,zb as ga,ze as H,zf as Ot}from"./chunk-SFNSRKY4.js";var Or=(()=>{class i{_settings=m(Gt);_router=m(Fa);dashboards=V([],{equal:Xt});activeDashboard=V(0);_widgetAction=new ct(null);widgetAction$=this._widgetAction.asObservable();_isDashboardStatic=new ct(!0);isDashboardStatic$=this._isDashboardStatic.asObservable();isDashboardStatic=Pa(this.isDashboardStatic$);blankDashboard=[{id:null,name:"Dashboard 1",configuration:[{w:12,h:12,id:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc",selector:"widget-tutorial",input:{widgetProperties:{type:"widget-tutorial",uuid:"d1d58e6f-f8b4-4a72-9597-7f92aa6776fc"}},x:0,y:0}]}];constructor(){let e=this._settings.getDashboardConfig();if(!e||e.length===0){console.warn("[Dashboard Service] No dashboards found in settings, creating blank dashboard");let t=this.blankDashboard.map(a=>ce(X({},a),{id:Oe.create()}));this.dashboards.set([...t])}else this.dashboards.set(this._settings.getDashboardConfig());xa(()=>{this._settings.saveDashboards(this.dashboards())})}toggleStaticDashboard(){this._isDashboardStatic.next(!this._isDashboardStatic.value)}add(e,t){this.dashboards.update(a=>[...a,{id:Oe.create(),name:e,configuration:t}])}update(e,t){this.dashboards.update(a=>a.map((l,d)=>d===e?ce(X({},l),{name:t}):l))}delete(e){this.dashboards.update(t=>t.filter((a,l)=>l!==e)),this.dashboards().length===0?(this.add("Dashboard "+(this.dashboards().length+1),[]),this.activeDashboard.set(0)):this.activeDashboard()>this.dashboards().length-1&&this.activeDashboard.set(this.dashboards().length-1)}duplicate(e,t){if(e<0||e>=this.dashboards().length){console.error(`[Dashboard Service] Invalid itemIndex: ${e}`);return}let a=this.dashboards()[e],l=Et(a);l.id=Oe.create(),l.name=t,Array.isArray(l.configuration)?l.configuration.forEach(d=>{d&&d.input?.widgetProperties?(d.id=Oe.create(),d.input.widgetProperties.uuid=d.id):console.error("Dashboard Service] Widget configuration is missing required properties:",d)}):(console.error("Dashboard Service] Dashboard configuration is not an array:",l.configuration),l.configuration=[]),this.dashboards.update(d=>[...d,l])}updateConfiguration(e,t){this.dashboards.update(a=>a.map((l,d)=>d===e?Xt(l.configuration,t)?l:ce(X({},l),{configuration:t}):l))}previousDashboard(){this.activeDashboard()+1>this.dashboards().length-1?this.activeDashboard.set(0):this.activeDashboard.set(this.activeDashboard()+1)}nextDashboard(){this.activeDashboard()-1<0?this.activeDashboard.set(this.dashboards().length-1):this.activeDashboard.set(this.activeDashboard()-1)}navigateToActive(){this._router.navigate(["/dashboard",this.activeDashboard()])}navigateTo(e){e<0||e>this.dashboards().length-1||this._router.navigate(["/dashboard",e])}deleteWidget(e){this._widgetAction.next({id:e,operation:"delete"})}duplicateWidget(e){this._widgetAction.next({id:e,operation:"duplicate"})}setStaticDashboard(e){this._isDashboardStatic.next(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=te({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function uo(i,c){i&1&&Ma(0)}var Pi=(()=>{class i{data=m(Se);static \u0275fac=function(t){return new(t||i)};static \u0275cmp=v({type:i,selectors:[["dialog-frame"]],decls:8,vars:3,consts:[[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],[1,"dialog-content-padding"],[4,"ngComponentOutlet"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"h6",1),r(2),o(),n(3,"button",2)(4,"mat-icon"),r(5,"close"),o()()(),n(6,"mat-dialog-content",3),ae(7,uo,1,0,"ng-container",4),o()),t&2&&(s(2),A(a.data.title),s(),p("mat-dialog-close",!1),s(4),p("ngComponentOutlet",a.data.componentType))},dependencies:[N,Ge,xe,we,Ae,ne,H,Aa],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}.dialog-content-padding[_ngcontent-%COMP%]{--mat-dialog-content-padding: 0px 24px 20px 24px}"]})}return i})();function fo(i,c){if(i&1&&(n(0,"button",4),r(1),o()),i&2){let e=g();p("mat-dialog-close",!0),s(),A(e.data.confirmBtnText)}}var Ii=(()=>{class i{data=m(Se);static \u0275fac=function(t){return new(t||i)};static \u0275cmp=v({type:i,selectors:[["dialog-confirmation"]],decls:12,vars:6,consts:[[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],["align","end"],["mat-flat-button","",3,"mat-dialog-close"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"h5",1),r(2),o(),n(3,"button",2)(4,"mat-icon"),r(5,"close"),o()()(),n(6,"mat-dialog-content"),r(7),o(),n(8,"mat-dialog-actions",3)(9,"button",4),r(10),o(),u(11,fo,2,2,"button",4),o()),t&2&&(s(2),A(a.data.title),s(),p("mat-dialog-close",!1),s(4),ee(" ",a.data.message,`
|
|
2
2
|
`),s(2),p("mat-dialog-close",!1),s(),A(a.data.cancelBtnText),s(),f(a.data.confirmBtnText?11:-1))},dependencies:[N,Ge,xe,we,Qe,Ae,ne,ye,H],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}"]})}return i})();function ho(i,c){if(i&1&&(n(0,"button",9),r(1),o()),i&2){let e=g(),t=ie(1);p("disabled",!t.valid),s(),A(e.data.confirmBtnText)}}var Li=(()=>{class i{dialogRef=m(Te);data=m(Se);saveName(){this.dialogRef.close(this.data)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=v({type:i,selectors:[["dialog-name"]],decls:19,vars:6,consts:[["name","ngForm"],["name","name",3,"ngSubmit"],[1,"dialogue-header"],["mat-dialog-title",""],["mat-icon-button","",1,"dialog-close-icon",3,"mat-dialog-close"],[1,"field-margin"],["matInput","","type","text","id","name","placeholder","Name","name","name","required","","cdkFocusInitial","",3,"ngModelChange","ngModel"],["align","end"],["mat-flat-button","",3,"mat-dialog-close"],["mat-flat-button","","type","submit",3,"disabled"]],template:function(t,a){if(t&1){let l=w();n(0,"form",1,0),C("ngSubmit",function(){return M(l),y(a.saveName())}),n(2,"div",2)(3,"h5",3),r(4),o(),n(5,"button",4)(6,"mat-icon"),r(7,"close"),o()()(),n(8,"mat-dialog-content")(9,"mat-form-field",5)(10,"mat-label"),r(11,"Name"),o(),n(12,"input",6),Sa("ngModelChange",function(h){return M(l),Ta(a.data.name,h)||(a.data.name=h),y(h)}),o(),n(13,"mat-error"),r(14," A name is required "),o()()(),n(15,"mat-dialog-actions",7)(16,"button",8),r(17),o(),u(18,ho,2,2,"button",9),o()()}t&2&&(s(4),A(a.data.title),s(),p("mat-dialog-close",!1),s(7),ya("ngModel",a.data.name),s(4),p("mat-dialog-close",!1),s(),A(a.data.cancelBtnText),s(),f(a.data.confirmBtnText?18:-1))},dependencies:[Ge,xe,we,Qe,Ae,oe,N,it,L,O,Lt,Vt,U,ne,ye,H,R,It,B,F,K,P,pi,di],styles:[".dialogue-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline}.dialog-close-icon[_ngcontent-%COMP%]{margin-right:15px}.mat-mdc-dialog-content[_ngcontent-%COMP%]{max-height:max-content}.field-margin[_ngcontent-%COMP%]{margin-left:15px;margin-bottom:15px}"]})}return i})();function _o(i,c){if(i&1&&(n(0,"mat-option",12),r(1),o()),i&2){let e=c.$implicit;p("value",Ie(e.value)),s(),A(e.label)}}function Co(i,c){if(i&1){let e=w();n(0,"button",21),C("click",function(){M(e);let a=g();return y(a.moveCtrlUp())}),n(1,"mat-icon"),r(2,"arrow_drop_up"),o()()}}function vo(i,c){if(i&1){let e=w();n(0,"button",22),C("click",function(){M(e);let a=g();return y(a.moveCtrlDown())}),n(1,"mat-icon"),r(2,"arrow_drop_down"),o()()}}var Vi=(()=>{class i{app=m(Ze);ctrlFormGroup=b.required();controlIndex=b(void 0);arrayLength=b(void 0);deleteCtrl=ve();moveUp=ve();moveDown=ve();colors=[];ngOnInit(){this.colors=this.app.configurableThemeColors}deleteControl(){let e={ctrlIndex:this.controlIndex(),pathID:this.ctrlFormGroup().get("pathID").value};this.deleteCtrl.emit(e)}moveCtrlUp(){this.moveUp.emit(this.controlIndex())}moveCtrlDown(){this.moveDown.emit(this.controlIndex())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=v({type:i,selectors:[["boolean-control-config"]],inputs:{ctrlFormGroup:[1,"ctrlFormGroup"],controlIndex:[1,"controlIndex"],arrayLength:[1,"arrayLength"]},outputs:{deleteCtrl:"deleteCtrl",moveUp:"moveUp",moveDown:"moveDown"},decls:36,vars:3,consts:[[1,"ctrl-grid","rounded-card","rounded-card-color",3,"formGroup"],[1,"controls","flex-container"],[1,"flex-label"],[1,"full-width"],["matInput","","type","string","placeholder","Enter a display label...","formControlName","ctrlLabel"],[1,"flex-settings"],[1,"settings"],["placeholder","Select Type...","formControlName","type","name","type","required",""],["value","1"],["value","2"],["value","3"],["placeholder","Select Color...","formControlName","color","name","color","required",""],[3,"value"],[1,"flex-full-width"],["formControlName","isNumeric"],[1,"actions"],[1,"flex-actions"],[1,"btn-grid"],["mat-icon-button","","type","button","aria-label","Move control up in the list",1,"up"],["mat-icon-button","","type","button","aria-label","Move control down in the list",1,"down"],["mat-icon-button","","type","button","aria-label","Delete control",1,"delete",3,"click"],["mat-icon-button","","type","button","aria-label","Move control up in the list",1,"up",3,"click"],["mat-icon-button","","type","button","aria-label","Move control down in the list",1,"down",3,"click"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-form-field",3)(4,"mat-label"),r(5,"Label"),o(),_(6,"input",4),o()(),n(7,"div",5)(8,"mat-form-field",6)(9,"mat-label"),r(10,"Type"),o(),n(11,"mat-select",7)(12,"mat-option",8),r(13,"Toggle"),o(),n(14,"mat-option",9),r(15,"Push"),o(),n(16,"mat-option",10),r(17,"Indicator"),o()()()(),n(18,"div",5)(19,"mat-form-field",6)(20,"mat-label"),r(21,"Color"),o(),n(22,"mat-select",11),T(23,_o,2,3,"mat-option",12,G),o()()(),n(25,"div",13)(26,"mat-checkbox",14),r(27," Use numeric path "),o()()(),n(28,"div",15)(29,"div",16)(30,"div",17),u(31,Co,3,0,"button",18),u(32,vo,3,0,"button",19),n(33,"button",20),C("click",function(){return a.deleteControl()}),n(34,"mat-icon"),r(35,"delete"),o()()()()()()),t&2&&(p("formGroup",a.ctrlFormGroup()),s(23),S(a.colors),s(8),f(a.controlIndex()!==0?31:-1),s(),f(a.controlIndex()!==a.arrayLength()-1?32:-1))},dependencies:[R,B,F,K,P,I,Y,Je,L,O,U,le,W,H,Rt,ke,oe,N],styles:['.ctrl-grid[_ngcontent-%COMP%]{display:grid;width:auto;height:auto;margin:0 0 10px;grid-template-columns:[col-start] calc(100% - 90px) [col1-end] 80px [col2-end];grid-template-areas:"controls actions";row-gap:0px;column-gap:10px;justify-items:center;align-items:center;justify-content:center;align-content:center;padding-top:20px}.controls[_ngcontent-%COMP%]{grid-area:controls;width:100%}.actions[_ngcontent-%COMP%]{grid-area:actions}.btn-grid[_ngcontent-%COMP%]{display:grid;width:80px;height:80px;margin:0;grid-template-columns:[col-start] 50% [col1-end] 50% [col2-end];grid-template-rows:[row-start] 50% [row1-end] 50% [row2-end];grid-template-areas:"up delete" "down delete";row-gap:0px;column-gap:0px;justify-items:center;align-items:center;justify-content:center;align-content:center}.up[_ngcontent-%COMP%]{grid-area:up}.down[_ngcontent-%COMP%]{grid-area:down}.delete[_ngcontent-%COMP%]{grid-area:delete}.flex-label[_ngcontent-%COMP%]{flex-grow:2;flex-shrink:2}.flex-settings[_ngcontent-%COMP%]{flex-grow:1;flex-shrink:1}.settings[_ngcontent-%COMP%]{min-width:100px}.flex-actions[_ngcontent-%COMP%]{flex-grow:0;flex-shrink:0}.flex-full-width[_ngcontent-%COMP%]{width:100%}']})}return i})();function Mo(i,c){if(i&1){let e=w();n(0,"boolean-control-config",4),C("moveUp",function(a){M(e);let l=g();return y(l.moveUp(a))})("moveDown",function(a){M(e);let l=g();return y(l.moveDown(a))})("deleteCtrl",function(a){M(e);let l=g();return y(l.deletePath(a))}),o()}if(i&2){let e=c.$implicit,t=c.$index,a=g();p("ctrlFormGroup",a.getFormGroup(e))("controlIndex",t)("arrayLength",a.arrayLength)}}var Ni=(()=>{class i{fb=m(tt);multiCtrlArray=b.required();addPath=ve();updatePath=ve();delPath=ve();multiFormGroup=null;arrayLength=0;multiCtrlArraySubscription=null;ngOnInit(){this.arrayLength=this.multiCtrlArray().length,this.multiFormGroup=new si({multiCtrlArray:this.multiCtrlArray()}),this.multiCtrlArraySubscription=this.multiCtrlArray().valueChanges.pipe(Mt(350)).subscribe(e=>{this.updatePath.emit(e)})}addCtrlGroup(){let e=Oe.create();this.multiCtrlArray().push(this.fb.group({ctrlLabel:[null,D.required],type:["1",D.required],pathID:[e],color:["contrast"],isNumeric:[!1],value:[null]})),this.arrayLength=this.multiCtrlArray().length;let t={path:{description:null,path:null,pathID:e,source:"default",pathType:"boolean",supportsPut:!0,isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:null,convertUnitTo:null,sampleTime:500},ctrlType:1};this.addPath.emit(t)}moveUp(e){let t=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e-1,t,{emitEvent:!1})}moveDown(e){let t=this.multiCtrlArray().at(e);this.multiCtrlArray().removeAt(e,{emitEvent:!1}),this.multiCtrlArray().insert(e+1,t,{emitEvent:!1})}deletePath(e){this.delPath.emit(e),this.arrayLength=this.multiCtrlArray().length}getFormGroup(e){return e}ngOnDestroy(){this.multiCtrlArraySubscription?.unsubscribe()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=v({type:i,selectors:[["boolean-multicontrol-options"]],inputs:{multiCtrlArray:[1,"multiCtrlArray"]},outputs:{addPath:"addPath",updatePath:"updatePath",delPath:"delPath"},decls:7,vars:1,consts:[[3,"formGroup"],["formArrayName","multiCtrlArray"],[1,"full-width",3,"ctrlFormGroup","controlIndex","arrayLength"],["type","button","mat-mini-fab","","color","primary","aria-label","Add control down in the list",1,"add-btn",3,"click"],[1,"full-width",3,"moveUp","moveDown","deleteCtrl","ctrlFormGroup","controlIndex","arrayLength"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"div",1),T(2,Mo,1,3,"boolean-control-config",2,St),n(4,"button",3),C("click",function(){return a.addCtrlGroup()}),n(5,"mat-icon"),r(6,"add"),o()()()()),t&2&&(p("formGroup",a.multiFormGroup),s(2),S(a.multiCtrlArray().controls))},dependencies:[R,K,I,Y,fi,Vi,ne,Ha,oe,N],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;padding-top:15px;padding-bottom:15px}.add-btn[_ngcontent-%COMP%]{margin-left:calc(50% - 20px)}"]})}return i})();var yo=["*"];var To=new Q("MAT_CARD_CONFIG"),Ol=(()=>{class i{appearance;constructor(){let e=m(To,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=v({type:i,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(t,a){t&2&&q("mat-mdc-card-outlined",a.appearance==="outlined")("mdc-card--outlined",a.appearance==="outlined")("mat-mdc-card-filled",a.appearance==="filled")("mdc-card--filled",a.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:yo,decls:1,vars:0,template:function(t,a){t&1&&(qe(),je(0))},styles:[`.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-elevated-container-elevation, var(--mat-sys-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mat-card-outlined-container-color, var(--mat-sys-surface));border-radius:var(--mat-card-outlined-container-shape, var(--mat-sys-corner-medium));border-width:var(--mat-card-outlined-outline-width, 1px);border-color:var(--mat-card-outlined-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mat-card-outlined-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.mat-mdc-card-filled{background-color:var(--mat-card-filled-container-color, var(--mat-sys-surface-container-highest));border-radius:var(--mat-card-filled-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-filled-container-elevation, var(--mat-sys-level0))}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-sys-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-sys-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-sys-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-sys-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-sys-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-sys-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-sys-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-sys-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-sys-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-sys-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-sys-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}
|
|
3
3
|
`],encapsulation:2,changeDetection:0})}return i})();var Bi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=be({type:i});static \u0275inj=he({imports:[z,z]})}return i})();function So(i,c){if(i&1&&(n(0,"mat-option",8),r(1),o()),i&2){let e=c.$implicit;p("value",Ie(e.value)),s(),A(e.label)}}var Ui=(()=>{class i{dsService=m(ot);app=m(Ze);displayName=b.required();showLabel=b.required();convertUnitTo=b.required();datasetUUID=b.required();datasetAverageArray=b.required();showAverageData=b.required();trackAgainstAverage=b.required();showDatasetMinimumValueLine=b.required();showDatasetMaximumValueLine=b.required();showDatasetAverageValueLine=b.required();showDatasetAngleAverageValueLine=b.required();verticalGraph=b.required();showTimeScale=b.required();showYScale=b.required();startScaleAtZero=b.required();yScaleSuggestedMin=b.required();yScaleSuggestedMax=b.required();enableMinMaxScaleLimit=b.required();yScaleMin=b.required();yScaleMax=b.required();numDecimal=b.required();color=b.required();colors=[];ngOnInit(){this.colors=this.app.configurableThemeColors,this.showAverageData().value||this.trackAgainstAverage().disable(),this.setValueScaleOptionsControls(this.enableMinMaxScaleLimit().value)}setValueScaleOptionsControls(e){e?(this.yScaleMin()?.enable(),this.yScaleMax()?.enable(),this.yScaleSuggestedMin()?.disable(),this.yScaleSuggestedMax()?.disable()):(this.yScaleMin()?.disable(),this.yScaleMax()?.disable(),this.yScaleSuggestedMin()?.enable(),this.yScaleSuggestedMax()?.enable())}setScaleControls(e){this.setValueScaleOptionsControls(e.value)}enableTrackAgainstMovingAverage(e){e.checked?this.trackAgainstAverage().enable():(this.trackAgainstAverage().setValue(e.checked),this.trackAgainstAverage().disable())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=v({type:i,selectors:[["config-display-chart-options"]],inputs:{displayName:[1,"displayName"],showLabel:[1,"showLabel"],convertUnitTo:[1,"convertUnitTo"],datasetUUID:[1,"datasetUUID"],datasetAverageArray:[1,"datasetAverageArray"],showAverageData:[1,"showAverageData"],trackAgainstAverage:[1,"trackAgainstAverage"],showDatasetMinimumValueLine:[1,"showDatasetMinimumValueLine"],showDatasetMaximumValueLine:[1,"showDatasetMaximumValueLine"],showDatasetAverageValueLine:[1,"showDatasetAverageValueLine"],showDatasetAngleAverageValueLine:[1,"showDatasetAngleAverageValueLine"],verticalGraph:[1,"verticalGraph"],showTimeScale:[1,"showTimeScale"],showYScale:[1,"showYScale"],startScaleAtZero:[1,"startScaleAtZero"],yScaleSuggestedMin:[1,"yScaleSuggestedMin"],yScaleSuggestedMax:[1,"yScaleSuggestedMax"],enableMinMaxScaleLimit:[1,"enableMinMaxScaleLimit"],yScaleMin:[1,"yScaleMin"],yScaleMax:[1,"yScaleMax"],numDecimal:[1,"numDecimal"],color:[1,"color"]},decls:80,vars:18,consts:[["minLine",""],[1,"tab-content"],[1,"chart-flex-container"],[1,"chart-panel-group"],[1,"full-width"],["matInput","","placeholder","Enter a label to display","name","displayName",3,"formControl"],["name","showLabel",1,"full-width",3,"formControl"],["placeholder","Select Color...","name","color","required","",3,"formControl"],[3,"value"],[1,"flex-item-rounded-card","rounded-card-color"],[2,"margin-left","10px"],["matInput","","type","number","min","0","max","5","placeholder","Enter or select number...","name","numDecimal","required","",3,"formControl"],["name","showAverageData",1,"full-width",2,"margin-top","10px",3,"change","formControl"],["name","trackAgainstAverage",1,"full-width",2,"margin-left","25px",3,"formControl"],[1,"no-margin"],[1,"mat-caption"],["aria-label","Select an option","name","enableMinMaxScaleLimit",1,"chart-option-radio-group",3,"formControl"],[1,"chart-option-radio-button",3,"change","value"],[1,"chart-option-radio-button-config"],[1,"chart-option-radio-button-config-form-field"],["matInput","","type","number","name","yScaleSuggestedMin",3,"formControl"],["matInput","","type","number","name","yScaleSuggestedMax",3,"formControl"],[1,"chart-option-radio-button-config-item"],["matInput","","type","number","name","yScaleMin","required","",3,"formControl"],["matInput","","type","number","name","yScaleMax","required","",3,"formControl"],["name","showYScale",1,"full-width",3,"formControl"],["name","showTimeScale",1,"full-width",3,"formControl"],["name","showDatasetMaximumValueLine",1,"full-width",3,"formControl"],["name","showDatasetAverageValueLine",1,"full-width",3,"formControl"],["name","showDatasetMinimumValueLine",1,"full-width",3,"formControl"]],template:function(t,a){if(t&1){let l=w();n(0,"div",1)(1,"div",2)(2,"div",3)(3,"mat-form-field",4)(4,"mat-label"),r(5,"Widget Label"),o(),_(6,"input",5),o()(),n(7,"div",3)(8,"mat-checkbox",6),r(9," Show Label "),o()()(),n(10,"div",2)(11,"mat-form-field",4)(12,"mat-label"),r(13,"Color"),o(),n(14,"mat-select",7),T(15,So,2,3,"mat-option",8,G),o()()(),n(17,"div",2)(18,"div",9)(19,"div")(20,"p"),r(21,"Series"),o(),n(22,"mat-form-field",10)(23,"mat-label"),r(24,"Value Decimal Places"),o(),_(25,"input",11),o(),n(26,"mat-checkbox",12),C("change",function(h){return M(l),y(a.enableTrackAgainstMovingAverage(h))}),r(27," Display Moving Average "),o(),n(28,"mat-checkbox",13),r(29," Track Against Moving Average "),o()()(),n(30,"div",9)(31,"div")(32,"p",14),r(33,"Data Scale"),o(),n(34,"span",15),r(35,"(Default node is automatic scale)"),o(),n(36,"mat-radio-group",16)(37,"mat-radio-button",17),C("change",function(h){return M(l),y(a.setScaleControls(h))}),r(38,"Auto Scale"),o(),n(39,"div",18)(40,"mat-form-field",19)(41,"mat-label"),r(42,"Suggested Min"),o(),_(43,"input",20),o(),n(44,"mat-form-field",19)(45,"mat-label"),r(46,"Suggested Max"),o(),_(47,"input",21),o()(),n(48,"mat-radio-button",17),C("change",function(h){return M(l),y(a.setScaleControls(h))}),r(49,"Fixed Scale"),o(),n(50,"div",18)(51,"div",22)(52,"mat-form-field",19)(53,"mat-label"),r(54,"Min"),o(),_(55,"input",23),o()(),n(56,"div",22)(57,"mat-form-field",19)(58,"mat-label"),r(59,"Max"),o(),_(60,"input",24),o()()()(),n(61,"mat-checkbox",25),r(62," Show Scale Ticks "),o()()(),n(63,"div",9)(64,"div")(65,"p",14),r(66,"Time Scale"),o(),n(67,"mat-checkbox",26),r(68," Show Scale Ticks "),o()()(),n(69,"div",9)(70,"div")(71,"p",14),r(72,"Dataset"),o(),n(73,"mat-checkbox",27),r(74," Show Maximum Line "),o(),n(75,"mat-checkbox",28),r(76," Show Average Line "),o(),n(77,"mat-checkbox",29,0),r(79," Show Minimum Line "),o()()()()()}t&2&&(s(6),p("formControl",a.displayName()),s(2),p("formControl",a.showLabel()),s(6),p("formControl",a.color()),s(),S(a.colors),s(10),p("formControl",a.numDecimal()),s(),p("formControl",a.showAverageData()),s(2),p("formControl",a.trackAgainstAverage()),s(8),p("formControl",a.enableMinMaxScaleLimit()),s(),p("value",!1),s(6),p("formControl",a.yScaleSuggestedMin()),s(4),p("formControl",a.yScaleSuggestedMax()),s(),p("value",!0),s(7),p("formControl",a.yScaleMin()),s(5),p("formControl",a.yScaleMax()),s(),p("formControl",a.showYScale()),s(6),p("formControl",a.showTimeScale()),s(6),p("formControl",a.showDatasetMaximumValueLine()),s(2),p("formControl",a.showDatasetAverageValueLine()),s(2),p("formControl",a.showDatasetMinimumValueLine()))},dependencies:[Bi,it,L,O,Rt,ke,Bt,le,W,bt,Vt,U,ki,Gi,Ei,I,B,Ee,F,P,et,Ot,re],styles:[".chart-flex-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;margin:15px 0;gap:15px;align-items:stretch}.chart-panel-group[_ngcontent-%COMP%]{min-width:250px;flex-grow:1}.no-margin[_ngcontent-%COMP%]{margin:0}.chart-option-radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:0;align-items:flex-start}.chart-option-radio-button[_ngcontent-%COMP%]{margin:0}.chart-option-radio-button-config[_ngcontent-%COMP%]{margin-left:35px;display:flex;flex-direction:row;flex-wrap:wrap;gap:10px;align-items:flex-start}.chart-option-radio-button-config-item[_ngcontent-%COMP%]{flex-grow:0;flex-shrink:1;min-width:50px}.chart-option-radio-button-config-form-field[_ngcontent-%COMP%]{display:block;max-width:118px}"]})}return i})();var xo=(i,c)=>c.uuid;function wo(i,c){if(i&1&&(n(0,"mat-option",4),r(1),o()),i&2){let e=c.$implicit;p("value",e.uuid),s(),ee(" ",e.label," ")}}function Ao(i,c){if(i&1&&(n(0,"mat-option",4),r(1),o()),i&2){let e=c.$implicit;p("value",e.measure),s(),ee(" ",e.description," ")}}function Go(i,c){if(i&1&&(n(0,"mat-optgroup",6),T(1,Ao,2,2,"mat-option",4,G),o()),i&2){let e=c.$implicit;p("label",e.group),s(),S(e.units)}}var Wi=(()=>{class i{datasetService=m(ot);units=m(nt);datasetUUID=b.required();convertUnitTo=b.required();availableDataSets=[];unitList={};ngOnInit(){this.availableDataSets=this.datasetService.list().sort();let e=this.datasetUUID();e.value&&this.setPathUnits(e.value)}setPathUnits(e){let t=this.datasetService.getDatasetConfig(e);return e&&t?(this.unitList=this.units.getConversionsForPath(t.path),this.convertUnitTo()?.enable(),!0):(this.unitList=this.units.getConversionsForPath(""),this.convertUnitTo()?.disable(),!1)}datasetChanged(e){this.setPathUnits(e.value)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=v({type:i,selectors:[["config-dataset-chart-options"]],inputs:{datasetUUID:[1,"datasetUUID"],convertUnitTo:[1,"convertUnitTo"]},decls:14,vars:2,consts:[[1,"display-content","tab-content"],[1,"widget-options-grid"],[1,"options-grid-span2"],["placeholder","Select dataset...","name","datasetUUID","required","",3,"selectionChange","formControl"],[3,"value"],["placeholder","Select unit...","name","convertUnitTo","required","",3,"formControl"],[3,"label"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),r(4,"Dataset"),o(),n(5,"mat-select",3),C("selectionChange",function(d){return a.datasetChanged(d)}),T(6,wo,2,2,"mat-option",4,xo),o()(),n(8,"mat-form-field",2)(9,"mat-label"),r(10,"Display Format"),o(),n(11,"mat-select",5),T(12,Go,3,1,"mat-optgroup",6,G),o()()()()),t&2&&(s(5),p("formControl",a.datasetUUID()),s(),S(a.availableDataSets),s(5),p("formControl",a.convertUnitTo()),s(),S(a.unitList.conversions))},dependencies:[it,L,O,Bt,le,W,Nt,I,F,P,re],styles:[".display-content[_ngcontent-%COMP%]{display:block;height:100%;width:100%;padding-top:15px;padding-bottom:10px}"]})}return i})();var qi=(()=>{class i{transform(e){return Object.keys(e)}static \u0275fac=function(t){return new(t||i)};static \u0275pipe=ga({name:"objectKeys",type:i,pure:!0})}return i})();var ko=["panel"],Do=["*"];function Fo(i,c){if(i&1&&(n(0,"div",1,0),je(2),o()),i&2){let e=c.id,t=g();ft(t._classList),q("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),p("id",t.id),me("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e))}}var ta=class{source;option;constructor(c,e){this.source=c,this.option=e}},Hi=new Q("mat-autocomplete-default-options",{providedIn:"root",factory:Po});function Po(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1}}var jt=(()=>{class i{_changeDetectorRef=m(Ye);_elementRef=m(dt);_defaults=m(Hi);_animationsDisabled=Me();_activeOptionChanges=vt.EMPTY;_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple;optionSelected=new J;opened=new J;closed=new J;optionActivated=new J;set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}id=m(ht).getId("mat-autocomplete-");inertGroups;constructor(){let e=m(Na);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new Wa(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let t=new ta(this,e);this.optionSelected.emit(t)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return!1}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=v({type:i,selectors:[["mat-autocomplete"]],contentQueries:function(t,a,l){if(t&1&&(pt(l,W,5),pt(l,vi,5)),t&2){let d;_e(d=Ce())&&(a.options=d),_e(d=Ce())&&(a.optionGroups=d)}},viewQuery:function(t,a){if(t&1&&(ut(pa,7),ut(ko,5)),t&2){let l;_e(l=Ce())&&(a.template=l.first),_e(l=Ce())&&(a.panel=l.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",k],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",k],requireSelection:[2,"requireSelection","requireSelection",k],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",k],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",k]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[gt([{provide:Ci,useExisting:i}])],ngContentSelectors:Do,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,a){t&1&&(qe(),ae(0,Fo,3,17,"ng-template"))},styles:[`div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:relative;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}@keyframes _mat-autocomplete-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}.mat-autocomplete-panel-animations-enabled{animation:_mat-autocomplete-enter 120ms cubic-bezier(0, 0, 0.2, 1)}mat-autocomplete{display:none}
|
|
4
4
|
`],encapsulation:2,changeDetection:0})}return i})();var Io={provide:Pt,useExisting:Tt(()=>_t),multi:!0};var Ki=new Q("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let i=m(Ue);return()=>Jt(i)}});function Oo(i){let c=m(Ue);return()=>Jt(c)}var Lo={provide:Ki,deps:[],useFactory:Oo},_t=(()=>{class i{_environmentInjector=m(ma);_element=m(dt);_injector=m(Ue);_viewContainerRef=m(fa);_zone=m(ba);_changeDetectorRef=m(Ye);_dir=m(Ft,{optional:!0});_formField=m(hi,{optional:!0,host:!0});_viewportRuler=m(Za);_scrollStrategy=m(Ki);_renderer=m(ua);_animationsDisabled=Me();_defaults=m(Hi,{optional:!0});_overlayRef;_portal;_componentDestroyed=!1;_initialized=new st;_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue;_valueOnAttach;_valueOnLastKeydown;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=vt.EMPTY;_breakpointObserver=m(kt);_handsetLandscapeSubscription=vt.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption;_closeKeyEventStream=new st;_overlayPanelClass=Ua(this._defaults?.overlayPanelClass||[]);_windowBlurHandler=()=>{this._canOpenOnNextFocus=this.panelOpen||!this._hasFocus()};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled;constructor(){}_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler)}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}_overlayAttached=!1;openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&Dt(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Ne(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(ge(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(ge(()=>this._overlayAttached)):Yt()).pipe(Ve(e=>e instanceof Mi?e:null))}optionSelections=la(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(Re(e),yt(()=>Ne(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(yt(()=>this.optionSelections))});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return new $t(e=>{let t=l=>{let d=Va(l),h=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,x=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&d!==this._element.nativeElement&&!this._hasFocus()&&(!h||!h.contains(d))&&(!x||!x.contains(d))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(d)&&e.next(l)},a=[this._renderer.listen("document","click",t),this._renderer.listen("document","auxclick",t),this._renderer.listen("document","touchend",t)];return()=>{a.forEach(l=>l())}})}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let t=e,a=t.keyCode,l=Xe(t);if(a===27&&!l&&t.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&a===13&&this.panelOpen&&!l)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){let d=this.autocomplete._keyManager.activeItem,h=a===38||a===40;a===9||h&&!l&&this.panelOpen?this.autocomplete._keyManager.onKeydown(t):h&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(h||this.autocomplete._keyManager.activeItem!==d)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let t=e.target,a=t.value;if(t.type==="number"&&(a=a==""?null:parseFloat(a)),this._previousValue!==a){if(this._previousValue=a,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(a),!a)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let l=this.autocomplete.options?.find(d=>d.selected);if(l){let d=this._getDisplayValue(l.value);a!==d&&l.deselect(!1)}}if(this._canOpen()&&this._hasFocus()){let l=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(l)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_hasFocus(){return La()===this._element.nativeElement}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new $t(a=>{_a(()=>{a.next()},{injector:this._environmentInjector})}),t=this.autocomplete.options?.changes.pipe(da(()=>this._positionStrategy.reapplyLastPosition()),ca(0))??Yt();return Ne(e,t).pipe(yt(()=>this._zone.run(()=>{let a=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),a!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),Be(1)).subscribe(a=>this._setValueAndClose(a))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let t=this.autocomplete;return t&&t.displayWith?t.displayWith(e):e}_assignOptionValue(e){let t=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(t??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let t=this.autocomplete,a=e?e.source:this._pendingAutoselectedOption;a?(this._clearPreviousSelectedOption(a),this._assignOptionValue(a.value),this._onChange(a.value),t._emitSelectEvent(a),this._element.nativeElement.focus()):t.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,t){this.autocomplete?.options?.forEach(a=>{a!==e&&a.selected&&a.deselect(t)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let t=this.autocomplete.id;Qt(this._trackedModal,"aria-owns",t)}}_attachOverlay(e){this.autocomplete;let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new Ka(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),t=ai(this._injector,this._getOverlayConfig()),this._overlayRef=t,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(pe.HandsetLandscape).subscribe(l=>{l.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),t&&!t.hasAttached()&&(t.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let a=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&a!==this.panelOpen&&this._emitOpened()}_handlePanelKeydown=e=>{(e.keyCode===27&&!Xe(e)||e.keyCode===38&&Xe(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new Ja({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass,panelClass:this._overlayPanelClass,disableAnimations:this._animationsDisabled})}_getOverlayPosition(){let e=ei(this._injector,this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let t=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],a=this._aboveClass,l=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:a},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:a}],d;this.position==="above"?d=l:this.position==="below"?d=t:d=[...t,...l],e.withPositions(d)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let t=-1;for(let a=0;a<e.options.length;a++)if(!e.options.get(a).disabled){t=a;break}e._keyManager.setActiveItem(t)}else e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled}_scrollToOption(e){let t=this.autocomplete,a=yi(e,t.options,t.optionGroups);if(e===0&&a===1)t._setScrollTop(0);else if(t.panel){let l=t.options.toArray()[e];if(l){let d=l._getHostElement(),h=Ti(d.offsetTop,d.offsetHeight,t._getScrollTop(),t.panel.nativeElement.offsetHeight);t._setScrollTop(h)}}}_trackedModal=null;_applyModalPanelOwnership(){let e=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=this.autocomplete.id;this._trackedModal&&Dt(this._trackedModal,"aria-owns",t),Qt(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;Dt(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static \u0275fac=function(t){return new(t||i)};static \u0275dir=mt({type:i,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(t,a){t&1&&C("focusin",function(){return a._handleFocus()})("blur",function(){return a._onTouched()})("input",function(d){return a._handleInput(d)})("keydown",function(d){return a._handleKeydown(d)})("click",function(){return a._handleClick()}),t&2&&me("autocomplete",a.autocompleteAttribute)("role",a.autocompleteDisabled?null:"combobox")("aria-autocomplete",a.autocompleteDisabled?null:"list")("aria-activedescendant",a.panelOpen&&a.activeOption?a.activeOption.id:null)("aria-expanded",a.autocompleteDisabled?null:a.panelOpen.toString())("aria-controls",a.autocompleteDisabled||!a.panelOpen||a.autocomplete==null?null:a.autocomplete.id)("aria-haspopup",a.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",k]},exportAs:["matAutocompleteTrigger"],features:[gt([Io]),We]})}return i})(),$i=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=be({type:i});static \u0275inj=he({providers:[Lo],imports:[ii,bt,z,Xa,bt,z]})}return i})();var No=(i,c)=>c.path;function Bo(i,c){i&1&&_(0,"i",22)}function Ro(i,c){i&1&&_(0,"i",23)}function Uo(i,c){if(i&1&&(n(0,"mat-option",16),r(1),o()),i&2){let e=c.$implicit;p("value",e),s(),He("",e.properties.quantity,": ",e.properties.display)}}function Wo(i,c){if(i&1){let e=w();n(0,"div",5)(1,"mat-form-field",21)(2,"mat-label"),u(3,Bo,1,0,"i",22)(4,Ro,1,0,"i",23),r(5," Filter"),o(),n(6,"mat-select",24,2),C("selectionChange",function(){M(e),g();let a=ie(11),l=g();return y(l.pathFormGroup.controls.path.setValue(a.value))}),n(8,"mat-option"),r(9,"All"),o(),T(10,Uo,2,3,"mat-option",16,G),o()()()}if(i&2){let e=ie(7),t=g(2);s(3),f(e.value?4:3),s(3),p("formControl",t.pathSkUnitsFilterControl),s(4),S(t.pathSkUnitsFiltersList)}}function qo(i,c){i&1&&(n(0,"span",8),r(1,"(optional)"),o())}function jo(i,c){i&1&&(n(0,"mat-hint"),r(1,"Leave blank to disable this path."),o())}function zo(i,c){if(i&1){let e=w();n(0,"button",25),C("click",function(){M(e);let a=g(2);return y(a.pathFormGroup.controls.path.setValue(""))}),n(1,"mat-icon"),r(2,"close"),o()()}}function Ho(i,c){i&1&&(n(0,"mat-error"),r(1," Path is required. Please enter a valid Signal K path. "),o())}function Ko(i,c){i&1&&(n(0,"mat-error"),r(1," Path not recognized. Please enter a path from the server's published list. "),o())}function $o(i,c){if(i&1&&(n(0,"span"),r(1),o(),_(2,"br"),n(3,"small",26),r(4),o()),i&2){let e=g().$implicit;s(),A(e.path),s(3),A(e.meta.description)}}function Yo(i,c){if(i&1&&r(0),i&2){let e=g().$implicit;ee(" ",e.path," ")}}function Zo(i,c){if(i&1&&(n(0,"mat-option",11),u(1,$o,5,2)(2,Yo,1,1),o()),i&2){let e=c.$implicit;p("value",e.path),s(),f(e.meta!==void 0?1:2)}}function Xo(i,c){if(i&1&&(n(0,"mat-option",16),r(1),o()),i&2){let e=c.$implicit;p("value",e),s(),ee(" ",e," ")}}function Qo(i,c){if(i&1&&(n(0,"mat-option",16),r(1),o()),i&2){let e=c.$implicit;p("value",e.measure),s(),ee(" ",e.description," ")}}function Jo(i,c){if(i&1&&(n(0,"mat-optgroup",28),T(1,Qo,2,2,"mat-option",16,G),o()),i&2){let e=c.$implicit;p("label",e.group),s(),S(e.units)}}function en(i,c){if(i&1&&(n(0,"mat-form-field",20)(1,"mat-label"),r(2,"Display Format"),o(),n(3,"mat-select",27),T(4,Jo,3,1,"mat-optgroup",28,G),o()()),i&2){let e=g(2);s(4),S(e.unitList.conversions)}}function tn(i,c){if(i&1&&(n(0,"div",3)(1,"div",4)(2,"span"),r(3),o()(),u(4,Wo,12,2,"div",5),n(5,"div",6)(6,"mat-form-field",7)(7,"mat-label"),r(8," Signal K Path "),u(9,qo,2,0,"span",8),o(),_(10,"input",9,0),u(12,jo,2,0,"mat-hint"),u(13,zo,3,0,"button",10),u(14,Ho,2,0,"mat-error")(15,Ko,2,0,"mat-error"),n(16,"mat-autocomplete",null,1),T(18,Zo,3,2,"mat-option",11,No),Ke(20,"async"),o()()(),n(21,"div",12)(22,"div",13)(23,"mat-form-field",14)(24,"mat-label"),r(25,"Data Source"),o(),n(26,"mat-select",15),T(27,Xo,2,2,"mat-option",16,G),o()()(),n(29,"div",17)(30,"mat-form-field",14)(31,"mat-label"),r(32,"Sample Time"),o(),_(33,"input",18),o()(),n(34,"div",19),u(35,en,6,0,"mat-form-field",20),o()()()),i&2){let e=ie(17),t=g();p("formGroup",t.pathFormGroup),s(2),xt("color",t.pathFormGroup.enabled?"":"rgba(255,255,255,0.5)"),s(),A(t.pathFormGroup.value.description),s(),f(t.pathFormGroup.value.pathType==="number"&&t.showPathSkUnitsFilter?4:-1),s(5),f(t.pathFormGroup.value.pathRequired===!1?9:-1),s(),p("matAutocomplete",e),s(2),f(t.pathFormGroup.value.pathRequired===!1?12:-1),s(),f(t.pathFormGroup.value.path?13:-1),s(),f(t.pathFormGroup.controls.path.errors!=null&&t.pathFormGroup.controls.path.errors.required?14:t.pathFormGroup.controls.path.errors!=null&&t.pathFormGroup.controls.path.errors.requireMatch?15:-1),s(4),S($e(20,11,t.filteredPaths)),s(9),S(t.availableSources),s(8),f(t.pathFormGroup.value.pathType==="number"&&t.pathFormGroup.value.showConvertUnitTo===void 0||t.pathFormGroup.value.pathType==="number"&&t.pathFormGroup.value.showConvertUnitTo===!0?35:-1)}}function an(i){return c=>{let e=c.parent?.value?.pathRequired!==!1,t=c.value;return e?t===null||t===""?{requireMatch:!0}:i().some(d=>d.path===t)?null:{requireMatch:!0}:t===null||t===""||i().some(d=>d.path===t)?null:{requireMatch:!0}}}var Yi=(()=>{class i{_data=m(Ia);_units=m(nt);_connection=m(Ga);pathFormGroup;multiCTRLArray=b.required();filterSelfPaths=b.required();availablePaths;filteredPaths=new ct(null);_pathValueChange$=null;_pathFormGroup$=null;availableSources;unitList={base:"",conversions:[]};showPathSkUnitsFilter=!1;pathSkUnitsFilterControl=new mi(null);pathSkUnitsFiltersList;unitlessUnit={unit:"unitless",properties:{display:"(null)",quantity:"Unitless",quantityDisplay:"(null)",description:""}};ngOnInit(){this.pathSkUnitsFiltersList=this._units.skBaseUnits.sort((e,t)=>e.properties.quantity>t.properties.quantity?1:-1),this.pathSkUnitsFiltersList.unshift(this.unitlessUnit),this.pathFormGroup.value.pathSkUnitsFilter&&this.pathSkUnitsFilterControl.setValue(this.pathSkUnitsFiltersList.find(e=>e.unit===this.pathFormGroup.value.pathSkUnitsFilter),{onlySelf:!0}),this.pathFormGroup.value.showPathSkUnitsFilter&&(this.showPathSkUnitsFilter=this.pathFormGroup.value.showPathSkUnitsFilter),this.pathFormGroup.controls.path.setValidators([an(()=>this.getPaths())]),this.pathFormGroup.controls.path.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this.pathFormGroup.controls.pathRequired&&this.pathFormGroup.controls.pathRequired.valueChanges.subscribe(()=>{this.pathFormGroup.controls.path.updateValueAndValidity()}),this.pathFormGroup.controls.path.valid?this.enableFormFields(!1):this.disablePathFields(),this.pathFormGroup.controls.sampleTime||(this.pathFormGroup.addControl("sampleTime",new $("500",D.required)),this.pathFormGroup.controls.sampleTime.updateValueAndValidity({onlySelf:!0,emitEvent:!1})),this._pathValueChange$=this.pathFormGroup.controls.path.valueChanges.pipe(sa(e=>e===""?Zt(0):Zt(350)),Re(""),Ve(e=>this.filterPaths(e||""))).subscribe(()=>{this.pathFormGroup.controls.path.pristine||(this.pathFormGroup.controls.path.valid?(this.enableFormFields(!0),this.updatePathMetaBoundDisplayName(this.pathFormGroup.controls.path.value),this.updatePathMetaBoundDisplayScale(this.pathFormGroup.controls.path.value)):this.disablePathFields())}),this._pathFormGroup$=this.pathFormGroup.controls.pathType.valueChanges.subscribe(()=>{this.pathFormGroup.value.showPathSkUnitsFilter?this.pathSkUnitsFilterControl.setValue(this.unitlessUnit):this.pathSkUnitsFilterControl.setValue(null),this.pathFormGroup.controls.path.updateValueAndValidity()})}ngOnChanges(e){e.filterSelfPaths&&!e.filterSelfPaths.firstChange&&this.pathFormGroup.controls.path.updateValueAndValidity()}getPaths(){let e=this.pathFormGroup.controls.pathType.value,t=this.filterSelfPaths(),a=!1;if(this.pathFormGroup.value.supportsPut){let l=!1;this.multiCTRLArray().length>0&&(l=this.multiCTRLArray().some(d=>d.pathID===this.pathFormGroup.value.pathID&&d.type==="3")),l?a=!1:a=Ea(this._connection.skServerVersion,"2.12.0",">=")?this.pathFormGroup.value.supportsPut:!1}return this._data.getPathsAndMetaByType(e,a,t).sort()}filterPaths(e){let t=e.toLowerCase(),a=this.getPaths();if(this.pathSkUnitsFilterControl.value){let l=this.pathSkUnitsFilterControl.value.unit;a=a.filter(d=>{let h=!!d.meta&&!!d.meta.units,x=l==="unitless";return h&&d.meta.units===l||!h&&x})}a=a.filter(l=>l.path.toLowerCase().includes(t)),this.filteredPaths.next(a)}enableFormFields(e){let t=this._data.getPathObject(this.pathFormGroup.controls.path.value);t!=null?(this.pathFormGroup.controls.sampleTime.enable({onlySelf:!1}),this.pathFormGroup.controls.pathType.value=="number"&&(this.unitList=this._units.getConversionsForPath(this.pathFormGroup.controls.path.value),e&&this.pathFormGroup.controls.convertUnitTo.setValue(this.unitList.base,{onlySelf:!0}),this.pathFormGroup.controls.convertUnitTo.enable({onlySelf:!1})),Object.keys(t.sources).length==1?(this.availableSources=["default"],e?this.pathFormGroup.controls.source.value!="default"&&this.pathFormGroup.controls.source.setValue("default",{onlySelf:!0}):this.pathFormGroup.controls.source.value!="default"&&this.pathFormGroup.controls.source.setValue("",{onlySelf:!0})):Object.keys(t.sources).length>1&&(this.availableSources=Object.keys(t.sources),this.pathFormGroup.controls.source.value=="default"&&this.pathFormGroup.controls.source.reset()),this.pathFormGroup.controls.source.enable({onlySelf:!1})):this.disablePathFields()}disablePathFields(){this.pathFormGroup.controls.source.reset("",{onlySelf:!0}),this.pathFormGroup.controls.source.disable({onlySelf:!1}),this.pathFormGroup.controls.sampleTime.disable({onlySelf:!1}),this.pathFormGroup.controls.pathType.value=="number"&&(this.pathFormGroup.controls.convertUnitTo.reset("",{onlySelf:!0}),this.pathFormGroup.controls.convertUnitTo.disable({onlySelf:!1}))}updatePathMetaBoundDisplayName(e){if(!Object.prototype.hasOwnProperty.call(this.pathFormGroup.parent.parent.value,"displayName"))return;let t=this._data.getPathMeta(e);t?.displayName&&this.pathFormGroup.parent.parent.controls.displayName.setValue(t.displayName)}updatePathMetaBoundDisplayScale(e){if(!Object.prototype.hasOwnProperty.call(this.pathFormGroup.parent.parent.value,"displayScale"))return;let t=this._data.getPathMeta(e);if(t?.displayScale){let a=this.pathFormGroup.parent.parent.get("displayScale"),l=this.pathFormGroup.controls.convertUnitTo.value;t.displayScale.lower!==null&&t.displayScale.lower!==void 0&&a.controls.lower.setValue(this._units.convertToUnit(l,t.displayScale.lower)),t.displayScale.upper!==null&&t.displayScale.upper!==void 0&&a.controls.upper.setValue(this._units.convertToUnit(l,t.displayScale.upper)),t.displayScale.type!==null&&t.displayScale.type!==void 0&&a.controls.type.setValue(t.displayScale.type),t.displayScale.power!==null&&t.displayScale.power!==void 0&&a.controls.power.setValue(t.displayScale.power)}}ngOnDestroy(){this._pathValueChange$?.unsubscribe(),this._pathFormGroup$?.unsubscribe()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=v({type:i,selectors:[["path-control-config"]],inputs:{pathFormGroup:"pathFormGroup",multiCTRLArray:[1,"multiCTRLArray"],filterSelfPaths:[1,"filterSelfPaths"]},features:[We],decls:1,vars:1,consts:[["pathInput",""],["pathAutoComplete","matAutocomplete"],["pathUnitsFilter",""],[1,"flex-container","rounded-card","rounded-card-color",3,"formGroup"],[1,"flex-field-100"],[1,"flex-field-fixed"],[1,"flex-field-to-100"],["floatLabel","auto","appearance","fill",1,"pathField"],[1,"optional-label"],["type","text","matInput","","placeholder","Type to use autocomplete or select from list","formControlName","path",3,"matAutocomplete"],["mat-icon-button","","matIconSuffix","","aria-label","Clear"],[2,"min-height","48px","line-height","1.15","height","auto","padding","8px 16px","white-space","normal",3,"value"],[1,"pathProperties"],[1,"sourceField"],["appearance","outline","floatLabel","always",1,"fields"],["placeholder","Select source","formControlName","source","required",""],[3,"value"],[1,"sampleTimeField"],["matInput","","type","number","placeholder","Sample time in milliseconds","formControlName","sampleTime","required",""],[1,"unitField"],[1,"fields"],["floatLabel","auto","appearance","fill",1,"filter-path"],[1,"fa-solid","fa-filter"],[1,"fa-solid","fa-filter-circle-xmark"],["panelWidth","",3,"selectionChange","formControl"],["mat-icon-button","","matIconSuffix","","aria-label","Clear",3,"click"],[1,"pathMetaDescription"],["placeholder","Select unit","formControlName","convertUnitTo","required",""],[3,"label"]],template:function(t,a){t&1&&u(0,tn,36,13,"div",3),t&2&&f(a.pathFormGroup.value.isPathConfigurable?0:-1)},dependencies:[R,B,Ee,F,K,P,I,re,Y,Je,L,O,U,$i,jt,W,Nt,_t,H,at,Lt,le,At,oe,N,gi],styles:[".pathGroup[_ngcontent-%COMP%]{width:100%}.pathGroupFields[_ngcontent-%COMP%]{display:block;width:calc(100% - 5px)}.pathField[_ngcontent-%COMP%]{width:100%}.pathProperties[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;align-content:flex-start;gap:10px}.fields[_ngcontent-%COMP%]{width:100%}.sourceField[_ngcontent-%COMP%]{flex:3 1}.sampleTimeField[_ngcontent-%COMP%]{flex:1 3}.unitField[_ngcontent-%COMP%]{flex:3 1}"]})}return i})();function on(i,c){if(i&1&&_(0,"path-control-config",6),i&2){let e=c.$implicit,t=g(2);p("pathFormGroup",e)("filterSelfPaths",t.filterSelfPaths().value)("multiCTRLArray",t.multiCTRLArray)}}function nn(i,c){if(i&1&&T(0,on,1,3,"path-control-config",6,G),i&2){let e=g();S(e.pathsFormGroup.controls)}}function rn(i,c){if(i&1&&_(0,"path-control-config",6),i&2){let e=c.$implicit,t=g(2);p("pathFormGroup",t.pathsFormGroup.get(e))("filterSelfPaths",t.filterSelfPaths().value)("multiCTRLArray",t.multiCTRLArray)}}function ln(i,c){if(i&1&&(T(0,rn,1,3,"path-control-config",6,G),Ke(2,"objectKeys")),i&2){let e=g();S($e(2,0,e.pathsFormGroup.controls))}}var Zi=(()=>{class i{rootFormGroup=m(Y);fb=m(tt);formGroupName=b.required();isArray=b.required();enableTimeout=b.required();dataTimeout=b.required();filterSelfPaths=b.required();addPathEvent=b(void 0);delPathEvent=b(void 0);updatePathEvent=b(void 0);pathsFormGroup;multiCTRLArray=[];ngOnInit(){this.isArray()?(this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName()),this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value):this.pathsFormGroup=this.rootFormGroup.control.get(this.formGroupName())}addPath(e){this.pathsFormGroup.push(this.fb.group({description:[e.path.description],path:[e.path.path,D.required],pathID:[e.path.pathID],source:[e.path.source,D.required],pathType:[e.path.pathType],isPathConfigurable:[e.path.isPathConfigurable],showPathSkUnitsFilter:[e.path.showPathSkUnitsFilter],pathSkUnitsFilter:[e.path.pathSkUnitsFilter],convertUnitTo:[e.path.convertUnitTo],sampleTime:[e.path.sampleTime],supportsPut:[e.path.supportsPut]})),this.pathsFormGroup.updateValueAndValidity(),this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value}delPath(){this.multiCTRLArray=this.rootFormGroup.control.get("multiChildCtrls").value}updatePath(e){this.multiCTRLArray=e}ngOnChanges(e){e.addPathEvent&&!e.addPathEvent.firstChange&&this.addPath(e.addPathEvent.currentValue),e.delPathEvent&&!e.delPathEvent.firstChange&&this.delPath(),e.updatePathEvent&&!e.updatePathEvent.firstChange&&this.updatePath(e.updatePathEvent.currentValue)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=v({type:i,selectors:[["paths-options"]],inputs:{formGroupName:[1,"formGroupName"],isArray:[1,"isArray"],enableTimeout:[1,"enableTimeout"],dataTimeout:[1,"dataTimeout"],filterSelfPaths:[1,"filterSelfPaths"],addPathEvent:[1,"addPathEvent"],delPathEvent:[1,"delPathEvent"],updatePathEvent:[1,"updatePathEvent"]},features:[We],decls:14,vars:5,consts:[[1,"widget-options-grid"],["name","enableTimeout",3,"formControl"],["type","number","matNativeControl","","placeholder","Time in seconds...","name","dataTimeout","min","2","required","",3,"formControl"],["matTextSuffix",""],[3,"formGroup"],["name","filterSelfPaths",3,"formControl"],[2,"display","block",3,"pathFormGroup","filterSelfPaths","multiCTRLArray"]],template:function(t,a){t&1&&(n(0,"div",0)(1,"mat-checkbox",1),r(2," Enable Widget Data TTL "),o(),n(3,"mat-form-field")(4,"mat-label"),r(5,"TTL Timeout For Paths"),o(),_(6,"input",2),n(7,"span",3),r(8,"Seconds"),o()()(),Ca(9,4),u(10,nn,2,0)(11,ln,3,2),va(),n(12,"mat-checkbox",5),r(13,` Restrict to own vessel
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as zt,d as Yt,e as Xt,f as Jt,g as Qt,h as te}from"./chunk-XF4K3Q53.js";import"./chunk-5K7TBZVE.js";import{b as ee,c as ie,e as se,f as ne}from"./chunk-OFKNWTWQ.js";import"./chunk-JGQZHRVH.js";import"./chunk-ECOFSL27.js";import"./chunk-ZKAVJSP3.js";import{a as re}from"./chunk-44YUY7UC.js";import"./chunk-AADA4WFK.js";import{o as G,p as $}from"./chunk-GCRU2MQN.js";import"./chunk-S3ZVIKLY.js";import"./chunk-KTH4Z2KU.js";import"./chunk-7MAW5JUV.js";import"./chunk-ENKPORJ2.js";import{$b as At,$d as Ut,Aa as T,Ce as Zt,Da as It,Ea as Q,Eb as v,Ee as jt,Fb as z,Gb as Ot,I as xt,Ic as ot,J as H,Ja as tt,Na as Tt,Nd as Vt,Od as Gt,Pd as V,Q as Et,Qa as et,Qe as qt,Rb as Mt,Rd as M,Se as Kt,Ud as lt,Wb as Lt,Wd as S,Xb as Nt,Yb as Ft,Zb as _,Zd as $t,_b as D,ad as at,dc as Ht,ed as O,fa as X,fc as P,fd as Bt,g as y,ga as Rt,gc as k,ha as C,he as Wt,ia as Ct,j as Y,lb as B,m as p,o as St,oa as J,ob as it,oe as dt,q as Pt,ra as x,sb as kt,sc as nt,ta as c,vc as b,wb as E,wc as rt,yb as st,z as yt,za as I}from"./chunk-SFNSRKY4.js";function Se(r){let e=r.cloneNode(!0),t=e.querySelectorAll("[id]"),i=r.nodeName.toLowerCase();e.removeAttribute("id");for(let s=0;s<t.length;s++)t[s].removeAttribute("id");return i==="canvas"?le(r,e):(i==="input"||i==="select"||i==="textarea")&&ae(r,e),oe("canvas",r,e,le),oe("input, textarea, select",r,e,ae),e}function oe(r,e,t,i){let s=e.querySelectorAll(r);if(s.length){let n=t.querySelectorAll(r);for(let o=0;o<s.length;o++)i(s[o],n[o])}}var Ae=0;function ae(r,e){e.type!=="file"&&(e.value=r.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${Ae++}`)}function le(r,e){let t=e.getContext("2d");if(t)try{t.drawImage(r,0,0)}catch{}}function ft(r){let e=r.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function pt(r,e,t){let{top:i,bottom:s,left:n,right:o}=r;return t>=i&&t<=s&&e>=n&&e<=o}function He(r,e){let t=e.left<r.left,i=e.left+e.width>r.right,s=e.top<r.top,n=e.top+e.height>r.bottom;return t||i||s||n}function F(r,e,t){r.top+=e,r.bottom=r.top+r.height,r.left+=t,r.right=r.left+r.width}function de(r,e,t,i){let{top:s,right:n,bottom:o,left:a,width:l,height:d}=r,h=l*e,u=d*e;return i>s-u&&i<o+u&&t>a-h&&t<n+h}var U=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:ft(t)})})}handleScroll(e){let t=M(e),i=this.positions.get(t);if(!i)return null;let s=i.scrollPosition,n,o;if(t===this._document){let d=this.getViewportScrollPosition();n=d.top,o=d.left}else n=t.scrollTop,o=t.scrollLeft;let a=s.top-n,l=s.left-o;return this.positions.forEach((d,h)=>{d.clientRect&&t!==h&&t.contains(h)&&F(d.clientRect,a,l)}),s.top=n,s.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Pe(r,e){let t=r.rootNodes;if(t.length===1&&t[0].nodeType===e.ELEMENT_NODE)return t[0];let i=e.createElement("div");return t.forEach(s=>i.appendChild(s)),i}function vt(r,e,t){for(let i in e)if(e.hasOwnProperty(i)){let s=e[i];s?r.setProperty(i,s,t?.has(i)?"important":""):r.removeProperty(i)}return r}function R(r,e){let t=e?"":"none";vt(r.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function ce(r,e,t){vt(r.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function W(r,e){return e&&e!="none"?r+" "+e:r}function he(r,e){r.style.width=`${e.width}px`,r.style.height=`${e.height}px`,r.style.transform=A(e.left,e.top)}function A(r,e){return`translate3d(${Math.round(r)}px, ${Math.round(e)}px, 0)`}function pe(r){let e=r.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(r)*e}function Be(r){let e=getComputedStyle(r),t=ct(e,"transition-property"),i=t.find(a=>a==="transform"||a==="all");if(!i)return 0;let s=t.indexOf(i),n=ct(e,"transition-duration"),o=ct(e,"transition-delay");return pe(n[s])+pe(o[s])}function ct(r,e){return r.getPropertyValue(e).split(",").map(i=>i.trim())}var ze=new Set(["position"]),_t=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,i,s,n,o,a,l,d,h){this._document=e,this._rootElement=t,this._direction=i,this._initialDomRect=s,this._previewTemplate=n,this._previewClass=o,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=d,this._renderer=h}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),_e(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return Be(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,i=e?e.template:null,s;if(i&&e){let n=e.matchSize?this._initialDomRect:null,o=e.viewContainer.createEmbeddedView(i,e.context);o.detectChanges(),s=Pe(o,this._document),this._previewEmbeddedView=o,e.matchSize?he(s,n):s.style.transform=A(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=Se(this._rootElement),he(s,this._initialDomRect),this._initialTransform&&(s.style.transform=this._initialTransform);return vt(s.style,{"pointer-events":"none",margin:_e(s)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},ze),R(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("popover","manual"),s.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(n=>s.classList.add(n)):s.classList.add(t)),s}};function _e(r){return"showPopover"in r}var Ve={passive:!0},ge={passive:!1},Ge={passive:!1,capture:!0},$e=800,ue=new Set(["position"]),gt=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=tt(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new p;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=y.EMPTY;_pointerUpSubscription=y.EMPTY;_scrollSubscription=y.EMPTY;_resizeSubscription=y.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>R(t,e)))}_disabled=!1;beforeStarted=new p;started=new p;released=new p;ended=new p;entered=new p;exited=new p;dropped=new p;moved=this._moveEvents;data;constrainPosition;constructor(e,t,i,s,n,o,a){this._config=t,this._document=i,this._ngZone=s,this._viewportRuler=n,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new U(i),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>S(i)),this._handles.forEach(i=>R(i,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=S(e);if(t!==this._rootElement){this._removeRootElementListeners();let i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(t,"mousedown",this._pointerDown,ge),i.listen(t,"touchstart",this._pointerDown,Ve),i.listen(t,"dragstart",this._nativeDragStart,ge)]),this._initialTransform=void 0,this._rootElement=t}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?S(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.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._anchor=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&&He(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let e=this._boundaryElement.getBoundingClientRect(),t=this._rootElement.getBoundingClientRect(),i=0,s=0;t.left<e.left?i=e.left-t.left:t.right>e.right&&(i=e.right-t.right),t.top<e.top?s=e.top-t.top:t.bottom>e.bottom&&(s=e.bottom-t.bottom);let n=this._activeTransform.x,o=this._activeTransform.y,a=n+i,l=o+s;this._rootElement.style.transform=A(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l}}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),R(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),R(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_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._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let s=Math.abs(t.x-this._pickupPositionOnPage.x),n=Math.abs(t.y-this._pickupPositionOnPage.y);if(s+n>=this._config.dragStartThreshold){let a=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),l=this._dropContainer;if(!a){this._endDragSequence(e);return}(!l||!l.isDragging()&&!l.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let i=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,t);else{let s=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,n=this._activeTransform;n.x=i.x-s.x+this._passiveTransform.x,n.y=i.y-s.y+this._passiveTransform.y,this._applyRootElementTransform(n.x,n.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:e,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){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:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){L(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),i=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(t,"selectstart",Ue,Ge)}),i){let s=this._rootElement,n=s.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");n.insertBefore(a,s),this._initialTransform=s.style.transform||"",this._preview=new _t(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(n,t)),ce(s,!1,ue),this._document.body.appendChild(n.replaceChild(o,s)),this.started.next({source:this,event:e}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let i=this.isDragging(),s=L(t),n=!s&&t.button!==0,o=this._rootElement,a=M(t),l=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+$e>Date.now(),d=s?Gt(t):Vt(t);if(a&&a.draggable&&t.type==="mousedown"&&t.preventDefault(),i||n||l||d)return;if(this._handles.length){let w=o.style;this._rootElementTapHighlight=w.webkitTapHighlightColor||"",w.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(w=>this._updateOnScroll(w)),this._boundaryElement&&(this._boundaryRect=ft(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){ce(this._rootElement,!0,ue),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,i=t.getItemIndex(this),s=this._getPointerPositionOnPage(e),n=this._getDragDistance(s),o=t._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:n,dropPoint:s,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:n,dropPoint:s,event:e}),t.drop(this,i,this._initialIndex,this._initialContainer,o,n,s,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:i,y:s}){let n=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!n&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(n=this._initialContainer),n&&n!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=n,this._dropContainer.enter(this,e,t,n===this._initialContainer&&n.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:n,currentIndex:n.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let s=a=>{(!a||this._preview&&M(a)===this._preview.element&&a.propertyName==="transform")&&(o(),i(),clearTimeout(n))},n=setTimeout(s,t*1.5),o=this._preview.addEventListener("transitionend",s)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,i;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),i=Pe(this._placeholderRef,this._document)):i=Se(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(e,t,i){let s=t===this._rootElement?null:t,n=s?s.getBoundingClientRect():e,o=L(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=o.pageX-n.left-a.left,d=o.pageY-n.top-a.top;return{x:n.left-e.left+l,y:n.top-e.top+d}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),i=L(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,s=i.pageX-t.left,n=i.pageY-t.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let a=this._ownerSVGElement.createSVGPoint();return a.x=s,a.y=n,a.matrixTransform(o.inverse())}}return{x:s,y:n}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:s}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?s=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:n,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:d}=this._getPreviewRect(),h=a.top+o,u=a.bottom-(d-o),w=a.left+n,q=a.right-(l-n);i=me(i,w,q),s=me(s,h,u)}return{x:i,y:s}}_updatePointerDirectionDelta(e){let{x:t,y:i}=e,s=this._pointerDirectionDelta,n=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-n.x),a=Math.abs(i-n.y);return o>this._config.pointerDirectionChangeThreshold&&(s.x=t>n.x?1:-1,n.x=t),a>this._config.pointerDirectionChangeThreshold&&(s.y=i>n.y?1:-1,n.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,R(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let i=1/this.scale,s=A(e*i,t*i),n=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=n.transform&&n.transform!="none"?n.transform:""),n.transform=W(s,this._initialTransform)}_applyPreviewTransform(e,t){let i=this._previewTemplate?.template?void 0:this._initialTransform,s=A(e,t);this._preview.setTransform(W(s,i))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),s=this._boundaryElement.getBoundingClientRect();if(s.width===0&&s.height===0||i.width===0&&i.height===0)return;let n=s.left-i.left,o=i.right-s.right,a=s.top-i.top,l=i.bottom-s.bottom;s.width>i.width?(n>0&&(e+=n),o>0&&(e-=o)):e=0,s.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:L(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let i=M(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&F(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=V(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let i=this._previewContainer||"global";if(i==="parent")return e;if(i==="global"){let s=this._document;return t||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return S(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function me(r,e,t){return Math.max(e,Math.min(t,r))}function L(r){return r.type[0]==="t"}function Ue(r){r.preventDefault()}function j(r,e,t){let i=fe(e,r.length-1),s=fe(t,r.length-1);if(i===s)return;let n=r[i],o=s<i?-1:1;for(let a=i;a!==s;a+=o)r[a]=r[a+o];r[s]=n}function fe(r,e){return Math.max(0,Math.min(e,r))}var Z=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,i,s){let n=this._itemPositions,o=this._getItemIndexFromPointerPosition(e,t,i,s);if(o===-1&&n.length>0)return null;let a=this.orientation==="horizontal",l=n.findIndex(m=>m.drag===e),d=n[o],h=n[l].clientRect,u=d.clientRect,w=l>o?1:-1,q=this._getItemOffsetPx(h,u,w),Le=this._getSiblingOffsetPx(l,n,w),Ne=n.slice();return j(n,l,o),n.forEach((m,Fe)=>{if(Ne[Fe]===m)return;let Dt=m.drag===e,K=Dt?q:Le,bt=Dt?e.getPlaceholderElement():m.drag.getRootElement();m.offset+=K;let wt=Math.round(m.offset*(1/m.drag.scale));a?(bt.style.transform=W(`translate3d(${wt}px, 0, 0)`,m.initialTransform),F(m.clientRect,0,K)):(bt.style.transform=W(`translate3d(0, ${wt}px, 0)`,m.initialTransform),F(m.clientRect,K,0))}),this._previousSwap.overlaps=pt(u,t,i),this._previousSwap.drag=d.drag,this._previousSwap.delta=a?s.x:s.y,{previousIndex:l,currentIndex:o}}enter(e,t,i,s){let n=s==null||s<0?this._getItemIndexFromPointerPosition(e,t,i):s,o=this._activeDraggables,a=o.indexOf(e),l=e.getPlaceholderElement(),d=o[n];if(d===e&&(d=o[n+1]),!d&&(n==null||n===-1||n<o.length-1)&&this._shouldEnterAsFirstChild(t,i)&&(d=o[0]),a>-1&&o.splice(a,1),d&&!this._dragDropRegistry.isDragging(d)){let h=d.getRootElement();h.parentElement.insertBefore(l,h),o.splice(n,0,e)}else this._element.appendChild(l),o.push(e);l.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let i=this._itemPositions.find(s=>s.drag===e)?.initialTransform;t.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:i})=>{F(i,e,t)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let i=t.getVisibleElement();return{drag:t,offset:0,initialTransform:i.style.transform||"",clientRect:ft(i)}}).sort((t,i)=>e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top)}_getItemOffsetPx(e,t,i){let s=this.orientation==="horizontal",n=s?t.left-e.left:t.top-e.top;return i===-1&&(n+=s?t.width-e.width:t.height-e.height),n}_getSiblingOffsetPx(e,t,i){let s=this.orientation==="horizontal",n=t[e].clientRect,o=t[e+i*-1],a=n[s?"width":"height"]*i;if(o){let l=s?"left":"top",d=s?"right":"bottom";i===-1?a-=o.clientRect[l]-n[d]:a+=n[l]-o.clientRect[d]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,s=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let o=i[i.length-1].clientRect;return s?e>=o.right:t>=o.bottom}else{let o=i[0].clientRect;return s?e<=o.left:t<=o.top}}_getItemIndexFromPointerPosition(e,t,i,s){let n=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===e)return!1;if(s){let d=n?s.x:s.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&d===this._previousSwap.delta)return!1}return n?t>=Math.floor(l.left)&&t<Math.floor(l.right):i>=Math.floor(l.top)&&i<Math.floor(l.bottom)});return o===-1||!this._sortPredicate(o,e)?-1:o}},ut=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<t.length;i++){let s=t[i];this._relatedNodes.push([s,s.nextSibling])}this.withItems(e)}sort(e,t,i,s){let n=this._getItemIndexFromPointerPosition(e,t,i),o=this._previousSwap;if(n===-1||this._activeItems[n]===e)return null;let a=this._activeItems[n];if(o.drag===a&&o.overlaps&&o.deltaX===s.x&&o.deltaY===s.y)return null;let l=this.getItemIndex(e),d=e.getPlaceholderElement(),h=a.getRootElement();n>l?h.after(d):h.before(d),j(this._activeItems,l,n);let u=this._getRootNode().elementFromPoint(t,i);return o.deltaX=s.x,o.deltaY=s.y,o.drag=a,o.overlaps=h===u||h.contains(u),{previousIndex:l,currentIndex:n}}enter(e,t,i,s){let n=s==null||s<0?this._getItemIndexFromPointerPosition(e,t,i):s;n===-1&&(n=this._getClosestItemIndexToPointer(e,t,i));let o=this._activeItems[n],a=this._activeItems.indexOf(e);a>-1&&this._activeItems.splice(a,1),o&&!this._dragDropRegistry.isDragging(o)?(this._activeItems.splice(n,0,e),o.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[s,n]=this._relatedNodes[i];s.parentNode===e&&s.nextSibling!==n&&(n===null?e.appendChild(s):n.parentNode===e&&e.insertBefore(s,n))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,i){let s=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(i)),n=s?this._activeItems.findIndex(o=>{let a=o.getRootElement();return s===a||a.contains(s)}):-1;return n===-1||!this._sortPredicate(n,e)?-1:n}_getRootNode(){return this._rootNode||(this._rootNode=V(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let s=1/0,n=-1;for(let o=0;o<this._activeItems.length;o++){let a=this._activeItems[o];if(a!==e){let{x:l,y:d}=a.getRootElement().getBoundingClientRect(),h=Math.hypot(t-l,i-d);h<s&&(s=h,n=o)}}return n}},ve=.05,ye=.05,f=function(r){return r[r.NONE=0]="NONE",r[r.UP=1]="UP",r[r.DOWN=2]="DOWN",r}(f||{}),g=function(r){return r[r.NONE=0]="NONE",r[r.LEFT=1]="LEFT",r[r.RIGHT=2]="RIGHT",r}(g||{}),mt=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new p;entered=new p;exited=new p;dropped=new p;sorted=new p;receivingStarted=new p;receivingStopped=new p;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=y.EMPTY;_verticalScrollDirection=f.NONE;_horizontalScrollDirection=g.NONE;_scrollNode;_stopScrollTimers=new p;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,i,s,n){this._dragDropRegistry=t,this._ngZone=s,this._viewportRuler=n;let o=this.element=S(e);this._document=i,this.withOrientation("vertical").withElementContainer(o),t.registerDropContainer(this),this._parentPositions=new U(i)}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(e,t,i,s){this._draggingStarted(),s==null&&this.sortingDisabled&&(s=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,i,s),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,i,s,n,o,a,l={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:n,distance:o,dropPoint:a,event:l})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(s=>s.isDragging()).every(s=>e.indexOf(s)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof Z&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new ut(this._document,this._dragDropRegistry);else{let t=new Z(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,i)=>this.sortPredicate(t,i,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=S(this.element),i=this._scrollableElements.indexOf(this._container),s=this._scrollableElements.indexOf(e);return i>-1&&this._scrollableElements.splice(i,1),s>-1&&this._scrollableElements.splice(s,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,i,s){if(this.sortingDisabled||!this._domRect||!de(this._domRect,ve,t,i))return;let n=this._sortStrategy.sort(e,t,i,s);n&&this.sorted.next({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let i,s=f.NONE,n=g.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||de(o.clientRect,ve,e,t)&&([s,n]=We(a,o.clientRect,this._direction,e,t),(s||n)&&(i=a))}),!s&&!n){let{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};s=xe(l,t),n=Ee(l,e),i=window}i&&(s!==this._verticalScrollDirection||n!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=n,this._scrollNode=i,(s||n)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.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 e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),xt(0,Pt).pipe(C(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===f.UP?e.scrollBy(0,-t):this._verticalScrollDirection===f.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===g.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===g.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&pt(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,i){return this._siblings.find(s=>s._canReceive(e,t,i))}_canReceive(e,t,i){if(!this._domRect||!pt(this._domRect,t,i)||!this.enterPredicate(e,this))return!1;let s=this._getShadowRoot().elementFromPoint(t,i);return s?s===this._container||this._container.contains(s):!1}_startReceiving(e,t){let i=this._activeSiblings;!i.has(e)&&t.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-1)&&(i.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=V(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function xe(r,e){let{top:t,bottom:i,height:s}=r,n=s*ye;return e>=t-n&&e<=t+n?f.UP:e>=i-n&&e<=i+n?f.DOWN:f.NONE}function Ee(r,e){let{left:t,right:i,width:s}=r,n=s*ye;return e>=t-n&&e<=t+n?g.LEFT:e>=i-n&&e<=i+n?g.RIGHT:g.NONE}function We(r,e,t,i,s){let n=xe(e,s),o=Ee(e,i),a=f.NONE,l=g.NONE;if(n){let d=r.scrollTop;n===f.UP?d>0&&(a=f.UP):r.scrollHeight-d>r.clientHeight&&(a=f.DOWN)}if(o){let d=r.scrollLeft;t==="rtl"?o===g.RIGHT?d<0&&(l=g.RIGHT):r.scrollWidth+d>r.clientWidth&&(l=g.LEFT):o===g.LEFT?d>0&&(l=g.LEFT):r.scrollWidth-d>r.clientWidth&&(l=g.RIGHT)}return[a,l]}var N={capture:!0},ht={passive:!1,capture:!0},Ze=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275cmp=E({type:r,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,s){},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}
|
|
1
|
+
import{a as zt,d as Yt,e as Xt,f as Jt,g as Qt,h as te}from"./chunk-4DNKNA4U.js";import"./chunk-5K7TBZVE.js";import{b as ee,c as ie,e as se,f as ne}from"./chunk-OFKNWTWQ.js";import"./chunk-JGQZHRVH.js";import"./chunk-ECOFSL27.js";import"./chunk-ZKAVJSP3.js";import{a as re}from"./chunk-44YUY7UC.js";import"./chunk-AADA4WFK.js";import{o as G,p as $}from"./chunk-GCRU2MQN.js";import"./chunk-S3ZVIKLY.js";import"./chunk-QHOUNSNZ.js";import"./chunk-7MAW5JUV.js";import"./chunk-ENKPORJ2.js";import{$b as At,$d as Ut,Aa as T,Ce as Zt,Da as It,Ea as Q,Eb as v,Ee as jt,Fb as z,Gb as Ot,I as xt,Ic as ot,J as H,Ja as tt,Na as Tt,Nd as Vt,Od as Gt,Pd as V,Q as Et,Qa as et,Qe as qt,Rb as Mt,Rd as M,Se as Kt,Ud as lt,Wb as Lt,Wd as S,Xb as Nt,Yb as Ft,Zb as _,Zd as $t,_b as D,ad as at,dc as Ht,ed as O,fa as X,fc as P,fd as Bt,g as y,ga as Rt,gc as k,ha as C,he as Wt,ia as Ct,j as Y,lb as B,m as p,o as St,oa as J,ob as it,oe as dt,q as Pt,ra as x,sb as kt,sc as nt,ta as c,vc as b,wb as E,wc as rt,yb as st,z as yt,za as I}from"./chunk-SFNSRKY4.js";function Se(r){let e=r.cloneNode(!0),t=e.querySelectorAll("[id]"),i=r.nodeName.toLowerCase();e.removeAttribute("id");for(let s=0;s<t.length;s++)t[s].removeAttribute("id");return i==="canvas"?le(r,e):(i==="input"||i==="select"||i==="textarea")&&ae(r,e),oe("canvas",r,e,le),oe("input, textarea, select",r,e,ae),e}function oe(r,e,t,i){let s=e.querySelectorAll(r);if(s.length){let n=t.querySelectorAll(r);for(let o=0;o<s.length;o++)i(s[o],n[o])}}var Ae=0;function ae(r,e){e.type!=="file"&&(e.value=r.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${Ae++}`)}function le(r,e){let t=e.getContext("2d");if(t)try{t.drawImage(r,0,0)}catch{}}function ft(r){let e=r.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}function pt(r,e,t){let{top:i,bottom:s,left:n,right:o}=r;return t>=i&&t<=s&&e>=n&&e<=o}function He(r,e){let t=e.left<r.left,i=e.left+e.width>r.right,s=e.top<r.top,n=e.top+e.height>r.bottom;return t||i||s||n}function F(r,e,t){r.top+=e,r.bottom=r.top+r.height,r.left+=t,r.right=r.left+r.width}function de(r,e,t,i){let{top:s,right:n,bottom:o,left:a,width:l,height:d}=r,h=l*e,u=d*e;return i>s-u&&i<o+u&&t>a-h&&t<n+h}var U=class{_document;positions=new Map;constructor(e){this._document=e}clear(){this.positions.clear()}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:ft(t)})})}handleScroll(e){let t=M(e),i=this.positions.get(t);if(!i)return null;let s=i.scrollPosition,n,o;if(t===this._document){let d=this.getViewportScrollPosition();n=d.top,o=d.left}else n=t.scrollTop,o=t.scrollLeft;let a=s.top-n,l=s.left-o;return this.positions.forEach((d,h)=>{d.clientRect&&t!==h&&t.contains(h)&&F(d.clientRect,a,l)}),s.top=n,s.left=o,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Pe(r,e){let t=r.rootNodes;if(t.length===1&&t[0].nodeType===e.ELEMENT_NODE)return t[0];let i=e.createElement("div");return t.forEach(s=>i.appendChild(s)),i}function vt(r,e,t){for(let i in e)if(e.hasOwnProperty(i)){let s=e[i];s?r.setProperty(i,s,t?.has(i)?"important":""):r.removeProperty(i)}return r}function R(r,e){let t=e?"":"none";vt(r.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function ce(r,e,t){vt(r.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function W(r,e){return e&&e!="none"?r+" "+e:r}function he(r,e){r.style.width=`${e.width}px`,r.style.height=`${e.height}px`,r.style.transform=A(e.left,e.top)}function A(r,e){return`translate3d(${Math.round(r)}px, ${Math.round(e)}px, 0)`}function pe(r){let e=r.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(r)*e}function Be(r){let e=getComputedStyle(r),t=ct(e,"transition-property"),i=t.find(a=>a==="transform"||a==="all");if(!i)return 0;let s=t.indexOf(i),n=ct(e,"transition-duration"),o=ct(e,"transition-delay");return pe(n[s])+pe(o[s])}function ct(r,e){return r.getPropertyValue(e).split(",").map(i=>i.trim())}var ze=new Set(["position"]),_t=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(e,t,i,s,n,o,a,l,d,h){this._document=e,this._rootElement=t,this._direction=i,this._initialDomRect=s,this._previewTemplate=n,this._previewClass=o,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=d,this._renderer=h}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),_e(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return Be(this._preview)}addEventListener(e,t){return this._renderer.listen(this._preview,e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,i=e?e.template:null,s;if(i&&e){let n=e.matchSize?this._initialDomRect:null,o=e.viewContainer.createEmbeddedView(i,e.context);o.detectChanges(),s=Pe(o,this._document),this._previewEmbeddedView=o,e.matchSize?he(s,n):s.style.transform=A(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else s=Se(this._rootElement),he(s,this._initialDomRect),this._initialTransform&&(s.style.transform=this._initialTransform);return vt(s.style,{"pointer-events":"none",margin:_e(s)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},ze),R(s,!1),s.classList.add("cdk-drag-preview"),s.setAttribute("popover","manual"),s.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(n=>s.classList.add(n)):s.classList.add(t)),s}};function _e(r){return"showPopover"in r}var Ve={passive:!0},ge={passive:!1},Ge={passive:!1,capture:!0},$e=800,ue=new Set(["position"]),gt=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=tt(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new p;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=y.EMPTY;_pointerUpSubscription=y.EMPTY;_scrollSubscription=y.EMPTY;_resizeSubscription=y.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>R(t,e)))}_disabled=!1;beforeStarted=new p;started=new p;released=new p;ended=new p;entered=new p;exited=new p;dropped=new p;moved=this._moveEvents;data;constrainPosition;constructor(e,t,i,s,n,o,a){this._config=t,this._document=i,this._ngZone=s,this._viewportRuler=n,this._dragDropRegistry=o,this._renderer=a,this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new U(i),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>S(i)),this._handles.forEach(i=>R(i,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=S(e);if(t!==this._rootElement){this._removeRootElementListeners();let i=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[i.listen(t,"mousedown",this._pointerDown,ge),i.listen(t,"touchstart",this._pointerDown,Ve),i.listen(t,"dragstart",this._nativeDragStart,ge)]),this._initialTransform=void 0,this._rootElement=t}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?S(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.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._anchor=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&&He(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let e=this._boundaryElement.getBoundingClientRect(),t=this._rootElement.getBoundingClientRect(),i=0,s=0;t.left<e.left?i=e.left-t.left:t.right>e.right&&(i=e.right-t.right),t.top<e.top?s=e.top-t.top:t.bottom>e.bottom&&(s=e.bottom-t.bottom);let n=this._activeTransform.x,o=this._activeTransform.y,a=n+i,l=o+s;this._rootElement.style.transform=A(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l}}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),R(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),R(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_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._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&this._initializeDragSequence(t,e)}else this.disabled||this._initializeDragSequence(this._rootElement,e)};_pointerMove=e=>{let t=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let s=Math.abs(t.x-this._pickupPositionOnPage.x),n=Math.abs(t.y-this._pickupPositionOnPage.y);if(s+n>=this._config.dragStartThreshold){let a=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),l=this._dropContainer;if(!a){this._endDragSequence(e);return}(!l||!l.isDragging()&&!l.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)))}return}e.cancelable&&e.preventDefault();let i=this._getConstrainedPointerPosition(t);if(this._hasMoved=!0,this._lastKnownPointerPosition=t,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,t);else{let s=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,n=this._activeTransform;n.x=i.x-s.x+this._passiveTransform.x,n.y=i.y-s.y+this._passiveTransform.y,this._applyRootElementTransform(n.x,n.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:e,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=e=>{this._endDragSequence(e)};_endDragSequence(e){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:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){L(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),i=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(t,"selectstart",Ue,Ge)}),i){let s=this._rootElement,n=s.parentNode,o=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");n.insertBefore(a,s),this._initialTransform=s.style.transform||"",this._preview=new _t(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(n,t)),ce(s,!1,ue),this._document.body.appendChild(n.replaceChild(o,s)),this.started.next({source:this,event:e}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let i=this.isDragging(),s=L(t),n=!s&&t.button!==0,o=this._rootElement,a=M(t),l=!s&&this._lastTouchEventTime&&this._lastTouchEventTime+$e>Date.now(),d=s?Gt(t):Vt(t);if(a&&a.draggable&&t.type==="mousedown"&&t.preventDefault(),i||n||l||d)return;if(this._handles.length){let w=o.style;this._rootElementTapHighlight=w.webkitTapHighlightColor||"",w.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(w=>this._updateOnScroll(w)),this._boundaryElement&&(this._boundaryRect=ft(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){ce(this._rootElement,!0,ue),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,i=t.getItemIndex(this),s=this._getPointerPositionOnPage(e),n=this._getDragDistance(s),o=t._isOverContainer(s.x,s.y);this.ended.next({source:this,distance:n,dropPoint:s,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:n,dropPoint:s,event:e}),t.drop(this,i,this._initialIndex,this._initialContainer,o,n,s,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:i,y:s}){let n=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!n&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(n=this._initialContainer),n&&n!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=n,this._dropContainer.enter(this,e,t,n===this._initialContainer&&n.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:n,currentIndex:n.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,s),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let s=a=>{(!a||this._preview&&M(a)===this._preview.element&&a.propertyName==="transform")&&(o(),i(),clearTimeout(n))},n=setTimeout(s,t*1.5),o=this._preview.addEventListener("transitionend",s)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,i;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),i=Pe(this._placeholderRef,this._document)):i=Se(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(e,t,i){let s=t===this._rootElement?null:t,n=s?s.getBoundingClientRect():e,o=L(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=o.pageX-n.left-a.left,d=o.pageY-n.top-a.top;return{x:n.left-e.left+l,y:n.top-e.top+d}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),i=L(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,s=i.pageX-t.left,n=i.pageY-t.top;if(this._ownerSVGElement){let o=this._ownerSVGElement.getScreenCTM();if(o){let a=this._ownerSVGElement.createSVGPoint();return a.x=s,a.y=n,a.matrixTransform(o.inverse())}}return{x:s,y:n}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:s}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?s=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:n,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:d}=this._getPreviewRect(),h=a.top+o,u=a.bottom-(d-o),w=a.left+n,q=a.right-(l-n);i=me(i,w,q),s=me(s,h,u)}return{x:i,y:s}}_updatePointerDirectionDelta(e){let{x:t,y:i}=e,s=this._pointerDirectionDelta,n=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-n.x),a=Math.abs(i-n.y);return o>this._config.pointerDirectionChangeThreshold&&(s.x=t>n.x?1:-1,n.x=t),a>this._config.pointerDirectionChangeThreshold&&(s.y=i>n.y?1:-1,n.y=i),s}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,R(this._rootElement,e))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0}_applyRootElementTransform(e,t){let i=1/this.scale,s=A(e*i,t*i),n=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=n.transform&&n.transform!="none"?n.transform:""),n.transform=W(s,this._initialTransform)}_applyPreviewTransform(e,t){let i=this._previewTemplate?.template?void 0:this._initialTransform,s=A(e,t);this._preview.setTransform(W(s,i))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),s=this._boundaryElement.getBoundingClientRect();if(s.width===0&&s.height===0||i.width===0&&i.height===0)return;let n=s.left-i.left,o=i.right-s.right,a=s.top-i.top,l=i.bottom-s.bottom;s.width>i.width?(n>0&&(e+=n),o>0&&(e-=o)):e=0,s.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:L(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let i=M(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&F(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=V(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let i=this._previewContainer||"global";if(i==="parent")return e;if(i==="global"){let s=this._document;return t||s.fullscreenElement||s.webkitFullscreenElement||s.mozFullScreenElement||s.msFullscreenElement||s.body}return S(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=e=>{if(this._handles.length){let t=this._getTargetHandle(e);t&&!this._disabledHandles.has(t)&&!this.disabled&&e.preventDefault()}else this.disabled||e.preventDefault()};_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function me(r,e,t){return Math.max(e,Math.min(t,r))}function L(r){return r.type[0]==="t"}function Ue(r){r.preventDefault()}function j(r,e,t){let i=fe(e,r.length-1),s=fe(t,r.length-1);if(i===s)return;let n=r[i],o=s<i?-1:1;for(let a=i;a!==s;a+=o)r[a]=r[a+o];r[s]=n}function fe(r,e){return Math.max(0,Math.min(e,r))}var Z=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(e){this._dragDropRegistry=e}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e)}sort(e,t,i,s){let n=this._itemPositions,o=this._getItemIndexFromPointerPosition(e,t,i,s);if(o===-1&&n.length>0)return null;let a=this.orientation==="horizontal",l=n.findIndex(m=>m.drag===e),d=n[o],h=n[l].clientRect,u=d.clientRect,w=l>o?1:-1,q=this._getItemOffsetPx(h,u,w),Le=this._getSiblingOffsetPx(l,n,w),Ne=n.slice();return j(n,l,o),n.forEach((m,Fe)=>{if(Ne[Fe]===m)return;let Dt=m.drag===e,K=Dt?q:Le,bt=Dt?e.getPlaceholderElement():m.drag.getRootElement();m.offset+=K;let wt=Math.round(m.offset*(1/m.drag.scale));a?(bt.style.transform=W(`translate3d(${wt}px, 0, 0)`,m.initialTransform),F(m.clientRect,0,K)):(bt.style.transform=W(`translate3d(0, ${wt}px, 0)`,m.initialTransform),F(m.clientRect,K,0))}),this._previousSwap.overlaps=pt(u,t,i),this._previousSwap.drag=d.drag,this._previousSwap.delta=a?s.x:s.y,{previousIndex:l,currentIndex:o}}enter(e,t,i,s){let n=s==null||s<0?this._getItemIndexFromPointerPosition(e,t,i):s,o=this._activeDraggables,a=o.indexOf(e),l=e.getPlaceholderElement(),d=o[n];if(d===e&&(d=o[n+1]),!d&&(n==null||n===-1||n<o.length-1)&&this._shouldEnterAsFirstChild(t,i)&&(d=o[0]),a>-1&&o.splice(a,1),d&&!this._dragDropRegistry.isDragging(d)){let h=d.getRootElement();h.parentElement.insertBefore(l,h),o.splice(n,0,e)}else this._element.appendChild(l),o.push(e);l.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let i=this._itemPositions.find(s=>s.drag===e)?.initialTransform;t.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:i})=>{F(i,e,t)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let i=t.getVisibleElement();return{drag:t,offset:0,initialTransform:i.style.transform||"",clientRect:ft(i)}}).sort((t,i)=>e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top)}_getItemOffsetPx(e,t,i){let s=this.orientation==="horizontal",n=s?t.left-e.left:t.top-e.top;return i===-1&&(n+=s?t.width-e.width:t.height-e.height),n}_getSiblingOffsetPx(e,t,i){let s=this.orientation==="horizontal",n=t[e].clientRect,o=t[e+i*-1],a=n[s?"width":"height"]*i;if(o){let l=s?"left":"top",d=s?"right":"bottom";i===-1?a-=o.clientRect[l]-n[d]:a+=n[l]-o.clientRect[d]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,s=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let o=i[i.length-1].clientRect;return s?e>=o.right:t>=o.bottom}else{let o=i[0].clientRect;return s?e<=o.left:t<=o.top}}_getItemIndexFromPointerPosition(e,t,i,s){let n=this.orientation==="horizontal",o=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===e)return!1;if(s){let d=n?s.x:s.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&d===this._previousSwap.delta)return!1}return n?t>=Math.floor(l.left)&&t<Math.floor(l.right):i>=Math.floor(l.top)&&i<Math.floor(l.bottom)});return o===-1||!this._sortPredicate(o,e)?-1:o}},ut=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,t){this._document=e,this._dragDropRegistry=t}start(e){let t=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<t.length;i++){let s=t[i];this._relatedNodes.push([s,s.nextSibling])}this.withItems(e)}sort(e,t,i,s){let n=this._getItemIndexFromPointerPosition(e,t,i),o=this._previousSwap;if(n===-1||this._activeItems[n]===e)return null;let a=this._activeItems[n];if(o.drag===a&&o.overlaps&&o.deltaX===s.x&&o.deltaY===s.y)return null;let l=this.getItemIndex(e),d=e.getPlaceholderElement(),h=a.getRootElement();n>l?h.after(d):h.before(d),j(this._activeItems,l,n);let u=this._getRootNode().elementFromPoint(t,i);return o.deltaX=s.x,o.deltaY=s.y,o.drag=a,o.overlaps=h===u||h.contains(u),{previousIndex:l,currentIndex:n}}enter(e,t,i,s){let n=s==null||s<0?this._getItemIndexFromPointerPosition(e,t,i):s;n===-1&&(n=this._getClosestItemIndexToPointer(e,t,i));let o=this._activeItems[n],a=this._activeItems.indexOf(e);a>-1&&this._activeItems.splice(a,1),o&&!this._dragDropRegistry.isDragging(o)?(this._activeItems.splice(n,0,e),o.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[s,n]=this._relatedNodes[i];s.parentNode===e&&s.nextSibling!==n&&(n===null?e.appendChild(s):n.parentNode===e&&e.insertBefore(s,n))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,i){let s=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(i)),n=s?this._activeItems.findIndex(o=>{let a=o.getRootElement();return s===a||a.contains(s)}):-1;return n===-1||!this._sortPredicate(n,e)?-1:n}_getRootNode(){return this._rootNode||(this._rootNode=V(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let s=1/0,n=-1;for(let o=0;o<this._activeItems.length;o++){let a=this._activeItems[o];if(a!==e){let{x:l,y:d}=a.getRootElement().getBoundingClientRect(),h=Math.hypot(t-l,i-d);h<s&&(s=h,n=o)}}return n}},ve=.05,ye=.05,f=function(r){return r[r.NONE=0]="NONE",r[r.UP=1]="UP",r[r.DOWN=2]="DOWN",r}(f||{}),g=function(r){return r[r.NONE=0]="NONE",r[r.LEFT=1]="LEFT",r[r.RIGHT=2]="RIGHT",r}(g||{}),mt=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new p;entered=new p;exited=new p;dropped=new p;sorted=new p;receivingStarted=new p;receivingStopped=new p;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=y.EMPTY;_verticalScrollDirection=f.NONE;_horizontalScrollDirection=g.NONE;_scrollNode;_stopScrollTimers=new p;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,t,i,s,n){this._dragDropRegistry=t,this._ngZone=s,this._viewportRuler=n;let o=this.element=S(e);this._document=i,this.withOrientation("vertical").withElementContainer(o),t.registerDropContainer(this),this._parentPositions=new U(i)}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(e,t,i,s){this._draggingStarted(),s==null&&this.sortingDisabled&&(s=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,i,s),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,i,s,n,o,a,l={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:i,container:this,previousContainer:s,isPointerOverContainer:n,distance:o,dropPoint:a,event:l})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(s=>s.isDragging()).every(s=>e.indexOf(s)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof Z&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new ut(this._document,this._dragDropRegistry);else{let t=new Z(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,i)=>this.sortPredicate(t,i,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=S(this.element),i=this._scrollableElements.indexOf(this._container),s=this._scrollableElements.indexOf(e);return i>-1&&this._scrollableElements.splice(i,1),s>-1&&this._scrollableElements.splice(s,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,i,s){if(this.sortingDisabled||!this._domRect||!de(this._domRect,ve,t,i))return;let n=this._sortStrategy.sort(e,t,i,s);n&&this.sorted.next({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let i,s=f.NONE,n=g.NONE;if(this._parentPositions.positions.forEach((o,a)=>{a===this._document||!o.clientRect||i||de(o.clientRect,ve,e,t)&&([s,n]=We(a,o.clientRect,this._direction,e,t),(s||n)&&(i=a))}),!s&&!n){let{width:o,height:a}=this._viewportRuler.getViewportSize(),l={width:o,height:a,top:0,right:o,bottom:a,left:0};s=xe(l,t),n=Ee(l,e),i=window}i&&(s!==this._verticalScrollDirection||n!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=s,this._horizontalScrollDirection=n,this._scrollNode=i,(s||n)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.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 e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),xt(0,Pt).pipe(C(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,t=this.autoScrollStep;this._verticalScrollDirection===f.UP?e.scrollBy(0,-t):this._verticalScrollDirection===f.DOWN&&e.scrollBy(0,t),this._horizontalScrollDirection===g.LEFT?e.scrollBy(-t,0):this._horizontalScrollDirection===g.RIGHT&&e.scrollBy(t,0)})};_isOverContainer(e,t){return this._domRect!=null&&pt(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,i){return this._siblings.find(s=>s._canReceive(e,t,i))}_canReceive(e,t,i){if(!this._domRect||!pt(this._domRect,t,i)||!this.enterPredicate(e,this))return!1;let s=this._getShadowRoot().elementFromPoint(t,i);return s?s===this._container||this._container.contains(s):!1}_startReceiving(e,t){let i=this._activeSiblings;!i.has(e)&&t.every(s=>this.enterPredicate(s,this)||this._draggables.indexOf(s)>-1)&&(i.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=V(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function xe(r,e){let{top:t,bottom:i,height:s}=r,n=s*ye;return e>=t-n&&e<=t+n?f.UP:e>=i-n&&e<=i+n?f.DOWN:f.NONE}function Ee(r,e){let{left:t,right:i,width:s}=r,n=s*ye;return e>=t-n&&e<=t+n?g.LEFT:e>=i-n&&e<=i+n?g.RIGHT:g.NONE}function We(r,e,t,i,s){let n=xe(e,s),o=Ee(e,i),a=f.NONE,l=g.NONE;if(n){let d=r.scrollTop;n===f.UP?d>0&&(a=f.UP):r.scrollHeight-d>r.clientHeight&&(a=f.DOWN)}if(o){let d=r.scrollLeft;t==="rtl"?o===g.RIGHT?d<0&&(l=g.RIGHT):r.scrollWidth+d>r.clientWidth&&(l=g.LEFT):o===g.LEFT?d>0&&(l=g.LEFT):r.scrollWidth-d>r.clientWidth&&(l=g.RIGHT)}return[a,l]}var N={capture:!0},ht={passive:!1,capture:!0},Ze=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275cmp=E({type:r,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,s){},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}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return r})(),Re=(()=>{class r{_ngZone=c(z);_document=c(Q);_styleLoader=c($t);_renderer=c(it).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new p;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=tt([]);_globalListeners;_draggingPredicate=t=>t.isDragging();_domNodesToDirectives=null;pointerMove=new p;pointerUp=new p;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,ht)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(t,i){if(!(this._activeDragInstances().indexOf(t)>-1)&&(this._styleLoader.load(Ze),this._activeDragInstances.update(s=>[...s,t]),this._activeDragInstances().length===1)){let s=i.type.startsWith("touch"),n=a=>this.pointerUp.next(a),o=[["scroll",a=>this._scroll.next(a),N],["selectstart",this._preventDefaultWhileDragging,ht]];s?o.push(["touchend",n,N],["touchcancel",n,N]):o.push(["mouseup",n,N]),s||o.push(["mousemove",a=>this.pointerMove.next(a),ht]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=o.map(([a,l,d])=>this._renderer.listen(this._document,a,l,d))})}}stopDragging(t){this._activeDragInstances.update(i=>{let s=i.indexOf(t);return s>-1?(i.splice(s,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances().indexOf(t)>-1}scrolled(t){let i=[this._scroll];return t&&t!==this._document&&i.push(new Y(s=>this._ngZone.runOutsideAngular(()=>{let n=this._renderer.listen(t,"scroll",o=>{this._activeDragInstances().length&&s.next(o)},N);return()=>{n()}}))),H(...i)}registerDirectiveNode(t,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(t,i)}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(i){return new(i||r)};static \u0275prov=J({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),je={dragStartThreshold:5,pointerDirectionChangeThreshold:5},Ce=(()=>{class r{_document=c(Q);_ngZone=c(z);_viewportRuler=c(Kt);_dragDropRegistry=c(Re);_renderer=c(it).createRenderer(null,null);constructor(){}createDrag(t,i=je){return new gt(t,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(t){return new mt(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(i){return new(i||r)};static \u0275prov=J({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),De=new x("CDK_DRAG_PARENT");var qe=new x("CdkDragHandle");var Ie=new x("CDK_DRAG_CONFIG"),Te=new x("CdkDropList"),ke=(()=>{class r{element=c(et);dropContainer=c(Te,{optional:!0,skipSelf:!0});_ngZone=c(z);_viewContainerRef=c(kt);_dir=c(dt,{optional:!0});_changeDetectorRef=c(at);_selfHandle=c(qe,{optional:!0,self:!0});_parentDrag=c(De,{optional:!0,skipSelf:!0});_dragDropRegistry=c(Re);_destroyed=new p;_handles=new St([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;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;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 Y(t=>{let i=this._dragRef.moved.pipe(yt(s=>({source:this,pointerPosition:s.pointerPosition,event:s.event,delta:s.delta,distance:s.distance}))).subscribe(t);return()=>{i.unsubscribe()}});_injector=c(It);constructor(){let t=this.dropContainer,i=c(Ie,{optional:!0}),s=c(Ce);this._dragRef=s.createDrag(this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),t&&(this._dragRef._withDropContainer(t._dropListRef),t.addItem(this),t._dropListRef.beforeStarted.pipe(C(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(){Ot(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(t){let i=t.rootElementSelector,s=t.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,s&&!s.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 i=this._handles.getValue();i.push(t),this._handles.next(i)}_removeHandle(t){let i=this._handles.getValue(),s=i.indexOf(t);s>-1&&(i.splice(s,1),this._handles.next(i))}_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,i=t;this.rootElementSelector&&(i=t.closest!==void 0?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||t)}_getBoundaryElement(){let t=this.boundaryElement;return t?typeof t=="string"?this.element.nativeElement.closest(t):S(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){let i=this._dir,s=this.dragStartDelay,n=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=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 s=="object"&&s?s:lt(s),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(n).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),i&&t.withDirection(i.value)}}),t.beforeStarted.pipe(Et(1)).subscribe(()=>{if(this._parentDrag){t.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let s=this._dragDropRegistry.getDragDirectiveForNode(i);if(s){t.withParent(s._dragRef);break}i=i.parentElement}})}_handleEvents(t){t.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),t.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(t){let{lockAxis:i,dragStartDelay:s,constrainPosition:n,previewClass:o,boundaryElement:a,draggingDisabled:l,rootElementSelector:d,previewContainer:h}=t;this.disabled=l??!1,this.dragStartDelay=s||0,i&&(this.lockAxis=i),n&&(this.constrainPosition=n),o&&(this.previewClass=o),a&&(this.boundaryElement=a),d&&(this.rootElementSelector=d),h&&(this.previewContainer=h)}_setupHandlesListener(){this._handles.pipe(Ct(t=>{let i=t.map(s=>s.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),Rt(t=>H(...t.map(i=>i._stateChanges.pipe(X(i))))),C(this._destroyed)).subscribe(t=>{let i=this._dragRef,s=t.element.nativeElement;t.disabled?i.disableHandle(s):i.enableHandle(s)})}static \u0275fac=function(i){return new(i||r)};static \u0275dir=st({type:r,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,s){i&2&&nt("cdk-drag-disabled",s.disabled)("cdk-drag-dragging",s._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",O],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Bt]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[ot([{provide:De,useExisting:r}]),Tt]})}return r})(),be=new x("CdkDropListGroup");var Oe=(()=>{class r{element=c(et);_changeDetectorRef=c(at);_scrollDispatcher=c(qt);_dir=c(dt,{optional:!0});_group=c(be,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new p;_scrollableParentsResolved;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation;id=c(Wt).getId("cdk-drop-list-");lockAxis;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=t}_disabled;sortingDisabled;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled;autoScrollStep;elementContainerSelector;dropped=new v;entered=new v;exited=new v;sorted=new v;_unsortedItems=new Set;constructor(){let t=c(Ce),i=c(Ie,{optional:!0});this._dropListRef=t.createDropList(this.element),this._dropListRef.data=this,i&&this._assignDefaults(i),this._dropListRef.enterPredicate=(s,n)=>this.enterPredicate(s.data,n.data),this._dropListRef.sortPredicate=(s,n,o)=>this.sortPredicate(s,n.data,o.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),r._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef))}removeItem(t){if(this._unsortedItems.delete(t),this._latestSortedRefs){let i=this._latestSortedRefs.indexOf(t._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs))}}getSortedItems(){return Array.from(this._unsortedItems).sort((t,i)=>t._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let t=r._dropLists.indexOf(this);t>-1&&r._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe(X(this._dir.value),C(this._destroyed)).subscribe(i=>t.withDirection(i)),t.beforeStarted.subscribe(()=>{let i=Ut(this.connectedTo).map(s=>{if(typeof s=="string"){let n=r._dropLists.find(o=>o.id===s);return n}return s});if(this._group&&this._group._items.forEach(s=>{i.indexOf(s)===-1&&i.push(s)}),!this._scrollableParentsResolved){let s=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(n=>n.getElementRef().nativeElement);this._dropListRef.withScrollableParents(s),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let s=this.element.nativeElement.querySelector(this.elementContainerSelector);t.withElementContainer(s)}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=this.sortingDisabled,t.autoScrollDisabled=this.autoScrollDisabled,t.autoScrollStep=lt(this.autoScrollStep,2),t.connectedTo(i.filter(s=>s&&s!==this).map(s=>s._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),t.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),H(t.receivingStarted,t.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(t){let{lockAxis:i,draggingDisabled:s,sortingDisabled:n,listAutoScrollDisabled:o,listOrientation:a}=t;this.disabled=s??!1,this.sortingDisabled=n??!1,this.autoScrollDisabled=o??!1,this.orientation=a||"vertical",i&&(this.lockAxis=i)}_syncItemsWithRef(t){this._latestSortedRefs=t,this._dropListRef.withItems(t)}static \u0275fac=function(i){return new(i||r)};static \u0275dir=st({type:r,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,s){i&2&&(Mt("id",s.id),nt("cdk-drop-list-disabled",s.disabled)("cdk-drop-list-dragging",s._dropListRef.isDragging())("cdk-drop-list-receiving",s._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",O],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",O],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",O],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[ot([{provide:be,useValue:void 0},{provide:Te,useExisting:r}])]})}return r})();var Me=(()=>{class r{_bottomSheetRef=c(Jt);clickAction(t){this._bottomSheetRef.dismiss(t)}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=E({type:r,selectors:[["dashboards-manage-bottom-sheet"]],decls:11,vars:0,consts:[["mat-list-item","",3,"click"],["matListItemIcon",""]],template:function(i,s){i&1&&(_(0,"mat-action-list")(1,"button",0),P("click",function(){return s.clickAction("duplicate")}),_(2,"mat-icon",1),b(3,"content_copy"),D(),_(4,"span"),b(5,"Duplicate"),D()(),_(6,"button",0),P("click",function(){return s.clickAction("delete")}),_(7,"mat-icon",1),b(8,"delete_forever"),D(),_(9,"span"),b(10,"Delete"),D()()())},dependencies:[ne,ie,se,ee,$,G],encapsulation:2})}return r})();var Ye=(r,e)=>e.id;function Xe(r,e){if(r&1){let t=Ht();_(0,"div",6),P("cdkDragStarted",function(){I(t);let s=k();return T(s.dragStart())})("cdkDragEnded",function(){I(t);let s=k();return T(s.dragEnd())})("press",function(){let s=I(t).$index,n=k();return T(n.openBottomSheet(s))})("doubletap",function(){let s=I(t).$index,n=k();return T(n.editDashboard(s))}),_(1,"span",7)(2,"div",8),b(3),D()(),_(4,"p",9),b(5),D()()}if(r&2){let t=e.$implicit,i=e.$index;B(3),rt(i+1),B(2),rt(t.name)}}var Vi=(()=>{class r{pageTitle="Dashboards";_bottomSheet=c(Qt);_dashboard=c(zt);_uiEvent=c(Xt);_dialog=c(Yt);addDashboard(){this._dialog.openNameDialog({title:"New Dashboard",name:`Dashboard ${this._dashboard.dashboards().length+1}`,confirmBtnText:"Create",cancelBtnText:"Cancel"}).afterClosed().subscribe(t=>{t&&this._dashboard.add(t.name,[])})}openBottomSheet(t){this._bottomSheet.open(Me).afterDismissed().subscribe(s=>{switch(s){case"delete":this.deleteDashboard(t);break;case"duplicate":this.duplicateDashboard(t,`${this._dashboard.dashboards()[t].name}`);break;default:break}})}editDashboard(t){this._dialog.openNameDialog({title:"Rename Dashboard",name:this._dashboard.dashboards()[t].name,confirmBtnText:"Save",cancelBtnText:"Cancel"}).afterClosed().subscribe(i=>{i&&this._dashboard.update(t,i.name)})}deleteDashboard(t){this._dashboard.delete(t)}duplicateDashboard(t,i){this._dialog.openNameDialog({title:"Duplicate Dashboard",name:`${i} copy`,confirmBtnText:"Save",cancelBtnText:"Cancel"}).afterClosed().subscribe(s=>{s&&this._dashboard.duplicate(t,s.name)})}drop(t){this._dashboard.dashboards.update(i=>{let s=[...i];return j(s,t.previousIndex,t.currentIndex),s})}dragStart(){this._uiEvent.isDragging.set(!0)}dragEnd(){this._uiEvent.isDragging.set(!1)}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=E({type:r,selectors:[["dashboards-editor"]],decls:11,vars:1,consts:[[3,"pageTitle"],["cdkDropList","","cdkDropListOrientation","mixed",1,"dashboard-manage",3,"cdkDropListDropped"],["cdkDrag","","cdkDragBoundary",".dashboard-manage",1,"dashboard-card","dashboard-item"],[1,"dashboard-card","dashboard-item-add","dashboard-add-btn"],["mat-fab","",3,"click"],[2,"margin-top","10px"],["cdkDrag","","cdkDragBoundary",".dashboard-manage",1,"dashboard-card","dashboard-item",3,"cdkDragStarted","cdkDragEnded","press","doubletap"],[2,"display","block","width","100%"],[1,"item-index"],[1,"mat-title-large",2,"margin-top","25px"]],template:function(i,s){i&1&&(At(0,"page-header",0),_(1,"div",1),P("cdkDropListDropped",function(o){return s.drop(o)}),Lt(2,Xe,6,2,"div",2,Ye),_(4,"div",3)(5,"button",4),P("click",function(){return s.addDashboard()}),_(6,"mat-icon"),b(7,"add_box"),D()(),_(8,"p",5)(9,"i"),b(10,"Add Dashboard"),D()()()()),i&2&&(Ft("pageTitle",s.pageTitle),B(2),Nt(s._dashboard.dashboards()))},dependencies:[te,jt,Zt,re,$,G,Oe,ke],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.dashboard-manage[_ngcontent-%COMP%]{box-sizing:border-box;padding:0 60px;width:100%;height:calc(100% - 63px);display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-around;overflow-y:scroll;scroll-behavior:smooth}.dashboard-card[_ngcontent-%COMP%]{position:relative;height:200px;width:300px;margin:10px;border-radius:15px;padding:10px;align-content:center;text-align:center}.dashboard-item[_ngcontent-%COMP%]{background-color:var(--kip-widget-card-background-color);border:1px solid var(--mat-sys-surface-container-highest)}.dashboard-item-add[_ngcontent-%COMP%]{background-color:var(--mat-sys-surface-container);border:1px solid var(--mat-sys-surface-container-highest)}.dashboard-add-btn[_ngcontent-%COMP%]{align-content:center;text-align:center;border:dashed 1px var(--mat-sys-outline)}.item-index[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;height:42px;width:42px;background-color:var(--mat-sys-tertiary-fixed);color:var(--mat-sys-surface-bright);border-radius:50%;align-content:center;align-items:center;justify-content:center;font-weight:700}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px var(--mat-sys-on-primary-container),0 8px 10px 1px var(--mat-sys-on-primary-container),0 3px 14px 2px var(--mat-sys-on-primary-container)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}"]})}return r})();export{Vi as DashboardsEditorComponent};
|