@luzmo/analytics-components-kit 1.0.1-alpha.52 → 1.0.1-alpha.54

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 (141) hide show
  1. package/components/{de-Cxe7xkT4.cjs → de-BimXztr7.cjs} +1 -1
  2. package/components/{de-ZPzjN2kc.js → de-Ca_gJecj.js} +0 -1
  3. package/components/display-settings/display-settings.d.ts +1 -0
  4. package/components/display-settings/index.cjs +1 -1
  5. package/components/display-settings/index.js +1 -1
  6. package/components/display-settings-binning/index.cjs +1 -1
  7. package/components/display-settings-binning/index.js +2 -2
  8. package/components/display-settings-datetime/display-settings-datetime.d.ts +1 -1
  9. package/components/display-settings-datetime/index.cjs +43 -56
  10. package/components/display-settings-datetime/index.js +81 -95
  11. package/components/display-settings-grand-totals/index.cjs +1 -1
  12. package/components/display-settings-grand-totals/index.js +2 -2
  13. package/components/display-settings-numeric/index.cjs +19 -19
  14. package/components/display-settings-numeric/index.js +84 -84
  15. package/components/display-settings-period-over-period/index.cjs +1 -1
  16. package/components/display-settings-period-over-period/index.js +2 -2
  17. package/components/draggable-data-item/index.cjs +1 -1
  18. package/components/draggable-data-item/index.js +3 -3
  19. package/components/draggable-data-item-level/index.cjs +1 -1
  20. package/components/draggable-data-item-level/index.js +1 -1
  21. package/components/droppable-slot/index.cjs +2 -2
  22. package/components/droppable-slot/index.js +4 -4
  23. package/components/edit-item/index.cjs +2 -2
  24. package/components/edit-item/index.js +6 -4
  25. package/components/edit-option/index.cjs +1 -1
  26. package/components/edit-option/index.js +1 -1
  27. package/components/{en-GB-BtLbN8o_.js → en-GB-UzDYaNfY.js} +1 -1
  28. package/components/{en-GB-Dd11ROdW.cjs → en-GB-cN3S24Cg.cjs} +1 -1
  29. package/components/{es-C0JGlz18.js → es-BHAnPxmj.js} +0 -1
  30. package/components/{es-4dEouIgb.cjs → es-CDzU1gsd.cjs} +1 -1
  31. package/components/filter-data-item-picker/index.cjs +1 -1
  32. package/components/filter-data-item-picker/index.js +2 -2
  33. package/components/filter-expression-picker/index.cjs +1 -1
  34. package/components/filter-expression-picker/index.js +1 -1
  35. package/components/filter-item/index.cjs +1 -1
  36. package/components/filter-item/index.js +3 -3
  37. package/components/filter-value-picker/index.cjs +1 -1
  38. package/components/filter-value-picker/index.js +1 -1
  39. package/components/filter-value-picker-datetime/index.cjs +1 -1
  40. package/components/filter-value-picker-datetime/index.js +2 -2
  41. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  42. package/components/filter-value-picker-hierarchy/index.js +2 -2
  43. package/components/filter-value-picker-numeric/index.cjs +1 -1
  44. package/components/filter-value-picker-numeric/index.js +2 -2
  45. package/components/{formatter-CQDms6fU.js → formatter-CqU9_98M.js} +1 -0
  46. package/components/{formatter-DiJYkB6b.cjs → formatter-Lo9PMcxy.cjs} +1 -1
  47. package/components/{fr-B_-_f-VN.js → fr-CKHxPDre.js} +0 -1
  48. package/components/{fr-Dwulhlbi.cjs → fr-s3wNsLiB.cjs} +1 -1
  49. package/components/grid/index.cjs +1 -1
  50. package/components/grid/index.js +2 -2
  51. package/components/{heat-map-options.config-DQya-lag.js → heat-map-options.config-BnLWe8jS.js} +16 -14
  52. package/components/heat-map-options.config-DVH-Bb5-.cjs +20 -0
  53. package/components/index-BF9-Mgs_.cjs +249 -0
  54. package/components/{index-5Z9GD60H.js → index-CZ0HI7ep.js} +2 -2
  55. package/components/index-D05oY5ND.cjs +178 -0
  56. package/components/{index-Df-_TbOD.cjs → index-D4JNE3zI.cjs} +1 -1
  57. package/components/{index-fmbD10nN.js → index-DV63kOPg.js} +269 -242
  58. package/components/{index-BPVXrhaX.js → index-KFE-WtKZ.js} +5 -3
  59. package/components/index.cjs +1 -1
  60. package/components/index.js +4 -4
  61. package/components/item-context-configs.cjs +225 -0
  62. package/components/item-context-configs.js +1013 -0
  63. package/components/item-options-configs.cjs +20 -0
  64. package/components/item-options-configs.js +109 -0
  65. package/components/{localized-decorator-DIXYZ3RL.cjs → localized-decorator-CIHsaT2_.cjs} +1 -1
  66. package/components/{localized-decorator-Bl5gcI6n.js → localized-decorator-Di4TdvRQ.js} +1 -1
  67. package/components/{marker-map-options.config-CYoq89Oz.js → marker-map-options.config-DPJ955tt.js} +1 -1
  68. package/components/{marker-map-options.config-_XFv5XWK.cjs → marker-map-options.config-_FYZzRwA.cjs} +1 -1
  69. package/components/{nl-gdQCG4WV.js → nl-CMVty5rf.js} +0 -1
  70. package/components/{nl-DxdBIXDd.cjs → nl-DHgf0PUG.cjs} +1 -1
  71. package/components/{periods.const-7sXlqgEo.cjs → periods.const-CTd6Hskz.cjs} +1 -1
  72. package/components/{periods.const-B7FKokcH.js → periods.const-D77iT3rK.js} +1 -1
  73. package/components/{set-locale-DCPlazsZ.cjs → set-locale-CSL8WaxL.cjs} +1 -1
  74. package/components/{set-locale-GI34z_M7.js → set-locale-CW9yA503.js} +1 -1
  75. package/components/slot-contents-picker/index.cjs +1 -1
  76. package/components/slot-contents-picker/index.js +3 -3
  77. package/components/slot-menu/index.cjs +8 -8
  78. package/components/slot-menu/index.js +88 -76
  79. package/components/slot-menu-list/index.cjs +1 -1
  80. package/components/slot-menu-list/index.js +9 -10
  81. package/components/{symbol-map-options.config-Bj-UuL9m.js → symbol-map-options.config-DdDA4aa7.js} +1 -1
  82. package/components/{symbol-map-options.config-sdPlHspI.cjs → symbol-map-options.config-m-lwLTtu.cjs} +1 -1
  83. package/components/utils.cjs +1 -1
  84. package/components/utils.js +1 -1
  85. package/components/venn-diagram-options.config-CGUMA930.js +23 -0
  86. package/components/venn-diagram-options.config-mPXMR1CE.cjs +20 -0
  87. package/custom-elements.json +6 -0
  88. package/item-definitions/area-chart/area-chart-context.config.d.ts +20 -0
  89. package/item-definitions/bar-chart/bar-chart-context.config.d.ts +20 -0
  90. package/item-definitions/box-plot/box-plot-context.config.d.ts +17 -0
  91. package/item-definitions/bubble-chart/bubble-chart-context.config.d.ts +20 -0
  92. package/item-definitions/bullet-chart/bullet-chart-context.config.d.ts +20 -0
  93. package/item-definitions/choropleth-map/choropleth-map-context.config.d.ts +20 -0
  94. package/item-definitions/circle-pack-chart/circle-pack-chart-context.config.d.ts +17 -0
  95. package/item-definitions/circular-gauge/circular-gauge-context.config.d.ts +17 -0
  96. package/item-definitions/circular-gauge/circular-gauge-options.config.d.ts +1 -1
  97. package/item-definitions/column-chart/column-chart-context.config.d.ts +20 -0
  98. package/item-definitions/combination-chart/combination-chart-context.config.d.ts +17 -0
  99. package/item-definitions/conditional-number/conditional-number-context.config.d.ts +17 -0
  100. package/item-definitions/context-helpers.d.ts +2 -0
  101. package/item-definitions/date-filter/date-filter-context.config.d.ts +14 -0
  102. package/item-definitions/donut-chart/donut-chart-context.config.d.ts +17 -0
  103. package/item-definitions/dropdown-filter/dropdown-filter-context.config.d.ts +14 -0
  104. package/item-definitions/evolution-number/evolution-number-context.config.d.ts +17 -0
  105. package/item-definitions/funnel-chart/funnel-chart-context.config.d.ts +17 -0
  106. package/item-definitions/heat-map/heat-map-context.config.d.ts +17 -0
  107. package/item-definitions/heat-table/heat-table-context.config.d.ts +20 -0
  108. package/item-definitions/hexbin-map/hexbin-map-context.config.d.ts +17 -0
  109. package/item-definitions/image/image-context.config.d.ts +10 -0
  110. package/item-definitions/item-context.config.d.ts +44 -0
  111. package/item-definitions/item-options.config.d.ts +44 -0
  112. package/item-definitions/line-chart/line-chart-context.config.d.ts +20 -0
  113. package/item-definitions/marker-map/marker-map-context.config.d.ts +17 -0
  114. package/item-definitions/ohlc-chart/ohlc-chart-context.config.d.ts +26 -0
  115. package/item-definitions/parallel-coordinates-plot/parallel-coordinates-plot-context.config.d.ts +17 -0
  116. package/item-definitions/pivot-table/pivot-table-context.config.d.ts +20 -0
  117. package/item-definitions/pyramid-chart/pyramid-chart-context.config.d.ts +20 -0
  118. package/item-definitions/radar-chart/radar-chart-context.config.d.ts +20 -0
  119. package/item-definitions/regular-table/regular-table-context.config.d.ts +14 -0
  120. package/item-definitions/route-map/route-map-context.config.d.ts +23 -0
  121. package/item-definitions/sankey-diagram/sankey-diagram-context.config.d.ts +19 -0
  122. package/item-definitions/scatter-plot/scatter-plot-context.config.d.ts +26 -0
  123. package/item-definitions/search-filter/search-filter-context.config.d.ts +14 -0
  124. package/item-definitions/slicer-filter/slicer-filter-context.config.d.ts +17 -0
  125. package/item-definitions/slider-filter/slider-filter-context.config.d.ts +14 -0
  126. package/item-definitions/spacer/spacer-context.config.d.ts +10 -0
  127. package/item-definitions/speedometer-chart/speedometer-chart-context.config.d.ts +17 -0
  128. package/item-definitions/spike-map/spike-map-context.config.d.ts +20 -0
  129. package/item-definitions/strip-plot/strip-plot-context.config.d.ts +17 -0
  130. package/item-definitions/sunburst-chart/sunburst-chart-context.config.d.ts +17 -0
  131. package/item-definitions/symbol-map/symbol-map-context.config.d.ts +20 -0
  132. package/item-definitions/text/text-context.config.d.ts +10 -0
  133. package/item-definitions/treemap-chart/treemap-chart-context.config.d.ts +20 -0
  134. package/item-definitions/venn-diagram/venn-diagram-context.config.d.ts +20 -0
  135. package/item-definitions/venn-diagram/venn-diagram-options.config.d.ts +2 -0
  136. package/item-definitions/video/video-context.config.d.ts +10 -0
  137. package/item-definitions/wordcloud-chart/wordcloud-chart-context.config.d.ts +20 -0
  138. package/package.json +11 -1
  139. package/components/heat-map-options.config-BQ-Afrbi.cjs +0 -20
  140. package/components/index-3X8Iuo7y.cjs +0 -174
  141. package/components/index-CSfR7FMV.cjs +0 -249
