@mxtommy/kip 4.4.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/.github/copilot-instructions.md +21 -5
  2. package/.github/instructions/best-practices.instructions.md +4 -0
  3. package/.github/instructions/project.instructions.md +47 -10
  4. package/CHANGELOG.md +13 -0
  5. package/README.md +11 -7
  6. package/package.json +8 -5
  7. package/plugin/duckdb-parquet-storage.service.js +1206 -0
  8. package/plugin/history-series.service.js +439 -0
  9. package/plugin/index.js +796 -81
  10. package/plugin/openApi.json +258 -20
  11. package/plugin/plugin-auth.service.js +75 -0
  12. package/plugin-config-data/kip/historicalData/kip-history.duckdb +0 -0
  13. package/plugin-config-data/kip/historicalData/parquet/chart-1/1772344583976-1772344583976.parquet +0 -0
  14. package/plugin-config-data/kip/historicalData/parquet/live-1/1771408800000-1771408890000.parquet +0 -0
  15. package/plugin-config-data/kip/historicalData/parquet/live-1/1771412400000-1771412490000.parquet +0 -0
  16. package/plugin-config-data/kip/historicalData/parquet/live-1/1771419600000-1771419650000.parquet +0 -0
  17. package/plugin-config-data/kip/historicalData/parquet/live-1/1772344584154-1772344584154.parquet +0 -0
  18. package/plugin-config-data/kip/historicalData/parquet/live-1/1772344584191-1772344584191.parquet +0 -0
  19. package/plugin-config-data/kip/historicalData/parquet/live-1/1772344584268-1772344584268.parquet +0 -0
  20. package/plugin-config-data/kip/historicalData/parquet/live-2/1771502400000-1771502400000.parquet +0 -0
  21. package/plugin-config-data/kip/historicalData/parquet/live-3/1771408800000-1771408890000.parquet +0 -0
  22. package/plugin-config-data/kip/historicalData/parquet/live-3/1771412400000-1771412490000.parquet +0 -0
  23. package/plugin-config-data/kip/historicalData/parquet/live-3/1771419600000-1771419650000.parquet +0 -0
  24. package/plugin-config-data/kip/historicalData/parquet/live-3/1772344584268-1772344584268.parquet +0 -0
  25. package/plugin-config-data/kip/historicalData/parquet/live-4/1771408800000-1771408890000.parquet +0 -0
  26. package/plugin-config-data/kip/historicalData/parquet/live-4/1771412400000-1771412490000.parquet +0 -0
  27. package/plugin-config-data/kip/historicalData/parquet/live-4/1771419600000-1771419650000.parquet +0 -0
  28. package/plugin-config-data/kip/historicalData/parquet/live-5/1771412400000-1771412490000.parquet +0 -0
  29. package/plugin-config-data/kip/historicalData/parquet/live-5/1771419600000-1771419650000.parquet +0 -0
  30. package/plugin-config-data/kip/historicalData/parquet/live-6/1771419600000-1771419650000.parquet +0 -0
  31. package/plugin-config-data/kip/historicalData/parquet/live-prefixed-1/1771408800000-1771408890000.parquet +0 -0
  32. package/plugin-config-data/kip/historicalData/parquet/live-prefixed-1/1771412400000-1771412490000.parquet +0 -0
  33. package/plugin-config-data/kip/historicalData/parquet/live-prefixed-1/1771419600000-1771419650000.parquet +0 -0
  34. package/plugin-config-data/kip/historicalData/parquet/live-prefixed-1/1772344584191-1772344584191.parquet +0 -0
  35. package/plugin-config-data/kip/historicalData/parquet/live-prefixed-1/1772344584268-1772344584268.parquet +0 -0
  36. package/public/assets/help-docs/chartplotter.md +5 -18
  37. package/public/assets/help-docs/community.md +0 -3
  38. package/public/assets/help-docs/configuration.md +1 -1
  39. package/public/assets/help-docs/contact-us.md +0 -4
  40. package/public/assets/help-docs/dashboards.md +20 -18
  41. package/public/assets/help-docs/datainspector.md +7 -5
  42. package/public/assets/help-docs/history-api.md +116 -0
  43. package/public/assets/help-docs/menu.json +18 -6
  44. package/public/assets/help-docs/nodered-control-flows.md +125 -0
  45. package/public/assets/help-docs/putcontrols.md +101 -60
  46. package/public/assets/help-docs/welcome.md +6 -7
  47. package/public/assets/help-docs/widget-historical-series.md +66 -0
  48. package/public/assets/help-docs/zones.md +5 -10
  49. package/public/chunk-2ICAVOT2.js +10 -0
  50. package/public/chunk-6XFWUUDD.js +3 -0
  51. package/public/chunk-A6DQJFP4.js +16 -0
  52. package/public/chunk-B75MT7ND.js +1 -0
  53. package/public/{chunk-HJQQWPGC.js → chunk-CEB42O2C.js} +1 -1
  54. package/public/chunk-CHGXAEKT.js +2 -0
  55. package/public/chunk-D7VDX7ZF.js +5 -0
  56. package/public/chunk-DD4F6F4S.js +9 -0
  57. package/public/{chunk-KIR67PZ2.js → chunk-DEGYRCMI.js} +1 -1
  58. package/public/{chunk-UVAQADRE.js → chunk-DEM56G4S.js} +1 -1
  59. package/public/chunk-DYTBBUMI.js +4 -0
  60. package/public/{chunk-PGELIHBX.js → chunk-EDNYYQIZ.js} +2 -2
  61. package/public/chunk-FNF7M3AE.js +1 -0
  62. package/public/chunk-IHURI4IH.js +5 -0
  63. package/public/chunk-J3LDKVIS.js +50 -0
  64. package/public/{chunk-PSF2OKKT.js → chunk-JB4YVVNW.js} +1 -1
  65. package/public/chunk-KPHICV76.js +5 -0
  66. package/public/chunk-KZ5DUKAX.js +1 -0
  67. package/public/{chunk-BNIQFWQ6.js → chunk-LQDSU4WS.js} +3 -3
  68. package/public/{chunk-PDYVZHOK.js → chunk-MGPPVLZ7.js} +1 -1
  69. package/public/{chunk-TKC7ROZ7.js → chunk-R7RQHWKJ.js} +1 -1
  70. package/public/chunk-S72JTJPN.js +6 -0
  71. package/public/chunk-UYIJND2R.js +1 -0
  72. package/public/chunk-YCEXTKGG.js +1 -0
  73. package/public/chunk-YKJKIWXO.js +6 -0
  74. package/public/index.html +1 -1
  75. package/public/main-EG2WF4EO.js +1 -0
  76. package/tools/schematics/create-host2-widget/files/readme/README.md.template +1 -1
  77. package/public/assets/help-docs/datasets.md +0 -95
  78. package/public/chunk-2KMYPGX4.js +0 -2
  79. package/public/chunk-2MWBAYPJ.js +0 -8
  80. package/public/chunk-3BGR52TW.js +0 -53
  81. package/public/chunk-4IHRH3BQ.js +0 -9
  82. package/public/chunk-557F3J5T.js +0 -1
  83. package/public/chunk-5DLSQ773.js +0 -4
  84. package/public/chunk-7HLFWAA7.js +0 -1
  85. package/public/chunk-IWK4FHBL.js +0 -5
  86. package/public/chunk-J4IGUIZA.js +0 -6
  87. package/public/chunk-JP7ZAJ6C.js +0 -3
  88. package/public/chunk-KKJXPB75.js +0 -8
  89. package/public/chunk-MMIOUKLI.js +0 -1
  90. package/public/chunk-PESXPDBT.js +0 -2
  91. package/public/chunk-PKATAZA2.js +0 -1
  92. package/public/chunk-TGGJAGV7.js +0 -15
  93. package/public/chunk-VH4ZIU4T.js +0 -4
  94. package/public/chunk-XEJJOWK6.js +0 -2
  95. package/public/main-I7M3MAJT.js +0 -1
  96. package/rm-npmjs-beta.sh +0 -50