@@ -17,7 +17,7 @@
17
17
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
18
  * SOFTWARE.
19
19
  * */
20
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../property-Cu4Q1hS4.cjs"),Ee=require("../state-fyl3IYMu.cjs"),Ge=require("../query-D5qWDopr.cjs"),Je=require("../directive-BOOaQO_r.cjs"),ie=require("../luzmo-icons-DonyjSXg.cjs");require("../index-Dy_5M3M5.cjs");require("../index-CnP-Q5Bw.cjs");require("../index-DSQyBS9Z.cjs");const Yt=require("../base-D76d76ww-tT6yr8eb.cjs");require("../focusable-BxtpnzWp-CkK9AeMt.cjs");const vt=require("../color-B6LaL8qz.cjs"),pi=require("../query-all-CR2wWKRD.cjs"),yi=require("../item-list.cjs"),Qe=require("../index-Vdyb9z2D.cjs"),K=require("../set-locale-DCPlazsZ.cjs"),bi=require("../localized-decorator-DIXYZ3RL.cjs");require("../index-CYeQkVeJ.cjs");const rt=Math.min,fe=Math.max,Ne=Math.round,Le=Math.floor,X=s=>({x:s,y:s}),vi={left:"right",right:"left",bottom:"top",top:"bottom"},wi={start:"end",end:"start"};function ct(s,e){return typeof s=="function"?s(e):s}function we(s){return s.split("-")[0]}function Ve(s){return s.split("-")[1]}function _i(s){return s==="x"?"y":"x"}function Xt(s){return s==="y"?"height":"width"}function ce(s){return["top","bottom"].includes(we(s))?"y":"x"}function Jt(s){return _i(ce(s))}function Ei(s,e,t){t===void 0&&(t=!1);const i=Ve(s),r=Jt(s),o=Xt(r);let n=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(n=Oe(n)),[n,Oe(n)]}function xi(s){const e=Oe(s);return[ot(s),e,ot(e)]}function ot(s){return s.replace(/start|end/g,e=>wi[e])}function zi(s,e,t){const i=["left","right"],r=["right","left"],o=["top","bottom"],n=["bottom","top"];switch(s){case"top":case"bottom":return t?e?r:i:e?i:r;case"left":case"right":return e?o:n;default:return[]}}function ki(s,e,t,i){const r=Ve(s);let o=zi(we(s),t==="start",i);return r&&(o=o.map(n=>n+"-"+r),e&&(o=o.concat(o.map(ot)))),o}function Oe(s){return s.replace(/left|right|bottom|top/g,e=>vi[e])}function Ri(s){return{top:0,right:0,bottom:0,left:0,...s}}function Si(s){return typeof s!="number"?Ri(s):{top:s,right:s,bottom:s,left:s}}function Pe(s){const{x:e,y:t,width:i,height:r}=s;return{width:i,height:r,top:t,left:e,right:e+i,bottom:t+r,x:e,y:t}}function wt(s,e,t){let{reference:i,floating:r}=s;const o=ce(e),n=Jt(e),a=Xt(n),l=we(e),d=o==="y",h=i.x+i.width/2-r.width/2,c=i.y+i.height/2-r.height/2,u=i[a]/2-r[a]/2;let f;switch(l){case"top":f={x:h,y:i.y-r.height};break;case"bottom":f={x:h,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:c};break;case"left":f={x:i.x-r.width,y:c};break;default:f={x:i.x,y:i.y}}switch(Ve(e)){case"start":f[n]-=u*(t&&d?-1:1);break;case"end":f[n]+=u*(t&&d?-1:1);break}return f}const Ai=async(s,e,t)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:n}=t,a=o.filter(Boolean),l=await(n.isRTL==null?void 0:n.isRTL(e));let d=await n.getElementRects({reference:s,floating:e,strategy:r}),{x:h,y:c}=wt(d,i,l),u=i,f={},y=0;for(let v=0;v<a.length;v++){const{name:b,fn:w}=a[v],{x:z,y:k,data:S,reset:R}=await w({x:h,y:c,initialPlacement:i,placement:u,strategy:r,middlewareData:f,rects:d,platform:n,elements:{reference:s,floating:e}});h=z??h,c=k??c,f={...f,[b]:{...f[b],...S}},R&&y<=50&&(y++,typeof R=="object"&&(R.placement&&(u=R.placement),R.rects&&(d=R.rects===!0?await n.getElementRects({reference:s,floating:e,strategy:r}):R.rects),{x:h,y:c}=wt(d,u,l)),v=-1)}return{x:h,y:c,placement:u,strategy:r,middlewareData:f}};async function Mi(s,e){var t;e===void 0&&(e={});const{x:i,y:r,platform:o,rects:n,elements:a,strategy:l}=s,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:c="floating",altBoundary:u=!1,padding:f=0}=ct(e,s),y=Si(f),b=a[u?c==="floating"?"reference":"floating":c],w=Pe(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(b)))==null||t?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:d,rootBoundary:h,strategy:l})),z=c==="floating"?{x:i,y:r,width:n.floating.width,height:n.floating.height}:n.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),S=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},R=Pe(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:z,offsetParent:k,strategy:l}):z);return{top:(w.top-R.top+y.top)/S.y,bottom:(R.bottom-w.bottom+y.bottom)/S.y,left:(w.left-R.left+y.left)/S.x,right:(R.right-w.right+y.right)/S.x}}const Di=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(e){var t,i;const{placement:r,middlewareData:o,rects:n,initialPlacement:a,platform:l,elements:d}=e,{mainAxis:h=!0,crossAxis:c=!0,fallbackPlacements:u,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...b}=ct(s,e);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const w=we(r),z=ce(a),k=we(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(d.floating)),R=u||(k||!v?[Oe(a)]:xi(a)),B=y!=="none";!u&&B&&R.push(...ki(a,v,y,S));const $=[a,...R],se=await Mi(e,b),U=[];let T=((i=o.flip)==null?void 0:i.overflows)||[];if(h&&U.push(se[w]),c){const D=Ei(r,n,S);U.push(se[D[0]],se[D[1]])}if(T=[...T,{placement:r,overflows:U}],!U.every(D=>D<=0)){var Te,L;const D=(((Te=o.flip)==null?void 0:Te.index)||0)+1,ae=$[D];if(ae&&(!(c==="alignment"?z!==ce(ae):!1)||T.every(F=>F.overflows[0]>0&&ce(F.placement)===z)))return{data:{index:D,overflows:T},reset:{placement:ae}};let ze=(L=T.filter(le=>le.overflows[0]<=0).sort((le,F)=>le.overflows[1]-F.overflows[1])[0])==null?void 0:L.placement;if(!ze)switch(f){case"bestFit":{var Z;const le=(Z=T.filter(F=>{if(B){const re=ce(F.placement);return re===z||re==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(re=>re>0).reduce((re,fi)=>re+fi,0)]).sort((F,re)=>F[1]-re[1])[0])==null?void 0:Z[0];le&&(ze=le);break}case"initialPlacement":ze=a;break}if(r!==ze)return{reset:{placement:ze}}}return{}}}};async function Ci(s,e){const{placement:t,platform:i,elements:r}=s,o=await(i.isRTL==null?void 0:i.isRTL(r.floating)),n=we(t),a=Ve(t),l=ce(t)==="y",d=["left","top"].includes(n)?-1:1,h=o&&l?-1:1,c=ct(e,s);let{mainAxis:u,crossAxis:f,alignmentAxis:y}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof y=="number"&&(f=a==="end"?y*-1:y),l?{x:f*h,y:u*d}:{x:u*d,y:f*h}}const Ii=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(e){var t,i;const{x:r,y:o,placement:n,middlewareData:a}=e,l=await Ci(e,s);return n===((t=a.offset)==null?void 0:t.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:n}}}}};function qe(){return typeof window<"u"}function xe(s){return Qt(s)?(s.nodeName||"").toLowerCase():"#document"}function O(s){var e;return(s==null||(e=s.ownerDocument)==null?void 0:e.defaultView)||window}function Q(s){var e;return(e=(Qt(s)?s.ownerDocument:s.document)||window.document)==null?void 0:e.documentElement}function Qt(s){return qe()?s instanceof Node||s instanceof O(s).Node:!1}function V(s){return qe()?s instanceof Element||s instanceof O(s).Element:!1}function J(s){return qe()?s instanceof HTMLElement||s instanceof O(s).HTMLElement:!1}function _t(s){return!qe()||typeof ShadowRoot>"u"?!1:s instanceof ShadowRoot||s instanceof O(s).ShadowRoot}function Ie(s){const{overflow:e,overflowX:t,overflowY:i,display:r}=q(s);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!["inline","contents"].includes(r)}function Ti(s){return["table","td","th"].includes(xe(s))}function je(s){return[":popover-open",":modal"].some(e=>{try{return s.matches(e)}catch{return!1}})}function ut(s){const e=mt(),t=V(s)?q(s):s;return["transform","translate","scale","rotate","perspective"].some(i=>t[i]?t[i]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(t.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(t.contain||"").includes(i))}function Li(s){let e=oe(s);for(;J(e)&&!_e(e);){if(ut(e))return e;if(je(e))return null;e=oe(e)}return null}function mt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _e(s){return["html","body","#document"].includes(xe(s))}function q(s){return O(s).getComputedStyle(s)}function Ke(s){return V(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function oe(s){if(xe(s)==="html")return s;const e=s.assignedSlot||s.parentNode||_t(s)&&s.host||Q(s);return _t(e)?e.host:e}function Zt(s){const e=oe(s);return _e(e)?s.ownerDocument?s.ownerDocument.body:s.body:J(e)&&Ie(e)?e:Zt(e)}function Me(s,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=Zt(s),o=r===((i=s.ownerDocument)==null?void 0:i.body),n=O(r);if(o){const a=nt(n);return e.concat(n,n.visualViewport||[],Ie(r)?r:[],a&&t?Me(a):[])}return e.concat(r,Me(r,[],t))}function nt(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function ei(s){const e=q(s);let t=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=J(s),o=r?s.offsetWidth:t,n=r?s.offsetHeight:i,a=Ne(t)!==o||Ne(i)!==n;return a&&(t=o,i=n),{width:t,height:i,$:a}}function gt(s){return V(s)?s:s.contextElement}function pe(s){const e=gt(s);if(!J(e))return X(1);const t=e.getBoundingClientRect(),{width:i,height:r,$:o}=ei(e);let n=(o?Ne(t.width):t.width)/i,a=(o?Ne(t.height):t.height)/r;return(!n||!Number.isFinite(n))&&(n=1),(!a||!Number.isFinite(a))&&(a=1),{x:n,y:a}}const Hi=X(0);function ti(s){const e=O(s);return!mt()||!e.visualViewport?Hi:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ni(s,e,t){return e===void 0&&(e=!1),!t||e&&t!==O(s)?!1:e}function ue(s,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=s.getBoundingClientRect(),o=gt(s);let n=X(1);e&&(i?V(i)&&(n=pe(i)):n=pe(s));const a=Ni(o,t,i)?ti(o):X(0);let l=(r.left+a.x)/n.x,d=(r.top+a.y)/n.y,h=r.width/n.x,c=r.height/n.y;if(o){const u=O(o),f=i&&V(i)?O(i):i;let y=u,v=nt(y);for(;v&&i&&f!==y;){const b=pe(v),w=v.getBoundingClientRect(),z=q(v),k=w.left+(v.clientLeft+parseFloat(z.paddingLeft))*b.x,S=w.top+(v.clientTop+parseFloat(z.paddingTop))*b.y;l*=b.x,d*=b.y,h*=b.x,c*=b.y,l+=k,d+=S,y=O(v),v=nt(y)}}return Pe({width:h,height:c,x:l,y:d})}function ft(s,e){const t=Ke(s).scrollLeft;return e?e.left+t:ue(Q(s)).left+t}function ii(s,e,t){t===void 0&&(t=!1);const i=s.getBoundingClientRect(),r=i.left+e.scrollLeft-(t?0:ft(s,i)),o=i.top+e.scrollTop;return{x:r,y:o}}function Oi(s){let{elements:e,rect:t,offsetParent:i,strategy:r}=s;const o=r==="fixed",n=Q(i),a=e?je(e.floating):!1;if(i===n||a&&o)return t;let l={scrollLeft:0,scrollTop:0},d=X(1);const h=X(0),c=J(i);if((c||!c&&!o)&&((xe(i)!=="body"||Ie(n))&&(l=Ke(i)),J(i))){const f=ue(i);d=pe(i),h.x=f.x+i.clientLeft,h.y=f.y+i.clientTop}const u=n&&!c&&!o?ii(n,l,!0):X(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-l.scrollLeft*d.x+h.x+u.x,y:t.y*d.y-l.scrollTop*d.y+h.y+u.y}}function Pi(s){return Array.from(s.getClientRects())}function $i(s){const e=Q(s),t=Ke(s),i=s.ownerDocument.body,r=fe(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=fe(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let n=-t.scrollLeft+ft(s);const a=-t.scrollTop;return q(i).direction==="rtl"&&(n+=fe(e.clientWidth,i.clientWidth)-r),{width:r,height:o,x:n,y:a}}function Wi(s,e){const t=O(s),i=Q(s),r=t.visualViewport;let o=i.clientWidth,n=i.clientHeight,a=0,l=0;if(r){o=r.width,n=r.height;const d=mt();(!d||d&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:n,x:a,y:l}}function Bi(s,e){const t=ue(s,!0,e==="fixed"),i=t.top+s.clientTop,r=t.left+s.clientLeft,o=J(s)?pe(s):X(1),n=s.clientWidth*o.x,a=s.clientHeight*o.y,l=r*o.x,d=i*o.y;return{width:n,height:a,x:l,y:d}}function Et(s,e,t){let i;if(e==="viewport")i=Wi(s,t);else if(e==="document")i=$i(Q(s));else if(V(e))i=Bi(e,t);else{const r=ti(s);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Pe(i)}function si(s,e){const t=oe(s);return t===e||!V(t)||_e(t)?!1:q(t).position==="fixed"||si(t,e)}function Ui(s,e){const t=e.get(s);if(t)return t;let i=Me(s,[],!1).filter(a=>V(a)&&xe(a)!=="body"),r=null;const o=q(s).position==="fixed";let n=o?oe(s):s;for(;V(n)&&!_e(n);){const a=q(n),l=ut(n);!l&&a.position==="fixed"&&(r=null),(o?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Ie(n)&&!l&&si(s,n))?i=i.filter(h=>h!==n):r=a,n=oe(n)}return e.set(s,i),i}function Fi(s){let{element:e,boundary:t,rootBoundary:i,strategy:r}=s;const n=[...t==="clippingAncestors"?je(e)?[]:Ui(e,this._c):[].concat(t),i],a=n[0],l=n.reduce((d,h)=>{const c=Et(e,h,r);return d.top=fe(c.top,d.top),d.right=rt(c.right,d.right),d.bottom=rt(c.bottom,d.bottom),d.left=fe(c.left,d.left),d},Et(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Gi(s){const{width:e,height:t}=ei(s);return{width:e,height:t}}function Vi(s,e,t){const i=J(e),r=Q(e),o=t==="fixed",n=ue(s,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=X(0);function d(){l.x=ft(r)}if(i||!i&&!o)if((xe(e)!=="body"||Ie(r))&&(a=Ke(e)),i){const f=ue(e,!0,o,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else r&&d();o&&!i&&r&&d();const h=r&&!i&&!o?ii(r,a):X(0),c=n.left+a.scrollLeft-l.x-h.x,u=n.top+a.scrollTop-l.y-h.y;return{x:c,y:u,width:n.width,height:n.height}}function Ze(s){return q(s).position==="static"}function xt(s,e){if(!J(s)||q(s).position==="fixed")return null;if(e)return e(s);let t=s.offsetParent;return Q(s)===t&&(t=t.ownerDocument.body),t}function ri(s,e){const t=O(s);if(je(s))return t;if(!J(s)){let r=oe(s);for(;r&&!_e(r);){if(V(r)&&!Ze(r))return r;r=oe(r)}return t}let i=xt(s,e);for(;i&&Ti(i)&&Ze(i);)i=xt(i,e);return i&&_e(i)&&Ze(i)&&!ut(i)?t:i||Li(s)||t}const qi=async function(s){const e=this.getOffsetParent||ri,t=this.getDimensions,i=await t(s.floating);return{reference:Vi(s.reference,await e(s.floating),s.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function ji(s){return q(s).direction==="rtl"}const Ki={convertOffsetParentRelativeRectToViewportRelativeRect:Oi,getDocumentElement:Q,getClippingRect:Fi,getOffsetParent:ri,getElementRects:qi,getClientRects:Pi,getDimensions:Gi,getScale:pe,isElement:V,isRTL:ji};function oi(s,e){return s.x===e.x&&s.y===e.y&&s.width===e.width&&s.height===e.height}function Yi(s,e){let t=null,i;const r=Q(s);function o(){var a;clearTimeout(i),(a=t)==null||a.disconnect(),t=null}function n(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const d=s.getBoundingClientRect(),{left:h,top:c,width:u,height:f}=d;if(a||e(),!u||!f)return;const y=Le(c),v=Le(r.clientWidth-(h+u)),b=Le(r.clientHeight-(c+f)),w=Le(h),k={rootMargin:-y+"px "+-v+"px "+-b+"px "+-w+"px",threshold:fe(0,rt(1,l))||1};let S=!0;function R(B){const $=B[0].intersectionRatio;if($!==l){if(!S)return n();$?n(!1,$):i=setTimeout(()=>{n(!1,1e-7)},1e3)}$===1&&!oi(d,s.getBoundingClientRect())&&n(),S=!1}try{t=new IntersectionObserver(R,{...k,root:r.ownerDocument})}catch{t=new IntersectionObserver(R,k)}t.observe(s)}return n(!0),o}function zt(s,e,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:n=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,d=gt(s),h=r||o?[...d?Me(d):[],...Me(e)]:[];h.forEach(w=>{r&&w.addEventListener("scroll",t,{passive:!0}),o&&w.addEventListener("resize",t)});const c=d&&a?Yi(d,t):null;let u=-1,f=null;n&&(f=new ResizeObserver(w=>{let[z]=w;z&&z.target===d&&f&&(f.unobserve(e),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var k;(k=f)==null||k.observe(e)})),t()}),d&&!l&&f.observe(d),f.observe(e));let y,v=l?ue(s):null;l&&b();function b(){const w=ue(s);v&&!oi(v,w)&&t(),v=w,y=requestAnimationFrame(b)}return t(),()=>{var w;h.forEach(z=>{r&&z.removeEventListener("scroll",t),o&&z.removeEventListener("resize",t)}),c==null||c(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(y)}}const kt=Ii,Rt=Di,St=(s,e,t)=>{const i=new Map,r={platform:Ki,...t},o={...r.platform,_c:i};return Ai(s,e,{...r,platform:o})},pt=(s,e)=>{let t="The dashboard component encountered an error";typeof(e==null?void 0:e.dashboardId)=="string"&&(t+=` for dashboard with id ${e.dashboardId}`),typeof(e==null?void 0:e.dashboardSlug)=="string"&&(t+=` for dashboard with slug ${e.dashboardSlug}`),typeof(e==null?void 0:e.container)=="string"&&(t+=` in container ${e.container}`),s&&(t+=`:
20
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../property-Cu4Q1hS4.cjs"),Ee=require("../state-fyl3IYMu.cjs"),Ge=require("../query-D5qWDopr.cjs"),Je=require("../directive-BOOaQO_r.cjs"),ie=require("../luzmo-icons-DonyjSXg.cjs");require("../index-Dy_5M3M5.cjs");require("../index-CnP-Q5Bw.cjs");require("../index-DSQyBS9Z.cjs");const Yt=require("../base-D76d76ww-tT6yr8eb.cjs");require("../focusable-BxtpnzWp-CkK9AeMt.cjs");const vt=require("../color-B6LaL8qz.cjs"),pi=require("../query-all-CR2wWKRD.cjs"),yi=require("../item-list.cjs"),Qe=require("../index-Vdyb9z2D.cjs"),K=require("../set-locale-CSL8WaxL.cjs"),bi=require("../localized-decorator-CIHsaT2_.cjs");require("../index-CYeQkVeJ.cjs");const rt=Math.min,fe=Math.max,Ne=Math.round,Le=Math.floor,X=s=>({x:s,y:s}),vi={left:"right",right:"left",bottom:"top",top:"bottom"},wi={start:"end",end:"start"};function ct(s,e){return typeof s=="function"?s(e):s}function we(s){return s.split("-")[0]}function Ve(s){return s.split("-")[1]}function _i(s){return s==="x"?"y":"x"}function Xt(s){return s==="y"?"height":"width"}function ce(s){return["top","bottom"].includes(we(s))?"y":"x"}function Jt(s){return _i(ce(s))}function Ei(s,e,t){t===void 0&&(t=!1);const i=Ve(s),r=Jt(s),o=Xt(r);let n=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(n=Oe(n)),[n,Oe(n)]}function xi(s){const e=Oe(s);return[ot(s),e,ot(e)]}function ot(s){return s.replace(/start|end/g,e=>wi[e])}function zi(s,e,t){const i=["left","right"],r=["right","left"],o=["top","bottom"],n=["bottom","top"];switch(s){case"top":case"bottom":return t?e?r:i:e?i:r;case"left":case"right":return e?o:n;default:return[]}}function ki(s,e,t,i){const r=Ve(s);let o=zi(we(s),t==="start",i);return r&&(o=o.map(n=>n+"-"+r),e&&(o=o.concat(o.map(ot)))),o}function Oe(s){return s.replace(/left|right|bottom|top/g,e=>vi[e])}function Ri(s){return{top:0,right:0,bottom:0,left:0,...s}}function Si(s){return typeof s!="number"?Ri(s):{top:s,right:s,bottom:s,left:s}}function Pe(s){const{x:e,y:t,width:i,height:r}=s;return{width:i,height:r,top:t,left:e,right:e+i,bottom:t+r,x:e,y:t}}function wt(s,e,t){let{reference:i,floating:r}=s;const o=ce(e),n=Jt(e),a=Xt(n),l=we(e),d=o==="y",h=i.x+i.width/2-r.width/2,c=i.y+i.height/2-r.height/2,u=i[a]/2-r[a]/2;let f;switch(l){case"top":f={x:h,y:i.y-r.height};break;case"bottom":f={x:h,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:c};break;case"left":f={x:i.x-r.width,y:c};break;default:f={x:i.x,y:i.y}}switch(Ve(e)){case"start":f[n]-=u*(t&&d?-1:1);break;case"end":f[n]+=u*(t&&d?-1:1);break}return f}const Ai=async(s,e,t)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:n}=t,a=o.filter(Boolean),l=await(n.isRTL==null?void 0:n.isRTL(e));let d=await n.getElementRects({reference:s,floating:e,strategy:r}),{x:h,y:c}=wt(d,i,l),u=i,f={},y=0;for(let v=0;v<a.length;v++){const{name:b,fn:w}=a[v],{x:z,y:k,data:S,reset:R}=await w({x:h,y:c,initialPlacement:i,placement:u,strategy:r,middlewareData:f,rects:d,platform:n,elements:{reference:s,floating:e}});h=z??h,c=k??c,f={...f,[b]:{...f[b],...S}},R&&y<=50&&(y++,typeof R=="object"&&(R.placement&&(u=R.placement),R.rects&&(d=R.rects===!0?await n.getElementRects({reference:s,floating:e,strategy:r}):R.rects),{x:h,y:c}=wt(d,u,l)),v=-1)}return{x:h,y:c,placement:u,strategy:r,middlewareData:f}};async function Mi(s,e){var t;e===void 0&&(e={});const{x:i,y:r,platform:o,rects:n,elements:a,strategy:l}=s,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:c="floating",altBoundary:u=!1,padding:f=0}=ct(e,s),y=Si(f),b=a[u?c==="floating"?"reference":"floating":c],w=Pe(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(b)))==null||t?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:d,rootBoundary:h,strategy:l})),z=c==="floating"?{x:i,y:r,width:n.floating.width,height:n.floating.height}:n.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),S=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},R=Pe(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:z,offsetParent:k,strategy:l}):z);return{top:(w.top-R.top+y.top)/S.y,bottom:(R.bottom-w.bottom+y.bottom)/S.y,left:(w.left-R.left+y.left)/S.x,right:(R.right-w.right+y.right)/S.x}}const Di=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(e){var t,i;const{placement:r,middlewareData:o,rects:n,initialPlacement:a,platform:l,elements:d}=e,{mainAxis:h=!0,crossAxis:c=!0,fallbackPlacements:u,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...b}=ct(s,e);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const w=we(r),z=ce(a),k=we(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(d.floating)),R=u||(k||!v?[Oe(a)]:xi(a)),B=y!=="none";!u&&B&&R.push(...ki(a,v,y,S));const $=[a,...R],se=await Mi(e,b),U=[];let T=((i=o.flip)==null?void 0:i.overflows)||[];if(h&&U.push(se[w]),c){const D=Ei(r,n,S);U.push(se[D[0]],se[D[1]])}if(T=[...T,{placement:r,overflows:U}],!U.every(D=>D<=0)){var Te,L;const D=(((Te=o.flip)==null?void 0:Te.index)||0)+1,ae=$[D];if(ae&&(!(c==="alignment"?z!==ce(ae):!1)||T.every(F=>F.overflows[0]>0&&ce(F.placement)===z)))return{data:{index:D,overflows:T},reset:{placement:ae}};let ze=(L=T.filter(le=>le.overflows[0]<=0).sort((le,F)=>le.overflows[1]-F.overflows[1])[0])==null?void 0:L.placement;if(!ze)switch(f){case"bestFit":{var Z;const le=(Z=T.filter(F=>{if(B){const re=ce(F.placement);return re===z||re==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(re=>re>0).reduce((re,fi)=>re+fi,0)]).sort((F,re)=>F[1]-re[1])[0])==null?void 0:Z[0];le&&(ze=le);break}case"initialPlacement":ze=a;break}if(r!==ze)return{reset:{placement:ze}}}return{}}}};async function Ci(s,e){const{placement:t,platform:i,elements:r}=s,o=await(i.isRTL==null?void 0:i.isRTL(r.floating)),n=we(t),a=Ve(t),l=ce(t)==="y",d=["left","top"].includes(n)?-1:1,h=o&&l?-1:1,c=ct(e,s);let{mainAxis:u,crossAxis:f,alignmentAxis:y}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof y=="number"&&(f=a==="end"?y*-1:y),l?{x:f*h,y:u*d}:{x:u*d,y:f*h}}const Ii=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(e){var t,i;const{x:r,y:o,placement:n,middlewareData:a}=e,l=await Ci(e,s);return n===((t=a.offset)==null?void 0:t.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:n}}}}};function qe(){return typeof window<"u"}function xe(s){return Qt(s)?(s.nodeName||"").toLowerCase():"#document"}function O(s){var e;return(s==null||(e=s.ownerDocument)==null?void 0:e.defaultView)||window}function Q(s){var e;return(e=(Qt(s)?s.ownerDocument:s.document)||window.document)==null?void 0:e.documentElement}function Qt(s){return qe()?s instanceof Node||s instanceof O(s).Node:!1}function V(s){return qe()?s instanceof Element||s instanceof O(s).Element:!1}function J(s){return qe()?s instanceof HTMLElement||s instanceof O(s).HTMLElement:!1}function _t(s){return!qe()||typeof ShadowRoot>"u"?!1:s instanceof ShadowRoot||s instanceof O(s).ShadowRoot}function Ie(s){const{overflow:e,overflowX:t,overflowY:i,display:r}=q(s);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!["inline","contents"].includes(r)}function Ti(s){return["table","td","th"].includes(xe(s))}function je(s){return[":popover-open",":modal"].some(e=>{try{return s.matches(e)}catch{return!1}})}function ut(s){const e=mt(),t=V(s)?q(s):s;return["transform","translate","scale","rotate","perspective"].some(i=>t[i]?t[i]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(t.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(t.contain||"").includes(i))}function Li(s){let e=oe(s);for(;J(e)&&!_e(e);){if(ut(e))return e;if(je(e))return null;e=oe(e)}return null}function mt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _e(s){return["html","body","#document"].includes(xe(s))}function q(s){return O(s).getComputedStyle(s)}function Ke(s){return V(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function oe(s){if(xe(s)==="html")return s;const e=s.assignedSlot||s.parentNode||_t(s)&&s.host||Q(s);return _t(e)?e.host:e}function Zt(s){const e=oe(s);return _e(e)?s.ownerDocument?s.ownerDocument.body:s.body:J(e)&&Ie(e)?e:Zt(e)}function Me(s,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=Zt(s),o=r===((i=s.ownerDocument)==null?void 0:i.body),n=O(r);if(o){const a=nt(n);return e.concat(n,n.visualViewport||[],Ie(r)?r:[],a&&t?Me(a):[])}return e.concat(r,Me(r,[],t))}function nt(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function ei(s){const e=q(s);let t=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=J(s),o=r?s.offsetWidth:t,n=r?s.offsetHeight:i,a=Ne(t)!==o||Ne(i)!==n;return a&&(t=o,i=n),{width:t,height:i,$:a}}function gt(s){return V(s)?s:s.contextElement}function pe(s){const e=gt(s);if(!J(e))return X(1);const t=e.getBoundingClientRect(),{width:i,height:r,$:o}=ei(e);let n=(o?Ne(t.width):t.width)/i,a=(o?Ne(t.height):t.height)/r;return(!n||!Number.isFinite(n))&&(n=1),(!a||!Number.isFinite(a))&&(a=1),{x:n,y:a}}const Hi=X(0);function ti(s){const e=O(s);return!mt()||!e.visualViewport?Hi:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ni(s,e,t){return e===void 0&&(e=!1),!t||e&&t!==O(s)?!1:e}function ue(s,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=s.getBoundingClientRect(),o=gt(s);let n=X(1);e&&(i?V(i)&&(n=pe(i)):n=pe(s));const a=Ni(o,t,i)?ti(o):X(0);let l=(r.left+a.x)/n.x,d=(r.top+a.y)/n.y,h=r.width/n.x,c=r.height/n.y;if(o){const u=O(o),f=i&&V(i)?O(i):i;let y=u,v=nt(y);for(;v&&i&&f!==y;){const b=pe(v),w=v.getBoundingClientRect(),z=q(v),k=w.left+(v.clientLeft+parseFloat(z.paddingLeft))*b.x,S=w.top+(v.clientTop+parseFloat(z.paddingTop))*b.y;l*=b.x,d*=b.y,h*=b.x,c*=b.y,l+=k,d+=S,y=O(v),v=nt(y)}}return Pe({width:h,height:c,x:l,y:d})}function ft(s,e){const t=Ke(s).scrollLeft;return e?e.left+t:ue(Q(s)).left+t}function ii(s,e,t){t===void 0&&(t=!1);const i=s.getBoundingClientRect(),r=i.left+e.scrollLeft-(t?0:ft(s,i)),o=i.top+e.scrollTop;return{x:r,y:o}}function Oi(s){let{elements:e,rect:t,offsetParent:i,strategy:r}=s;const o=r==="fixed",n=Q(i),a=e?je(e.floating):!1;if(i===n||a&&o)return t;let l={scrollLeft:0,scrollTop:0},d=X(1);const h=X(0),c=J(i);if((c||!c&&!o)&&((xe(i)!=="body"||Ie(n))&&(l=Ke(i)),J(i))){const f=ue(i);d=pe(i),h.x=f.x+i.clientLeft,h.y=f.y+i.clientTop}const u=n&&!c&&!o?ii(n,l,!0):X(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-l.scrollLeft*d.x+h.x+u.x,y:t.y*d.y-l.scrollTop*d.y+h.y+u.y}}function Pi(s){return Array.from(s.getClientRects())}function $i(s){const e=Q(s),t=Ke(s),i=s.ownerDocument.body,r=fe(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=fe(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let n=-t.scrollLeft+ft(s);const a=-t.scrollTop;return q(i).direction==="rtl"&&(n+=fe(e.clientWidth,i.clientWidth)-r),{width:r,height:o,x:n,y:a}}function Wi(s,e){const t=O(s),i=Q(s),r=t.visualViewport;let o=i.clientWidth,n=i.clientHeight,a=0,l=0;if(r){o=r.width,n=r.height;const d=mt();(!d||d&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:n,x:a,y:l}}function Bi(s,e){const t=ue(s,!0,e==="fixed"),i=t.top+s.clientTop,r=t.left+s.clientLeft,o=J(s)?pe(s):X(1),n=s.clientWidth*o.x,a=s.clientHeight*o.y,l=r*o.x,d=i*o.y;return{width:n,height:a,x:l,y:d}}function Et(s,e,t){let i;if(e==="viewport")i=Wi(s,t);else if(e==="document")i=$i(Q(s));else if(V(e))i=Bi(e,t);else{const r=ti(s);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Pe(i)}function si(s,e){const t=oe(s);return t===e||!V(t)||_e(t)?!1:q(t).position==="fixed"||si(t,e)}function Ui(s,e){const t=e.get(s);if(t)return t;let i=Me(s,[],!1).filter(a=>V(a)&&xe(a)!=="body"),r=null;const o=q(s).position==="fixed";let n=o?oe(s):s;for(;V(n)&&!_e(n);){const a=q(n),l=ut(n);!l&&a.position==="fixed"&&(r=null),(o?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Ie(n)&&!l&&si(s,n))?i=i.filter(h=>h!==n):r=a,n=oe(n)}return e.set(s,i),i}function Fi(s){let{element:e,boundary:t,rootBoundary:i,strategy:r}=s;const n=[...t==="clippingAncestors"?je(e)?[]:Ui(e,this._c):[].concat(t),i],a=n[0],l=n.reduce((d,h)=>{const c=Et(e,h,r);return d.top=fe(c.top,d.top),d.right=rt(c.right,d.right),d.bottom=rt(c.bottom,d.bottom),d.left=fe(c.left,d.left),d},Et(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Gi(s){const{width:e,height:t}=ei(s);return{width:e,height:t}}function Vi(s,e,t){const i=J(e),r=Q(e),o=t==="fixed",n=ue(s,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=X(0);function d(){l.x=ft(r)}if(i||!i&&!o)if((xe(e)!=="body"||Ie(r))&&(a=Ke(e)),i){const f=ue(e,!0,o,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else r&&d();o&&!i&&r&&d();const h=r&&!i&&!o?ii(r,a):X(0),c=n.left+a.scrollLeft-l.x-h.x,u=n.top+a.scrollTop-l.y-h.y;return{x:c,y:u,width:n.width,height:n.height}}function Ze(s){return q(s).position==="static"}function xt(s,e){if(!J(s)||q(s).position==="fixed")return null;if(e)return e(s);let t=s.offsetParent;return Q(s)===t&&(t=t.ownerDocument.body),t}function ri(s,e){const t=O(s);if(je(s))return t;if(!J(s)){let r=oe(s);for(;r&&!_e(r);){if(V(r)&&!Ze(r))return r;r=oe(r)}return t}let i=xt(s,e);for(;i&&Ti(i)&&Ze(i);)i=xt(i,e);return i&&_e(i)&&Ze(i)&&!ut(i)?t:i||Li(s)||t}const qi=async function(s){const e=this.getOffsetParent||ri,t=this.getDimensions,i=await t(s.floating);return{reference:Vi(s.reference,await e(s.floating),s.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function ji(s){return q(s).direction==="rtl"}const Ki={convertOffsetParentRelativeRectToViewportRelativeRect:Oi,getDocumentElement:Q,getClippingRect:Fi,getOffsetParent:ri,getElementRects:qi,getClientRects:Pi,getDimensions:Gi,getScale:pe,isElement:V,isRTL:ji};function oi(s,e){return s.x===e.x&&s.y===e.y&&s.width===e.width&&s.height===e.height}function Yi(s,e){let t=null,i;const r=Q(s);function o(){var a;clearTimeout(i),(a=t)==null||a.disconnect(),t=null}function n(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const d=s.getBoundingClientRect(),{left:h,top:c,width:u,height:f}=d;if(a||e(),!u||!f)return;const y=Le(c),v=Le(r.clientWidth-(h+u)),b=Le(r.clientHeight-(c+f)),w=Le(h),k={rootMargin:-y+"px "+-v+"px "+-b+"px "+-w+"px",threshold:fe(0,rt(1,l))||1};let S=!0;function R(B){const $=B[0].intersectionRatio;if($!==l){if(!S)return n();$?n(!1,$):i=setTimeout(()=>{n(!1,1e-7)},1e3)}$===1&&!oi(d,s.getBoundingClientRect())&&n(),S=!1}try{t=new IntersectionObserver(R,{...k,root:r.ownerDocument})}catch{t=new IntersectionObserver(R,k)}t.observe(s)}return n(!0),o}function zt(s,e,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:n=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,d=gt(s),h=r||o?[...d?Me(d):[],...Me(e)]:[];h.forEach(w=>{r&&w.addEventListener("scroll",t,{passive:!0}),o&&w.addEventListener("resize",t)});const c=d&&a?Yi(d,t):null;let u=-1,f=null;n&&(f=new ResizeObserver(w=>{let[z]=w;z&&z.target===d&&f&&(f.unobserve(e),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var k;(k=f)==null||k.observe(e)})),t()}),d&&!l&&f.observe(d),f.observe(e));let y,v=l?ue(s):null;l&&b();function b(){const w=ue(s);v&&!oi(v,w)&&t(),v=w,y=requestAnimationFrame(b)}return t(),()=>{var w;h.forEach(z=>{r&&z.removeEventListener("scroll",t),o&&z.removeEventListener("resize",t)}),c==null||c(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(y)}}const kt=Ii,Rt=Di,St=(s,e,t)=>{const i=new Map,r={platform:Ki,...t},o={...r.platform,_c:i};return Ai(s,e,{...r,platform:o})},pt=(s,e)=>{let t="The dashboard component encountered an error";typeof(e==null?void 0:e.dashboardId)=="string"&&(t+=` for dashboard with id ${e.dashboardId}`),typeof(e==null?void 0:e.dashboardSlug)=="string"&&(t+=` for dashboard with slug ${e.dashboardSlug}`),typeof(e==null?void 0:e.container)=="string"&&(t+=` in container ${e.container}`),s&&(t+=`:
21
21
  ${s}`,console.warn(t))},Xi=s=>{let e=!1,t="";const r=(document.body||document.documentElement).style,o={svg:!!("createElementNS"in document&&document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),flexbox:r.webkitFlexWrap===""||r.flexWrap==="",postMessage:!!window.postMessage},n=["svg","flexbox","postMessage"];for(const h of n)o[h]||(e=!0,s.browserNotSupported=s.browserNotSupported||[],s.browserNotSupported.push(h),t+=`Your browser does not support: ${h}