@@ -1,6 +0,0 @@
1
- import{a as He,b as yi,f as wi,g as Ci,i as Le,j as je}from"./chunk-VH4ZIU4T.js";import{a as bi}from"./chunk-UVAQADRE.js";import{d as gi,f as Be,j as _i}from"./chunk-IWK4FHBL.js";import"./chunk-PSF2OKKT.js";import{a as ni,e as ri,f as si,h as li,i as ci,j as di,k as ui,l as mi,o as Ae,v as _e,w as fi,x as hi,y as pi}from"./chunk-KKJXPB75.js";import"./chunk-XEJJOWK6.js";import"./chunk-PESXPDBT.js";import{$a as V,$d as qt,A as G,Aa as Ie,Ab as D,Ad as Lt,Ae as ii,Ba as St,Bb as v,Cd as jt,Ce as oi,Da as X,Db as Se,De as ai,Eb as ee,Ed as Vt,Fb as te,Fc as At,Ga as Rt,Gb as _,Gd as Ut,Ha as kt,Hb as c,Hc as ke,Ib as d,Ic as Je,J as De,Ja as ce,Jb as F,Ka as P,Kb as Ee,Kd as $t,L as wt,Lb as Re,Ma as L,Mb as Tt,Mc as pe,Nb as ue,Nc as ge,Ob as me,Oc as w,P as Ct,Pb as T,Pc as xe,Qb as Q,Rd as Qt,Sb as M,Ub as y,Vb as fe,Wb as z,Xb as Xe,Xd as Wt,Ya as u,Zb as W,_a as ve,_b as q,a as Ye,ac as Ot,b as Ze,bc as It,be as Gt,cb as xt,cc as Pe,da as Y,ec as ie,ed as Bt,fb as de,ga as bt,hc as h,ic as he,ie as Kt,jb as k,jc as N,je as Fe,k as x,kb as U,ke as Yt,la as le,lb as f,le as ze,m as ne,ma as j,mc as Et,n as Oe,nc as Pt,ne as tt,o as gt,oa as K,ob as b,oc as Ft,p as _t,pb as J,pd as et,qa as s,qd as Ht,qe as oe,re as Zt,s as re,se as Ne,te as Xt,u as yt,uc as I,ue as Jt,va as B,wa as H,xa as Z,xb as Mt,xc as zt,xe as ei,ya as Dt,yb as $,yc as Nt,ye as ti,z as se,za as vt}from"./chunk-TGGJAGV7.js";var Wi=[[["caption"]],[["colgroup"],["col"]],"*"],qi=["caption","colgroup, col","*"];function Gi(i,a){i&1&&z(0,2)}function Ki(i,a){i&1&&(c(0,"thead",0),T(1,1),d(),c(2,"tbody",0),T(3,2)(4,3),d(),c(5,"tfoot",0),T(6,4),d())}function Yi(i,a){i&1&&T(0,1)(1,2)(2,3)(3,4)}var A=new K("CDK_TABLE");var $e=(()=>{class i{template=s(V);constructor(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["","cdkCellDef",""]]})}return i})(),Qe=(()=>{class i{template=s(V);constructor(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["","cdkHeaderCellDef",""]]})}return i})(),Si=(()=>{class i{template=s(V);constructor(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["","cdkFooterCellDef",""]]})}return i})(),we=(()=>{class i{_table=s(A,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;constructor(){}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,o,n){if(t&1&&Xe(n,$e,5)(n,Qe,5)(n,Si,5),t&2){let r;W(r=q())&&(o.cell=r.first),W(r=q())&&(o.headerCell=r.first),W(r=q())&&(o.footerCell=r.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",w],stickyEnd:[2,"stickyEnd","stickyEnd",w]},features:[I([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:i}])]})}return i})(),Ue=class{constructor(a,e){e.nativeElement.classList.add(...a._columnCssClassName)}},Ri=(()=>{class i extends Ue{constructor(){super(s(we),s(L))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[b]})}return i})();var ki=(()=>{class i extends Ue{constructor(){let e=s(we),t=s(L);super(e,t);let o=e._table?._getCellRole();o&&t.nativeElement.setAttribute("role",o)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[b]})}return i})();var ot=(()=>{class i{template=s(V);_differs=s(ge);columns;_columnsDiffer;constructor(){}ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof Te?e.headerCell.template:this instanceof at?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,features:[ce]})}return i})(),Te=(()=>{class i extends ot{_table=s(A,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(s(V),s(ge))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",w]},features:[b,ce]})}return i})(),at=(()=>{class i extends ot{_table=s(A,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(s(V),s(ge))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",w]},features:[b,ce]})}return i})(),We=(()=>{class i extends ot{_table=s(A,{optional:!0});when;constructor(){super(s(V),s(ge))}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[b]})}return i})(),ae=(()=>{class i{_viewContainer=s(de);cells;context;static mostRecentCellOutlet=null;constructor(){i.mostRecentCellOutlet=this}ngOnDestroy(){i.mostRecentCellOutlet===this&&(i.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["","cdkCellOutlet",""]]})}return i})(),nt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=k({type:i,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&T(0,0)},dependencies:[ae],encapsulation:2})}return i})();var rt=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=k({type:i,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&T(0,0)},dependencies:[ae],encapsulation:2})}return i})(),qe=(()=>{class i{templateRef=s(V);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";constructor(){}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["ng-template","cdkNoDataRow",""]]})}return i})(),Di=["top","bottom","left","right"],it=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(a=>this._updateCachedSizes(a)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(a,e,t=!0,o=!0,n,r,l){this._isNativeHtmlTable=a,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=o,this.direction=n,this._positionListener=r,this._tableInjector=l,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(a,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(a);let t=[];for(let o of a)o.nodeType===o.ELEMENT_NODE&&t.push(o,...Array.from(o.children));ve({write:()=>{for(let o of t)this._removeStickyStyle(o,e)}},{injector:this._tableInjector})}updateStickyColumns(a,e,t,o=!0,n=!0){if(!a.length||!this._isBrowser||!(e.some(E=>E)||t.some(E=>E))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let r=a[0],l=r.children.length,m=this.direction==="rtl",p=m?"right":"left",g=m?"left":"right",C=e.lastIndexOf(!0),S=t.indexOf(!0),R,ft,ht;n&&this._updateStickyColumnReplayQueue({rows:[...a],stickyStartStates:[...e],stickyEndStates:[...t]}),ve({earlyRead:()=>{R=this._getCellWidths(r,o),ft=this._getStickyStartColumnPositions(R,e),ht=this._getStickyEndColumnPositions(R,t)},write:()=>{for(let E of a)for(let O=0;O<l;O++){let pt=E.children[O];e[O]&&this._addStickyStyle(pt,p,ft[O],O===C),t[O]&&this._addStickyStyle(pt,g,ht[O],O===S)}this._positionListener&&R.some(E=>!!E)&&(this._positionListener.stickyColumnsUpdated({sizes:C===-1?[]:R.slice(0,C+1).map((E,O)=>e[O]?E:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:S===-1?[]:R.slice(S).map((E,O)=>t[O+S]?E:null).reverse()}))}},{injector:this._tableInjector})}stickRows(a,e,t){if(!this._isBrowser)return;let o=t==="bottom"?a.slice().reverse():a,n=t==="bottom"?e.slice().reverse():e,r=[],l=[],m=[];ve({earlyRead:()=>{for(let p=0,g=0;p<o.length;p++){if(!n[p])continue;r[p]=g;let C=o[p];m[p]=this._isNativeHtmlTable?Array.from(C.children):[C];let S=this._retrieveElementSize(C).height;g+=S,l[p]=S}},write:()=>{let p=n.lastIndexOf(!0);for(let g=0;g<o.length;g++){if(!n[g])continue;let C=r[g],S=g===p;for(let R of m[g])this._addStickyStyle(R,t,C,S)}t==="top"?this._positionListener?.stickyHeaderRowsUpdated({sizes:l,offsets:r,elements:m}):this._positionListener?.stickyFooterRowsUpdated({sizes:l,offsets:r,elements:m})}},{injector:this._tableInjector})}updateStickyFooterContainer(a,e){this._isNativeHtmlTable&&ve({write:()=>{let t=a.querySelector("tfoot");t&&(e.some(o=>!o)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(a,e){if(!a.classList.contains(this._stickCellCss))return;for(let o of e)a.style[o]="",a.classList.remove(this._borderCellCss[o]);Di.some(o=>e.indexOf(o)===-1&&a.style[o])?a.style.zIndex=this._getCalculatedZIndex(a):(a.style.zIndex="",this._needsPositionStickyOnElement&&(a.style.position=""),a.classList.remove(this._stickCellCss))}_addStickyStyle(a,e,t,o){a.classList.add(this._stickCellCss),o&&a.classList.add(this._borderCellCss[e]),a.style[e]=`${t}px`,a.style.zIndex=this._getCalculatedZIndex(a),this._needsPositionStickyOnElement&&(a.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(a){let e={top:100,bottom:10,left:1,right:1},t=0;for(let o of Di)a.style[o]&&(t+=e[o]);return t?`${t}`:""}_getCellWidths(a,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],o=a.children;for(let n=0;n<o.length;n++){let r=o[n];t.push(this._retrieveElementSize(r).width)}return this._cachedCellWidths=t,t}_getStickyStartColumnPositions(a,e){let t=[],o=0;for(let n=0;n<a.length;n++)e[n]&&(t[n]=o,o+=a[n]);return t}_getStickyEndColumnPositions(a,e){let t=[],o=0;for(let n=a.length;n>0;n--)e[n]&&(t[n]=o,o+=a[n]);return t}_retrieveElementSize(a){let e=this._elemSizeCache.get(a);if(e)return e;let t=a.getBoundingClientRect(),o={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(a,o),this._resizeObserver.observe(a,{box:"border-box"})),o}_updateStickyColumnReplayQueue(a){this._removeFromStickyColumnReplayQueue(a.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(a)}_removeFromStickyColumnReplayQueue(a){let e=new Set(a);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(o=>!e.has(o));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(a){let e=!1;for(let t of a){let o=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};o.width!==this._elemSizeCache.get(t.target)?.width&&Zi(t.target)&&(e=!0),this._elemSizeCache.set(t.target,o)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function Zi(i){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(a=>i.classList.contains(a))}var Me=new K("STICKY_POSITIONING_LISTENER");var st=(()=>{class i{viewContainer=s(de);elementRef=s(L);constructor(){let e=s(A);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["","rowOutlet",""]]})}return i})(),lt=(()=>{class i{viewContainer=s(de);elementRef=s(L);constructor(){let e=s(A);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["","headerRowOutlet",""]]})}return i})(),ct=(()=>{class i{viewContainer=s(de);elementRef=s(L);constructor(){let e=s(A);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["","footerRowOutlet",""]]})}return i})(),dt=(()=>{class i{viewContainer=s(de);elementRef=s(L);constructor(){let e=s(A);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["","noDataRowOutlet",""]]})}return i})(),ut=(()=>{class i{_differs=s(ge);_changeDetectorRef=s(pe);_elementRef=s(L);_dir=s(Yt,{optional:!0});_platform=s(Lt);_viewRepeater;_viewportRuler=s(ei);_injector=s(vt);_virtualScrollViewport=s(ti,{optional:!0,host:!0});_positionListener=s(Me,{optional:!0})||s(Me,{optional:!0,skipSelf:!0});_document=s(Ie);_data;_renderedRange;_onDestroy=new x;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new x;_footerRowStickyUpdates=new x;_disableVirtualScrolling=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck())}_dataSource;_dataSourceChanges=new x;_dataStream=new x;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new X;viewChange=new ne({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;constructor(){s(new At("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,o)=>this.trackBy?this.trackBy(o.dataIndex,o.data):o)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(Y(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new Jt:new _i,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),Ne(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(o,n,r)=>this._getEmbeddedViewArgs(o.item,r),o=>o.item.data,o=>{o.operation===Xt.INSERTED&&o.context&&this._renderCellTemplateForItem(o.record.item.rowDef,o.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(o=>{let n=t.get(o.currentIndex);n.context.$implicit=o.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let o=vi(this._headerRowOutlet,"thead");o&&(o.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let o=vi(this._footerRowOutlet,"tfoot");o&&(o.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...o],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((n,r)=>{this._addStickyColumnStyles([n],this._headerRowDefs[r])}),this._rowDefs.forEach(n=>{let r=[];for(let l=0;l<t.length;l++)this._renderRows[l].rowDef===n&&r.push(t[l]);this._addStickyColumnStyles(r,n)}),o.forEach((n,r)=>{this._addStickyColumnStyles([n],this._footerRowDefs[r])}),Array.from(this._columnDefsByName.values()).forEach(n=>n.resetStickyChanged())}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e)}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e)}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e)}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e)}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return[];let e=[],t=Math.min(this._data.length,this._renderedRange.end),o=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let n=this._renderedRange.start;n<t;n++){let r=this._data[n],l=this._getRenderRowsForData(r,n,o.get(r));this._cachedRenderRowsMap.has(r)||this._cachedRenderRowsMap.set(r,new WeakMap);for(let m=0;m<l.length;m++){let p=l[m],g=this._cachedRenderRowsMap.get(p.data);g.has(p.rowDef)?g.get(p.rowDef).push(p):g.set(p.rowDef,[p]),e.push(p)}}return e}_getRenderRowsForData(e,t,o){return this._getRowDefs(e,t).map(r=>{let l=o&&o.has(r)?o.get(r):[];if(l.length){let m=l.shift();return m.dataIndex=t,m}else return{data:e,rowDef:r,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),Ve(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=Ve(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=Ve(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=Ve(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(r,l)=>{let m=!!l.getColumnsDiff();return r||m},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let o=this._headerRowDefs.reduce(e,!1);o&&this._forceRenderHeaderRows();let n=this._footerRowDefs.reduce(e,!1);return n&&this._forceRenderFooterRows(),t||o||n}_switchDataSource(e){this._data=[],Ne(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;Ne(this.dataSource)?e=this.dataSource.connect(this):yt(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=re(this.dataSource)),this._renderChangeSubscription=G([e,this.viewChange]).pipe(Y(this._onDestroy)).subscribe(([t,o])=>{this._data=t||[],this._renderedRange=o,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let o=Array.from(t?.columns||[]).map(l=>{let m=this._columnDefsByName.get(l);return m}),n=o.map(l=>l.sticky),r=o.map(l=>l.stickyEnd);this._stickyStyler.updateStickyColumns(e,n,r,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let o=0;o<e.viewContainer.length;o++){let n=e.viewContainer.get(o);t.push(n.rootNodes[0])}return t}_getRowDefs(e,t){if(this._rowDefs.length===1)return[this._rowDefs[0]];let o=[];if(this.multiTemplateDataRows)o=this._rowDefs.filter(n=>!n.when||n.when(t,e));else{let n=this._rowDefs.find(r=>r.when&&r.when(t,e))||this._defaultRowDef;n&&o.push(n)}return o.length,o}_getEmbeddedViewArgs(e,t){let o=e.rowDef,n={$implicit:e.data};return{templateRef:o.template,context:n,index:t}}_renderRow(e,t,o,n={}){let r=e.viewContainer.createEmbeddedView(t.template,n,o);return this._renderCellTemplateForItem(t,n),r}_renderCellTemplateForItem(e,t){for(let o of this._getCellTemplates(e))ae.mostRecentCellOutlet&&ae.mostRecentCellOutlet._viewContainer.createEmbeddedView(o,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,o=e.length;t<o;t++){let r=e.get(t).context;r.count=o,r.first=t===0,r.last=t===o-1,r.even=t%2===0,r.odd=!r.even,this.multiTemplateDataRows?(r.dataIndex=this._renderRows[t].dataIndex,r.renderIndex=t):r.index=this._renderRows[t].dataIndex}}_getCellTemplates(e){return!e||!e.columns?[]:Array.from(e.columns,t=>{let o=this._columnDefsByName.get(t);return e.extractCellTemplate(o)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,o)=>t||o.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new it(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:re()).pipe(Y(this._onDestroy)).subscribe(o=>{this._stickyStyler.direction=o,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?_t:gt;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(wt(0,t),Y(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(o,n)=>this._measureRangeSize(o,n)}),G([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(Y(this._onDestroy)).subscribe(([o,n])=>{if(!(!n.sizes||!n.offsets||!n.elements))for(let r=0;r<n.elements.length;r++){let l=n.elements[r];if(l){let m=n.offsets[r],p=o!==0?Math.max(o-m,m):-m;for(let g of l)g.style.top=`${-p}px`}}}),G([e.renderedContentOffset,this._footerRowStickyUpdates]).pipe(Y(this._onDestroy)).subscribe(([o,n])=>{if(!(!n.sizes||!n.offsets||!n.elements))for(let r=0;r<n.elements.length;r++){let l=n.elements[r];if(l)for(let m of l)m.style.bottom=`${o+n.offsets[r]}px`}})}_getOwnDefs(e){return e.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let o=this._noDataRowOutlet.viewContainer;if(t){let n=o.createEmbeddedView(e.templateRef),r=n.rootNodes[0];if(n.rootNodes.length===1&&r?.nodeType===this._document.ELEMENT_NODE){r.setAttribute("role","row"),r.classList.add(...e._contentClassNames);let l=r.querySelectorAll(e._cellSelector);for(let m=0;m<l.length;m++)l[m].classList.add(...e._cellClassNames)}}else o.clear();this._isShowingNoDataRow=t,this._changeDetectorRef.markForCheck()}_measureRangeSize(e,t){if(e.start>=e.end||t!=="vertical")return 0;let o=this.viewChange.value,n=this._rowOutlet.viewContainer;e.start<o.start||e.end>o.end;let r=e.start-o.start,l=e.end-e.start,m,p;for(let S=0;S<l;S++){let R=n.get(S+r);if(R&&R.rootNodes.length){m=p=R.rootNodes[0];break}}for(let S=l-1;S>-1;S--){let R=n.get(S+r);if(R&&R.rootNodes.length){p=R.rootNodes[R.rootNodes.length-1];break}}let g=m?.getBoundingClientRect?.(),C=p?.getBoundingClientRect?.();return g&&C?C.bottom-g.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=k({type:i,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,o,n){if(t&1&&Xe(n,qe,5)(n,we,5)(n,We,5)(n,Te,5)(n,at,5),t&2){let r;W(r=q())&&(o._noDataRow=r.first),W(r=q())&&(o._contentColumnDefs=r),W(r=q())&&(o._contentRowDefs=r),W(r=q())&&(o._contentHeaderRowDefs=r),W(r=q())&&(o._contentFooterRowDefs=r)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,o){t&2&&ie("cdk-table-fixed-layout",o.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",w],fixedLayout:[2,"fixedLayout","fixedLayout",w],recycleRows:[2,"recycleRows","recycleRows",w]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[I([{provide:A,useExisting:i},{provide:Me,useValue:null}])],ngContentSelectors:qi,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(fe(Wi),z(0),z(1,1),D(2,Gi,1,0),D(3,Ki,7,0)(4,Yi,4,0)),t&2&&(u(2),v(o._isServer?2:-1),u(),v(o._isNativeHtmlTable?3:4))},dependencies:[lt,st,dt,ct],styles:[`.cdk-table-fixed-layout{table-layout:fixed}
2
- `],encapsulation:2})}return i})();function Ve(i,a){return i.concat(Array.from(a))}function vi(i,a){let e=a.toUpperCase(),t=i.viewContainer.element.nativeElement;for(;t;){let o=t.nodeType===1?t.nodeName:null;if(o===e)return t;if(o==="TABLE")break;t=t.parentNode}return null}var xi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=j({imports:[ii]})}return i})();var Xi=[[["caption"]],[["colgroup"],["col"]],"*"],Ji=["caption","colgroup, col","*"];function eo(i,a){i&1&&z(0,2)}function to(i,a){i&1&&(c(0,"thead",0),T(1,1),d(),c(2,"tbody",2),T(3,3)(4,4),d(),c(5,"tfoot",0),T(6,5),d())}function io(i,a){i&1&&T(0,1)(1,3)(2,4)(3,5)}var Mi=(()=>{class i extends ut{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(o){return(e||(e=P(i)))(o||i)}})();static \u0275cmp=k({type:i,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,o){t&2&&ie("mat-table-fixed-layout",o.fixedLayout)},exportAs:["matTable"],features:[I([{provide:ut,useExisting:i},{provide:A,useExisting:i},{provide:Me,useValue:null}]),b],ngContentSelectors:Ji,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(fe(Xi),z(0),z(1,1),D(2,eo,1,0),D(3,to,7,0)(4,io,4,0)),t&2&&(u(2),v(o._isServer?2:-1),u(),v(o._isNativeHtmlTable?3:4))},dependencies:[lt,st,dt,ct],styles:[`.mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:var(--mat-table-header-container-height, 56px)}mat-row{min-height:var(--mat-table-row-item-container-height, 52px)}mat-footer-row{min-height:var(--mat-table-footer-container-height, 52px)}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-sys-surface))}.mat-table-fixed-layout{table-layout:fixed}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:start;text-overflow:ellipsis}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-sys-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-sys-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-sys-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-sys-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:start}.mdc-data-table__row:last-child>.mat-mdc-header-cell{border-bottom:none}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child>.mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}
3
- `],encapsulation:2})}return i})(),Ti=(()=>{class i extends $e{static \u0275fac=(()=>{let e;return function(o){return(e||(e=P(i)))(o||i)}})();static \u0275dir=f({type:i,selectors:[["","matCellDef",""]],features:[I([{provide:$e,useExisting:i}]),b]})}return i})(),Oi=(()=>{class i extends Qe{static \u0275fac=(()=>{let e;return function(o){return(e||(e=P(i)))(o||i)}})();static \u0275dir=f({type:i,selectors:[["","matHeaderCellDef",""]],features:[I([{provide:Qe,useExisting:i}]),b]})}return i})();var Ii=(()=>{class i extends we{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=P(i)))(o||i)}})();static \u0275dir=f({type:i,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[I([{provide:we,useExisting:i},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:i}]),b]})}return i})(),Ei=(()=>{class i extends Ri{static \u0275fac=(()=>{let e;return function(o){return(e||(e=P(i)))(o||i)}})();static \u0275dir=f({type:i,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[b]})}return i})();var Ke=(()=>{class i extends ki{static \u0275fac=(()=>{let e;return function(o){return(e||(e=P(i)))(o||i)}})();static \u0275dir=f({type:i,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[b]})}return i})();var Pi=(()=>{class i extends Te{static \u0275fac=(()=>{let e;return function(o){return(e||(e=P(i)))(o||i)}})();static \u0275dir=f({type:i,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",w]},features:[I([{provide:Te,useExisting:i}]),b]})}return i})();var Fi=(()=>{class i extends We{static \u0275fac=(()=>{let e;return function(o){return(e||(e=P(i)))(o||i)}})();static \u0275dir=f({type:i,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[I([{provide:We,useExisting:i}]),b]})}return i})(),zi=(()=>{class i extends nt{static \u0275fac=(()=>{let e;return function(o){return(e||(e=P(i)))(o||i)}})();static \u0275cmp=k({type:i,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[I([{provide:nt,useExisting:i}]),b],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&T(0,0)},dependencies:[ae],encapsulation:2})}return i})();var Ni=(()=>{class i extends rt{static \u0275fac=(()=>{let e;return function(o){return(e||(e=P(i)))(o||i)}})();static \u0275cmp=k({type:i,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[I([{provide:rt,useExisting:i}]),b],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&T(0,0)},dependencies:[ae],encapsulation:2})}return i})(),Ai=(()=>{class i extends qe{_cellSelector="td, mat-cell, [mat-cell], .mat-cell";constructor(){super(),this._contentClassNames.push("mat-mdc-no-data-row","mat-mdc-row","mdc-data-table__row"),this._cellClassNames.push("mat-mdc-cell","mdc-data-table__cell","mat-no-data-cell")}static \u0275fac=function(t){return new(t||i)};static \u0275dir=f({type:i,selectors:[["ng-template","matNoDataRow",""]],features:[I([{provide:qe,useExisting:i}]),b]})}return i})();var Bi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=j({imports:[xi,ze]})}return i})(),oo=9007199254740991,Ge=class extends Zt{_data;_renderData=new ne([]);_filter=new ne("");_internalPageChanges=new x;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(a){a=Array.isArray(a)?a:[],this._data.next(a),this._renderChangesSubscription||this._filterData(a)}get filter(){return this._filter.value}set filter(a){this._filter.next(a),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(a){this._sort=a,this._updateChangeSubscription()}_sort;get paginator(){return this._paginator}set paginator(a){this._paginator=a,this._updateChangeSubscription()}_paginator;sortingDataAccessor=(a,e)=>{let t=a[e];if(jt(t)){let o=Number(t);return o<oo?o:t}return t};sortData=(a,e)=>{let t=e.active,o=e.direction;return!t||o==""?a:a.sort((n,r)=>{let l=this.sortingDataAccessor(n,t),m=this.sortingDataAccessor(r,t),p=typeof l,g=typeof m;p!==g&&(p==="number"&&(l+=""),g==="number"&&(m+=""));let C=0;return l!=null&&m!=null?l>m?C=1:l<m&&(C=-1):l!=null?C=1:m!=null&&(C=-1),C*(o=="asc"?1:-1)})};filterPredicate=(a,e)=>{let t=e.trim().toLowerCase();return Object.values(a).some(o=>`${o}`.toLowerCase().includes(t))};constructor(a=[]){super(),this._data=new ne(a),this._updateChangeSubscription()}_updateChangeSubscription(){let a=this._sort?De(this._sort.sortChange,this._sort.initialized):re(null),e=this._paginator?De(this._paginator.page,this._internalPageChanges,this._paginator.initialized):re(null),t=this._data,o=G([t,this._filter]).pipe(se(([l])=>this._filterData(l))),n=G([o,a]).pipe(se(([l])=>this._orderData(l))),r=G([n,e]).pipe(se(([l])=>this._pageData(l)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=r.subscribe(l=>this._renderData.next(l))}_filterData(a){return this.filteredData=this.filter==null||this.filter===""?a:a.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(a){return this.sort?this.sortData(a.slice(),this.sort):a}_pageData(a){if(!this.paginator)return a;let e=this.paginator.pageIndex*this.paginator.pageSize;return a.slice(e,e+this.paginator.pageSize)}_updatePaginator(a){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=a,e.pageIndex>0)){let t=Math.ceil(e.length/e.pageSize)-1||0,o=Math.min(e.pageIndex,t);o!==e.pageIndex&&(e.pageIndex=o,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}};function no(i,a){if(i&1&&(c(0,"mat-option",17),h(1),d()),i&2){let e=a.$implicit;_("value",e),u(),N(" ",e," ")}}function ro(i,a){if(i&1){let e=Q();c(0,"mat-form-field",14)(1,"mat-select",16,0),M("selectionChange",function(o){B(e);let n=y(2);return H(n._changePageSize(o.value))}),ee(3,no,2,2,"mat-option",17,Se),d(),c(5,"div",18),M("click",function(){B(e);let o=Pe(2);return H(o.open())}),d()()}if(i&2){let e=y(2);_("appearance",e._formFieldAppearance)("color",e.color),u(),_("value",e.pageSize)("disabled",e.disabled),Mt("aria-labelledby",e._pageSizeLabelId),_("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),u(2),te(e._displayedPageSizeOptions)}}function so(i,a){if(i&1&&(c(0,"div",15),h(1),d()),i&2){let e=y(2);u(),he(e.pageSize)}}function lo(i,a){if(i&1&&(c(0,"div",3)(1,"div",13),h(2),d(),D(3,ro,6,7,"mat-form-field",14),D(4,so,2,1,"div",15),d()),i&2){let e=y();u(),$("id",e._pageSizeLabelId),u(),N(" ",e._intl.itemsPerPageLabel," "),u(),v(e._displayedPageSizeOptions.length>1?3:-1),u(),v(e._displayedPageSizeOptions.length<=1?4:-1)}}function co(i,a){if(i&1){let e=Q();c(0,"button",19),M("click",function(){B(e);let o=y();return H(o._buttonClicked(0,o._previousButtonsDisabled()))}),Z(),c(1,"svg",8),F(2,"path",20),d()()}if(i&2){let e=y();_("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("disabled",e._previousButtonsDisabled())("tabindex",e._previousButtonsDisabled()?-1:null),$("aria-label",e._intl.firstPageLabel)}}function uo(i,a){if(i&1){let e=Q();c(0,"button",21),M("click",function(){B(e);let o=y();return H(o._buttonClicked(o.getNumberOfPages()-1,o._nextButtonsDisabled()))}),Z(),c(1,"svg",8),F(2,"path",22),d()()}if(i&2){let e=y();_("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("disabled",e._nextButtonsDisabled())("tabindex",e._nextButtonsDisabled()?-1:null),$("aria-label",e._intl.lastPageLabel)}}var mo=(()=>{class i{changes=new x;itemsPerPageLabel="Items per page:";nextPageLabel="Next page";previousPageLabel="Previous page";firstPageLabel="First page";lastPageLabel="Last page";getRangeLabel=(e,t,o)=>{if(o==0||t==0)return`0 of ${o}`;o=Math.max(o,0);let n=e*t,r=n<o?Math.min(n+t,o):n+t;return`${n+1} \u2013 ${r} of ${o}`};static \u0275fac=function(t){return new(t||i)};static \u0275prov=le({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),fo=50;var ho=new K("MAT_PAGINATOR_DEFAULT_OPTIONS"),Ce=(()=>{class i{_intl=s(mo);_changeDetectorRef=s(pe);_formFieldAppearance;_pageSizeLabelId=s(Qt).getId("mat-paginator-page-size-label-");_intlChanges;_isInitialized=!1;_initializedStream=new Oe(1);color;get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(e||0,0),this._changeDetectorRef.markForCheck()}_pageIndex=0;get length(){return this._length}set length(e){this._length=e||0,this._changeDetectorRef.markForCheck()}_length=0;get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(e||0,0),this._updateDisplayedPageSizeOptions()}_pageSize;get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(t=>xe(t,0)),this._updateDisplayedPageSizeOptions()}_pageSizeOptions=[];hidePageSize=!1;showFirstLastButtons=!1;selectConfig={};disabled=!1;page=new X;_displayedPageSizeOptions;initialized=this._initializedStream;constructor(){let e=this._intl,t=s(ho,{optional:!0});if(this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),t){let{pageSize:o,pageSizeOptions:n,hidePageSize:r,showFirstLastButtons:l}=t;o!=null&&(this._pageSize=o),n!=null&&(this._pageSizeOptions=n),r!=null&&(this.hidePageSize=r),l!=null&&(this.showFirstLastButtons=l)}this._formFieldAppearance=t?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){this.hasNextPage()&&this._navigate(this.pageIndex+1)}previousPage(){this.hasPreviousPage()&&this._navigate(this.pageIndex-1)}firstPage(){this.hasPreviousPage()&&this._navigate(0)}lastPage(){this.hasNextPage()&&this._navigate(this.getNumberOfPages()-1)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let e=this.getNumberOfPages()-1;return this.pageIndex<e&&this.pageSize!=0}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(e){let t=this.pageIndex*this.pageSize,o=this.pageIndex;this.pageIndex=Math.floor(t/e)||0,this.pageSize=e,this._emitPageEvent(o)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._isInitialized&&(this.pageSize||(this._pageSize=this.pageSizeOptions.length!=0?this.pageSizeOptions[0]:fo),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),this._displayedPageSizeOptions.indexOf(this.pageSize)===-1&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((e,t)=>e-t),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}_navigate(e){let t=this.pageIndex;e!==t&&(this.pageIndex=e,this._emitPageEvent(t))}_buttonClicked(e,t){t||this._navigate(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=k({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",xe],length:[2,"length","length",xe],pageSize:[2,"pageSize","pageSize",xe],pageSizeOptions:"pageSizeOptions",hidePageSize:[2,"hidePageSize","hidePageSize",w],showFirstLastButtons:[2,"showFirstLastButtons","showFirstLastButtons",w],selectConfig:"selectConfig",disabled:[2,"disabled","disabled",w]},outputs:{page:"page"},exportAs:["matPaginator"],decls:14,vars:14,consts:[["selectRef",""],[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-atomic","true","aria-live","polite","role","status",1,"mat-mdc-paginator-range-label"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","disabled","tabindex"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","disabled","tabindex"],["aria-hidden","true",1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],[1,"mat-mdc-paginator-touch-target",3,"click"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["matIconButton","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(t,o){t&1&&(c(0,"div",1)(1,"div",2),D(2,lo,5,4,"div",3),c(3,"div",4)(4,"div",5),h(5),d(),D(6,co,3,5,"button",6),c(7,"button",7),M("click",function(){return o._buttonClicked(o.pageIndex-1,o._previousButtonsDisabled())}),Z(),c(8,"svg",8),F(9,"path",9),d()(),Dt(),c(10,"button",10),M("click",function(){return o._buttonClicked(o.pageIndex+1,o._nextButtonsDisabled())}),Z(),c(11,"svg",8),F(12,"path",11),d()(),D(13,uo,3,5,"button",12),d()()()),t&2&&(u(2),v(o.hidePageSize?-1:2),u(3),N(" ",o._intl.getRangeLabel(o.pageIndex,o.pageSize,o.length)," "),u(),v(o.showFirstLastButtons?6:-1),u(),_("matTooltip",o._intl.previousPageLabel)("matTooltipDisabled",o._previousButtonsDisabled())("disabled",o._previousButtonsDisabled())("tabindex",o._previousButtonsDisabled()?-1:null),$("aria-label",o._intl.previousPageLabel),u(3),_("matTooltip",o._intl.nextPageLabel)("matTooltipDisabled",o._nextButtonsDisabled())("disabled",o._nextButtonsDisabled())("tabindex",o._nextButtonsDisabled()?-1:null),$("aria-label",o._intl.nextPageLabel),u(3),v(o.showFirstLastButtons?13:-1))},dependencies:[_e,He,Be,Fe,Le],styles:[`.mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-sys-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-sys-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-sys-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-sys-body-small-tracking));--mat-form-field-container-height: var(--mat-paginator-form-field-container-height, 40px);--mat-form-field-container-vertical-padding: var(--mat-paginator-form-field-container-vertical-padding, 8px)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-sys-body-small-size))}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size, 56px)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:var(--mat-paginator-page-size-select-width, 84px)}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}@media(forced-colors: active){.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon,.mat-mdc-paginator-icon{fill:currentColor}.mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-range-actions .mat-mdc-icon-button[aria-disabled]{color:GrayText}}.mat-mdc-paginator-touch-target{display:var(--mat-paginator-touch-target-display, block);position:absolute;top:50%;left:50%;width:var(--mat-paginator-page-size-select-width, 84px);height:var(--mat-paginator-page-size-select-touch-target-height, 48px);background-color:rgba(0,0,0,0);transform:translate(-50%, -50%);cursor:pointer}
4
- `],encapsulation:2,changeDetection:0})}return i})(),Hi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=j({imports:[oe,yi,je,Ce]})}return i})();var go=["mat-sort-header",""],_o=["*",[["","matSortHeaderIcon",""]]],yo=["*","[matSortHeaderIcon]"];function wo(i,a){i&1&&(Z(),Ee(0,"svg",3),Tt(1,"path",4),Re())}function Co(i,a){i&1&&(Ee(0,"div",2),z(1,1,null,wo,2,0),Re())}var Li=new K("MAT_SORT_DEFAULT_OPTIONS"),be=(()=>{class i{_defaultOptions;_initializedStream=new Oe(1);sortables=new Map;_stateChanges=new x;active;start="asc";get direction(){return this._direction}set direction(e){this._direction=e}_direction="";disableClear;disabled=!1;sortChange=new X;initialized=this._initializedStream;constructor(e){this._defaultOptions=e}register(e){this.sortables.set(e.id,e)}deregister(e){this.sortables.delete(e.id)}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(e){if(!e)return"";let t=e?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear,o=bo(e.start||this.start,t),n=o.indexOf(this.direction)+1;return n>=o.length&&(n=0),o[n]}ngOnInit(){this._initializedStream.next()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete()}static \u0275fac=function(t){return new(t||i)(xt(Li,8))};static \u0275dir=f({type:i,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{active:[0,"matSortActive","active"],start:[0,"matSortStart","start"],direction:[0,"matSortDirection","direction"],disableClear:[2,"matSortDisableClear","disableClear",w],disabled:[2,"matSortDisabled","disabled",w]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[ce]})}return i})();function bo(i,a){let e=["asc","desc"];return i=="desc"&&e.reverse(),a||e.push(""),e}var Do=(()=>{class i{changes=new x;static \u0275fac=function(t){return new(t||i)};static \u0275prov=le({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ji=(()=>{class i{_intl=s(Do);_sort=s(be,{optional:!0});_columnDef=s("MAT_SORT_HEADER_COLUMN_DEF",{optional:!0});_changeDetectorRef=s(pe);_focusMonitor=s(Vt);_elementRef=s(L);_ariaDescriber=s(Wt,{optional:!0});_renderChanges;_animationsDisabled=Gt();_recentlyCleared=Rt(null);_sortButton;id;arrowPosition="after";start;disabled=!1;get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(e){this._updateSortActionDescription(e)}_sortActionDescription="Sort";disableClear;constructor(){s(Ut).load(Kt);let e=s(Li,{optional:!0});this._sort,e?.arrowPosition&&(this.arrowPosition=e?.arrowPosition)}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._sort.register(this),this._renderChanges=De(this._sort._stateChanges,this._sort.sortChange).subscribe(()=>this._changeDetectorRef.markForCheck()),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(()=>{Promise.resolve().then(()=>this._recentlyCleared.set(null))})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._renderChanges?.unsubscribe(),this._sortButton&&this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription)}_toggleOnInteraction(){if(!this._isDisabled()){let e=this._isSorted(),t=this._sort.direction;this._sort.sort(this),this._recentlyCleared.set(e&&!this._isSorted()?t:null)}}_handleKeydown(e){(e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&(this._sort.direction==="asc"||this._sort.direction==="desc")}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?this._sort.direction=="asc"?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(e){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,e)),this._sortActionDescription=e}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=k({type:i,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,o){t&1&&M("click",function(){return o._toggleOnInteraction()})("keydown",function(r){return o._handleKeydown(r)})("mouseleave",function(){return o._recentlyCleared.set(null)}),t&2&&($("aria-sort",o._getAriaSortAttribute()),ie("mat-sort-header-disabled",o._isDisabled()))},inputs:{id:[0,"mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",disabled:[2,"disabled","disabled",w],sortActionDescription:"sortActionDescription",disableClear:[2,"disableClear","disableClear",w]},exportAs:["matSortHeader"],attrs:go,ngContentSelectors:yo,decls:4,vars:17,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],[1,"mat-sort-header-arrow"],["viewBox","0 -960 960 960","focusable","false","aria-hidden","true"],["d","M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z"]],template:function(t,o){t&1&&(fe(_o),Ee(0,"div",0)(1,"div",1),z(2),Re(),D(3,Co,3,0,"div",2),Re()),t&2&&(ie("mat-sort-header-sorted",o._isSorted())("mat-sort-header-position-before",o.arrowPosition==="before")("mat-sort-header-descending",o._sort.direction==="desc")("mat-sort-header-ascending",o._sort.direction==="asc")("mat-sort-header-recently-cleared-ascending",o._recentlyCleared()==="asc")("mat-sort-header-recently-cleared-descending",o._recentlyCleared()==="desc")("mat-sort-header-animations-disabled",o._animationsDisabled),$("tabindex",o._isDisabled()?null:0)("role",o._isDisabled()?null:"button"),u(3),v(o._renderArrow()?3:-1))},styles:[`.mat-sort-header{cursor:pointer}.mat-sort-header-disabled{cursor:default}.mat-sort-header-container{display:flex;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-sort-header-content{display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}@keyframes _mat-sort-header-recently-cleared-ascending{from{transform:translateY(0);opacity:1}to{transform:translateY(-25%);opacity:0}}@keyframes _mat-sort-header-recently-cleared-descending{from{transform:translateY(0) rotate(180deg);opacity:1}to{transform:translateY(25%) rotate(180deg);opacity:0}}.mat-sort-header-arrow{height:12px;width:12px;position:relative;transition:transform 225ms cubic-bezier(0.4, 0, 0.2, 1),opacity 225ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;overflow:visible;color:var(--mat-sort-arrow-color, var(--mat-sys-on-surface))}.mat-sort-header.cdk-keyboard-focused .mat-sort-header-arrow,.mat-sort-header.cdk-program-focused .mat-sort-header-arrow,.mat-sort-header:hover .mat-sort-header-arrow{opacity:.54}.mat-sort-header .mat-sort-header-sorted .mat-sort-header-arrow{opacity:1}.mat-sort-header-descending .mat-sort-header-arrow{transform:rotate(180deg)}.mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow{transform:translateY(-25%)}.mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow{transition:none;animation:_mat-sort-header-recently-cleared-ascending 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards}.mat-sort-header-recently-cleared-descending .mat-sort-header-arrow{transition:none;animation:_mat-sort-header-recently-cleared-descending 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards}.mat-sort-header-animations-disabled .mat-sort-header-arrow{transition-duration:0ms;animation-duration:0ms}.mat-sort-header-arrow>svg,.mat-sort-header-arrow [matSortHeaderIcon]{width:24px;height:24px;fill:currentColor;position:absolute;top:50%;left:50%;margin:-12px 0 0 -12px;transform:translateZ(0)}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}
5
- `],encapsulation:2,changeDetection:0})}return i})(),Vi=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=U({type:i});static \u0275inj=j({imports:[ze]})}return i})();function Ro(i,a){i&1&&(c(0,"span",3),h(1,"Boolean"),d())}function ko(i,a){i&1&&(c(0,"span",3),h(1,"String"),d())}function xo(i,a){i&1&&(c(0,"span",3),h(1,"String"),d())}function Mo(i,a){i&1&&(c(0,"span",3),h(1,"Object"),d())}function To(i,a){if(i&1){let e=Q();c(0,"button",5),M("click",function(){B(e);let o=y();return H(o.openDialog())}),h(1),d()}if(i&2){let e=y();u(),he(e.selectedUnit)}}function Oo(i,a){if(i&1&&(c(0,"mat-option",6),h(1),d()),i&2){let e=a.$implicit;_("value",e.measure),u(),N(" ",e.measure," ")}}function Io(i,a){if(i&1&&(c(0,"mat-optgroup",3),ee(1,Oo,2,2,"mat-option",6,Se),d()),i&2){let e=a.$implicit;_("label",e.group),u(),te(e.units)}}var Ui=(()=>{class i{_units=s(Ci);_dialog=s(li);path=ke.required();source=ke(void 0);pathValue=ke(void 0);type=ke.required();units=null;selectedUnit="unitless";ngOnInit(){this.units=this._units.getConversionsForPath(this.path()),this.selectedUnit=this.units.base}convertValue(e,t){return t==="number"?this._units.convertToUnit(this.selectedUnit,e):e}openDialog(){this._dialog.open(Eo,{data:{selectedUnit:this.selectedUnit,units:this.units}}).afterClosed().subscribe(t=>{t&&(this.selectedUnit=t)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=k({type:i,selectors:[["data-inspector-row"]],inputs:{path:[1,"path"],source:[1,"source"],pathValue:[1,"pathValue"],type:[1,"type"]},decls:10,vars:3,consts:[[1,"cell-source","cells"],[1,"cell-value","cells"],[1,"cell-action","cells"],[1,"path-type"],["mat-stroked-button","",1,"change-units-btn"],["mat-stroked-button","",1,"change-units-btn",3,"click"]],template:function(t,o){if(t&1&&(c(0,"mat-cell",0),h(1),d(),c(2,"mat-cell",1),h(3),d(),c(4,"mat-cell",2),D(5,Ro,2,0,"span",3)(6,ko,2,0,"span",3)(7,xo,2,0,"span",3)(8,Mo,2,0,"span",3)(9,To,2,1,"button",4),d()),t&2){let n;u(),he(o.source()),u(2),he(o.convertValue(o.pathValue(),o.type())),u(2),v((n=o.type())==="boolean"?5:n==="string"?6:n==="Date"?7:n==="object"?8:9)}},dependencies:[Ke,oe,tt],styles:[`.change-units-btn{width:100%}.cell-source:first-of-type{padding-left:0;flex:1 1 30%}.cells{border:0px solid white;word-break:break-word;overflow-wrap:break-word}.cell-value{justify-content:flex-start;flex:1 1 70%;padding:0}.cell-action{justify-content:end;flex:0 0 107px}.cell-action:last-of-type{padding:0}.path-type{width:100%;height:40px;align-content:center;text-align:center;color:var(--mat-sys-primary)}
6
- `],encapsulation:2})}return i})(),Eo=(()=>{class i{dialogRef=s(ri);data=s(si);selectedUnit=null;static \u0275fac=function(t){return new(t||i)};static \u0275cmp=k({type:i,selectors:[["dialog-unit-selector"]],decls:14,vars:2,consts:[["mat-dialog-title",""],["appearance","outline","floatLabel","always",2,"padding-top","15px","padding-bottom","15px"],[3,"valueChange","value"],[3,"label"],["mat-flat-button","","mat-dialog-close",""],["mat-flat-button","",3,"mat-dialog-close"],[3,"value"]],template:function(t,o){t&1&&(c(0,"h2",0),h(1,"Select Unit type"),d(),c(2,"mat-dialog-content")(3,"mat-form-field",1)(4,"mat-label"),h(5,"Unit"),d(),c(6,"mat-select",2),Ft("valueChange",function(r){return Pt(o.data.selectedUnit,r)||(o.data.selectedUnit=r),r}),ee(7,Io,3,1,"mat-optgroup",3,Se),d()()(),c(9,"mat-dialog-actions")(10,"button",4),h(11,"Cancel"),d(),c(12,"button",5),h(13,"Ok"),d()()),t&2&&(u(6),Et("value",o.data.selectedUnit),u(),te(o.data.units.conversions),u(5),_("mat-dialog-close",o.data.selectedUnit))},dependencies:[di,ui,_e,Ae,He,gi,Be,mi,oe,tt,ci],encapsulation:2})}return i})();var mt=class{_document;_textarea;constructor(a,e){this._document=e;let t=this._textarea=this._document.createElement("textarea"),o=t.style;o.position="fixed",o.top=o.opacity="0",o.left="-999em",t.setAttribute("aria-hidden","true"),t.value=a,t.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(t)}copy(){let a=this._textarea,e=!1;try{if(a){let t=this._document.activeElement;a.select(),a.setSelectionRange(0,a.value.length),e=this._document.execCommand("copy"),t&&t.focus()}}catch(t){}return e}destroy(){let a=this._textarea;a&&(a.remove(),this._textarea=void 0)}},$i=(()=>{class i{_document=s(Ie);constructor(){}copy(e){let t=this.beginCopy(e),o=t.copy();return t.destroy(),o}beginCopy(e){return new mt(e,this._document)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=le({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Po=(i,a)=>a.key;function Fo(i,a){i&1&&(c(0,"mat-header-cell",19),h(1," Path "),d())}function zo(i,a){if(i&1){let e=Q();c(0,"mat-cell",20),h(1),c(2,"button",21),M("click",function(o){let n=B(e).$implicit,r=y();return H(r.copyPath(n.path,o))}),c(3,"mat-icon"),h(4,"content_copy"),d()()()}if(i&2){let e=a.$implicit;u(),N(" ",e.path," ")}}function No(i,a){i&1&&(c(0,"mat-header-cell",22),h(1," PUT Support "),d())}function Ao(i,a){i&1&&(c(0,"mat-icon",24),h(1,"check_circle"),d())}function Bo(i,a){if(i&1&&(c(0,"mat-cell",23),D(1,Ao,2,0,"mat-icon",24),d()),i&2){let e=a.$implicit;u(),v(e.meta!=null&&e.meta.supportsPut?1:-1)}}function Ho(i,a){i&1&&(c(0,"mat-header-cell",25),h(1," Source "),d())}function Lo(i,a){if(i&1&&F(0,"data-inspector-row",28),i&2){let e=a.$implicit,t=y().$implicit,o=y();_("path",t.path)("source",o.getSourceKey(e))("pathValue",o.getSourceValue(e))("type",t.type)}}function jo(i,a){if(i&1&&(c(0,"mat-cell",26)(1,"div",27),ee(2,Lo,1,4,"data-inspector-row",28,Po),zt(4,"keyvalue"),d()()),i&2){let e=a.$implicit;u(2),te(Nt(4,0,e.sources))}}function Vo(i,a){i&1&&F(0,"mat-header-row",29)}function Uo(i,a){i&1&&F(0,"mat-row",30)}function $o(i,a){if(i&1&&(c(0,"tr",31)(1,"td",32),h(2),d()()),i&2){y();let e=Pe(6);u(2),N('No data matching the filter "',e.value,'"')}}var er=(()=>{class i{dataService=s(wi);destroyRef=s(St);_responsive=s($t);clipboard=s($i);toast=s(ni);isPhonePortrait;filterSubject=new x;paginator=Je.required(Ce);sort=Je.required(be);pageTitle="Data Inspector";pageSize=25;hidePageSize=!1;showFirstLastButtons=!0;showPageSizeOptions=[5,10,25,100];tableData=new Ge([]);displayedColumns=["path","supportsPut","defaultSource"];constructor(){this.filterSubject.pipe(Ct(500)).pipe(et(this.destroyRef)).subscribe(e=>{this.tableData.filter=e.trim().toLowerCase(),this.tableData.paginator&&this.tableData.paginator.firstPage()}),this.isPhonePortrait=Ht(this._responsive.observe(qt.HandsetPortrait)),kt(()=>{this.isPhonePortrait().matches?(this.hidePageSize=!0,this.showFirstLastButtons=!1,this.showPageSizeOptions=[]):(this.hidePageSize=!1,this.showFirstLastButtons=!0,this.showPageSizeOptions=[5,10,25,100])})}ngAfterViewInit(){this.dataService.startSkDataFullTree().pipe(se(e=>e.filter(t=>Object.keys(t.sources||{}).length>0).map(t=>Ze(Ye({},t),{sources:t.type&&t.type.includes("object")&&typeof t.sources=="object"?Object.fromEntries(Object.entries(t.sources).map(([o,n])=>[o,Ze(Ye({},n),{sourceValue:typeof n.sourceValue=="object"?JSON.stringify(n.sourceValue):n.sourceValue})])):t.sources}))),bt(500),et(this.destroyRef)).subscribe(e=>{this.tableData.data=e}),this.tableData.paginator=this.paginator(),this.tableData.sort=this.sort(),this.tableData.sortingDataAccessor=(e,t)=>t==="supportsPut"?e.meta?.supportsPut?1:0:e[t]}applyFilter(e){let t=e.target.value;this.filterSubject.next(t)}trackByPath(e,t){return`${t.path}`}trackBySource(e,t){return`${t.key}`}getSourceKey(e){return String(e.key)}getSourceValue(e){return e.value.sourceValue}copyPath(e,t){if(t?.stopPropagation(),!e)return;this.clipboard.copy(e)?this.toast.show("Path copied to clipboard",1e3,!0,null,"success"):this.toast.show("Copy to clipboard failed",1500,!1,null,"error")}ngOnDestroy(){this.filterSubject.complete(),this.dataService.stopSkDataFullTree()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=k({type:i,selectors:[["data-inspector"]],viewQuery:function(t,o){t&1&&Ot(o.paginator,Ce,5)(o.sort,be,5),t&2&&It(2)},decls:21,vars:10,consts:[["input",""],["svgIconId","troubleshoot",3,"pageTitle"],[1,"data-inspector-container"],[1,"filter-field"],["matInput","","placeholder","Type any part of the path, source or value...","value","",3,"keyup"],["matSort","","matSortActive","path","matSortDirection","asc",1,"table-content-area","mat-elevation-z8",3,"dataSource","trackBy"],["matColumnDef","path"],["class","pathHeader","mat-sort-header","",4,"matHeaderCellDef"],["class","pathCell row-cell",4,"matCellDef"],["matColumnDef","supportsPut"],["class","putHeader","mat-sort-header","",4,"matHeaderCellDef"],["class","putCell row-cell",4,"matCellDef"],["matColumnDef","defaultSource"],["class","dataHeader","mat-sort-header","",4,"matHeaderCellDef"],["class","dataCell row-cell",4,"matCellDef"],["class","headerRow",4,"matHeaderRowDef","matHeaderRowDefSticky"],["class","table-row",4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],[1,"paginator",3,"pageSize","pageSizeOptions","hidePageSize","showFirstLastButtons"],["mat-sort-header","",1,"pathHeader"],[1,"pathCell","row-cell"],["matIconButton","","matTooltip","Copy path",1,"copy-btn",3,"click"],["mat-sort-header","",1,"putHeader"],[1,"putCell","row-cell"],["matTooltip","Supports PUT operation",1,"put-icon"],["mat-sort-header","",1,"dataHeader"],[1,"dataCell","row-cell"],[1,"flex-container"],[1,"source-sub-row",3,"path","source","pathValue","type"],[1,"headerRow"],[1,"table-row"],[1,"mat-row"],["colspan","4",1,"mat-cell"]],template:function(t,o){if(t&1){let n=Q();F(0,"page-header",1),c(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),h(4,"Filter"),d(),c(5,"input",4,0),M("keyup",function(l){return B(n),H(o.applyFilter(l))}),d()(),c(7,"mat-table",5),ue(8,6),J(9,Fo,2,0,"mat-header-cell",7)(10,zo,5,1,"mat-cell",8),me(),ue(11,9),J(12,No,2,0,"mat-header-cell",10)(13,Bo,2,1,"mat-cell",11),me(),ue(14,12),J(15,Ho,2,0,"mat-header-cell",13)(16,jo,5,2,"mat-cell",14),me(),J(17,Vo,1,0,"mat-header-row",15)(18,Uo,1,0,"mat-row",16)(19,$o,3,1,"tr",17),d(),F(20,"mat-paginator",18),d()}t&2&&(_("pageTitle",o.pageTitle),u(7),_("dataSource",o.tableData)("trackBy",o.trackByPath),u(10),_("matHeaderRowDef",o.displayedColumns)("matHeaderRowDefSticky",!0),u(),_("matRowDefColumns",o.displayedColumns),u(2),_("pageSize",o.pageSize)("pageSizeOptions",o.showPageSizeOptions)("hidePageSize",o.hidePageSize)("showFirstLastButtons",o.showFirstLastButtons))},dependencies:[fi,_e,Ae,Bi,Mi,Oi,Pi,Ii,Ti,Fi,Ei,Ke,zi,Ni,Ai,pi,hi,Hi,Ce,Vi,be,ji,Ui,bi,oe,Fe,ai,oi,je,Le,Bt],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%}.data-inspector-container[_ngcontent-%COMP%]{margin-left:24px;margin-right:24px;height:calc(100% - 63px)}.table-content-area[_ngcontent-%COMP%]{height:calc(100% - 142px);overflow-y:auto;width:100%;scroll-behavior:smooth}.mat-column-path[_ngcontent-%COMP%]{flex:0 0 50%;width:50%}.mat-mdc-table[_ngcontent-%COMP%]{overflow:auto}.paginator[_ngcontent-%COMP%]{width:100%;height:56px;background-color:var(--mat-sys-background)}.filter-field[_ngcontent-%COMP%]{padding:15px 0;width:100%;height:86px}.pathHeader[_ngcontent-%COMP%]{flex:1 1 45%}.putHeader[_ngcontent-%COMP%]{flex:1 1 10%}.dataHeader[_ngcontent-%COMP%]{flex:1 1 45%}.table-row[_ngcontent-%COMP%]{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, .12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid}.row-cell[_ngcontent-%COMP%]{border-bottom-color:#fff;border-bottom-width:0px;border-bottom-style:solid}.pathCell[_ngcontent-%COMP%]{flex:1 1 45%;word-break:break-word;overflow-wrap:break-word}.copy-btn[_ngcontent-%COMP%]{padding-left:10px;--mat-icon-button-icon-color: var(--mat-sys-outline)}.putCell[_ngcontent-%COMP%]{flex:1 1 10%}.dataCell[_ngcontent-%COMP%]{flex:1 1 45%;flex-flow:column;flex-wrap:nowrap;gap:2px}.flex-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:nowrap;gap:5px;margin:5px 0;height:100%;width:100%}.source-sub-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;gap:5px;width:100%}.put-icon[_ngcontent-%COMP%]{color:var(--kip-starboard-color)}@media screen and (max-width:750px){.pathHeader[_ngcontent-%COMP%], .dataHeader[_ngcontent-%COMP%]{flex:1 1 50%}.dataCell[_ngcontent-%COMP%]{flex:1 1 100%}.dataCell[_ngcontent-%COMP%]{flex:1 1 100%;margin-left:24px}.mat-mdc-table[_ngcontent-%COMP%] .mat-mdc-row[_ngcontent-%COMP%]{flex-direction:row;flex-wrap:wrap}.mat-mdc-table[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]:before{content:attr(data-label);float:left;padding-right:5px}mat-row[_ngcontent-%COMP%]:after{min-height:auto;padding-bottom:10px}.dataRow[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}.actionCell[_ngcontent-%COMP%]{margin-left:24px}}"]})}return i})();export{er as DataInspectorComponent};
@@ -1,3 +0,0 @@
1
- import{a as X,b as Q,c as xe,d as I,e as wt,f as Ee,g as Ct,m as De,o as Z,p as ke,q as xt,r as tt,s as Re,t as ze}from"./chunk-3BGR52TW.js";import{c as ve}from"./chunk-2MWBAYPJ.js";import{a as we,b as Ce,d as Et,e as Dt,g as kt,h as Se,i as Rt}from"./chunk-5DLSQ773.js";import{c as fe}from"./chunk-PSF2OKKT.js";import{a as be}from"./chunk-KKJXPB75.js";import{a as vt,d as W}from"./chunk-XEJJOWK6.js";import{Ab as A,Ac as Ut,Ba as Xt,Bb as B,Cc as le,Ce as K,Da as N,De as J,Eb as Zt,Fb as te,Ga as ut,Gb as V,Ha as F,Hb as m,Hc as Ft,Ia as nt,Ib as y,Ic as he,Jb as mt,Kb as Y,Lb as lt,Ma as at,Mb as ee,Pb as ie,Qb as L,Sb as x,Sc as ce,Ub as P,V as jt,Vb as It,Wa as Qt,Wb as _t,Xa as At,Xb as se,Ya as H,Yb as ht,Zb as j,_b as $,a as _,ac as re,ad as ue,b as E,bc as oe,cb as Bt,dc as yt,eb as gt,fb as dt,hc as b,ic as ne,jb as z,jc as ae,la as $t,nb as pt,ne as me,ob as ft,oe as _e,pb as Kt,pc as de,pd as ge,qa as w,qb as Jt,qc as Gt,qd as pe,qe as ye,rc as bt,va as D,wa as k,zb as Wt}from"./chunk-TGGJAGV7.js";var h=class d{static getElements(r,t=document){if(typeof r=="string"){let e="getElementById"in t?t:void 0;if(e&&!isNaN(+r[0])){let s=e.getElementById(r);return s?[s]:[]}let i=t.querySelectorAll(r);if(!i.length&&r[0]!=="."&&r[0]!=="#"&&(i=t.querySelectorAll("."+r),i.length||(i=t.querySelectorAll("#"+r)),!i.length)){let s=t.querySelector(`[gs-id="${r}"]`);return s?[s]:[]}return Array.from(i)}return[r]}static getElement(r,t=document){if(typeof r=="string"){let e="getElementById"in t?t:void 0;if(!r.length)return null;if(e&&r[0]==="#")return e.getElementById(r.substring(1));if(r[0]==="#"||r[0]==="."||r[0]==="[")return t.querySelector(r);if(e&&!isNaN(+r[0]))return e.getElementById(r);let i=t.querySelector(r);return e&&!i&&(i=e.getElementById(r)),i||(i=t.querySelector("."+r)),i}return r}static lazyLoad(r){return r.lazyLoad||r.grid?.opts?.lazyLoad&&r.lazyLoad!==!1}static createDiv(r,t){let e=document.createElement("div");return r.forEach(i=>{i&&e.classList.add(i)}),t?.appendChild(e),e}static shouldSizeToContent(r,t=!1){return r?.grid&&(t?r.sizeToContent===!0||r.grid.opts.sizeToContent===!0&&r.sizeToContent===void 0:!!r.sizeToContent||r.grid.opts.sizeToContent&&r.sizeToContent!==!1)}static isIntercepted(r,t){return!(r.y>=t.y+t.h||r.y+r.h<=t.y||r.x+r.w<=t.x||r.x>=t.x+t.w)}static isTouching(r,t){return d.isIntercepted(r,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(r,t){let e=r.x>t.x?r.x:t.x,i=r.x+r.w<t.x+t.w?r.x+r.w:t.x+t.w;if(i<=e)return 0;let s=r.y>t.y?r.y:t.y,o=r.y+r.h<t.y+t.h?r.y+r.h:t.y+t.h;return o<=s?0:(i-e)*(o-s)}static area(r){return r.w*r.h}static sort(r,t=1){return r.sort((i,s)=>{let o=t*((i.y??1e4)-(s.y??1e4));return o===0?t*((i.x??1e4)-(s.x??1e4)):o})}static find(r,t){return t?r.find(e=>e.id===t):void 0}static toBool(r){return typeof r=="boolean"?r:typeof r=="string"?(r=r.toLowerCase(),!(r===""||r==="no"||r==="false"||r==="0")):!!r}static toNumber(r){return r===null||r.length===0?void 0:Number(r)}static parseHeight(r){let t,e="px";if(typeof r=="string")if(r==="auto"||r==="")t=0;else{let i=r.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!i)throw new Error(`Invalid height val = ${r}`);e=i[2]||"px",t=parseFloat(i[1])}else t=r;return{h:t,unit:e}}static defaults(r,...t){return t.forEach(e=>{for(let i in e){if(!e.hasOwnProperty(i))return;r[i]===null||r[i]===void 0?r[i]=e[i]:typeof e[i]=="object"&&typeof r[i]=="object"&&d.defaults(r[i],e[i])}}),r}static same(r,t){if(typeof r!="object")return r==t;if(typeof r!=typeof t||Object.keys(r).length!==Object.keys(t).length)return!1;for(let e in r)if(r[e]!==t[e])return!1;return!0}static copyPos(r,t,e=!1){return t.x!==void 0&&(r.x=t.x),t.y!==void 0&&(r.y=t.y),t.w!==void 0&&(r.w=t.w),t.h!==void 0&&(r.h=t.h),e&&(t.minW&&(r.minW=t.minW),t.minH&&(r.minH=t.minH),t.maxW&&(r.maxW=t.maxW),t.maxH&&(r.maxH=t.maxH)),r}static samePos(r,t){return r&&t&&r.x===t.x&&r.y===t.y&&(r.w||1)===(t.w||1)&&(r.h||1)===(t.h||1)}static sanitizeMinMax(r){r.minW||delete r.minW,r.minH||delete r.minH,r.maxW||delete r.maxW,r.maxH||delete r.maxH}static removeInternalAndSame(r,t){if(!(typeof r!="object"||typeof t!="object")&&!(Array.isArray(r)||Array.isArray(t)))for(let e in r){let i=r[e],s=t[e];e[0]==="_"||i===s?delete r[e]:i&&typeof i=="object"&&s!==void 0&&(d.removeInternalAndSame(i,s),Object.keys(i).length||delete r[e])}}static removeInternalForSave(r,t=!0){for(let e in r)(e[0]==="_"||r[e]===null||r[e]===void 0)&&delete r[e];delete r.grid,t&&delete r.el,r.autoPosition||delete r.autoPosition,r.noResize||delete r.noResize,r.noMove||delete r.noMove,r.locked||delete r.locked,(r.w===1||r.w===r.minW)&&delete r.w,(r.h===1||r.h===r.minH)&&delete r.h}static throttle(r,t){let e=!1;return(...i)=>{e||(e=!0,setTimeout(()=>{r(...i),e=!1},t))}}static removePositioningStyles(r){let t=r.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(r){if(!r)return document.scrollingElement||document.documentElement;let t=getComputedStyle(r);return/(auto|scroll)/.test(t.overflow+t.overflowY)?r:d.getScrollElement(r.parentElement)}static updateScrollPosition(r,t,e){let i=d.getScrollElement(r);if(!i)return;let s=r.getBoundingClientRect(),o=i.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,a=s.bottom-Math.min(o.bottom,n),u=s.top-Math.max(o.top,0),c=i.scrollTop;u<0&&e<0?r.offsetHeight>o.height?i.scrollTop+=e:i.scrollTop+=Math.abs(u)>Math.abs(e)?e:u:a>0&&e>0&&(r.offsetHeight>o.height?i.scrollTop+=e:i.scrollTop+=a>e?e:a),t.top+=i.scrollTop-c}static updateScrollResize(r,t,e){let i=d.getScrollElement(t),s=i.clientHeight,o=i===d.getScrollElement()?0:i.getBoundingClientRect().top,n=r.clientY-o,a=n<e,u=n>s-e;a?i.scrollBy({behavior:"smooth",top:n-e}):u&&i.scrollBy({behavior:"smooth",top:e-(s-n)})}static clone(r){return r==null||typeof r!="object"?r:r instanceof Array?[...r]:_({},r)}static cloneDeep(r){let t=["parentGrid","el","grid","subGrid","engine"],e=d.clone(r);for(let i in e)e.hasOwnProperty(i)&&typeof e[i]=="object"&&i.substring(0,2)!=="__"&&!t.find(s=>s===i)&&(e[i]=d.cloneDeep(r[i]));return e}static cloneNode(r){let t=r.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(r,t){let e;typeof t=="string"?e=d.getElement(t):e=t,e&&e.appendChild(r)}static addElStyles(r,t){if(t instanceof Object)for(let e in t)t.hasOwnProperty(e)&&(Array.isArray(t[e])?t[e].forEach(i=>{r.style[e]=i}):r.style[e]=t[e])}static initEvent(r,t){let e={type:t.type},i={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:r.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(s=>e[s]=r[s]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(s=>e[s]=r[s]),_(_({},e),i)}static simulateMouseEvent(r,t,e){let i=r,s=new MouseEvent(t,{bubbles:!0,composed:!0,cancelable:!0,view:window,detail:1,screenX:r.screenX,screenY:r.screenY,clientX:r.clientX,clientY:r.clientY,ctrlKey:i.ctrlKey??!1,altKey:i.altKey??!1,shiftKey:i.shiftKey??!1,metaKey:i.metaKey??!1,button:0,relatedTarget:r.target});(e||r.target).dispatchEvent(s)}static getValuesFromTransformedElement(r){let t=document.createElement("div");d.addElStyles(t,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),r.appendChild(t);let e=t.getBoundingClientRect();return r.removeChild(t),t.remove(),{xScale:1/e.width,yScale:1/e.height,xOffset:e.left,yOffset:e.top}}static swap(r,t,e){if(!r)return;let i=r[t];r[t]=r[e],r[e]=i}static canBeRotated(r){return!(!r||r.w===r.h||r.locked||r.noResize||r.grid?.opts.disableResize||r.minW&&r.minW===r.maxW||r.minH&&r.minH===r.maxH)}};var Vt=(()=>{class d{constructor(t={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=t.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=t.maxRow,this._float=t.float,this.nodes=t.nodes||[],this.onChange=t.onChange}batchUpdate(t=!0,e=!0){return!!this.batchMode===t?this:(this.batchMode=t,t?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,e&&this._packNodes(),this._notify()),this)}_useEntireRowArea(t,e){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!t._moving||t._skipDown||e.y<=t.y)}_fixCollisions(t,e=t,i,s={}){if(this.sortNodes(-1),i=i||this.collide(t,e),!i)return!1;if(t._moving&&!s.nested&&!this.float&&this.swap(t,i))return!0;let o=e;!this._loading&&this._useEntireRowArea(t,e)&&(o={x:0,w:this.column,y:e.y,h:e.h},i=this.collide(t,o,s.skip));let n=!1,a={nested:!0,pack:!1},u=0;for(;i=i||this.collide(t,o,s.skip);){if(u++>this.nodes.length*2)throw new Error("Infinite collide check");let c;if(i.locked||this._loading||t._moving&&!t._skipDown&&e.y>t.y&&!this.float&&(!this.collide(i,E(_({},i),{y:t.y}),t)||!this.collide(i,E(_({},i),{y:e.y-i.h}),t))){t._skipDown=t._skipDown||e.y>t.y;let l=_(E(_({},e),{y:i.y+i.h}),a);c=this._loading&&h.samePos(t,l)?!0:this.moveNode(t,l),(i.locked||this._loading)&&c?h.copyPos(e,t):!i.locked&&c&&s.pack&&(this._packNodes(),e.y=i.y+i.h,h.copyPos(t,e)),n=n||c}else c=this.moveNode(i,_(E(_({},i),{y:e.y+e.h,skip:t}),a));if(!c)return n;i=void 0}return n}collide(t,e=t,i){let s=t._id,o=i?._id;return this.nodes.find(n=>n._id!==s&&n._id!==o&&h.isIntercepted(n,e))}collideAll(t,e=t,i){let s=t._id,o=i?._id;return this.nodes.filter(n=>n._id!==s&&n._id!==o&&h.isIntercepted(n,e))}directionCollideCoverage(t,e,i){if(!e.rect||!t._rect)return;let s=t._rect,o=_({},e.rect);o.y>s.y?(o.h+=o.y-s.y,o.y=s.y):o.h+=s.y-o.y,o.x>s.x?(o.w+=o.x-s.x,o.x=s.x):o.w+=s.x-o.x;let n,a=.5;for(let u of i){if(u.locked||!u._rect)break;let c=u._rect,l=Number.MAX_VALUE,g=Number.MAX_VALUE;s.y<c.y?l=(o.y+o.h-c.y)/c.h:s.y+s.h>c.y+c.h&&(l=(c.y+c.h-o.y)/c.h),s.x<c.x?g=(o.x+o.w-c.x)/c.w:s.x+s.w>c.x+c.w&&(g=(c.x+c.w-o.x)/c.w);let p=Math.min(g,l);p>a&&(a=p,n=u)}return e.collide=n,n}cacheRects(t,e,i,s,o,n){return this.nodes.forEach(a=>a._rect={y:a.y*e+i,x:a.x*t+n,w:a.w*t-n-s,h:a.h*e-i-o}),this}swap(t,e){if(!e||e.locked||!t||t.locked)return!1;function i(){let o=e.x,n=e.y;return e.x=t.x,e.y=t.y,t.h!=e.h?(t.x=o,t.y=e.y+e.h):t.w!=e.w?(t.x=e.x+e.w,t.y=n):(t.x=o,t.y=n),t._dirty=e._dirty=!0,!0}let s;if(t.w===e.w&&t.h===e.h&&(t.x===e.x||t.y===e.y)&&(s=h.isTouching(t,e)))return i();if(s!==!1){if(t.w===e.w&&t.x===e.x&&(s||(s=h.isTouching(t,e)))){if(e.y<t.y){let o=t;t=e,e=o}return i()}if(s!==!1){if(t.h===e.h&&t.y===e.y&&(s||(s=h.isTouching(t,e)))){if(e.x<t.x){let o=t;t=e,e=o}return i()}return!1}}}isAreaEmpty(t,e,i,s){let o={x:t||0,y:e||0,w:i||1,h:s||1};return!this.collide(o)}compact(t="compact",e=!0){if(this.nodes.length===0)return this;e&&this.sortNodes();let i=this.batchMode;i||this.batchUpdate();let s=this._inColumnResize;s||(this._inColumnResize=!0);let o=this.nodes;return this.nodes=[],o.forEach((n,a,u)=>{let c;n.locked||(n.autoPosition=!0,t==="list"&&a&&(c=u[a-1])),this.addNode(n,!1,c)}),s||delete this._inColumnResize,i||this.batchUpdate(!1),this}set float(t){this._float!==t&&(this._float=t||!1,t||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(t=1){return this.nodes=h.sort(this.nodes,t),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(t=>{if(t._updating||t._orig===void 0||t.y===t._orig.y)return;let e=t.y;for(;e>t._orig.y;)--e,this.collide(t,{x:t.x,y:e,w:t.w,h:t.h})||(t._dirty=!0,t.y=e)}):this.nodes.forEach((t,e)=>{if(!t.locked)for(;t.y>0;){let i=e===0?0:t.y-1;if(!(e===0||!this.collide(t,{x:t.x,y:i,w:t.w,h:t.h})))break;t._dirty=t.y!==i,t.y=i}}),this)}prepareNode(t,e){t._id=t._id??d._idSeq++;let i=t.id;if(i){let o=1;for(;this.nodes.find(n=>n.id===t.id&&n!==t);)t.id=i+"_"+o++}(t.x===void 0||t.y===void 0||t.x===null||t.y===null)&&(t.autoPosition=!0);let s={x:0,y:0,w:1,h:1};return h.defaults(t,s),t.autoPosition||delete t.autoPosition,t.noResize||delete t.noResize,t.noMove||delete t.noMove,h.sanitizeMinMax(t),typeof t.x=="string"&&(t.x=Number(t.x)),typeof t.y=="string"&&(t.y=Number(t.y)),typeof t.w=="string"&&(t.w=Number(t.w)),typeof t.h=="string"&&(t.h=Number(t.h)),isNaN(t.x)&&(t.x=s.x,t.autoPosition=!0),isNaN(t.y)&&(t.y=s.y,t.autoPosition=!0),isNaN(t.w)&&(t.w=s.w),isNaN(t.h)&&(t.h=s.h),this.nodeBoundFix(t,e),t}nodeBoundFix(t,e){let i=t._orig||h.copyPos({},t);if(t.maxW&&(t.w=Math.min(t.w||1,t.maxW)),t.maxH&&(t.h=Math.min(t.h||1,t.maxH)),t.minW&&(t.w=Math.max(t.w||1,t.minW)),t.minH&&(t.h=Math.max(t.h||1,t.minH)),(t.x||0)+(t.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&!this.skipCacheUpdate&&t._id!=null&&this.findCacheLayout(t,this.defaultColumn)===-1){let o=_({},t);o.autoPosition||o.x===void 0?(delete o.x,delete o.y):o.x=Math.min(this.defaultColumn-1,o.x),o.w=Math.min(this.defaultColumn,o.w||1),this.cacheOneLayout(o,this.defaultColumn)}return t.w>this.column?t.w=this.column:t.w<1&&(t.w=1),this.maxRow&&t.h>this.maxRow?t.h=this.maxRow:t.h<1&&(t.h=1),t.x<0&&(t.x=0),t.y<0&&(t.y=0),t.x+t.w>this.column&&(e?t.w=this.column-t.x:t.x=this.column-t.w),this.maxRow&&t.y+t.h>this.maxRow&&(e?t.h=this.maxRow-t.y:t.y=this.maxRow-t.h),h.samePos(t,i)||(t._dirty=!0),this}getDirtyNodes(t){return t?this.nodes.filter(e=>e._dirty&&!h.samePos(e,e._orig)):this.nodes.filter(e=>e._dirty)}_notify(t){if(this.batchMode||!this.onChange)return this;let e=(t||[]).concat(this.getDirtyNodes());return this.onChange(e),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(t=>{delete t._dirty,delete t._lastTried}),this)}saveInitial(){return this.nodes.forEach(t=>{t._orig=h.copyPos({},t),delete t._dirty}),this._hasLocked=this.nodes.some(t=>t.locked),this}restoreInitial(){return this.nodes.forEach(t=>{!t._orig||h.samePos(t,t._orig)||(h.copyPos(t,t._orig),t._dirty=!0)}),this._notify(),this}findEmptyPosition(t,e=this.nodes,i=this.column,s){let o=s?s.y*i+(s.x+s.w):0,n=!1;for(let a=o;!n;++a){let u=a%i,c=Math.floor(a/i);if(u+t.w>i)continue;let l={x:u,y:c,w:t.w,h:t.h};e.find(g=>h.isIntercepted(l,g))||((t.x!==u||t.y!==c)&&(t._dirty=!0),t.x=u,t.y=c,delete t.autoPosition,n=!0)}return n}addNode(t,e=!1,i){let s=this.nodes.find(n=>n._id===t._id);if(s)return s;this._inColumnResize?this.nodeBoundFix(t):this.prepareNode(t),delete t._temporaryRemoved,delete t._removeDOM;let o;return t.autoPosition&&this.findEmptyPosition(t,this.nodes,this.column,i)&&(delete t.autoPosition,o=!0),this.nodes.push(t),e&&this.addedNodes.push(t),o||this._fixCollisions(t),this.batchMode||this._packNodes()._notify(),t}removeNode(t,e=!0,i=!1){return this.nodes.find(s=>s._id===t._id)?(i&&this.removedNodes.push(t),e&&(t._removeDOM=!0),this.nodes=this.nodes.filter(s=>s._id!==t._id),t._isAboutToRemove||this._packNodes(),this._notify([t]),this):this}removeAll(t=!0,e=!0){if(delete this._layouts,!this.nodes.length)return this;t&&this.nodes.forEach(s=>s._removeDOM=!0);let i=this.nodes;return this.removedNodes=e?i:[],this.nodes=[],this._notify(i)}moveNodeCheck(t,e){if(!this.changedPosConstrain(t,e))return!1;if(e.pack=!0,!this.maxRow)return this.moveNode(t,e);let i,s=new d({column:this.column,float:this.float,nodes:this.nodes.map(n=>n._id===t._id?(i=_({},n),i):_({},n))});if(!i)return!1;let o=s.moveNode(i,e)&&s.getRow()<=Math.max(this.getRow(),this.maxRow);if(!o&&!e.resizing&&e.collide){let n=e.collide.el.gridstackNode;if(this.swap(t,n))return this._notify(),!0}return o?(s.nodes.filter(n=>n._dirty).forEach(n=>{let a=this.nodes.find(u=>u._id===n._id);a&&(h.copyPos(a,n),a._dirty=!0)}),this._notify(),!0):!1}willItFit(t){if(delete t._willFitPos,!this.maxRow)return!0;let e=new d({column:this.column,float:this.float,nodes:this.nodes.map(s=>_({},s))}),i=_({},t);return this.cleanupNode(i),delete i.el,delete i._id,delete i.content,delete i.grid,e.addNode(i),e.getRow()<=this.maxRow?(t._willFitPos=h.copyPos({},i),!0):!1}changedPosConstrain(t,e){return e.w=e.w||t.w,e.h=e.h||t.h,t.x!==e.x||t.y!==e.y?!0:(t.maxW&&(e.w=Math.min(e.w,t.maxW)),t.maxH&&(e.h=Math.min(e.h,t.maxH)),t.minW&&(e.w=Math.max(e.w,t.minW)),t.minH&&(e.h=Math.max(e.h,t.minH)),t.w!==e.w||t.h!==e.h)}moveNode(t,e){if(!t||!e)return!1;let i;e.pack===void 0&&!this.batchMode&&(i=e.pack=!0),typeof e.x!="number"&&(e.x=t.x),typeof e.y!="number"&&(e.y=t.y),typeof e.w!="number"&&(e.w=t.w),typeof e.h!="number"&&(e.h=t.h);let s=t.w!==e.w||t.h!==e.h,o=h.copyPos({},t,!0);if(h.copyPos(o,e),this.nodeBoundFix(o,s),h.copyPos(e,o),!e.forceCollide&&h.samePos(t,e))return!1;let n=h.copyPos({},t),a=this.collideAll(t,o,e.skip),u=!0;if(a.length){let c=t._moving&&!e.nested,l=c?this.directionCollideCoverage(t,e,a):a[0];if(c&&l&&t.grid?.opts?.subGridDynamic&&!t.grid._isTemp){let g=h.areaIntercept(e.rect,l._rect),p=h.area(e.rect),v=h.area(l._rect);g/(p<v?p:v)>.8&&(l.grid.makeSubGrid(l.el,void 0,t),l=void 0)}l?u=!this._fixCollisions(t,o,l,e):(u=!1,i&&delete e.pack)}return u&&!h.samePos(t,o)&&(t._dirty=!0,h.copyPos(t,o)),e.pack&&this._packNodes()._notify(),!h.samePos(t,n)}getRow(){return this.nodes.reduce((t,e)=>Math.max(t,e.y+e.h),0)}beginUpdate(t){return t._updating||(t._updating=!0,delete t._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){let t=this.nodes.find(e=>e._updating);return t&&(delete t._updating,delete t._skipDown),this}save(t=!0,e,i){let s=this._layouts?.length||0,o;s&&(i?i!==this.column&&(o=this._layouts[i]):this.column!==s-1&&(o=this._layouts[s-1]));let n=[];return this.sortNodes(),this.nodes.forEach(a=>{let u=o?.find(l=>l._id===a._id),c=_(_({},a),u||{});h.removeInternalForSave(c,!t),e&&e(a,c),n.push(c)}),n}layoutsNodesChange(t){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((e,i)=>{if(!e||i===this.column)return this;if(i<this.column)this._layouts[i]=void 0;else{let s=i/this.column;t.forEach(o=>{if(!o._orig)return;let n=e.find(a=>a._id===o._id);n&&(n.y>=0&&o.y!==o._orig.y&&(n.y+=o.y-o._orig.y,n.y<0&&(n.y=0)),o.x!==o._orig.x&&(n.x=Math.round(o.x*s),n.x<0&&(n.x=0)),o.w!==o._orig.w&&(n.w=Math.round(o.w*s),n.w<1&&(n.w=1)))})}}),this)}columnChanged(t,e,i="moveScale"){if(!this.nodes.length||!e||t===e)return this;let s=i==="compact"||i==="list";s&&this.sortNodes(1),e<t&&this.cacheLayout(this.nodes,t),this.batchUpdate();let o=[],n=s?this.nodes:h.sort(this.nodes,-1);if(e>t&&this._layouts){let a=this._layouts[e]||[],u=this._layouts.length-1;!a.length&&t!==u&&this._layouts[u]?.length&&(t=u,this._layouts[u].forEach(c=>{let l=n.find(g=>g._id===c._id);l&&(!s&&!c.autoPosition&&(l.x=c.x??l.x,l.y=c.y??l.y),l.w=c.w??l.w,(c.x==null||c.y===void 0)&&(l.autoPosition=!0))})),a.forEach(c=>{let l=n.findIndex(g=>g._id===c._id);if(l!==-1){let g=n[l];if(s){g.w=c.w;return}(c.autoPosition||isNaN(c.x)||isNaN(c.y))&&this.findEmptyPosition(c,o),c.autoPosition||(g.x=c.x??g.x,g.y=c.y??g.y,g.w=c.w??g.w,o.push(g)),n.splice(l,1)}})}if(s)this.compact(i,!1);else{if(n.length)if(typeof i=="function")i(e,t,o,n);else{let a=s||i==="none"?1:e/t,u=i==="move"||i==="moveScale",c=i==="scale"||i==="moveScale";n.forEach(l=>{l.x=e===1?0:u?Math.round(l.x*a):Math.min(l.x,e-1),l.w=e===1||t===1?1:c?Math.round(l.w*a)||1:Math.min(l.w,e),o.push(l)}),n=[]}o=h.sort(o,-1),this._inColumnResize=!0,this.nodes=[],o.forEach(a=>{this.addNode(a,!1),delete a._orig})}return this.nodes.forEach(a=>delete a._orig),this.batchUpdate(!1,!s),delete this._inColumnResize,this}cacheLayout(t,e,i=!1){let s=[];return t.forEach((o,n)=>{if(o._id===void 0){let a=o.id?this.nodes.find(u=>u.id===o.id):void 0;o._id=a?._id??d._idSeq++}s[n]={x:o.x,y:o.y,w:o.w,_id:o._id}}),this._layouts=i?[]:this._layouts||[],this._layouts[e]=s,this}cacheOneLayout(t,e){t._id=t._id??d._idSeq++;let i={x:t.x,y:t.y,w:t.w,_id:t._id};(t.autoPosition||t.x===void 0)&&(delete i.x,delete i.y,t.autoPosition&&(i.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[e]=this._layouts[e]||[];let s=this.findCacheLayout(t,e);return s===-1?this._layouts[e].push(i):this._layouts[e][s]=i,this}findCacheLayout(t,e){return this._layouts?.[e]?.findIndex(i=>i._id===t._id)??-1}removeNodeFromLayoutCache(t){if(this._layouts)for(let e=0;e<this._layouts.length;e++){let i=this.findCacheLayout(t,e);i!==-1&&this._layouts[e].splice(i,1)}}cleanupNode(t){for(let e in t)e[0]==="_"&&e!=="_id"&&delete t[e];return this}}return d._idSeq=0,d})();var O={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"};var f=class{};var S=typeof window<"u"&&typeof document<"u"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),R=class{};function zt(d,r){d.touches.length>1||(d.cancelable&&d.preventDefault(),h.simulateMouseEvent(d.changedTouches[0],r))}function Me(d,r){d.cancelable&&d.preventDefault(),h.simulateMouseEvent(d,r)}function et(d){R.touchHandled||(R.touchHandled=!0,zt(d,"mousedown"))}function it(d){R.touchHandled&&zt(d,"mousemove")}function st(d){if(!R.touchHandled)return;R.pointerLeaveTimeout&&(window.clearTimeout(R.pointerLeaveTimeout),delete R.pointerLeaveTimeout);let r=!!f.dragElement;zt(d,"mouseup"),r||zt(d,"click"),R.touchHandled=!1}function rt(d){d.pointerType!=="mouse"&&d.target.releasePointerCapture(d.pointerId)}function qt(d){f.dragElement&&d.pointerType!=="mouse"&&Me(d,"mouseenter")}function Yt(d){f.dragElement&&d.pointerType!=="mouse"&&(R.pointerLeaveTimeout=window.setTimeout(()=>{delete R.pointerLeaveTimeout,Me(d,"mouseleave")},10))}var Te=(()=>{class d{constructor(t,e,i){this.host=t,this.dir=e,this.option=i,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){if(this.option.element)try{this.el=this.option.element instanceof HTMLElement?this.option.element:this.host.querySelector(this.option.element)}catch(t){this.option.element=void 0,console.error("Query for resizeable handle failed, falling back",t)}return this.el||(this.el=document.createElement("div"),this.host.appendChild(this.el)),this.el.classList.add("ui-resizable-handle"),this.el.classList.add(`${d.prefix}${this.dir}`),this.el.style.zIndex="100",this.el.style.userSelect="none",this.el.addEventListener("mousedown",this._mouseDown),S&&(this.el.addEventListener("touchstart",et),this.el.addEventListener("pointerdown",rt)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),S&&(this.el.removeEventListener("touchstart",et),this.el.removeEventListener("pointerdown",rt)),this.option.element||this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(t){this.mouseDownEvent=t,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),S&&(this.el.addEventListener("touchmove",it),this.el.addEventListener("touchend",st)),t.stopPropagation(),t.preventDefault()}_mouseMove(t){let e=this.mouseDownEvent;this.moving?this._triggerEvent("move",t):Math.abs(t.x-e.x)+Math.abs(t.y-e.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",t),document.addEventListener("keydown",this._keyEvent)),t.stopPropagation()}_mouseUp(t){this.moving&&(this._triggerEvent("stop",t),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),S&&(this.el.removeEventListener("touchmove",it),this.el.removeEventListener("touchend",st)),delete this.moving,delete this.mouseDownEvent,t.stopPropagation(),t.preventDefault()}_keyEvent(t){t.key==="Escape"&&(this.host.gridstackNode?.grid?.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(t,e){return this.option[t]&&this.option[t](e),this}}return d.prefix="ui-resizable-",d})();var G=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(r,t){this._eventRegister[r]=t}off(r){delete this._eventRegister[r]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(r,t){if(!this.disabled&&this._eventRegister&&this._eventRegister[r])return this._eventRegister[r](t)}};var He=(()=>{class d extends G{constructor(t,e={}){super(),this.el=t,this.option=e,this.rectScale={x:1,y:1},this._ui=()=>{let s=this.el.parentElement.getBoundingClientRect(),o={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},n=this.temporalRect||o;return{position:{left:(n.left-s.left)*this.rectScale.x,top:(n.top-s.top)*this.rectScale.y},size:{width:n.width*this.rectScale.x,height:n.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(t,e){super.on(t,e)}off(t){super.off(t)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(t){let e=t.handles&&t.handles!==this.option.handles,i=t.autoHide&&t.autoHide!==this.option.autoHide;return Object.keys(t).forEach(s=>this.option[s]=t[s]),e&&(this._removeHandlers(),this._setupHandlers()),i&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(t){return t?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),f.overResizeElement===this&&delete f.overResizeElement),this}_mouseOver(t){f.overResizeElement||f.dragElement||(f.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(t){f.overResizeElement===this&&(delete f.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(t=>t.trim()).map(t=>new Te(this.el,t,{element:this.option.element,start:e=>this._resizeStart(e),stop:e=>this._resizeStop(e),move:e=>this._resizing(e,t)})),this}_resizeStart(t){this.sizeToContent=h.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=h.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=t,this._setupHelper(),this._applyChange();let e=h.initEvent(t,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(e,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",e),this}_resizing(t,e){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(t,e),this._applyChange();let i=h.initEvent(t,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(i,this._ui()),this.triggerEvent("resize",i),this}_resizeStop(t){let e=h.initEvent(t,{type:"resizestop",target:this.el});return this._cleanHelper(),this.option.stop&&this.option.stop(e),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",e),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=d._originStyleProp.map(i=>this.el.style[i]),this.parentOriginStylePosition=this.el.parentElement.style.position;let t=this.el.parentElement,e=h.getValuesFromTransformedElement(t);return this.rectScale={x:e.xScale,y:e.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return d._originStyleProp.forEach((t,e)=>{this.el.style[t]=this.elOriginStyleVal[e]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(t,e){let i=this.startEvent,s={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},o=t.clientX-i.clientX,n=this.sizeToContent?0:t.clientY-i.clientY,a,u;e.indexOf("e")>-1?s.width+=o:e.indexOf("w")>-1&&(s.width-=o,s.left+=o,a=!0),e.indexOf("s")>-1?s.height+=n:e.indexOf("n")>-1&&(s.height-=n,s.top+=n,u=!0);let c=this._constrainSize(s.width,s.height,a,u);return Math.round(s.width)!==Math.round(c.width)&&(e.indexOf("w")>-1&&(s.left+=s.width-c.width),s.width=c.width),Math.round(s.height)!==Math.round(c.height)&&(e.indexOf("n")>-1&&(s.top+=s.height-c.height),s.height=c.height),s}_constrainSize(t,e,i,s){let o=this.option,n=(i?o.maxWidthMoveLeft:o.maxWidth)||Number.MAX_SAFE_INTEGER,a=o.minWidth/this.rectScale.x||t,u=(s?o.maxHeightMoveUp:o.maxHeight)||Number.MAX_SAFE_INTEGER,c=o.minHeight/this.rectScale.y||e,l=Math.min(n,Math.max(a,t)),g=Math.min(u,Math.max(c,e));return{width:l,height:g}}_applyChange(){let t={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){let e=this.el.parentElement,{left:i,top:s}=e.getBoundingClientRect();t={left:i,top:s,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(e=>{let i=this.temporalRect[e],s=e==="width"||e==="left"?this.rectScale.x:e==="height"||e==="top"?this.rectScale.y:1;this.el.style[e]=(i-t[e])*s+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(t=>t.destroy()),delete this.handlers,this}}return d._originStyleProp=["width","height","position","left","top","opacity","zIndex"],d})();var Fe='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle',Oe=(()=>{class d extends G{constructor(t,e={}){super(),this.el=t,this.option=e,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};let i=e?.handle?.substring(1),s=t.gridstackNode;this.dragEls=!i||t.classList.contains(i)?[t]:s?.subGrid?[t.querySelector(e.handle)||t]:Array.from(t.querySelectorAll(e.handle)),this.dragEls.length===0&&(this.dragEls=[t]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(t,e){super.on(t,e)}off(t){super.off(t)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(t=>{t.addEventListener("mousedown",this._mouseDown),S&&(t.addEventListener("touchstart",et),t.addEventListener("pointerdown",rt))}),this.el.classList.remove("ui-draggable-disabled"))}disable(t=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(e=>{e.removeEventListener("mousedown",this._mouseDown),S&&(e.removeEventListener("touchstart",et),e.removeEventListener("pointerdown",rt))}),t||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(t){return Object.keys(t).forEach(e=>this.option[e]=t[e]),this}_mouseDown(t){if(R.touchHandled&&t.isTrusted&&(R.touchHandled=!1),!f.mouseHandled)return t.button!==0||!this.dragEls.find(e=>e===t.target)&&t.target.closest(Fe)||this.option.cancel&&t.target.closest(this.option.cancel)||(this.mouseDownEvent=t,delete this.dragging,delete f.dragElement,delete f.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),S&&(t.currentTarget.addEventListener("touchmove",it),t.currentTarget.addEventListener("touchend",st)),t.preventDefault(),document.activeElement&&document.activeElement.blur(),f.mouseHandled=!0),!0}_callDrag(t){if(!this.dragging)return;let e=h.initEvent(t,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(e,this.ui()),this.triggerEvent("drag",e)}_mouseMove(t){let e=this.mouseDownEvent;if(this.lastDrag=t,this.dragging)if(this._dragFollow(t),f.pauseDrag){let i=Number.isInteger(f.pauseDrag)?f.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(t),i)}else this._callDrag(t);else if(Math.abs(t.x-e.x)+Math.abs(t.y-e.y)>3){this.dragging=!0,f.dragElement=this;let i=this.el.gridstackNode?.grid;i?f.dropElement=i.el.ddElement.ddDroppable:delete f.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=h.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(t,this.el,this.helperContainment),this._setupHelperStyle(t);let s=h.initEvent(t,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(s,this.ui()),this.triggerEvent("dragstart",s),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(t){if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),S&&t.currentTarget&&(t.currentTarget.removeEventListener("touchmove",it,!0),t.currentTarget.removeEventListener("touchend",st,!0)),this.dragging){delete this.dragging,delete this.el.gridstackNode?._origRotate,document.removeEventListener("keydown",this._keyEvent),f.dropElement?.el===this.el.parentElement&&delete f.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();let e=h.initEvent(t,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(e),this.triggerEvent("dragstop",e),f.dropElement&&f.dropElement.drop(t)}delete this.helper,delete this.mouseDownEvent,delete f.dragElement,delete f.dropElement,delete f.mouseHandled,t.preventDefault()}_keyEvent(t){let e=this.el.gridstackNode,i=e?.grid||f.dropElement?.el?.gridstack;if(t.key==="Escape")e&&e._origRotate&&(e._orig=e._origRotate,delete e._origRotate),i?.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(e&&i&&(t.key==="r"||t.key==="R")){if(!h.canBeRotated(e))return;e._origRotate=e._origRotate||_({},e._orig),delete e._moving,i.setAnimation(!1).rotate(e.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),e._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,e.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",h.swap(e._orig,"w","h"),delete e._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let t=this.el;return typeof this.option.helper=="function"?t=this.option.helper(this.el):this.option.helper==="clone"&&(t=h.cloneNode(this.el)),t.parentElement||h.appendTo(t,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=d.originStyleProp.map(e=>this.el.style[e]),t}_setupHelperStyle(t){this.helper.classList.add("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.add("grid-stack-dragging");let e=this.helper.style;return e.pointerEvents="none",e.width=this.dragOffset.width+"px",e.height=this.dragOffset.height+"px",e.willChange="left, top",e.position="fixed",this._dragFollow(t),e.transition="none",setTimeout(()=>{this.helper&&(e.transition=null)},0),this}_removeHelperStyle(){if(this.helper.classList.remove("ui-draggable-dragging"),this.el.gridstackNode?.grid?.el.classList.remove("grid-stack-dragging"),!this.helper?.gridstackNode?._isAboutToRemove&&this.dragElementOriginStyle){let e=this.helper,i=this.dragElementOriginStyle.transition||null;e.style.transition=this.dragElementOriginStyle.transition="none",d.originStyleProp.forEach(s=>e.style[s]=this.dragElementOriginStyle[s]||null),setTimeout(()=>e.style.transition=i,50)}return delete this.dragElementOriginStyle,this}_dragFollow(t){let e={left:0,top:0},i=this.helper.style,s=this.dragOffset;i.left=(t.clientX+s.offsetLeft-e.left)*this.dragTransform.xScale+"px",i.top=(t.clientY+s.offsetTop-e.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(t,e,i){let s=0,o=0;i&&(s=this.dragTransform.xOffset,o=this.dragTransform.yOffset);let n=e.getBoundingClientRect();return{left:n.left,top:n.top,offsetLeft:-t.clientX+n.left-s,offsetTop:-t.clientY+n.top-o,width:n.width*this.dragTransform.xScale,height:n.height*this.dragTransform.yScale}}ui(){let e=this.el.parentElement.getBoundingClientRect(),i=this.helper.getBoundingClientRect();return{position:{top:(i.top-e.top)*this.dragTransform.yScale,left:(i.left-e.left)*this.dragTransform.xScale}}}}return d.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"],d})();var St=class extends G{constructor(r,t={}){super(),this.el=r,this.option=t,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(r,t){super.on(r,t)}off(r){super.off(r)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),S&&(this.el.addEventListener("pointerenter",qt),this.el.addEventListener("pointerleave",Yt)))}disable(r=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),r||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),S&&(this.el.removeEventListener("pointerenter",qt),this.el.removeEventListener("pointerleave",Yt)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(r){return Object.keys(r).forEach(t=>this.option[t]=r[t]),this._setupAccept(),this}_mouseEnter(r){if(!f.dragElement||R.touchHandled&&r.isTrusted||!this._canDrop(f.dragElement.el))return;r.preventDefault(),r.stopPropagation(),f.dropElement&&f.dropElement!==this&&f.dropElement._mouseLeave(r,!0),f.dropElement=this;let t=h.initEvent(r,{target:this.el,type:"dropover"});this.option.over&&this.option.over(t,this._ui(f.dragElement)),this.triggerEvent("dropover",t),this.el.classList.add("ui-droppable-over")}_mouseLeave(r,t=!1){if(!f.dragElement||f.dropElement!==this)return;r.preventDefault(),r.stopPropagation();let e=h.initEvent(r,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(e,this._ui(f.dragElement)),this.triggerEvent("dropout",e),f.dropElement===this&&(delete f.dropElement,!t)){let i,s=this.el.parentElement;for(;!i&&s;)i=s.ddElement?.ddDroppable,s=s.parentElement;i&&i._mouseEnter(r)}}drop(r){r.preventDefault();let t=h.initEvent(r,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(t,this._ui(f.dragElement)),this.triggerEvent("drop",t)}_canDrop(r){return r&&(!this.accept||this.accept(r))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=r=>r.classList.contains(this.option.accept)||r.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(r){return _({draggable:r.el},r.ui())}};var Mt=class d{static init(r){return r.ddElement||(r.ddElement=new d(r)),r.ddElement}constructor(r){this.el=r}on(r,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(r)>-1?this.ddDraggable.on(r,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(r)>-1?this.ddDroppable.on(r,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(r)>-1&&this.ddResizable.on(r,t),this}off(r){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(r)>-1?this.ddDraggable.off(r):this.ddDroppable&&["drop","dropover","dropout"].indexOf(r)>-1?this.ddDroppable.off(r):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(r)>-1&&this.ddResizable.off(r),this}setupDraggable(r){return this.ddDraggable?this.ddDraggable.updateOption(r):this.ddDraggable=new Oe(this.el,r),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(r){return this.ddResizable?this.ddResizable.updateOption(r):this.ddResizable=new He(this.el,r),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(r){return this.ddDroppable?this.ddDroppable.updateOption(r):this.ddDroppable=new St(this.el,r),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}};var Tt=class{resizable(r,t,e,i){return this._getDDElements(r,t).forEach(s=>{if(t==="disable"||t==="enable")s.ddResizable&&s.ddResizable[t]();else if(t==="destroy")s.ddResizable&&s.cleanResizable();else if(t==="option")s.setupResizable({[e]:i});else{let n=s.el.gridstackNode.grid,a=s.el.getAttribute("gs-resize-handles")||n.opts.resizable.handles||"e,s,se";a==="all"&&(a="n,e,s,w,se,sw,ne,nw");let u=!n.opts.alwaysShowResizeHandle;s.setupResizable(E(_({},n.opts.resizable),{handles:a,autoHide:u,start:t.start,stop:t.stop,resize:t.resize}))}}),this}draggable(r,t,e,i){return this._getDDElements(r,t).forEach(s=>{if(t==="disable"||t==="enable")s.ddDraggable&&s.ddDraggable[t]();else if(t==="destroy")s.ddDraggable&&s.cleanDraggable();else if(t==="option")s.setupDraggable({[e]:i});else{let o=s.el.gridstackNode.grid;s.setupDraggable(E(_({},o.opts.draggable),{start:t.start,stop:t.stop,drag:t.drag}))}}),this}dragIn(r,t){return this._getDDElements(r).forEach(e=>e.setupDraggable(t)),this}droppable(r,t,e,i){return typeof t.accept=="function"&&!t._accept&&(t._accept=t.accept,t.accept=s=>t._accept(s)),this._getDDElements(r,t).forEach(s=>{t==="disable"||t==="enable"?s.ddDroppable&&s.ddDroppable[t]():t==="destroy"?s.ddDroppable&&s.cleanDroppable():t==="option"?s.setupDroppable({[e]:i}):s.setupDroppable(t)}),this}isDroppable(r){return!!(r?.ddElement?.ddDroppable&&!r.ddElement.ddDroppable.disabled)}isDraggable(r){return!!(r?.ddElement?.ddDraggable&&!r.ddElement.ddDraggable.disabled)}isResizable(r){return!!(r?.ddElement?.ddResizable&&!r.ddElement.ddResizable.disabled)}on(r,t,e){return this._getDDElements(r).forEach(i=>i.on(t,s=>{e(s,f.dragElement?f.dragElement.el:s.target,f.dragElement?f.dragElement.helper:null)})),this}off(r,t){return this._getDDElements(r).forEach(e=>e.off(t)),this}_getDDElements(r,t){let e=r.gridstack||t!=="destroy"&&t!=="disable",i=h.getElements(r);return i.length?i.map(o=>o.ddElement||(e?Mt.init(o):null)).filter(o=>o):[]}};var M=new Tt,U=(()=>{class d{static init(t={},e=".grid-stack"){if(typeof document>"u")return null;let i=d.getGridElement(e);return i?(i.gridstack||(i.gridstack=new d(i,h.cloneDeep(t))),i.gridstack):(console.error(typeof e=="string"?'GridStack.initAll() no grid was found with selector "'+e+`" - element missing or wrong selector ?
2
- Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(t={},e=".grid-stack"){let i=[];return typeof document>"u"||(d.getGridElements(e).forEach(s=>{s.gridstack||(s.gridstack=new d(s,h.cloneDeep(t))),i.push(s.gridstack)}),i.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+e+`" - element missing or wrong selector ?
3
- Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),i}static addGrid(t,e={}){if(!t)return null;let i=t;if(i.gridstack){let n=i.gridstack;return e&&(n.opts=_(_({},n.opts),e)),e.children!==void 0&&n.load(e.children),n}return(!t.classList.contains("grid-stack")||d.addRemoveCB)&&(d.addRemoveCB?i=d.addRemoveCB(t,e,!0,!0):i=h.createDiv(["grid-stack",e.class],t)),d.init(e,i)}static registerEngine(t){d.engineClass=t}get placeholder(){if(!this._placeholder){this._placeholder=h.createDiv([this.opts.placeholderClass,O.itemClass,this.opts.itemClass]);let t=h.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(t.textContent=this.opts.placeholderText)}return this._placeholder}constructor(t,e={}){this.el=t,this.opts=e,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},t.gridstack=this,this.opts=e=e||{},t.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),e.row&&(e.minRow=e.maxRow=e.row,delete e.row);let i=h.toNumber(t.getAttribute("gs-row"));e.column==="auto"&&delete e.column,e.alwaysShowResizeHandle!==void 0&&(e._alwaysShowResizeHandle=e.alwaysShowResizeHandle);let s=e.columnOpts;if(s){let c=s.breakpoints;!s.columnWidth&&!c?.length?delete e.columnOpts:(s.columnMax=s.columnMax||12,c?.length>1&&c.sort((l,g)=>(g.w||0)-(l.w||0)))}let o=E(_({},h.cloneDeep(O)),{column:h.toNumber(t.getAttribute("gs-column"))||O.column,minRow:i||h.toNumber(t.getAttribute("gs-min-row"))||O.minRow,maxRow:i||h.toNumber(t.getAttribute("gs-max-row"))||O.maxRow,staticGrid:h.toBool(t.getAttribute("gs-static"))||O.staticGrid,sizeToContent:h.toBool(t.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(e.handleClass?"."+e.handleClass:e.handle?e.handle:"")||O.draggable.handle},removableOptions:{accept:e.itemClass||O.removableOptions.accept,decline:O.removableOptions.decline}});t.getAttribute("gs-animate")&&(o.animate=h.toBool(t.getAttribute("gs-animate"))),e=h.defaults(e,o),this._initMargin(),this.checkDynamicColumn(),this._updateColumnVar(e),e.rtl==="auto"&&(e.rtl=t.style.direction==="rtl"),e.rtl&&this.el.classList.add("grid-stack-rtl");let a=this.el.closest("."+O.itemClass)?.gridstackNode;if(a&&(a.subGrid=this,this.parentGridNode=a,this.el.classList.add("grid-stack-nested"),a.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=e.cellHeight==="auto",this._isAutoCellHeight||e.cellHeight==="initial")this.cellHeight(void 0);else{typeof e.cellHeight=="number"&&e.cellHeightUnit&&e.cellHeightUnit!==O.cellHeightUnit&&(e.cellHeight=e.cellHeight+e.cellHeightUnit,delete e.cellHeightUnit);let c=e.cellHeight;delete e.cellHeight,this.cellHeight(c)}e.alwaysShowResizeHandle==="mobile"&&(e.alwaysShowResizeHandle=S),this._setStaticClass();let u=e.engineClass||d.engineClass||Vt;if(this.engine=new u({column:this.getColumn(),float:e.float,maxRow:e.maxRow,onChange:c=>{c.forEach(l=>{let g=l.el;g&&(l._removeDOM?(g&&g.remove(),delete l._removeDOM):this._writePosAttr(g,l))}),this._updateContainerHeight()}}),e.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(c=>this._prepareElement(c)),delete this.engine._loading,this.batchUpdate(!1)),e.children){let c=e.children;delete e.children,c.length&&this.load(c)}this.setAnimation(),e.subGridDynamic&&!f.pauseDrag&&(f.pauseDrag=!0),e.draggable?.pause!==void 0&&(f.pauseDrag=e.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}_updateColumnVar(t=this.opts){this.el.classList.add("gs-"+t.column),typeof t.column=="number"&&this.el.style.setProperty("--gs-column-width",`${100/t.column}%`)}addWidget(t){if(!t)return;if(typeof t=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(t.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(t);let e,i=t;if(i.grid=this,i.el?e=i.el:d.addRemoveCB?e=d.addRemoveCB(this.el,t,!0,!1):e=this.createWidgetDivs(i),!e)return;if(i=e.gridstackNode,i&&e.parentElement===this.el&&this.engine.nodes.find(o=>o._id===i._id))return e;let s=this._readAttr(e);return h.defaults(t,s),this.engine.prepareNode(t),this.el.appendChild(e),this.makeWidget(e,t),e}createWidgetDivs(t){let e=h.createDiv(["grid-stack-item",this.opts.itemClass]),i=h.createDiv(["grid-stack-item-content"],e);return h.lazyLoad(t)?t.visibleObservable||(t.visibleObservable=new IntersectionObserver(([s])=>{s.isIntersecting&&(t.visibleObservable?.disconnect(),delete t.visibleObservable,d.renderCB(i,t),t.grid?.prepareDragDrop(t.el))}),window.setTimeout(()=>t.visibleObservable?.observe(e))):d.renderCB(i,t),e}makeSubGrid(t,e,i,s=!0){let o=t.gridstackNode;if(o||(o=this.makeWidget(t).gridstackNode),o.subGrid?.el)return o.subGrid;let n,a=this;for(;a&&!n;)n=a.opts?.subGridOpts,a=a.parentGridNode?.grid;e=h.cloneDeep(_(_(E(_({},this.opts),{id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0}),n||{}),e||o.subGridOpts||{})),o.subGridOpts=e;let u;e.column==="auto"&&(u=!0,e.column=Math.max(o.w||1,i?.w||1),delete e.columnOpts);let c=o.el.querySelector(".grid-stack-item-content"),l,g;if(s&&(this._removeDD(o.el),g=E(_({},o),{x:0,y:0}),h.removeInternalForSave(g),delete g.subGridOpts,o.content&&(g.content=o.content,delete o.content),d.addRemoveCB?l=d.addRemoveCB(this.el,g,!0,!1):(l=h.createDiv(["grid-stack-item"]),l.appendChild(c),c=h.createDiv(["grid-stack-item-content"],o.el)),this.prepareDragDrop(o.el)),i){let v=u?e.column:o.w,C=o.h+i.h,T=o.el.style;T.transition="none",this.update(o.el,{w:v,h:C}),setTimeout(()=>T.transition=null)}let p=o.subGrid=d.addGrid(c,e);return i?._moving&&(p._isTemp=!0),u&&(p._autoColumn=!0),s&&p.makeWidget(l,g),i&&(i._moving?window.setTimeout(()=>h.simulateMouseEvent(i._event,"mouseenter",p.el),0):p.makeWidget(o.el,o)),this.resizeToContentCheck(!1,o),p}removeAsSubGrid(t){let e=this.parentGridNode?.grid;e&&(e.batchUpdate(),e.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(i=>{i.x+=this.parentGridNode.x,i.y+=this.parentGridNode.y,e.makeWidget(i.el,i)}),e.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,t&&window.setTimeout(()=>h.simulateMouseEvent(t._event,"mouseenter",e.el),0))}save(t=!0,e=!1,i=d.saveCB,s){let o=this.engine.save(t,i,s);if(o.forEach(n=>{if(t&&n.el&&!n.subGrid&&!i){let a=n.el.querySelector(".grid-stack-item-content");n.content=a?.innerHTML,n.content||delete n.content}else if(!t&&!i&&delete n.content,n.subGrid?.el){let a=n.w||n.subGrid.getColumn(),u=n.subGrid.save(t,e,i,a);n.subGridOpts=e?u:{children:u},delete n.subGrid}delete n.el}),e){let n=h.cloneDeep(this.opts);n.marginBottom===n.marginTop&&n.marginRight===n.marginLeft&&n.marginTop===n.marginRight&&(n.margin=n.marginTop,delete n.marginTop,delete n.marginRight,delete n.marginBottom,delete n.marginLeft),n.rtl===(this.el.style.direction==="rtl")&&(n.rtl="auto"),this._isAutoCellHeight&&(n.cellHeight="auto"),this._autoColumn&&(n.column="auto");let a=n._alwaysShowResizeHandle;return delete n._alwaysShowResizeHandle,a!==void 0?n.alwaysShowResizeHandle=a:delete n.alwaysShowResizeHandle,h.removeInternalAndSame(n,O),n.children=o,n}return o}load(t,e=d.addRemoveCB||!0){t=h.cloneDeep(t);let i=this.getColumn();t.forEach(l=>{l.w=l.w||l.minW||1,l.h=l.h||l.minH||1}),t=h.sort(t),this.engine.skipCacheUpdate=this._ignoreLayoutsNodeChange=!0;let s=0;t.forEach(l=>{s=Math.max(s,(l.x||0)+l.w)}),s>this.engine.defaultColumn&&(this.engine.defaultColumn=s),s>i&&(this.engine.nodes.length===0&&this.responseLayout?(this.engine.nodes=t,this.engine.columnChanged(s,i,this.responseLayout),t=this.engine.nodes,this.engine.nodes=[],delete this.responseLayout):this.engine.cacheLayout(t,s,!0));let o=d.addRemoveCB;typeof e=="function"&&(d.addRemoveCB=e);let n=[];this.batchUpdate();let a=!this.engine.nodes.length,u=a&&this.opts.animate;u&&this.setAnimation(!1),!a&&e&&[...this.engine.nodes].forEach(g=>{if(!g.id)return;h.find(t,g.id)||(d.addRemoveCB&&d.addRemoveCB(this.el,g,!1,!1),n.push(g),this.removeWidget(g.el,!0,!1))}),this.engine._loading=!0;let c=[];return this.engine.nodes=this.engine.nodes.filter(l=>h.find(t,l.id)?(c.push(l),!1):!0),t.forEach(l=>{let g=h.find(c,l.id);if(g){if(h.shouldSizeToContent(g)&&(l.h=g.h),this.engine.nodeBoundFix(l),(l.autoPosition||l.x===void 0||l.y===void 0)&&(l.w=l.w||g.w,l.h=l.h||g.h,this.engine.findEmptyPosition(l)),this.engine.nodes.push(g),h.samePos(g,l)&&this.engine.nodes.length>1&&(this.moveNode(g,E(_({},l),{forceCollide:!0})),h.copyPos(l,g)),this.update(g.el,l),l.subGridOpts?.children){let p=g.el.querySelector(".grid-stack");p&&p.gridstack&&p.gridstack.load(l.subGridOpts.children)}}else e&&this.addWidget(l)}),delete this.engine._loading,this.engine.removedNodes=n,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this.engine.skipCacheUpdate,o?d.addRemoveCB=o:delete d.addRemoveCB,u&&this.setAnimation(!0,!0),this}batchUpdate(t=!0){return this.engine.batchUpdate(t),t||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(t=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!t||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;let e=this.el.querySelector("."+this.opts.itemClass);if(e){let s=h.toNumber(e.getAttribute("gs-h"))||1;return Math.round(e.offsetHeight/s)}let i=parseInt(this.el.getAttribute("gs-current-row"));return i?Math.round(this.el.getBoundingClientRect().height/i):this.opts.cellHeight}cellHeight(t){if(t!==void 0&&this._isAutoCellHeight!==(t==="auto")&&(this._isAutoCellHeight=t==="auto",this._updateResizeEvent()),(t==="initial"||t==="auto")&&(t=void 0),t===void 0){let i=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;t=this.cellWidth()+i}let e=h.parseHeight(t);return this.opts.cellHeightUnit===e.unit&&this.opts.cellHeight===e.h?this:(this.opts.cellHeightUnit=e.unit,this.opts.cellHeight=e.h,this.el.style.setProperty("--gs-cell-height",`${this.opts.cellHeight}${this.opts.cellHeightUnit}`),this._updateContainerHeight(),this.resizeToContentCheck(),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(t=!1){return t&&this.opts.columnOpts?.breakpointForWindow?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){let t=this.opts.columnOpts;if(!t||!t.columnWidth&&!t.breakpoints?.length)return!1;let e=this.getColumn(),i=e,s=this._widthOrContainer(!0);if(t.columnWidth)i=Math.min(Math.round(s/t.columnWidth)||1,t.columnMax);else{i=t.columnMax;let o=0;for(;o<t.breakpoints.length&&s<=t.breakpoints[o].w;)i=t.breakpoints[o++].c||e}if(i!==e){let o=t.breakpoints?.find(n=>n.c===i);return this.column(i,o?.layout||t.layout),!0}return!1}compact(t="compact",e=!0){return this.engine.compact(t,e),this._triggerChangeEvent(),this}column(t,e="moveScale"){if(!t||t<1||this.opts.column===t)return this;let i=this.getColumn();return this.opts.column=t,this.engine?(this.engine.column=t,this.el.classList.remove("gs-"+i),this._updateColumnVar(),this.engine.columnChanged(i,t,e),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):(this.responseLayout=e,this)}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(t=>t.matches("."+this.opts.itemClass)&&!t.matches("."+this.opts.placeholderClass))}isIgnoreChangeCB(){return this._ignoreLayoutsNodeChange}destroy(t=!0){if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),t?this.el.parentNode.removeChild(this.el):(this.removeAll(t),this.el.removeAttribute("gs-current-row")),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,delete this.opts,delete this._placeholder?.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(t){return this.opts.float!==t&&(this.opts.float=this.engine.float=t,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(t,e=!1){let i=this.el.getBoundingClientRect(),s;e?s={top:i.top+document.documentElement.scrollTop,left:i.left}:s={top:this.el.offsetTop,left:this.el.offsetLeft};let o=t.left-s.left,n=t.top-s.top,a=i.width/this.getColumn(),u=i.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(o/a),y:Math.floor(n/u)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow||0)}isAreaEmpty(t,e,i,s){return this.engine.isAreaEmpty(t,e,i,s)}makeWidget(t,e){let i=d.getElement(t);if(!i||i.gridstackNode)return i;i.parentElement||this.el.appendChild(i),this._prepareElement(i,!0,e);let s=i.gridstackNode;this._updateContainerHeight(),s.subGridOpts&&this.makeSubGrid(i,s.subGridOpts,void 0,!1);let o;return this.opts.column===1&&!this._ignoreLayoutsNodeChange&&(o=this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),o&&delete this._ignoreLayoutsNodeChange,i}on(t,e){return t.indexOf(" ")!==-1?(t.split(" ").forEach(s=>this.on(s,e)),this):(t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable"?(t==="enable"||t==="disable"?this._gsEventHandler[t]=s=>e(s):this._gsEventHandler[t]=s=>{s.detail&&e(s,s.detail)},this.el.addEventListener(t,this._gsEventHandler[t])):t==="drag"||t==="dragstart"||t==="dragstop"||t==="resizestart"||t==="resize"||t==="resizestop"||t==="dropped"||t==="resizecontent"?this._gsEventHandler[t]=e:console.error("GridStack.on("+t+") event not supported"),this)}off(t){return t.indexOf(" ")!==-1?(t.split(" ").forEach(i=>this.off(i)),this):((t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable")&&this._gsEventHandler[t]&&this.el.removeEventListener(t,this._gsEventHandler[t]),delete this._gsEventHandler[t],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(t=>this.off(t)),this}removeWidget(t,e=!0,i=!0){return t?(d.getElements(t).forEach(s=>{if(s.parentElement&&s.parentElement!==this.el)return;let o=s.gridstackNode;o||(o=this.engine.nodes.find(n=>s===n.el)),o&&(e&&d.addRemoveCB&&d.addRemoveCB(this.el,o,!1,!1),delete s.gridstackNode,this._removeDD(s),this.engine.removeNode(o,e,i),e&&s.parentElement&&s.remove())}),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(t=!0,e=!0){return this.engine.nodes.forEach(i=>{t&&d.addRemoveCB&&d.addRemoveCB(this.el,i,!1,!1),delete i.el.gridstackNode,this.opts.staticGrid||this._removeDD(i.el)}),this.engine.removeAll(t,e),e&&this._triggerRemoveEvent(),this}setAnimation(t=this.opts.animate,e){return e?setTimeout(()=>{this.opts&&this.setAnimation(t)}):t?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this.opts.animate=t,this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(t,e=!0,i=!0){return!!this.opts.staticGrid===t?this:(t?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(s=>{this.prepareDragDrop(s.el),s.subGrid&&i&&s.subGrid.setStatic(t,e,i)}),e&&this._setStaticClass(),this)}updateOptions(t){let e=this.opts;return t===e?this:(t.acceptWidgets!==void 0&&(e.acceptWidgets=t.acceptWidgets,this._setupAcceptWidget()),t.animate!==void 0&&this.setAnimation(t.animate),t.cellHeight&&this.cellHeight(t.cellHeight),t.class!==void 0&&t.class!==e.class&&(e.class&&this.el.classList.remove(e.class),t.class&&this.el.classList.add(t.class)),t.columnOpts?(this.opts.columnOpts=t.columnOpts,this.checkDynamicColumn()):t.columnOpts===null&&this.opts.columnOpts?(delete this.opts.columnOpts,this._updateResizeEvent()):typeof t.column=="number"&&this.column(t.column),t.margin!==void 0&&this.margin(t.margin),t.staticGrid!==void 0&&this.setStatic(t.staticGrid),t.disableDrag!==void 0&&!t.staticGrid&&this.enableMove(!t.disableDrag),t.disableResize!==void 0&&!t.staticGrid&&this.enableResize(!t.disableResize),t.float!==void 0&&this.float(t.float),t.row!==void 0?(e.minRow=e.maxRow=e.row=t.row,this._updateContainerHeight()):(t.minRow!==void 0&&(e.minRow=t.minRow,this._updateContainerHeight()),t.maxRow!==void 0&&(e.maxRow=t.maxRow)),t.lazyLoad!==void 0&&(e.lazyLoad=t.lazyLoad),t.children?.length&&this.load(t.children),this)}update(t,e){return d.getElements(t).forEach(i=>{let s=i?.gridstackNode;if(!s)return;let o=_(_({},h.copyPos({},s)),h.cloneDeep(e));this.engine.nodeBoundFix(o),delete o.autoPosition;let n=["x","y","w","h"],a;if(n.some(l=>o[l]!==void 0&&o[l]!==s[l])&&(a={},n.forEach(l=>{a[l]=o[l]!==void 0?o[l]:s[l],delete o[l]})),!a&&(o.minW||o.minH||o.maxW||o.maxH)&&(a={}),o.content!==void 0){let l=i.querySelector(".grid-stack-item-content");l&&l.textContent!==o.content&&(s.content=o.content,d.renderCB(l,o),s.subGrid?.el&&(l.appendChild(s.subGrid.el),s.subGrid._updateContainerHeight())),delete o.content}let u=!1,c=!1;for(let l in o)l[0]!=="_"&&s[l]!==o[l]&&(s[l]=o[l],u=!0,c=c||!this.opts.staticGrid&&(l==="noResize"||l==="noMove"||l==="locked"));if(h.sanitizeMinMax(s),a){let l=a.w!==void 0&&a.w!==s.w;this.moveNode(s,a),l&&s.subGrid?s.subGrid.onResize(this.hasAnimationCSS()?s.w:void 0):this.resizeToContentCheck(l,s),delete s._orig}(a||u)&&this._writeAttr(i,s),c&&this.prepareDragDrop(s.el),d.updateCB&&d.updateCB(s)}),this}moveNode(t,e){let i=t._updating;i||this.engine.cleanNodes().beginUpdate(t),this.engine.moveNode(t,e),this._updateContainerHeight(),i||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(t){if(!t||(t.classList.remove("size-to-content-max"),!t.clientHeight))return;let e=t.gridstackNode;if(!e)return;let i=e.grid;if(!i||t.parentElement!==i.el)return;let s=i.getCellHeight(!0);if(!s)return;let o=e.h?e.h*s:t.clientHeight,n;if(e.resizeToContentParent&&(n=t.querySelector(e.resizeToContentParent)),n||(n=t.querySelector(d.resizeToContentParent)),!n)return;let a=t.clientHeight-n.clientHeight,u=e.h?e.h*s-a:n.clientHeight,c;if(e.subGrid){c=e.subGrid.getRow()*e.subGrid.getCellHeight(!0);let p=e.subGrid.el.getBoundingClientRect(),v=t.getBoundingClientRect();c+=p.top-v.top}else{if(e.subGridOpts?.children?.length)return;{let p=n.firstElementChild;if(!p){console.error(`Error: GridStack.resizeToContent() widget id:${e.id} '${d.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}c=p.getBoundingClientRect().height||u}}if(u===c)return;o+=c-u;let l=Math.ceil(o/s),g=Number.isInteger(e.sizeToContent)?e.sizeToContent:0;g&&l>g&&(l=g,t.classList.add("size-to-content-max")),e.minH&&l<e.minH?l=e.minH:e.maxH&&l>e.maxH&&(l=e.maxH),l!==e.h&&(i._ignoreLayoutsNodeChange=!0,i.moveNode(e,{h:l}),delete i._ignoreLayoutsNodeChange)}resizeToContentCBCheck(t){d.resizeToContentCB?d.resizeToContentCB(t):this.resizeToContent(t)}rotate(t,e){return d.getElements(t).forEach(i=>{let s=i.gridstackNode;if(!h.canBeRotated(s))return;let o={w:s.h,h:s.w,minH:s.minW,minW:s.minH,maxH:s.maxW,maxW:s.maxH};if(e){let a=e.left>0?Math.floor(e.left/this.cellWidth()):0,u=e.top>0?Math.floor(e.top/this.opts.cellHeight):0;o.x=s.x+a-(s.h-(u+1)),o.y=s.y+u-a}Object.keys(o).forEach(a=>{o[a]===void 0&&delete o[a]});let n=s._orig;this.update(i,o),s._orig=n}),this}margin(t){if(!(typeof t=="string"&&t.split(" ").length>1)){let i=h.parseHeight(t);if(this.opts.marginUnit===i.unit&&this.opts.margin===i.h)return}return this.opts.margin=t,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this}getMargin(){return this.opts.margin}willItFit(t){return this.engine.willItFit(t)}_triggerChangeEvent(){if(this.engine.batchMode)return this;let t=this.engine.getDirtyNodes(!0);return t&&t.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(t),this._triggerEvent("change",t)),this.engine.saveInitial(),this}_triggerAddEvent(){if(this.engine.batchMode)return this;if(this.engine.addedNodes?.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(e=>{delete e._dirty});let t=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",t)}return this}_triggerRemoveEvent(){if(this.engine.batchMode)return this;if(this.engine.removedNodes?.length){let t=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",t)}return this}_triggerEvent(t,e){let i=e?new CustomEvent(t,{bubbles:!1,detail:e}):new Event(t),s=this;for(;s.parentGridNode;)s=s.parentGridNode.grid;return s.el.dispatchEvent(i),this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let t=this.parentGridNode,e=this.getRow()+this._extraDragRow,i=this.opts.cellHeight,s=this.opts.cellHeightUnit;if(!i)return this;if(!t&&!this.opts.minRow){let o=h.parseHeight(getComputedStyle(this.el).minHeight);if(o.h>0&&o.unit===s){let n=Math.floor(o.h/i);e<n&&(e=n)}}return this.el.setAttribute("gs-current-row",String(e)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),e&&(this.el.style[t?"minHeight":"height"]=e*i+s),t&&h.shouldSizeToContent(t)&&t.grid.resizeToContentCBCheck(t.el),this}_prepareElement(t,e=!1,i){i=i||this._readAttr(t),t.gridstackNode=i,i.el=t,i.grid=this,i=this.engine.addNode(i,e),this._writeAttr(t,i),t.classList.add(O.itemClass,this.opts.itemClass);let s=h.shouldSizeToContent(i);return s?t.classList.add("size-to-content"):t.classList.remove("size-to-content"),s&&this.resizeToContentCheck(!1,i),h.lazyLoad(i)||this.prepareDragDrop(i.el),this}_writePosAttr(t,e){return(!e._moving&&!e._resizing||this._placeholder===t)&&(t.style.top=e.y?e.y===1?"var(--gs-cell-height)":`calc(${e.y} * var(--gs-cell-height))`:null,t.style.left=e.x?e.x===1?"var(--gs-column-width)":`calc(${e.x} * var(--gs-column-width))`:null,t.style.width=e.w>1?`calc(${e.w} * var(--gs-column-width))`:null,t.style.height=e.h>1?`calc(${e.h} * var(--gs-cell-height))`:null),t.setAttribute("gs-x",String(e.x)),t.setAttribute("gs-y",String(e.y)),e.w>1?t.setAttribute("gs-w",String(e.w)):t.removeAttribute("gs-w"),e.h>1?t.setAttribute("gs-h",String(e.h)):t.removeAttribute("gs-h"),this}_writeAttr(t,e){if(!e)return this;this._writePosAttr(t,e);let i={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(let s in i)e[s]?t.setAttribute(i[s],String(e[s])):t.removeAttribute(i[s]);return this}_readAttr(t,e=!0){let i={};i.x=h.toNumber(t.getAttribute("gs-x")),i.y=h.toNumber(t.getAttribute("gs-y")),i.w=h.toNumber(t.getAttribute("gs-w")),i.h=h.toNumber(t.getAttribute("gs-h")),i.autoPosition=h.toBool(t.getAttribute("gs-auto-position")),i.noResize=h.toBool(t.getAttribute("gs-no-resize")),i.noMove=h.toBool(t.getAttribute("gs-no-move")),i.locked=h.toBool(t.getAttribute("gs-locked"));let s=t.getAttribute("gs-size-to-content");s&&(s==="true"||s==="false"?i.sizeToContent=h.toBool(s):i.sizeToContent=parseInt(s,10)),i.id=t.getAttribute("gs-id"),i.maxW=h.toNumber(t.getAttribute("gs-max-w")),i.minW=h.toNumber(t.getAttribute("gs-min-w")),i.maxH=h.toNumber(t.getAttribute("gs-max-h")),i.minH=h.toNumber(t.getAttribute("gs-min-h")),e&&(i.w===1&&t.removeAttribute("gs-w"),i.h===1&&t.removeAttribute("gs-h"),i.maxW&&t.removeAttribute("gs-max-w"),i.minW&&t.removeAttribute("gs-min-w"),i.maxH&&t.removeAttribute("gs-max-h"),i.minH&&t.removeAttribute("gs-min-h"));for(let o in i){if(!i.hasOwnProperty(o))return;!i[o]&&i[o]!==0&&o!=="sizeToContent"&&delete i[o]}return i}_setStaticClass(){let t=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...t),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...t),this.el.removeAttribute("gs-static")),this}onResize(t=this.el?.clientWidth){if(!t||this.prevWidth===t)return;this.prevWidth=t,this.batchUpdate();let e=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),e=!0):e=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(i=>{i.subGrid&&i.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(e),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(t=!1,e=void 0){if(this.engine){if(t&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,e),this.animationDelay);if(e)h.shouldSizeToContent(e)&&this.resizeToContentCBCheck(e.el);else if(this.engine.nodes.some(i=>h.shouldSizeToContent(i))){let i=[...this.engine.nodes];this.batchUpdate(),i.forEach(s=>{h.shouldSizeToContent(s)&&this.resizeToContentCBCheck(s.el)}),this._ignoreLayoutsNodeChange=!0,this.batchUpdate(!1),this._ignoreLayoutsNodeChange=!1}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,e?[e]:this.engine.nodes)}}_updateResizeEvent(t=!1){let e=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(i=>i.sizeToContent));return!t&&e&&!this.resizeObserver?(this._sizeThrottle=h.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(t||!e)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(t=".grid-stack-item"){return h.getElement(t)}static getElements(t=".grid-stack-item"){return h.getElements(t)}static getGridElement(t){return d.getElement(t)}static getGridElements(t){return h.getElements(t)}_initMargin(){let t,e=0,i=[];typeof this.opts.margin=="string"&&(i=this.opts.margin.split(" ")),i.length===2?(this.opts.marginTop=this.opts.marginBottom=i[0],this.opts.marginLeft=this.opts.marginRight=i[1]):i.length===4?(this.opts.marginTop=i[0],this.opts.marginRight=i[1],this.opts.marginBottom=i[2],this.opts.marginLeft=i[3]):(t=h.parseHeight(this.opts.margin),this.opts.marginUnit=t.unit,e=this.opts.margin=t.h),["marginTop","marginRight","marginBottom","marginLeft"].forEach(n=>{this.opts[n]===void 0?this.opts[n]=e:(t=h.parseHeight(this.opts[n]),this.opts[n]=t.h,delete this.opts.margin)}),this.opts.marginUnit=t.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop);let o=this.el.style;return o.setProperty("--gs-item-margin-top",`${this.opts.marginTop}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-bottom",`${this.opts.marginBottom}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-right",`${this.opts.marginRight}${this.opts.marginUnit}`),o.setProperty("--gs-item-margin-left",`${this.opts.marginLeft}${this.opts.marginUnit}`),this}static getDD(){return M}static setupDragIn(t,e,i,s=document){e?.pause!==void 0&&(f.pauseDrag=e.pause),e=_({appendTo:"body",helper:"clone"},e||{}),(typeof t=="string"?h.getElements(t,s):t).forEach((n,a)=>{M.isDraggable(n)||M.dragIn(n,e),i?.[a]&&(n.gridstackNode=i[a])})}movable(t,e){return this.opts.staticGrid?this:(d.getElements(t).forEach(i=>{let s=i.gridstackNode;s&&(e?delete s.noMove:s.noMove=!0,this.prepareDragDrop(s.el))}),this)}resizable(t,e){return this.opts.staticGrid?this:(d.getElements(t).forEach(i=>{let s=i.gridstackNode;s&&(e?delete s.noResize:s.noResize=!0,this.prepareDragDrop(s.el))}),this)}disable(t=!0){if(!this.opts.staticGrid)return this.enableMove(!1,t),this.enableResize(!1,t),this._triggerEvent("disable"),this}enable(t=!0){if(!this.opts.staticGrid)return this.enableMove(!0,t),this.enableResize(!0,t),this._triggerEvent("enable"),this}enableMove(t,e=!0){return this.opts.staticGrid?this:(t?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(i=>{this.prepareDragDrop(i.el),i.subGrid&&e&&i.subGrid.enableMove(t,e)}),this)}enableResize(t,e=!0){return this.opts.staticGrid?this:(t?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(i=>{this.prepareDragDrop(i.el),i.subGrid&&e&&i.subGrid.enableResize(t,e)}),this)}cancelDrag(){let t=this._placeholder?.gridstackNode;t&&(t._isExternal?(t._isAboutToRemove=!0,this.engine.removeNode(t)):t._isAboutToRemove&&d._itemRemoving(t.el,!1),this.engine.restoreInitial())}_removeDD(t){return M.draggable(t,"destroy").resizable(t,"destroy"),t.gridstackNode&&delete t.gridstackNode._initDD,delete t.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return M.droppable(this.el,"destroy"),this;let t,e,i=(s,o,n)=>{n=n||o;let a=n.gridstackNode;if(!a)return;if(!a.grid?.el){n.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;let p=n.getBoundingClientRect();n.style.left=p.x+(this.dragTransform.xScale-1)*(s.clientX-p.x)/this.dragTransform.xScale+"px",n.style.top=p.y+(this.dragTransform.yScale-1)*(s.clientY-p.y)/this.dragTransform.yScale+"px",n.style.transformOrigin="0px 0px"}let{top:u,left:c}=n.getBoundingClientRect(),l=this.el.getBoundingClientRect();c-=l.left,u-=l.top;let g={position:{top:u*this.dragTransform.xScale,left:c*this.dragTransform.yScale}};if(a._temporaryRemoved){if(a.x=Math.max(0,Math.round(c/e)),a.y=Math.max(0,Math.round(u/t)),delete a.autoPosition,this.engine.nodeBoundFix(a),!this.engine.willItFit(a)){if(a.autoPosition=!0,!this.engine.willItFit(a)){M.off(o,"drag");return}a._willFitPos&&(h.copyPos(a,a._willFitPos),delete a._willFitPos)}this._onStartMoving(n,s,g,a,e,t)}else this._dragOrResize(n,s,g,a,e,t)};return M.droppable(this.el,{accept:s=>{let o=s.gridstackNode||this._readAttr(s,!1);if(o?.grid===this)return!0;if(!this.opts.acceptWidgets)return!1;let n=!0;if(typeof this.opts.acceptWidgets=="function")n=this.opts.acceptWidgets(s);else{let a=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;n=s.matches(a)}if(n&&o&&this.opts.maxRow){let a={w:o.w,h:o.h,minW:o.minW,minH:o.minH};n=this.engine.willItFit(a)}return n}}).on(this.el,"dropover",(s,o,n)=>{let a=n?.gridstackNode||o.gridstackNode;if(a?.grid===this&&!a._temporaryRemoved)return!1;if(a?._sidebarOrig&&(a.w=a._sidebarOrig.w,a.h=a._sidebarOrig.h),a?.grid&&a.grid!==this&&!a._temporaryRemoved&&a.grid._leave(o,n),n=n||o,e=this.cellWidth(),t=this.getCellHeight(!0),!a){let l=n.getAttribute("data-gs-widget")||n.getAttribute("gridstacknode");if(l){try{a=JSON.parse(l)}catch(g){console.error("Gridstack dropover: Bad JSON format: ",l)}n.removeAttribute("data-gs-widget"),n.removeAttribute("gridstacknode")}a||(a=this._readAttr(n)),a._sidebarOrig={w:a.w,h:a.h}}a.grid||(a.el||(a=_({},a)),a._isExternal=!0,n.gridstackNode=a);let u=a.w||Math.round(n.offsetWidth/e)||1,c=a.h||Math.round(n.offsetHeight/t)||1;return a.grid&&a.grid!==this?(o._gridstackNodeOrig||(o._gridstackNodeOrig=a),o.gridstackNode=a=E(_({},a),{w:u,h:c,grid:this}),delete a.x,delete a.y,this.engine.cleanupNode(a).nodeBoundFix(a),a._initDD=a._isExternal=a._temporaryRemoved=!0):(a.w=u,a.h=c,a._temporaryRemoved=!0),d._itemRemoving(a.el,!1),M.on(o,"drag",i),i(s,o,n),!1}).on(this.el,"dropout",(s,o,n)=>{let a=n?.gridstackNode||o.gridstackNode;return a&&(!a.grid||a.grid===this)&&(this._leave(o,n),this._isTemp&&this.removeAsSubGrid(a)),!1}).on(this.el,"drop",(s,o,n)=>{let a=n?.gridstackNode||o.gridstackNode;if(a?.grid===this&&!a._isExternal)return!1;let u=!!this.placeholder.parentElement,c=o!==n;this.placeholder.remove(),delete this.placeholder.gridstackNode,u&&this.opts.animate&&(this.setAnimation(!1),this.setAnimation(!0,!0));let l=o._gridstackNodeOrig;if(delete o._gridstackNodeOrig,u&&l?.grid&&l.grid!==this){let p=l.grid;p.engine.removeNodeFromLayoutCache(l),p.engine.removedNodes.push(l),p._triggerRemoveEvent()._triggerChangeEvent(),p.parentGridNode&&!p.engine.nodes.length&&p.opts.subGridDynamic&&p.removeAsSubGrid()}if(!a||(u&&(this.engine.cleanupNode(a),a.grid=this),delete a.grid?._isTemp,M.off(o,"drag"),n!==o?(n.remove(),o=n):o.remove(),this._removeDD(o),!u))return!1;let g=a.subGrid?.el?.gridstack;return h.copyPos(a,this._readAttr(this.placeholder)),h.removePositioningStyles(o),c&&(a.content||a.subGridOpts||d.addRemoveCB)?(delete a.el,o=this.addWidget(a)):(this._prepareElement(o,!0,a),this.el.appendChild(o),this.resizeToContentCheck(!1,a),g&&(g.parentGridNode=a),this._updateContainerHeight()),this.engine.addedNodes.push(a),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(E(_({},s),{type:"dropped"}),l&&l.grid?l:void 0,a),!1}),this}static _itemRemoving(t,e){if(!t)return;let i=t?t.gridstackNode:void 0;!i?.grid||t.classList.contains(i.grid.opts.removableOptions.decline)||(e?i._isAboutToRemove=!0:delete i._isAboutToRemove,e?t.classList.add("grid-stack-item-removing"):t.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;let t=document.querySelector(this.opts.removable);return t?(!this.opts.staticGrid&&!M.isDroppable(t)&&M.droppable(t,this.opts.removableOptions).on(t,"dropover",(e,i)=>d._itemRemoving(i,!0)).on(t,"dropout",(e,i)=>d._itemRemoving(i,!1)),this):this}prepareDragDrop(t,e=!1){let i=t?.gridstackNode;if(!i)return;let s=i.noMove||this.opts.disableDrag,o=i.noResize||this.opts.disableResize,n=this.opts.staticGrid||s&&o;if((e||n)&&(i._initDD&&(this._removeDD(t),delete i._initDD),n&&t.classList.add("ui-draggable-disabled","ui-resizable-disabled"),!e))return this;if(!i._initDD){let a,u,c=(p,v)=>{this.triggerEvent(p,p.target),a=this.cellWidth(),u=this.getCellHeight(!0),this._onStartMoving(t,p,v,i,a,u)},l=(p,v)=>{this._dragOrResize(t,p,v,i,a,u)},g=p=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete i._moving,delete i._resizing,delete i._event,delete i._lastTried;let v=i.w!==i._orig.w,C=p.target;if(!(!C.gridstackNode||C.gridstackNode.grid!==this)){if(i.el=C,i._isAboutToRemove){let T=t.gridstackNode.grid;T._gsEventHandler[p.type]&&T._gsEventHandler[p.type](p,C),T.engine.nodes.push(i),T.removeWidget(t,!0,!0)}else h.removePositioningStyles(C),i._temporaryRemoved?(this._writePosAttr(C,i),this.engine.addNode(i)):this._writePosAttr(C,i),this.triggerEvent(p,C);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),p.type==="resizestop"&&(Number.isInteger(i.sizeToContent)&&(i.sizeToContent=i.h),this.resizeToContentCheck(v,i))}};M.draggable(t,{start:c,stop:g,drag:l}).resizable(t,{start:c,stop:g,resize:l}),i._initDD=!0}return M.draggable(t,s?"disable":"enable").resizable(t,o?"disable":"enable"),this}_onStartMoving(t,e,i,s,o,n){if(this.engine.cleanNodes().beginUpdate(s),this._writePosAttr(this.placeholder,s),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=s,s.grid?.el)this.dragTransform=h.getValuesFromTransformedElement(t);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){let a=this.placeholder.closest(".grid-stack");this.dragTransform=h.getValuesFromTransformedElement(a)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(s.el=this.placeholder,s._lastUiPosition=i.position,s._prevYPix=i.position.top,s._moving=e.type==="dragstart",s._resizing=e.type==="resizestart",delete s._lastTried,e.type==="dropover"&&s._temporaryRemoved&&(this.engine.addNode(s),s._moving=!0),this.engine.cacheRects(o,n,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),e.type==="resizestart"){let a=this.getColumn()-s.x,u=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-s.y;M.resizable(t,"option","minWidth",o*Math.min(s.minW||1,a)).resizable(t,"option","minHeight",n*Math.min(s.minH||1,u)).resizable(t,"option","maxWidth",o*Math.min(s.maxW||Number.MAX_SAFE_INTEGER,a)).resizable(t,"option","maxWidthMoveLeft",o*Math.min(s.maxW||Number.MAX_SAFE_INTEGER,s.x+s.w)).resizable(t,"option","maxHeight",n*Math.min(s.maxH||Number.MAX_SAFE_INTEGER,u)).resizable(t,"option","maxHeightMoveUp",n*Math.min(s.maxH||Number.MAX_SAFE_INTEGER,s.y+s.h))}}_dragOrResize(t,e,i,s,o,n){let a=_({},s._orig),u,c=this.opts.marginLeft,l=this.opts.marginRight,g=this.opts.marginTop,p=this.opts.marginBottom,v=Math.round(n*.1),C=Math.round(o*.1);if(c=Math.min(c,C),l=Math.min(l,C),g=Math.min(g,v),p=Math.min(p,v),e.type==="drag"){if(s._temporaryRemoved)return;let q=i.position.top-s._prevYPix;s._prevYPix=i.position.top,this.opts.draggable.scroll!==!1&&h.updateScrollPosition(t,i.position,q);let Nt=i.position.left+(i.position.left>s._lastUiPosition.left?-l:c),Ge=i.position.top+(i.position.top>s._lastUiPosition.top?-p:g);a.x=Math.round(Nt/o),a.y=Math.round(Ge/n);let Ue=this._extraDragRow;if(this.engine.collide(s,a)){let Pt=this.getRow(),Lt=Math.max(0,a.y+s.h-Pt);this.opts.maxRow&&Pt+Lt>this.opts.maxRow&&(Lt=Math.max(0,this.opts.maxRow-Pt)),this._extraDragRow=Lt}else this._extraDragRow=0;if(this._extraDragRow!==Ue&&this._updateContainerHeight(),s.x===a.x&&s.y===a.y)return}else if(e.type==="resize"){if(a.x<0||(h.updateScrollResize(e,t,n),a.w=Math.round((i.size.width-c)/o),a.h=Math.round((i.size.height-g)/n),s.w===a.w&&s.h===a.h)||s._lastTried&&s._lastTried.w===a.w&&s._lastTried.h===a.h)return;let q=i.position.left+c,Nt=i.position.top+g;a.x=Math.round(q/o),a.y=Math.round(Nt/n),u=!0}s._event=e,s._lastTried=a;let T={x:i.position.left+c,y:i.position.top+g,w:(i.size?i.size.width:s.w*o)-c-l,h:(i.size?i.size.height:s.h*n)-g-p};if(this.engine.moveNodeCheck(s,E(_({},a),{cellWidth:o,cellHeight:n,rect:T,resizing:u}))){s._lastUiPosition=i.position,this.engine.cacheRects(o,n,g,l,p,c),delete s._skipDown,u&&s.subGrid&&s.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();let q=e.target;s._sidebarOrig||this._writePosAttr(q,s),this.triggerEvent(e,q)}}triggerEvent(t,e){let i=this;for(;i.parentGridNode;)i=i.parentGridNode.grid;i._gsEventHandler[t.type]&&i._gsEventHandler[t.type](t,e)}_leave(t,e){e=e||t;let i=e.gridstackNode;if(!i||(e.style.transform=e.style.transformOrigin=null,M.off(t,"drag"),i._temporaryRemoved))return;i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&e?e:t;let s=i._sidebarOrig;i._isExternal&&this.engine.cleanupNode(i),i._sidebarOrig=s,this.opts.removable===!0&&d._itemRemoving(t,!0),t._gridstackNodeOrig?(t.gridstackNode=t._gridstackNodeOrig,delete t._gridstackNodeOrig):i._isExternal&&this.engine.restoreInitial()}}return d.renderCB=(r,t)=>{r&&t?.content&&(r.textContent=t.content)},d.resizeToContentParent=".grid-stack-item-content",d.Utils=h,d.Engine=Vt,d.GDRev="12.4.2",d})();var Ne=["container"],Ve=["*"];function qe(d,r){}var Ye=["*",[["","empty-content",""]]],je=["*","[empty-content]"];function $e(d,r){d&1&&_t(0,1,["*ngIf","isEmpty"])}function Xe(d,r){}var Ht=(()=>{class d{serialize(){}deserialize(t){this.widgetItem=t,t&&t.input&&Object.assign(this,t.input)}}return d.\u0275fac=function(t){return new(t||d)},d.\u0275prov=$t({token:d,factory:d.\u0275fac}),d})(),Pe=(()=>{class d{constructor(t){this.elementRef=t,this.el._gridItemComp=this}set options(t){let e=this.el.gridstackNode?.grid;e?e.update(this.el,t):this._options=E(_({},t),{el:this.el})}get options(){return this.el.gridstackNode||this._options||{el:this.el}}get el(){return this.elementRef.nativeElement}clearOptions(){delete this._options}ngOnDestroy(){this.clearOptions(),delete this.childWidget,delete this.el._gridItemComp,delete this.container,delete this.ref}}return d.\u0275fac=function(t){return new(t||d)(Bt(at))},d.\u0275cmp=z({type:d,selectors:[["gridstack-item"]],viewQuery:function(t,e){if(t&1&&ht(Ne,7,dt),t&2){let i;j(i=$())&&(e.container=i.first)}},inputs:{options:"options"},ngContentSelectors:Ve,decls:5,vars:1,consts:[["container",""],[1,"grid-stack-item-content"]],template:function(t,e){t&1&&(It(),Y(0,"div",1),Jt(1,qe,0,0,"ng-template",null,0,Ut),_t(3),b(4),lt()),t&2&&(H(4),ae(" ",e.options.content," "))},styles:["[_nghost-%COMP%]{display:block}"]}),d})(),ct=(()=>{class d{constructor(t){this.elementRef=t,this.addedCB=new N,this.changeCB=new N,this.disableCB=new N,this.dragCB=new N,this.dragStartCB=new N,this.dragStopCB=new N,this.droppedCB=new N,this.enableCB=new N,this.removedCB=new N,this.resizeCB=new N,this.resizeStartCB=new N,this.resizeStopCB=new N,U.addRemoveCB||(U.addRemoveCB=Qe),U.saveCB||(U.saveCB=Ke),U.updateCB||(U.updateCB=Je),this.el._gridComp=this}set options(t){this._grid?this._grid.updateOptions(t):this._options=t}get options(){return this._grid?.opts||this._options||{}}get el(){return this.elementRef.nativeElement}get grid(){return this._grid}static addComponentToSelectorType(t){t.forEach(e=>d.selectorToType[d.getSelector(e)]=e)}static getSelector(t){return ce(t).selector}ngOnInit(){this.loaded=!!this.options?.children?.length,this._grid=U.init(this._options,this.el),delete this._options,this.checkEmpty()}ngAfterContentInit(){this._sub=this.gridstackItems?.changes.subscribe(()=>this.updateAll()),this.loaded||this.updateAll(),this.hookEvents(this.grid)}ngOnDestroy(){this.unhookEvents(this._grid),this._sub?.unsubscribe(),this._grid?.destroy(),delete this._grid,delete this.el._gridComp,delete this.container,delete this.ref}updateAll(){if(!this.grid)return;let t=[];this.gridstackItems?.forEach(e=>{t.push(e.options),e.clearOptions()}),this.grid.load(t)}checkEmpty(){this.grid&&(this.isEmpty=!this.grid.engine.nodes.length)}hookEvents(t){t&&(t.parentGridNode||t.on("added",(e,i)=>{(i[0].grid?.el._gridComp||this).checkEmpty(),this.addedCB.emit({event:e,nodes:i})}).on("change",(e,i)=>this.changeCB.emit({event:e,nodes:i})).on("disable",e=>this.disableCB.emit({event:e})).on("drag",(e,i)=>this.dragCB.emit({event:e,el:i})).on("dragstart",(e,i)=>this.dragStartCB.emit({event:e,el:i})).on("dragstop",(e,i)=>this.dragStopCB.emit({event:e,el:i})).on("dropped",(e,i,s)=>this.droppedCB.emit({event:e,previousNode:i,newNode:s})).on("enable",e=>this.enableCB.emit({event:e})).on("removed",(e,i)=>{(i[0].grid?.el._gridComp||this).checkEmpty(),this.removedCB.emit({event:e,nodes:i})}).on("resize",(e,i)=>this.resizeCB.emit({event:e,el:i})).on("resizestart",(e,i)=>this.resizeStartCB.emit({event:e,el:i})).on("resizestop",(e,i)=>this.resizeStopCB.emit({event:e,el:i})))}unhookEvents(t){t&&(t.parentGridNode||t.off("added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop"))}}return d.selectorToType={},d.\u0275fac=function(t){return new(t||d)(Bt(at))},d.\u0275cmp=z({type:d,selectors:[["gridstack"]],contentQueries:function(t,e,i){if(t&1&&se(i,Pe,4),t&2){let s;j(s=$())&&(e.gridstackItems=s)}},viewQuery:function(t,e){if(t&1&&ht(Ne,7,dt),t&2){let i;j(i=$())&&(e.container=i.first)}},inputs:{options:"options",isEmpty:"isEmpty"},outputs:{addedCB:"addedCB",changeCB:"changeCB",disableCB:"disableCB",dragCB:"dragCB",dragStartCB:"dragStartCB",dragStopCB:"dragStopCB",droppedCB:"droppedCB",enableCB:"enableCB",removedCB:"removedCB",resizeCB:"resizeCB",resizeStartCB:"resizeStartCB",resizeStopCB:"resizeStopCB"},ngContentSelectors:je,decls:4,vars:1,consts:[["container",""],[4,"ngIf"]],template:function(t,e){t&1&&(It(Ye),Kt(0,$e,1,0,"ng-content",1)(1,Xe,0,0,"ng-template",null,0,Ut),_t(3)),t&2&&V("ngIf",e.isEmpty)},dependencies:[ue],styles:["[_nghost-%COMP%]{display:block}"]}),d})();function Qe(d,r,t,e){if(t){if(!d)return;if(e){let i=d.parentElement?._gridItemComp;if(!i)return;let o=(i.childWidget?.container||i.container)?.createComponent(ct),n=o?.instance;return n?(n.ref=o,n.options=r,n.el):void 0}else{let s=d._gridComp?.container?.createComponent(Pe),o=s?.instance;if(!o)return;o.ref=s;let n=r.selector,a=n?ct.selectorToType[n]:void 0;if(a){let u=()=>{let l=o.container?.createComponent(a)?.instance;l&&typeof l.serialize=="function"&&typeof l.deserialize=="function"&&(o.childWidget=l,l.deserialize(r))};r.lazyLoad||r.grid?.opts?.lazyLoad&&r.lazyLoad!==!1?r.visibleObservable||(r.visibleObservable=new IntersectionObserver(([l])=>{l.isIntersecting&&(r.visibleObservable?.disconnect(),delete r.visibleObservable,u())}),window.setTimeout(()=>r.visibleObservable?.observe(o.el))):u()}return o.el}}else if(e){let i=r.el?._gridComp;i?.ref?i.ref.destroy():i?.ngOnDestroy()}else{let i=r.el?._gridItemComp;i?.ref?i.ref.destroy():i?.ngOnDestroy()}}function Ke(d,r){let t=d.el?._gridItemComp;if(t){let i=t.childWidget?.serialize();i&&(r.input=i);return}let e=d.el?._gridComp}function Je(d){let r=d,t=d.el?._gridItemComp;t?.childWidget&&r.input&&t.childWidget.deserialize(r)}var Ze=(d,r)=>r.id;function ti(d,r){if(d&1&&ee(0,"div",4),d&2){let t=r.$index;P(2);let e=bt(0);yt("background-color",e===t?"var(--mat-sys-on-surface)":"var(--mat-sys-inverse-on-surface)")}}function ei(d,r){if(d&1&&(Y(0,"div",0),Wt("fade-toast"),Y(1,"span",1),b(2),lt()(),Y(3,"div",2),Wt("fade-toast"),Zt(4,ti,1,2,"div",3,Ze),lt()),d&2){P();let t=bt(0),e=bt(1);H(2),ne(e[t].name),H(2),te(e)}}var Le=(()=>{class d{activePage=Ft();dashboards=Ft();visible=ut(!1);constructor(){F(()=>{let t=this.activePage();if(t==null){this.visible.set(!1);return}this.visible.set(!1),queueMicrotask(()=>this.visible.set(!0))})}static \u0275fac=function(e){return new(e||d)};static \u0275cmp=z({type:d,selectors:[["dashboard-scroller"]],inputs:{activePage:[1,"activePage"],dashboards:[1,"dashboards"]},decls:3,vars:3,consts:[[1,"page-scroll-title","page-scroll-container"],[1,"page-label"],[1,"page-scroll-page-number","page-scroll-container","fade-toast"],[1,"page-marker",3,"background-color"],[1,"page-marker"]],template:function(e,i){e&1&&(de(0)(1),A(2,ei,6,1)),e&2&&(Gt(i.activePage()),H(),Gt(i.dashboards()),H(),B(i.visible()?2:-1))},styles:["[_nghost-%COMP%]{pointer-events:none}.page-scroll-title[_ngcontent-%COMP%]{position:absolute;top:50%;right:54px;transform:translateY(-50%);z-index:100;cursor:default;text-align:center;padding:10px;color:var(--mat-sys-inverse-surface)}.page-scroll-page-number[_ngcontent-%COMP%]{position:absolute;top:50%;right:15px;transform:translateY(-50%);z-index:100;cursor:default;display:grid;padding:0}.page-scroll-container[_ngcontent-%COMP%]{opacity:0;background-color:var(--mat-sys-tertiary-fixed-dim);border-radius:10px;border:1px solid var(--mat-sys-inverse-surface)}.page-label[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface);text-shadow:1px 1px 0 var(--mat-sys-outline),-1px 1px 0 var(--mat-sys-outline),-1px -1px 0 var(--mat-sys-outline),1px -1px 0 var(--mat-sys-outline);font-size:x-large}.page-marker[_ngcontent-%COMP%]{height:20px;width:20px;margin:4px;border-radius:50%;border:1px solid var(--mat-sys-outline)}@keyframes _ngcontent-%COMP%_fadeInHoldFadeOut{0%{opacity:0}7.407%{opacity:1}25.926%{opacity:1}to{opacity:0}}.fade-toast[_ngcontent-%COMP%]{opacity:0;animation:_ngcontent-%COMP%_fadeInHoldFadeOut 1.35s linear forwards}"]})}return d})();function si(d,r){if(d&1){let t=L();m(0,"button",0),x("click",function(){D(t);let i=P();return k(i.clickAction("cancel"))}),m(1,"mat-icon",1),b(2,"close"),y(),m(3,"span"),b(4,"Close"),y()()}}var Ot=(()=>{class d{_bottomSheetRef=w(xt);data=w(ke);showCancel=!!(this.data&&this.data.showCancel);clickAction(t){this._bottomSheetRef.dismiss(t)}static \u0275fac=function(e){return new(e||d)};static \u0275cmp=z({type:d,selectors:[["widget-host-bottom-sheet"]],decls:22,vars:1,consts:[["mat-list-item","",3,"click"],["matListItemIcon",""],["mat-list-item",""]],template:function(e,i){e&1&&(m(0,"mat-action-list")(1,"button",0),x("click",function(){return i.clickAction("duplicate")}),m(2,"mat-icon",1),b(3,"add_to_photos"),y(),m(4,"span"),b(5,"Duplicate"),y()(),m(6,"button",0),x("click",function(){return i.clickAction("copy")}),m(7,"mat-icon",1),b(8,"content_copy"),y(),m(9,"span"),b(10,"Copy"),y()(),m(11,"button",0),x("click",function(){return i.clickAction("cut")}),m(12,"mat-icon",1),b(13,"content_cut"),y(),m(14,"span"),b(15,"Cut"),y()(),m(16,"button",0),x("click",function(){return i.clickAction("delete")}),m(17,"mat-icon",1),b(18,"delete_forever"),y(),m(19,"span"),b(20,"Delete"),y()(),A(21,si,5,0,"button",2),y()),e&2&&(H(21),B(i.showCancel?21:-1))},dependencies:[Rt,Dt,kt,Et,J,K],encapsulation:2})}return d})();var oi=["childOutlet"],Be=(()=>{class d extends Ht{widgetProperties;outlet;_dialog=w(Z);_dashboard=w(Q);_bottomSheet=w(tt);_streams=w(wt,{optional:!0});_meta=w(Ct,{optional:!0});_runtime=w(I,{optional:!0});_widgetService=w(De);_app=w(ve);theme=pe(this._app.cssThemeColorRoles$,{requireSync:!0});childRef;compType;_hasInitialized=!1;_sheetOpen=!1;_optionsOpen=!1;isDebugEnabled(){try{return typeof localStorage<"u"&&localStorage.getItem("kip:gesturesDebug")==="1"}catch(t){return!1}}debug(...t){this.isDebugEnabled()&&console.debug("[Host2]",...t)}constructor(){super(),F(()=>{let t=this._dashboard.layoutEditCanceled();!this._hasInitialized||!t||nt(()=>{this.reinitFromSavedConfig()})})}ngOnInit(){let t=this.widgetProperties.type;if(!t)return;this.compType=this._widgetService.getComponentType(t);let e=this.getDefaultConfig();this._runtime?.initialize?.(e,this.widgetProperties.config);let i=this._runtime?.options();i&&(this.widgetProperties.config=i),this._streams?.applyStreamsConfigDiff?.(i),this._meta?.applyMetaConfigDiff?.(i),this.outlet&&this.compType&&(this.childRef=this.outlet.createComponent(this.compType,{bindings:[gt("id",()=>this.widgetProperties.uuid),gt("type",()=>this.widgetProperties.type),gt("theme",this.theme)]})),this._hasInitialized=!0}serialize(){let t=this._runtime?.options();return t?this.widgetProperties.config=t:this.widgetProperties.config||(this.widgetProperties.config={}),{widgetProperties:this.widgetProperties}}applyRuntimeConfig(t){t&&this._runtime?.setRuntimeConfig?.(t);let e=this._runtime.options();e&&(this.widgetProperties.config=e),this._streams?.applyStreamsConfigDiff?.(e),this._meta?.applyMetaConfigDiff?.(e)}reinitFromSavedConfig(){try{let t=this.getSavedConfigForSelf(),e=this.getDefaultConfig();this._runtime?.initialize?.(e,W(t));let i=this._runtime?.options();i&&(this.widgetProperties.config=i),this._streams?.applyStreamsConfigDiff?.(i),this._meta?.applyMetaConfigDiff?.(i)}catch(t){}}getSavedConfigForSelf(){try{let t=this._dashboard.dashboards(),e=this._dashboard.activeDashboard(),o=(t?.[e]?.configuration??[]).find(n=>n?.id===this.widgetProperties.uuid);return o?.input?.widgetProperties?.config??o?.widgetProperties?.config??void 0}catch(t){return}}getDefaultConfig(){let t=this.compType&&this.compType.DEFAULT_CONFIG;if(!t&&this.compType&&this.outlet){let e=this.outlet.createComponent(this.compType);t=e.instance.defaultConfig,e.destroy()}return t}openWidgetOptions(t){if(t.stopPropagation(),this.debug("openWidgetOptions invoked",{widgetId:this.widgetProperties?.uuid,static:this._dashboard.isDashboardStatic()}),!this._dashboard.isDashboardStatic()){if(this._optionsOpen){this.debug("options already open; ignoring");return}if(this._optionsOpen=!0,!this.widgetProperties)return;this._dialog.openWidgetOptions({title:"Widget Options",config:this.widgetProperties.config,confirmBtnText:"Save",cancelBtnText:"Cancel"}).afterClosed().subscribe(e=>{this._optionsOpen=!1,e&&(this.debug("options saved",{widgetId:this.widgetProperties?.uuid}),this.applyRuntimeConfig(e))})}}openBottomSheet(t){if(t.stopPropagation(),this.debug("openBottomSheet invoked",{widgetId:this.widgetProperties?.uuid,static:this._dashboard.isDashboardStatic()}),!this._dashboard.isDashboardStatic()){if(this._sheetOpen){this.debug("sheet already open; ignoring");return}this._sheetOpen=!0;let e=typeof navigator<"u"&&/Linux/.test(navigator.platform)&&/Firefox/.test(navigator.userAgent);this._bottomSheet.open(Ot,e?{disableClose:!0,data:{showCancel:!0}}:{}).afterDismissed().subscribe(s=>{switch(this._sheetOpen=!1,this.debug("bottom sheet dismissed",{widgetId:this.widgetProperties?.uuid,action:s}),s){case"delete":this._dashboard.deleteWidget(this.widgetProperties.uuid);break;case"duplicate":this._dashboard.duplicateWidget(this.widgetProperties.uuid);break;case"copy":this._dashboard.copyWidget(this.widgetProperties.uuid);break;case"cut":this._dashboard.cutWidget(this.widgetProperties.uuid);break;default:break}})}}static \u0275fac=function(e){return new(e||d)};static \u0275cmp=z({type:d,selectors:[["widget-host2"]],viewQuery:function(e,i){if(e&1&&ht(oi,7,dt),e&2){let s;j(s=$())&&(i.outlet=s.first)}},inputs:{widgetProperties:"widgetProperties"},features:[pt([wt,Ct,I]),ft],decls:3,vars:2,consts:[["childOutlet",""],["kipGestures","","mode","press","appearance","raised",1,"widget-container","kip-widget-card-colors",3,"doubletap","press"]],template:function(e,i){if(e&1){let s=L();m(0,"mat-card",1),x("doubletap",function(n){return D(s),k(i.openWidgetOptions(n))})("press",function(n){return D(s),k(i.openBottomSheet(n))}),ie(1,null,0),y()}e&2&&yt("border",i._dashboard.isDashboardStatic()?"1px dashed transparent":"1px dashed var(--mat-sys-outline)")},dependencies:[Ce,we,Re,X],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:block;overflow:hidden}.widget-container[_ngcontent-%COMP%]{display:block;width:100%;height:100%;margin:0;padding:0}.kip-widget-card-colors[_ngcontent-%COMP%]{background-color:var(--kip-widget-card-background-color)}"],changeDetection:0})}return d})();function ni(d,r){if(d&1){let t=L();m(0,"div",2),x("doubletap",function(i){D(t);let s=P();return k(s.openWidgetOptions(i))})("press",function(i){D(t);let s=P();return k(s.openBottomSheet(i))}),y()}}var We=(()=>{class d extends Ht{widgetProperties;dashboard=w(Q);_dialog=w(Z);_bottomSheet=w(tt);runtime=w(I);static DEFAULT_CONFIG={displayName:"Gauge Label",color:"contrast"};_sheetOpen=!1;_optionsOpen=!1;constructor(){super()}ngOnInit(){this.runtime?.initialize?.(d.DEFAULT_CONFIG,this.widgetProperties.config)}serialize(){let t=this.runtime?.options();return t?this.widgetProperties.config=t:this.widgetProperties.config||(this.widgetProperties.config={}),{widgetProperties:this.widgetProperties}}openWidgetOptions(t){if(t.stopPropagation(),!this.dashboard.isDashboardStatic()){if(this._optionsOpen)return;this._optionsOpen=!0,this._dialog.openWidgetOptions({title:"Widget Options",config:W(this.runtime.options()),confirmBtnText:"Save",cancelBtnText:"Cancel"}).afterClosed().subscribe(e=>{this._optionsOpen=!1,e&&this.runtime.setRuntimeConfig(e)})}}openBottomSheet(t){if(t.stopPropagation(),!this.dashboard.isDashboardStatic()){if(this._sheetOpen)return;this._sheetOpen=!0;let e=typeof navigator<"u"&&/Linux/.test(navigator.platform)&&/Firefox/.test(navigator.userAgent);this._bottomSheet.open(Ot,e?{disableClose:!0,data:{showCancel:!0}}:{}).afterDismissed().subscribe(s=>{this._sheetOpen=!1,s==="delete"&&this.dashboard.deleteWidget(this.widgetProperties.uuid)})}}static \u0275fac=function(e){return new(e||d)};static \u0275cmp=z({type:d,selectors:[["group-widget"]],inputs:{widgetProperties:"widgetProperties"},features:[pt([I]),ft],decls:2,vars:3,consts:[[3,"text","color"],["kipGestures","","mode","press",1,"widgetOverlay"],["kipGestures","","mode","press",1,"widgetOverlay",3,"doubletap","press"]],template:function(e,i){e&1&&(mt(0,"widget-title",0),A(1,ni,1,0,"div",1)),e&2&&(V("text",i.runtime.options().displayName)("color",i.runtime.options().color),H(),B(i.dashboard.isDashboardStatic()?-1:1))},dependencies:[Ee,X],styles:["[_nghost-%COMP%]{display:block;height:15%}.widgetOverlay[_ngcontent-%COMP%]{position:absolute;width:100%;height:15%;right:0;top:0;color:transparent;z-index:21}"],changeDetection:0})}return d})();var Ie=(()=>{class d{_bottomSheetRef=w(xt);clickAction(t){this._bottomSheetRef.dismiss(t)}static \u0275fac=function(e){return new(e||d)};static \u0275cmp=z({type:d,selectors:[["dashboard-clipboard-bottom-sheet"]],decls:20,vars:0,consts:[["mat-subheader",""],["mat-list-item","",3,"click"],["matListItemIcon",""]],template:function(e,i){e&1&&(m(0,"mat-action-list")(1,"div",0),b(2,"Clipboard"),y(),m(3,"button",1),x("click",function(){return i.clickAction("paste")}),m(4,"mat-icon",2),b(5,"content_paste"),y(),m(6,"span"),b(7,"Paste"),y()(),m(8,"button",1),x("click",function(){return i.clickAction("clear")}),m(9,"mat-icon",2),b(10,"clear"),y(),m(11,"span"),b(12,"Clear"),y()(),m(13,"div",0),b(14,"New Widget"),y(),m(15,"button",1),x("click",function(){return i.clickAction("add")}),m(16,"mat-icon",2),b(17,"add_circle"),y(),m(18,"span"),b(19,"Add"),y()()())},dependencies:[Rt,Dt,kt,Et,Se,J,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}return d})();var ai=["grid"];function di(d,r){d&1&&(m(0,"p",9)(1,"strong"),b(2,"Long press/click and hold anywhere"),y(),b(3," to add widgets"),y(),m(4,"mat-icon",10),b(5,"touch_app"),y())}function li(d,r){if(d&1){let t=L();m(0,"p",9),b(1,"This empty dashboard is ready to be customized."),y(),m(2,"button",11),x("click",function(){D(t);let i=P();return k(i.editDashboard())}),m(3,"mat-icon"),b(4,"lock_open"),y(),b(5," Unlock and Customize "),y()}}function hi(d,r){if(d&1){let t=L();m(0,"div",7)(1,"button",12),x("click",function(){D(t);let i=P();return k(i.cancelLayoutChanges())}),m(2,"mat-icon"),b(3,"close"),y()(),m(4,"button",13),x("click",function(){D(t);let i=P();return k(i.saveLayoutChanges())}),m(5,"mat-icon"),b(6,"done"),y()()()}}function ci(d,r){if(d&1&&mt(0,"dashboard-scroller",8),d&2){let t=P();V("activePage",t.dashboard.activeDashboard())("dashboards",t.dashboard.dashboards())}}var Kr=(()=>{class d{toast=w(be);_dialog=w(Z);_bottomSheet=w(tt);dashboard=w(Q);_destroyRef=w(Xt);_uiEvent=w(ze);_dataset=w(xe);_router=w(fe);_hostEl=w(at);isDashboardStatic=le(()=>this.dashboard.isDashboardStatic());_gridstack=he.required("grid");_previousIsStaticState=!0;_suppressDrag=!1;subGridOptions={cellHeight:"auto",column:"auto",acceptWidgets:!0,subGridDynamic:!1,class:"group-container"};gridOptions=ut({column:24,row:24,margin:4,float:!0,resizable:{handles:"all"},acceptWidgets:!0,subGridDynamic:!1,subGridOpts:this.subGridOptions,children:[]});_boundHandleKeyDown=this.handleKeyDown.bind(this);_resizeObserver;_pendingResizeRaf=null;_lastContainerHeight=0;_lastCellHeight=0;_addDialogOpen=!1;_clipboardSheetOpen=!1;constructor(){ct.addComponentToSelectorType([Be,We]),F(()=>{let t=this.dashboard.isDashboardStatic();nt(()=>{if(this._previousIsStaticState!==t){this._previousIsStaticState=t;try{this._gridstack().grid.setStatic(t)}catch(e){}}})}),F(()=>{let t=this.dashboard.activeDashboard();nt(()=>{this.loadDashboard(t)})})}ngAfterViewInit(){this._gridstack().grid?.setStatic(this._previousIsStaticState),this.resizeGridColumns(),this.setupResizeObserver(),this._uiEvent.addHotkeyListener(this._boundHandleKeyDown,{ctrlKey:!0,keys:["arrowdown","arrowup"]});try{let t=this._gridstack().grid;t&&typeof t.on=="function"&&(t.on("dragstart",()=>{this._uiEvent.isDragging.set(!0)}),t.on("dragstop",()=>{setTimeout(()=>this._uiEvent.isDragging.set(!1),0)}),t.on("resizestart",()=>{this._uiEvent.isDragging.set(!0)}),t.on("resizestop",()=>{setTimeout(()=>this._uiEvent.isDragging.set(!1),0)}))}catch(t){}this.dashboard.widgetAction$.pipe(ge(this._destroyRef)).subscribe(t=>{t&&this._gridstack().grid.getGridItems().forEach(e=>{if(e.gridstackNode.id===t.id)switch(t.operation){case"delete":this.deleteWidget(e);break;case"duplicate":this.duplicateWidget(e);break;case"copy":this.dashboard.setWidgetClipboardFromNode(e.gridstackNode);break;case"cut":this.dashboard.setWidgetClipboardFromNode(e.gridstackNode),this.deleteWidget(e);break;default:break}})})}setupResizeObserver(){if(this._resizeObserver)return;let t=this._hostEl.nativeElement;try{this._resizeObserver=new ResizeObserver(()=>{this._pendingResizeRaf===null&&(this._pendingResizeRaf=requestAnimationFrame(()=>{this._pendingResizeRaf=null,this.resizeGridColumns()}))}),this._resizeObserver.observe(t)}catch(e){}}handleKeyDown(t){t==="arrowdown"?this.previousDashboard():t==="arrowup"&&this.nextDashboard()}resizeGridColumns(){try{let e=this._gridstack().grid;if(!e)return;let i=e,s=this._hostEl.nativeElement.clientHeight||window.innerHeight;if(s===this._lastContainerHeight&&this._lastCellHeight>0)return;let o=i.getRow?i.getRow():0;if(o>0&&i.cellHeight){let n=Number(o)||0,a=n>0?s/n:1;if(a=Math.max(1,Math.round(a*100)/100),this._lastCellHeight===a&&this._lastContainerHeight===s)return;i.cellHeight(a),i.batchUpdate&&(i.batchUpdate(),i.batchUpdate(!1)),this._lastContainerHeight=s,this._lastCellHeight=a}}catch(t){}}loadDashboard(t){let e=W(this.dashboard.dashboards()[t]),i=this._gridstack();if(!i?.grid){queueMicrotask(()=>this.loadDashboard(t));return}i.grid.batchUpdate(),i.grid.load(e.configuration),i.grid.batchUpdate(!1)}saveDashboard(){let t=this._gridstack().grid.save(!1,!1)||null;this.dashboard.updateConfiguration(this.dashboard.activeDashboard(),t)}saveLayoutChanges(){this.dashboard.setStaticDashboard(!0),this.saveDashboard(),this.dashboard.notifyLayoutEditSaved()}cancelLayoutChanges(){this.loadDashboard(this.dashboard.activeDashboard()),this.dashboard.setStaticDashboard(!0),this.dashboard.notifyLayoutEditCanceled()}addNewWidget(t){if(!this.dashboard.isDashboardStatic()&&t.detail!==void 0){if(this._addDialogOpen||this._clipboardSheetOpen)return;let e=t.detail||{},i=e.center?.x??e.x??0,s=e.center?.y??e.y??0,o=this._gridstack().grid.getCellFromPixel({left:i,top:s});if(this._gridstack().grid.isAreaEmpty(o.x,o.y,1,2)){if(this.dashboard.widgetClipboard()){this.openClipboardBottomSheet(o.x,o.y);return}this.openAddWidgetDialog(o.x,o.y)}else this.toast.show("Not enough free space at the selected location to add a widget. Please reorganize the dashboard to free up space or try a larger empty area.",0,!1,null,"error")}}openClipboardBottomSheet(t,e){if(this._clipboardSheetOpen)return;this._clipboardSheetOpen=!0,this._bottomSheet.open(Ie).afterDismissed().subscribe(s=>{switch(this._clipboardSheetOpen=!1,s){case"paste":this.pasteCopiedWidget(t,e);break;case"clear":this.dashboard.clearWidgetClipboard();break;case"add":this.openAddWidgetDialog(t,e);break;default:break}})}openAddWidgetDialog(t,e){this._addDialogOpen=!0,this._dialog.openFrameDialog({title:"Add Widget",component:"select-widget"},!0).pipe(jt(()=>{this._addDialogOpen=!1})).subscribe(i=>{if(!i||typeof i!="object")return;let s=i,o=vt.create(),n={};s.selector==="group-widget"?n={x:t,y:e,w:3,h:4,id:o,selector:"group-widget",input:{widgetProperties:{type:s.selector,uuid:o,config:{displayName:"Group Widget",color:"contrast"}}},subGridOpts:{children:[]}}:n={x:t,y:e,w:s.defaultWidth,h:s.defaultHeight,minW:s.minWidth,minH:s.minHeight,id:o,selector:"widget-host2",input:{widgetProperties:{type:s.selector,uuid:o}}};let a=this._gridstack().grid,u=Number(s.minWidth??1),c=Number(s.minHeight??2),l=Number(s.defaultWidth??u),g=Number(s.defaultHeight??c);if(!(a.isAreaEmpty(t,e,l,g)&&a.willItFit({x:t,y:e,w:l,h:g}))){let C=this.findBestWidgetSizeAtCell(a,t,e,u,c,l,g);if(!C){this.toast.show(`Not enough free space to add ${s.name} widget at the selected location. Please reorganize the dashboard to free up space or try a larger empty area.`,0,!1,null,"error");return}n.w=C.w,n.h=C.h}let v=this._gridstack().grid.addWidget(n);v.gridstackNode.subGrid&&(v.gridstackNode.subGridOpts.row=v.gridstackNode.subGridOpts.minRow=v.gridstackNode.subGridOpts.maxRow=v.gridstackNode.h)})}findBestWidgetSizeAtCell(t,e,i,s,o,n,a){let u=Math.max(1,Math.floor(s)),c=Math.max(1,Math.floor(o)),l=Math.max(u,Math.floor(n)),g=Math.max(c,Math.floor(a)),p=null;for(let v=u;v<=l;v++)for(let C=c;C<=g;C++){if(!t.isAreaEmpty(e,i,v,C)||!t.willItFit({x:e,y:i,w:v,h:C}))continue;let T=v*C;(!p||T>p.area||T===p.area&&C>p.h||T===p.area&&C===p.h&&v>p.w)&&(p={w:v,h:C,area:T})}return p?{w:p.w,h:p.h}:null}cancelPointerSequence(){if(!this._suppressDrag){this._suppressDrag=!0;try{this._gridstack().grid.setStatic(!0)}catch(t){}["pointerup","mouseup","touchend"].forEach(t=>{document.dispatchEvent(new Event(t,{bubbles:!0}))})}}onPointerRelease(){if(this._suppressDrag&&(this._suppressDrag=!1,!this.dashboard.isDashboardStatic()))try{this._gridstack().grid.setStatic(!1)}catch(t){}}duplicateWidget(t){let e=vt.create(),i=t.gridstackNode,s={w:i.w,h:i.h,id:e,selector:i.selector,input:{widgetProperties:{type:i.input.widgetProperties.type,uuid:e,config:W(i.input.widgetProperties.config)}}},o=this._gridstack();o.grid.willItFit(s)?o.grid.addWidget(s):(s.h=2,s.w=1,o.grid.willItFit(s)?o.grid.addWidget(s):this.toast.show("Insufficient space on the dashboard. Please reorganize to free up space.",0,!1,null,"error"))}pasteCopiedWidget(t,e){if(this.dashboard.isDashboardStatic())return;let i=this.dashboard.widgetClipboard(),s=i?.input?.widgetProperties;if(!i||!s?.type)return;let o=vt.create(),n={w:i.w,h:i.h,id:o,selector:i.selector,input:{widgetProperties:{type:s.type,uuid:o,config:W(s.config)}}};typeof t=="number"&&typeof e=="number"&&(n.x=t,n.y=e);let a=this._gridstack();a.grid.willItFit(n)?(a.grid.addWidget(n),this.dashboard.clearWidgetClipboard()):(n.h=2,n.w=1,a.grid.willItFit(n)?(a.grid.addWidget(n),this.dashboard.clearWidgetClipboard()):this.toast.show("Insufficient space on the dashboard. Please reorganize to free up space.",0,!1,null,"error"))}deleteWidget(t){let e=t.gridstackNode;switch(this._gridstack().grid.removeWidget(t),e.selector){case"widget-numeric-chart":case"widget-windtrends-chart":{(this._dataset.list()?.filter(o=>o.uuid===e.id||o.uuid?.startsWith(`${e.id}-`))||[]).forEach(o=>this._dataset.remove(o.uuid));break}}}nextDashboard(){this.dashboard.isDashboardStatic()&&this.dashboard.navigateToNextDashboard()}previousDashboard(){this.dashboard.isDashboardStatic()&&this.dashboard.navigateToPreviousDashboard()}editDashboard(){this.dashboard.isDashboardStatic.set(!1)}navigateToHelp(){this._router.navigate(["/help"])}ngOnDestroy(){let t=this._gridstack();if(t?.grid&&(t.grid.offAll(),t.grid.destroy()),this._resizeObserver){try{this._resizeObserver.disconnect()}catch(e){}this._resizeObserver=void 0}this._pendingResizeRaf!==null&&(cancelAnimationFrame(this._pendingResizeRaf),this._pendingResizeRaf=null),this._uiEvent.removeHotkeyListener(this._boundHandleKeyDown)}static \u0275fac=function(e){return new(e||d)};static \u0275cmp=z({type:d,selectors:[["dashboard"]],viewQuery:function(e,i){e&1&&re(i._gridstack,ai,5),e&2&&oe()},hostBindings:function(e,i){e&1&&x("mouseup",function(){return i.onPointerRelease()},At)("touchend",function(){return i.onPointerRelease()},At)},decls:16,vars:6,consts:[["grid",""],["kipGestures","",3,"swipeup","swipedown","press","resize","mode","enablePress","enableDoubleTap","options"],["empty-content","",1,"dashboard-empty-state-container"],[1,"dashboard-empty-state-action"],[1,"empty-state-icon"],[1,"empty-state-help"],["mat-button","",1,"empty-state-help-button",3,"click"],[1,"edit-layout-close-icon"],[3,"activePage","dashboards"],[1,"empty-state-text"],[1,"touch-icon"],["mat-flat-button","",1,"empty-state-button",3,"click"],["mat-fab","",1,"cancel",2,"margin-right","10px",3,"click"],["mat-fab","",1,"save",3,"click"]],template:function(e,i){if(e&1){let s=L();m(0,"gridstack",1,0),x("swipeup",function(){return D(s),k(i.previousDashboard())})("swipedown",function(){return D(s),k(i.nextDashboard())})("press",function(n){return D(s),k(i.addNewWidget(n))})("resize",function(){return D(s),k(i.resizeGridColumns())},Qt),m(2,"div",2)(3,"div",3)(4,"mat-icon",4),b(5,"dashboard"),y(),A(6,di,6,0)(7,li,6,0),y(),m(8,"div")(9,"div",5)(10,"button",6),x("click",function(){return D(s),k(i.navigateToHelp())}),m(11,"mat-icon"),b(12,"help"),y(),b(13," Get Help "),y()()()()(),A(14,hi,7,0,"div",7)(15,ci,1,2,"dashboard-scroller",8)}if(e&2){let s=i.dashboard.isDashboardStatic();V("mode",s?"dashboard":"editor")("enablePress",!s)("enableDoubleTap",!1)("options",i.gridOptions()),H(6),B(s?7:6),H(8),B(s?15:14)}},dependencies:[ct,Le,J,K,ye,me,_e,X],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;height:100%;width:100%;overflow:hidden}.grid-stack[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;position:relative} .grid-stack-sub-grid{border:1px solid var(--mat-sys-outline);border-radius:8px} .grid-stack-sub-grid div{display:flex;flex-direction:column} .grid-stack-sub-grid div .grid-stack{flex:1 1 auto;min-height:500px}.edit-layout-close-icon[_ngcontent-%COMP%]{position:absolute;bottom:20px;right:20px;cursor:pointer;z-index:100}.cancel[_ngcontent-%COMP%]{--mat-fab-container-color: var(--mat-sys-primary);--mat-fab-foreground-color: var(--mat-sys-background)}.save[_ngcontent-%COMP%]{--mat-fab-container-color: var(--mat-sys-primary-fixed);--mat-fab-foreground-color: var(--mat-sys-background)}.dashboard-empty-state-container[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:space-around;padding:1.5rem;text-align:center;box-sizing:border-box;overflow:hidden;pointer-events:auto}@media(orientation:landscape)and (max-height:420px){.dashboard-empty-state-container[_ngcontent-%COMP%]{padding:.75rem}.empty-state-icon[_ngcontent-%COMP%]{font-size:3.25rem;width:3.25rem;height:3.25rem}}.dashboard-empty-state-action[_ngcontent-%COMP%]{max-width:500px;color:var(--mat-sys-outline-variant)}.dashboard-empty-state-action[_ngcontent-%COMP%] .touch-icon[_ngcontent-%COMP%]{font-size:2rem;width:2rem;height:2rem;color:var(--mat-sys-outline-variant);margin-top:.5rem;animation:_ngcontent-%COMP%_bounce 2s infinite}.empty-state-icon[_ngcontent-%COMP%]{font-size:4rem;width:4rem;height:4rem;color:var(--mat-sys-outline-variant);margin-bottom:1rem}.empty-state-button[_ngcontent-%COMP%]{--mat-button-filled-label-text-color: var(--kip-widget-card-background-color);--mat-button-filled-container-color: var(--mat-sys-outline-variant);--mat-button-filled-hover-state-layer-opacity: .7;--mat-button-filled-state-layer-color: var(--mat-sys-primary-fixed-dim)}.empty-state-help-button[_ngcontent-%COMP%]{--mat-button-text-label-text-color: var(--mat-sys-outline-variant);--mat-button-text-hover-state-layer-opacity: .7;--mat-button-text-state-layer-color: var(--mat-sys-primary-fixed-dim)}.empty-state-text[_ngcontent-%COMP%]{color:var(--mat-sys-outline-variant);font-style:italic}@keyframes _ngcontent-%COMP%_bounce{0%,20%,50%,80%,to{transform:translateY(0)}40%{transform:translateY(-10px)}60%{transform:translateY(-5px)}}"]})}return d})();export{Kr as a};