22
22
  `);const a=window.navigator.userAgent,l=a.includes("MSIE"),d=a.includes("Trident/");(l||d)&&(e=!0,t="IE is not supported."),e&&pt(t)},W={appServer:"https://app.luzmo.com/",apiHost:"https://api.luzmo.com/",dashboardId:null,dashboardSlug:null,container:null,key:null,token:null,language:"auto",editorLanguage:"auto",qeVersion:null,editMode:null,screenMode:null,switchScreenModeOnResize:!0,itemId:null,theme:"",mainColor:"",accentColor:"",itemDimensions:{width:"auto",height:"auto"},loaderBackground:"#f9f9f9",loaderFontColor:"#5a5a5a",loaderSpinnerColor:"rgba(255, 165, 0, 0.7)",loaderSpinnerBackground:"rgba(169, 169, 169, 0.14)",timezoneId:null,contextId:null},ni=[{mode:"mobile",width:[150,767]},{mode:"tablet",width:[768,1199]},{mode:"desktop",width:[1200,1599]},{mode:"largeScreen",width:[1600,9999]},{mode:"fixed",width:[]}],At={initializing:{en:"Initializing...",nl:"Laden...",fr:"Chargement...",de:"Initialisiere...",es:"Inicializando..."}},Se=s=>s?s.endsWith("/")?s:`${s}/`:"",te=s=>s?s.endsWith("/")?s.slice(0,-1):s:"",Ji=(s,e,t,i)=>{var a;const r=(l,d)=>{var v;const h=l.users.find(b=>b.id===d.id),c=h&&h.userAccessRight?{flagRead:h.userAccessRight.flagRead,flagUse:h.userAccessRight.flagUse,flagModify:h.userAccessRight.flagModify,flagOwn:h.userAccessRight.flagOwn}:{flagRead:!1,flagUse:!1,flagModify:!1,flagOwn:!1},f=l.groups.filter(b=>d.userGroups.includes(b.id)||b.public===!0).map(b=>{if(b.groupAccessRight)return b.groupAccessRight});for(const b of f)!c.flagRead&&b.flagRead&&(c.flagRead=b.flagRead),!c.flagUse&&b.flagUse&&(c.flagUse=b.flagUse),!c.flagModify&&b.flagModify&&(c.flagModify=b.flagModify),!c.flagOwn&&b.flagOwn&&(c.flagOwn=b.flagOwn);const y=((v=l.integrations)==null?void 0:v.length)>0?l.integrations.map(b=>{if(b.integrationAccessRight)return b.integrationAccessRight}):[];for(const b of y)!c.flagRead&&b.flagRead&&(c.flagRead=b.flagRead),!c.flagUse&&b.flagUse&&(c.flagUse=b.flagUse),!c.flagModify&&b.flagModify&&(c.flagModify=b.flagModify);return c},o=(l,d)=>{if(l==null)return"";if(typeof l!="object"||Object.keys(l).length===0)return typeof l=="object"&&Object.keys(l).length===0?"":l;let h;return h=d&&l[d]?l[d]:l[Object.keys(l)[0]],h==null&&(h=""),h},n=[];for(const l of s){const d={accessibleBy:[],accessRights:r(l,t),id:l.id,modifiedAt:l.modified_at,name:o(l.name,i.language),slug:null,tags:l.tags.map(y=>y.tag).sort((y,v)=>y.localeCompare(v))},h=l.integrations.find(y=>y.id===e);(a=h==null?void 0:h.integrationAccessRight)!=null&&a.slug&&(d.slug=h.integrationAccessRight.slug);const c=l.users.map(y=>({model:"User",id:y.id,name:o(y.name,t.locale_id)})),u=l.groups.map(y=>({model:"Group",id:y.id,name:o(y.name,t.locale_id)||{}})),f=l.integrations.map(y=>({model:"Integration",id:y.id,name:o(y.name,t.locale_id)||{}}));d.accessibleBy=[...c,...u,...f],n.push(d)}return n},Qi="0.0.0-unknown-luzmo",Zi=s=>{const e=/^(%20|\s)*(javascript|data)/im,t=/[^\u0020-\u007E]/gim,i=/^([^:]+):/gm,r=new Set([".","/"]),o=d=>r.has(d[0]);if(!s)return"about:blank";const n=s.replaceAll(t,"").trim();if(o(n))return n;const a=n.match(i);if(!a)return n;const l=a[0];return e.test(l)?"about:blank":n},Mt=s=>JSON.parse(JSON.stringify(s)),es=s=>s&&typeof s=="object",at=(s,e)=>(Object.entries(e).forEach(([t,i])=>{t in s?s[t]===void 0?s[t]=i:s[t]=es(i)?at(s[t],i):s[t]:s[t]=i}),s),ge=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g,function(s){const e=Math.random()*16|0;return(s=="x"?e:e&3|8).toString(16)}),Dt=s=>{const e=[],{appServer:t,language:i,editorLanguage:r,qeVersion:o,loaderBackground:n,loaderSpinnerColor:a,loaderSpinnerBackground:l,loaderFontColor:d,screenMode:h,key:c,token:u,timezoneId:f,itemEmbedding:y,itemDimensions:v,dashboardId:b,dashboardSlug:w,itemId:z,theme:k,mainColor:S,accentColor:R,editMode:B}=s.params;i&&i!=="auto"&&e.push(`language=${i}`),r&&r!=="auto"&&e.push(`editorLanguage=${r}`),o&&e.push(`qe_version=${o}`),n&&e.push(`ldrbg=${n}`),d&&e.push(`ldrftclr=${d}`),a&&e.push(`ldrspclr=${a}`),l&&e.push(`ldrspbg=${l}`),k&&e.push(`theme=${k}`),S&&e.push(`mainColor=${S}`),R&&e.push(`accentColor=${R}`),h&&h!=="auto"&&e.push("screenMode=&{screenMode}"),f&&e.push("timezoneId="+f),y&&v&&v.width&&e.push("width="+v.width),y&&v&&v.height&&e.push("height="+v.height),B&&e.push("editMode="+B);const $=c&&u?"#"+c+":"+u:"";e.push("version="+(s.libVersion||Qi));const se=y?`${t}i/${b||w}/${z}?${encodeURIComponent(e.join("&"))}${$}`:`${t}i/${b||w}?${encodeURIComponent(e.join("&"))}${$}`;return Zi(se)},Ct=s=>{let e;(s.params.error||s.browserNotSupported.length>0)&&(s.params.error=!0,s.browserNotSupported&&(e="Browser is not supported."));const t=At.initializing[s.params.language]||At.initializing.en;return s.browserNotSupported||s.params.error?{loadingMsg:t,errorMsg:e}:{loadingMsg:t,errorMsg:""}};function de(s,e,t){s.promises[e]&&(s.promises[e].resolve(t),delete s.promises[e])}function He(s,e,t){s.promises[e]&&(s.promises[e].reject(t),delete s.promises[e])}function ai(s){const e={};return s.params.loaderBackground&&!s.iframeLoaded&&(e.background=s.params.loaderBackground),e}function ts(s){var r;const e=((r=s.params.itemDimensions)==null?void 0:r.height)||W.itemDimensions.height,t=s.params.itemEmbedding&&e!=="auto";return{display:s.iframeLoaded?"none":"",height:`${t?e:s.minHeight}px`}}function is(s){var t,i;const e=s.params.loaderBackground||W.loaderBackground;if(s.params.itemEmbedding){s.loaderSize=24,s.borderWidth=4,s.minHeight=200;const r=((t=s.params.itemDimensions)==null?void 0:t.width)||W.itemDimensions.width,o=((i=s.params.itemDimensions)==null?void 0:i.height)||W.itemDimensions.height,n=r!=="auto",a=o!=="auto";return{background:e,width:n?`${r}px`:"100%",height:`${a?o:"200"}px`,"min-height":a?"":"200px"}}return{background:e}}function ss(s){const{loaderSpinnerColor:e,loaderSpinnerBackground:t}=W,i=Tt(s.borderWidth,s.params.loaderSpinnerColor||e),r=Tt(s.borderWidth,s.params.loaderSpinnerBackground||t),o=`${s.loaderSize}px`;return{"border-top":i,"border-right":i,"border-bottom":r,"border-left":r,width:o,height:o}}function rs(s){var o;const e=((o=s.params.itemDimensions)==null?void 0:o.height)||W.itemDimensions.height,t=s.params.itemEmbedding&&e!=="auto",i=n=>`${(n-s.loaderSize-32)/2}px`;return{padding:`${s.params.itemId?i(t?Number.parseInt(`${e}`,10):s.minHeight):"128px"} 16px`}}function It(s){var r,o;const e=((r=s.params.itemDimensions)==null?void 0:r.height)||W.itemDimensions.height,t=((o=s.params.itemDimensions)==null?void 0:o.width)||W.itemDimensions.width;s.params.itemEmbedding&&e!=="auto"?s.iframeHeight=`${e}px`:s.params.itemEmbedding?s.iframeHeight="200px":["editFull","editLimited"].includes(s.params.editMode)?s.iframeHeight="100%":s.iframeHeight="400px",s.iframeWidth=s.params.itemEmbedding&&t!=="auto"?`${t}px`:"100%";const i={height:s.iframeHeight,width:s.iframeWidth};return s.iframeLoaded?i.opacity=1:s.error?(i.opacity=1,i.width="100%",i.height="400px"):i.opacity=0,i}function Tt(s,e){return`${s}px solid ${e}`}const os=(s,e)=>{s!=null&&s.contentWindow&&s.contentWindow.location.replace(e)},Lt=(s,e,t)=>{const i=ge();return e!=null&&e.contentWindow?(e.contentWindow.postMessage({action:"exportDashboard",format:t||"png",_version:s.libVersion,requestId:i},"*"),new Promise((r,o)=>{s.promises[i]={resolve:r,reject:o},setTimeout(()=>{if(s.promises[i]){const n="exportDashboard request timed out.";s.promises[i].reject(new Error(n)),delete s.promises[i]}},12e5)})):Promise.reject(new Error("Cannot retrieve contentWindow."))},ns=async s=>{if(await s.updateComplete,(s.currentAuthKey??s.authKey)&&(s.currentAuthToken??s.authToken)){const e=new Promise((t,i)=>{(()=>{try{window.fetch(`${Se(s.params.apiHost)}0.1.0/authorization`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",body:JSON.stringify({action:"get",version:"0.1.0",key:s.currentAuthKey??s.authKey,token:s.currentAuthToken??s.authToken,find:{where:{id:s.authKey},attributes:["id","integration_id"],include:[{model:"User",attributes:["id","name","locale_id"],include:[{model:"Group"}]}]}})}).then(o=>o.json()).then(o=>{!o||!o.rows||o.rows.length===0||!o.rows[0].user?i("Authorization failed, please check authKey and authToken. If the problem persists, please contact support@luzmo.com."):(o.rows[0].user.userGroups=o.rows[0].user.groups.map(n=>n.id),delete o.rows[0].user.groups,t({integrationId:o.rows[0].integration_id,user:o.rows[0].user}))})}catch(r){i(r)}})()});return new Promise((t,i)=>void(()=>{try{e.then(r=>{window.fetch(`${Se(s.params.apiHost)}0.1.0/securable`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",body:JSON.stringify({action:"get",version:"0.1.0",key:s.currentAuthKey??s.authKey,token:s.currentAuthToken??s.authToken,find:{where:{type:"dashboard",is_variant:!1},attributes:["id","name","modified_at"],order:[["modified_at","desc"]],include:[{model:"Tag",attributes:["tag"]},{model:"User",attributes:["id","name"]},{model:"Group",attributes:["id","name","public"]},{model:"Integration",attributes:["id","name"]}]}})}).then(n=>n.json()).then(n=>{const a=n.rows.length>0?Ji(n.rows,r.integrationId,r.user,s):[];t(a)})}).catch(r=>{i(r)})}catch(r){i(r)}})())}throw new Error("No authKey or authToken found in the luzmo-dashboard component.")},as=(s,e,t)=>{if(e!=null&&e.contentWindow){const i=ge();return e.contentWindow.postMessage({action:"getData",id:t,_version:s.libVersion,requestId:i},"*"),new Promise((r,o)=>{s.promises[i]={resolve:r,reject:o},setTimeout(()=>{if(s.promises[i]){const n="getData request timed out.";s.promises[i].reject(new Error(n)),delete s.promises[i]}},2e3)})}return Promise.reject(new Error("Cannot retrieve contentWindow."))},ls=(s,e)=>{if(e!=null&&e.contentWindow){const t=ge();return e.contentWindow.postMessage({action:"getFilters",_version:s.libVersion,requestId:t},"*"),new Promise((i,r)=>{s.promises[t]={resolve:i,reject:r},setTimeout(()=>{if(s.promises[t]){const o="getFilters request timed out.";s.promises[t].reject(new Error(o)),delete s.promises[t]}},2e3)})}return Promise.reject(new Error("Cannot retrieve contentWindow."))},Ht=(s,e,t)=>e?(e.contentWindow.postMessage({action:"refreshData",id:t??null,_version:s.libVersion},"*"),Promise.resolve()):Promise.reject(new Error("Cannot retrieve contentWindow.")),ds=(s,e)=>e?(e.contentWindow.postMessage({action:"reloadDashboard",_version:s.libVersion},"*"),Promise.resolve()):Promise.reject(new Error("Cannot retrieve contentWindow.")),hs=(s,e,t,i)=>e?(e.contentWindow.postMessage({action:"setAuthorization",key:t,token:i,_version:s.libVersion},"*"),Promise.resolve()):Promise.reject(new Error("Cannot retrieve contentWindow.")),cs=(s,e,t)=>{if(e&&e.contentWindow){const i=ge();return s.params.editMode===t?Promise.reject(new Error("editMode parameter is currently already set to "+t)):t!=="editFull"&&t!=="editLimited"&&t!=="view"?Promise.reject(new Error("The editMode parameter must be one of the following values: 'editFull', 'editLimited' or 'view'.")):(e.contentWindow.postMessage({action:"setEditMode",editMode:t,_version:s.libVersion,requestId:i},"*"),new Promise((r,o)=>{s.promises[i]={resolve:r,reject:o}}))}return Promise.reject(new Error("Cannot retrieve contentWindow."))},us=(s,e,t,i)=>{if(e){const r=ge();return e.contentWindow.postMessage({action:"setSelectedData",itemId:t,filters:i,_version:s.libVersion,requestId:r},"*"),new Promise((o,n)=>{s.promises[r]={resolve:o,reject:n},setTimeout(()=>{if(s.promises[r]){const a="setSelectedData request timed out.";s.promises[r].reject(new Error(a)),delete s.promises[r]}},2e3)})}return Promise.reject()},ms=(s,e,t)=>{if(e){const i=ge();return e.contentWindow.postMessage({action:"setPreview",preview:t,requestId:i,_version:s.libVersion},"*"),new Promise((r,o)=>{s.promises[i]={resolve:r,reject:o},setTimeout(()=>{if(s.promises[i]){const n="setPreview request timed out.";s.promises[i].reject(new Error(n)),delete s.promises[i]}},2e3)})}return Promise.reject(new Error("Cannot retrieve contentWindow."))},Ae=s=>{var l,d,h,c,u,f,y,v;if(!s.dimensions){s.params.error=!0,pt("Got no valid dimensions.",s.params);return}const e=Object.keys(s.dimensions),t=[];let i,r=0,o=0;if(!s.params.switchScreenModeOnResize&&s.currentScreenMode&&(s.params.screenMode=s.currentScreenMode),s.dimensions&&(e==null?void 0:e[0])==="fixed")i="fixed",r=s.dimensions.fixed[0],o=s.dimensions.fixed[1];else{const b=["mobile","tablet","desktop","largeScreen"];if(s.params.itemEmbedding){const[w]=e;let z=Mt(w);for(const k of b){const S=e.find(R=>R===k);S?z=Mt(S):s.dimensions[k]=s.dimensions[z]}}for(const w of e)if(b.includes(w)){const z=ni.find(k=>k.mode===w);t.push({...z,height:s.dimensions[w][1]||50})}if(t.map(w=>w.mode).includes(s.params.screenMode)||(s.params.screenMode="auto"),s.params.screenMode==="auto"){t.sort((w,z)=>b.indexOf(w.mode)-b.indexOf(z.mode));for(const w of t){const[z,k]=w.width;s.params.itemEmbedding&&s.params.itemDimensions&&s.params.itemDimensions.width!=="auto"&&s.params.itemDimensions.height==="auto"?z<s.params.itemDimensions.width&&(i=w.mode,r=Number.parseInt(s.params.itemDimensions.width,10),o=s.dimensions[i][1]):z<s.containerWidth&&(i=w.mode,s.params.itemEmbedding?(r=(l=s.params.itemDimensions)!=null&&l.width&&((d=s.params.itemDimensions)==null?void 0:d.width)!=="auto"?Number.parseInt(s.params.itemDimensions.width,10):Math.min(s.containerWidth,k),o=(h=s.params.itemDimensions)!=null&&h.height&&((c=s.params.itemDimensions)==null?void 0:c.height)!=="auto"?Number.parseInt(s.params.itemDimensions.height,10):s.dimensions[i][1],s.params.itemDimensions&&s.params.itemDimensions.width!=="auto"&&s.params.itemDimensions.height==="auto"&&(r=Number.parseInt(s.params.itemDimensions.width,10),o=s.dimensions[i][1])):(r=Math.max(Math.min(k,s.containerWidth),z),o=w.height))}}else{const{height:w,width:[z,k]}=t.find(S=>S.mode===s.params.screenMode);i=s.params.screenMode,r=Math.max(Math.min(k,s.containerWidth),z),o=w,s.params.itemEmbedding&&((u=s.params.itemDimensions)!=null&&u.width&&((f=s.params.itemDimensions)==null?void 0:f.width)!=="auto"&&(r=Number.parseInt(s.params.itemDimensions.width,10)),(y=s.params.itemDimensions)!=null&&y.height&&((v=s.params.itemDimensions)==null?void 0:v.height)!=="auto"&&(o=Number.parseInt(s.params.itemDimensions.height,10)))}if(!i&&t.length>0){const[w]=t;i=w.mode,r=w.width[0],o=w.height}}s.currentScreenMode=i;const n={height:o===0?"100%":`${String(o)}px`,width:r===0?"100%":`${String(r)}px`,opacity:1};["editFull","editLimited"].includes(s.params.editMode)?(n.height="100%",n.width="100%"):s.params.itemEmbedding&&s.params.itemDimensions?(n.height=s.params.itemDimensions.height==="auto"?n.height:`${String(s.params.itemDimensions.height).replace("px","")}px`,n.width=s.params.itemDimensions.width==="auto"?n.width:`${String(s.params.itemDimensions.width).replace("px","")}px`):(n.height=o===0?"100%":`${String(o)}px`,n.width=r===0?"100%":`${String(r)}px`),s.currentScreenMode=i,s.iframeStyle=n},Nt=s=>{const e=Object.keys(W),t=[],i=["appServer","language","apiHost"],r=["key","token","screenMode","timezoneId","itemId","container","loaderBackground","loaderFontColor","loaderSpinnerColor","loaderSpinnerBackground"],o=["itemDimensions"],n=["mobile","tablet","desktop","largeScreen","fixed","auto"];for(const a of e)s.params[a]===null&&delete s.params[a];s.params=at(s.params,W),(!s.params.dashboardId||typeof s.params.dashboardId!="string")&&(!s.params.dashboardSlug||typeof s.params.dashboardSlug!="string")&&(delete s.params.dashboardId,delete s.params.dashboardSlug);for(const a of i)typeof s.params[a]!="string"&&(delete s.params[a],t.push(`${a} needs to be of type string.`));for(const a of r)typeof s.params[a]!="string"&&s.params[a]!==null&&s.params[a]!==void 0&&(delete s.params[a],t.push(`${a} needs to be of type string or empty.`));if(s.params.screenMode&&!n.includes(s.params.screenMode)){const a=n.map(l=>`"${l}"`).join(", ");t.push(`"screenMode" needs should be one of these types: ${a}`),s.params.screenMode="auto"}s.params.itemId&&(s.params.itemEmbedding=!0);for(const a of o)typeof s.params[a]!="object"&&s.params[a]!==null&&(delete s.params[a],t.push(`${a} needs to be of type object or empty.`));if(typeof s.params.switchScreenModeOnResize!="boolean"&&(t.push("switchScreenModeOnResize needs to be of type boolean."),s.params.switchScreenModeOnResize=!0),s.params.itemDimensions){const a=["width","height"];for(const l of a)!["string","number"].includes(typeof s.params.itemDimensions[l])&&s.params.itemDimensions[l]!==null&&t.push(`itemDimensions ${l} needs to be of type string, number or empty.`)}s.params=at(s.params,W),s.params.screenMode&&s.params.screenMode!=="auto"&&(s.params.switchScreenModeOnResize=!1),s.params.itemDimensions.width!=="auto"&&(s.params.itemDimensions.width=Number.parseInt(`${s.params.itemDimensions.width}`.replace("px",""),10)||"auto"),s.params.itemDimensions.height!=="auto"&&(s.params.itemDimensions.height=Number.parseInt(`${s.params.itemDimensions.height}`.replace("px",""),10)||"auto"),s.params.itemEmbedding=!!s.params.itemId,(s.params.error||t.length>0)&&pt(t.join(`
23
23
  `),s.params)},et={type:"type",slots:"slots",options:"options",appServer:"app-server",apiHost:"api-host",authKey:"auth-key",authToken:"auth-token",contextId:"context-id",canFilter:"can-filter",filters:"filters",dashboardId:"dashboard-id",itemId:"item-id",dashboardContentsVersion:"dashboard-contents-version",libVersion:"lib-version"},lt="luzmo-embed-container",Re={},gs=async(s,e)=>{const t=typeof s=="function"?await s():s,i=document.createElement("script");i.type="text/javascript",i.addEventListener("load",e),i.src=t,document.querySelectorAll("head")[0].append(i)},Ot=s=>({});async function fs(s){const e=Re[s];if(e.inited)return e.lib;if(e.format==="var")return new Promise(t=>{const i=()=>{e.inited||(e.lib=window[s],e.lib.init(Ot(e.from)),e.inited=!0),t(e.lib)};return gs(e.url,i)});if(["esm","systemjs"].includes(e.format))return new Promise((t,i)=>{(typeof e.url=="function"?e.url:()=>Promise.resolve(e.url))().then(o=>{import(o).then(n=>{if(!e.inited){const a=Ot(e.from);n.init(a),e.lib=n,e.lib.init(a),e.inited=!0}t(e.lib)}).catch(i)})})}function ps(s,e){if(!(s!=null&&s.default)&&e){const t=Object.create(null);return t.default=s,t.__esModule=!0,t}return s}async function ys(s,e){return fs(s).then(t=>t.get(e).then(i=>i()))}async function ne(s,e="DashboardApp"){const t=s+e;if(Re[t])return Re[t].module;let i=`${te(s)}/remoteEntry.mjs`;if(!s.startsWith("http://localhost"))switch(e){case"DashboardApp":case"VizItemApp":{i=`${te(s)}/dashboard-app/remoteEntry.mjs`;break}case"IQApp":{i=`${te(s)}/iq-components/remoteEntry.mjs`;break}}Re[t]={url:i,format:"esm",from:"vite",module:void 0};const r=await ys(t,`./${e}`),o=ps(r,!0);return Re[t].module=o,o}/**
@@ -31,8 +31,8 @@ import { C as zt } from "../color-DuJ4-73S.js";
31
31
  import { r as Li } from "../query-all-Ddzx2fEK.js";
32
32
  import { itemTypes as Hi } from "../item-list.js";
33
33
  import { s as Ni, g as xt } from "../index-CgnTl6Sc.js";
34
- import { m as le, g as Oi, t as Pi, s as $i } from "../set-locale-GI34z_M7.js";
35
- import { l as Wi } from "../localized-decorator-Bl5gcI6n.js";
34
+ import { m as le, g as Oi, t as Pi, s as $i } from "../set-locale-CW9yA503.js";
35
+ import { l as Wi } from "../localized-decorator-Di4TdvRQ.js";
36
36
  import "../index-BmshD32H.js";
37
37
  const wi = () => {
38
38
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
@@ -21,9 +21,9 @@ import { C as p } from "./color-DuJ4-73S.js";
21
21
  import { g as n, a as y } from "./color-palettes-BqH2Fv19.js";
22
22
  import { m as d } from "./index-t45_zv93.js";
23
23
  const s = () => structuredClone(n().Spectrum.colors5), m = (e) => {
24
- var r;
24
+ var l;
25
25
  if (!e || e.length === 0) return [];
26
- const t = /^rgb(a)?\s*\(/i.test(((r = e.at(-1)) == null ? void 0 : r.trim()) ?? "");
26
+ const t = /^rgb(a)?\s*\(/i.test(((l = e.at(-1)) == null ? void 0 : l.trim()) ?? "");
27
27
  return e.map((a) => new p(a).toString({ format: t ? "hex" : "rgb" }));
28
28
  }, o = (e) => {
29
29
  const t = (e == null ? void 0 : e.length) || 0;
@@ -31,15 +31,15 @@ const s = () => structuredClone(n().Spectrum.colors5), m = (e) => {
31
31
  type: "heat",
32
32
  colorClass: "Spectrum",
33
33
  colors: s()
34
- } : y().map((l) => {
34
+ } : y().map((r) => {
35
35
  var u, i;
36
36
  return {
37
- type: (u = n()[l]) == null ? void 0 : u.type,
38
- colorClass: l,
39
- colors: (i = n()[l]) == null ? void 0 : i[`colors${t}`]
37
+ type: (u = n()[r]) == null ? void 0 : u.type,
38
+ colorClass: r,
39
+ colors: (i = n()[r]) == null ? void 0 : i[`colors${t}`]
40
40
  };
41
41
  }).find(
42
- (l) => Array.isArray(l.colors) && Array.isArray(e) && l.colors.length === e.length && l.colors.every(
42
+ (r) => Array.isArray(r.colors) && Array.isArray(e) && r.colors.length === e.length && r.colors.every(
43
43
  (u, i) => u === e[i]
44
44
  )
45
45
  ) ?? {
@@ -128,8 +128,9 @@ const s = () => structuredClone(n().Spectrum.colors5), m = (e) => {
128
128
  default: !0
129
129
  }
130
130
  },
131
+ // TODO: check with heatRadius
131
132
  {
132
- key: "heatRadius",
133
+ key: "screenRadius",
133
134
  control: {
134
135
  type: "slider",
135
136
  label: "Radius",
@@ -159,7 +160,8 @@ const s = () => structuredClone(n().Spectrum.colors5), m = (e) => {
159
160
  open: !0,
160
161
  children: [
161
162
  {
162
- key: "opacity",
163
+ // TODO: rename to opacity
164
+ key: "transparency",
163
165
  control: {
164
166
  type: "slider",
165
167
  label: "Opacity",
@@ -178,11 +180,11 @@ const s = () => structuredClone(n().Spectrum.colors5), m = (e) => {
178
180
  enum: ["heat", "sequential", "manual"],
179
181
  calculateValue: ({ options: e }) => o(e == null ? void 0 : e.colors).type,
180
182
  toOptions: ({ options: e, value: t }) => {
181
- var c, l;
182
- const r = o(
183
+ var c, r;
184
+ const l = o(
183
185
  e == null ? void 0 : e.colors
184
186
  ), a = { ...e };
185
- return r.type !== t && (a.colors = t === "manual" ? m(r.colors ?? s()) : ((l = n()[(c = y(t)) == null ? void 0 : c[0]]) == null ? void 0 : l.colors5) ?? s()), a;
187
+ return l.type !== t && (a.colors = t === "manual" ? m(l.colors ?? s()) : ((r = n()[(c = y(t)) == null ? void 0 : c[0]]) == null ? void 0 : r.colors5) ?? s()), a;
186
188
  }
187
189
  }
188
190
  },
@@ -207,8 +209,8 @@ const s = () => structuredClone(n().Spectrum.colors5), m = (e) => {
207
209
  },
208
210
  toOptions: ({ options: e, value: t }) => {
209
211
  var a;
210
- const r = { ...e };
211
- return r.colors = ((a = n()[t]) == null ? void 0 : a.colors5) ?? s(), r;
212
+ const l = { ...e };
213
+ return l.colors = ((a = n()[t]) == null ? void 0 : a.colors5) ?? s(), l;
212
214
  }
213
215
  },
214
216
  visibleIf: ({ options: e }) => o(e == null ? void 0 : e.colors).type !== "manual"
@@ -0,0 +1,20 @@
1
+ /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Luzmo web components (“Luzmo Web Components”)
6
+ * must be used according to the Luzmo Terms of Service.
7
+ * This license allows users with a current active Luzmo account
8
+ * to use the Luzmo Web Components. This license terminates
9
+ * automatically if a user no longer has an active Luzmo account.
10
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ * SOFTWARE.
19
+ * */
20
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./color-B6LaL8qz.cjs"),o=require("./color-palettes-DhNHcib8.cjs"),p=require("./index-DhDgy1sp.cjs"),n=()=>structuredClone(o.getColorMaps().Spectrum.colors5),d=e=>{var l;if(!e||e.length===0)return[];const t=/^rgb(a)?\s*\(/i.test(((l=e.at(-1))==null?void 0:l.trim())??"");return e.map(a=>new y.Color(a).toString({format:t?"hex":"rgb"}))},s=e=>{const t=(e==null?void 0:e.length)||0;return t===0?{type:"heat",colorClass:"Spectrum",colors:n()}:o.getColorMapKeys().map(r=>{var u,i;return{type:(u=o.getColorMaps()[r])==null?void 0:u.type,colorClass:r,colors:(i=o.getColorMaps()[r])==null?void 0:i[`colors${t}`]}}).find(r=>Array.isArray(r.colors)&&Array.isArray(e)&&r.colors.length===e.length&&r.colors.every((u,i)=>u===e[i]))??{type:"manual",colorClass:"manual",colors:e}},m=[{key:"general",type:"group",open:!0,children:[{key:"display.title",control:{type:"switch",label:"Title",default:!0}},{key:"enabled.zoom",control:{type:"switch",label:"Zoom",default:!0}},{key:"enabled.pan",control:{type:"switch",label:"Pan",default:!0}},{key:"enabled.pitchBearing",control:{type:"switch",label:"Pitch & Rotate",default:!1}},{type:"divider"},{key:"vectorTileProvider",control:{type:"picker",label:"Map style",default:"Basic",enum:["Basic","Bright","Dark","Fiord","Liberty","Pastel","Positron","Streets","Toner","Topographique","Voyager","No Tiles"],parseValue:e=>(e==null?void 0:e.name)||"Basic",toValue:e=>p.mapVectorTileProviders[e]??{}}}]},{key:"heat",type:"group",open:!0,children:[{key:"enabled.adaptOnZoom",control:{type:"switch",label:"Adapt on zoom",tooltip:"If turned off, density is calculated based on map surface",default:!0}},{key:"screenRadius",control:{type:"slider",label:"Radius",default:20,min:1,max:50,step:1}},{key:"intensity",control:{type:"slider",label:"Intensity",tooltip:"Multiplier for the density, multiplies by 1 on minimum (default)",default:1,min:1,max:100,step:1}}]},{key:"heatColors",type:"group",open:!0,children:[{key:"transparency",control:{type:"slider",label:"Opacity",default:.8,min:0,max:1,step:.01}},{key:"colorsClassType",control:{type:"picker",label:"Colors type",default:"sequential",enum:["heat","sequential","manual"],calculateValue:({options:e})=>s(e==null?void 0:e.colors).type,toOptions:({options:e,value:t})=>{var c,r;const l=s(e==null?void 0:e.colors),a={...e};return l.type!==t&&(a.colors=t==="manual"?d(l.colors??n()):((r=o.getColorMaps()[(c=o.getColorMapKeys(t))==null?void 0:c[0]])==null?void 0:r.colors5)??n()),a}}},{key:"colorsClass",control:{type:"color-palette-picker",label:"Color palette",hideLabel:!0,default:"Spectrum",enum:({options:e})=>{const t=s(e==null?void 0:e.colors).type;return o.getColorMapKeys(["heat","sequential"].includes(t)?t:"heat")},calculateValue:({options:e})=>{const t=s(e==null?void 0:e.colors);return t!=null&&t.colorClass&&t.colorClass!=="manual"?t.colorClass:"Spectrum"},toOptions:({options:e,value:t})=>{var a;const l={...e};return l.colors=((a=o.getColorMaps()[t])==null?void 0:a.colors5)??n(),l}},visibleIf:({options:e})=>s(e==null?void 0:e.colors).type!=="manual"},{key:"colors",control:{type:"color-range",editRangeSize:!1,noValues:!0,minimumRangeSize:4,noAlphaChannel:!0,hideLabel:!0,label:"Manual color ranges",default:n(),parseValue:e=>e==null?void 0:e.map(t=>({color:t})),toValue:e=>(e==null?void 0:e.map(t=>t==null?void 0:t.color))??[]},visibleIf:({options:e})=>s(e==null?void 0:e.colors).type==="manual"}]}];exports.default=m;