@mattilsynet/design 2.2.22 → 2.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mtds/atlas.iife.js +1 -1
- package/mtds/chart/chart.css.js +59 -260
- package/mtds/chart/chart.css.js.map +1 -1
- package/mtds/chart/chart.js +11 -10
- package/mtds/chart/chart.js.map +1 -1
- package/mtds/chart/chart.stories.d.ts +2 -0
- package/mtds/field/field-observer.js +35 -35
- package/mtds/field/field-observer.js.map +1 -1
- package/mtds/field/field.d.ts +1 -0
- package/mtds/field/field.js +100 -95
- package/mtds/field/field.js.map +1 -1
- package/mtds/index.iife.js +66 -267
- package/mtds/package.json.js +1 -1
- package/mtds/styles.css +1 -1
- package/mtds/styles.json +43 -43
- package/mtds/styles.module.css.js +29 -29
- package/mtds/utils.d.ts +5 -4
- package/mtds/utils.js +23 -23
- package/mtds/utils.js.map +1 -1
- package/package.json +8 -8
package/mtds/atlas.iife.js
CHANGED
|
@@ -737,5 +737,5 @@ slot {
|
|
|
737
737
|
position: absolute;
|
|
738
738
|
rotate: 45deg;
|
|
739
739
|
} */
|
|
740
|
-
`;_.MarkerClusterGroup=_.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(n){_.Util.setOptions(this,n),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this.options.clusterPane||(this.options.clusterPane=_.Marker.prototype.options.pane),this._featureGroup=new _.FeatureGroup,this._featureGroup.addEventParent(this),this._nonPointGroup=new _.FeatureGroup,this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=_.DomUtil.TRANSITION&&this.options.animate;Object.assign(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?_.MarkerCluster:_.MarkerClusterNonAnimated},addLayer:function(n){if(n instanceof _.LayerGroup)return this.addLayers([n]);if(!n.getLatLng)return this._nonPointGroup.addLayer(n),this.fire("layeradd",{layer:n,propagatedFrom:n}),this;if(!this._map)return this._needsClustering.push(n),this.fire("layeradd",{layer:n,propagatedFrom:n}),this;if(this.hasLayer(n))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(n,this._maxZoom),this.fire("layeradd",{layer:n,propagatedFrom:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=n,e=this._zoom;if(n.__parent)for(;t.__parent._zoom>=e;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(n,t):this._animationAddLayerNonAnimated(n,t)),this},removeLayer:function(n){return n instanceof _.LayerGroup?this.removeLayers([n]):n.getLatLng?this._map?n.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(n)),this._removeLayer(n,!0),this.fire("layerremove",{layer:n,propagatedFrom:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),n.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(n)&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,n)&&this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire("layerremove",{layer:n,propagatedFrom:n}),this):(this._nonPointGroup.removeLayer(n),this.fire("layerremove",{layer:n,propagatedFrom:n}),this)},addLayers:function(n,t){if(!Array.isArray(n))return this.addLayer(n);var e=this._featureGroup,i=this._nonPointGroup,s=this.options.chunkedLoading,o=this.options.chunkInterval,r=this.options.chunkProgress,a=n.length,l=0,h=!0,d;if(this._map){const c=Date.now(),f=()=>{for(var m=Date.now();l<a&&!(s&&l%200===0&&Date.now()-m>o);l++){if(d=n[l],d instanceof _.LayerGroup){h&&(n=n.slice(),h=!1),this._extractNonGroupLayers(d,n),a=n.length;continue}if(!d.getLatLng){i.addLayer(d),t||this.fire("layeradd",{layer:d,propagatedFrom:d});continue}if(!this.hasLayer(d)&&(this._addLayer(d,this._maxZoom),t||this.fire("layeradd",{layer:d,propagatedFrom:d}),d.__parent&&d.__parent.getChildCount()===2)){const C=d.__parent.getAllChildMarkers(),k=C[0]===d?C[1]:C[0];e.removeLayer(k)}}r&&r(l,a,Date.now()-c),l===a?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(f,this.options.chunkDelay)};f()}else{const c=this._needsClustering;for(;l<a;l++){if(d=n[l],d instanceof _.LayerGroup){h&&(n=n.slice(),h=!1),this._extractNonGroupLayers(d,n),a=n.length;continue}if(!d.getLatLng){i.addLayer(d);continue}this.hasLayer(d)||c.push(d)}}return this},removeLayers:function(n){var t,e,i=n.length,s=this._featureGroup,o=this._nonPointGroup,r=!0;if(!this._map){for(t=0;t<i;t++){if(e=n[t],e instanceof _.LayerGroup){r&&(n=n.slice(),r=!1),this._extractNonGroupLayers(e,n),i=n.length;continue}this._arraySplice(this._needsClustering,e),o.removeLayer(e),this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e,propagatedFrom:e})}return this}if(this._unspiderfy){this._unspiderfy();const a=n.slice();let l=i;for(t=0;t<l;t++){if(e=a[t],e instanceof _.LayerGroup){this._extractNonGroupLayers(e,a),l=a.length;continue}this._unspiderfyLayer(e)}}for(t=0;t<i;t++){if(e=n[t],e instanceof _.LayerGroup){r&&(n=n.slice(),r=!1),this._extractNonGroupLayers(e,n),i=n.length;continue}if(!e.__parent){o.removeLayer(e),this.fire("layerremove",{layer:e,propagatedFrom:e});continue}this._removeLayer(e,!0,!0),this.fire("layerremove",{layer:e,propagatedFrom:e}),s.hasLayer(e)&&(s.removeLayer(e),e.clusterShow&&e.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(n){n.off(this._childMarkerEventHandlers,this),delete n.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var n=new _.LatLngBounds;this._topClusterLevel&&n.extend(this._topClusterLevel._bounds);for(let t=this._needsClustering.length-1;t>=0;t--)n.extend(this._needsClustering[t].getLatLng());return n.extend(this._nonPointGroup.getBounds()),n},eachLayer:function(n,t){var e=this._needsClustering.slice(),i=this._needsRemoving,s,o,r;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(e),o=e.length-1;o>=0;o--){for(s=!0,r=i.length-1;r>=0;r--)if(i[r].layer===e[o]){s=!1;break}s&&n.call(t,e[o])}this._nonPointGroup.eachLayer(n,t)},getLayers:function(){var n=[];return this.eachLayer(t=>{n.push(t)}),n},getLayer:function(n){var t=null;return n=parseInt(n,10),this.eachLayer(e=>{_.stamp(e)===n&&(t=e)}),t},hasLayer:function(n){if(!n)return!1;var t,e=this._needsClustering;for(t=e.length-1;t>=0;t--)if(e[t]===n)return!0;for(e=this._needsRemoving,t=e.length-1;t>=0;t--)if(e[t].layer===n)return!1;return!!(n.__parent&&n.__parent._group===this)||this._nonPointGroup.hasLayer(n)},zoomToShowLayer:function(n,t){typeof t!="function"&&(t=()=>{});var e=function(){(n._icon||n.__parent._icon)&&!this._inZoomAnimation&&(this._map.off("moveend",e,this),this.off("animationend",e,this),n._icon?t():n.__parent._icon&&(this.once("spiderfied",t,this),n.__parent.spiderfy()))};n._icon&&this._map.getBounds().contains(n.getLatLng())?t():n.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",e,this),this._map.panTo(n.getLatLng())):(this._map.on("moveend",e,this),this.on("animationend",e,this),n.__parent.zoomToBounds())},onAdd:function(n){this._map=n;var t,e,i;if(!Number.isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(n),this._nonPointGroup.addTo(n),this._gridClusters||this._generateInitialClusters(),this._maxLat=n.options.crs.projection.MAX_LATITUDE,t=0,e=this._needsRemoving.length;t<e;t++)i=this._needsRemoving[t],i.newlatlng=i.layer._latlng,i.layer._latlng=i.latlng;for(t=0,e=this._needsRemoving.length;t<e;t++)i=this._needsRemoving[t],this._removeLayer(i.layer,!0),i.layer._latlng=i.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),e=this._needsClustering,this._needsClustering=[],this.addLayers(e,!0)},onRemove:function(n){n.off("zoomend",this._zoomEnd,this),n.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:n=>{for(var t=n;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:(n,t)=>{for(let e=n.length-1;e>=0;e--)if(n[e]===t)return n.splice(e,1),!0},_removeFromGridUnclustered:function(n,t){for(var e=this._map,i=this._gridUnclustered,s=Math.floor(this._map.getMinZoom());t>=s&&i[t].removeObject(n,e.project(n.getLatLng(),t));t--);},_childMarkerDragStart:n=>{n.target.__dragStart=n.target._latlng},_childMarkerMoved:function(n){if(!this._ignoreMove&&!n.target.__dragStart){const t=(n.target._popup||null)?.isOpen();this._moveChild(n.target,n.oldLatLng,n.latlng),t&&n.target.openPopup()}},_moveChild:function(n,t,e){n._latlng=t,this.removeLayer(n),n._latlng=e,this.addLayer(n)},_childMarkerDragEnd:function(n){n.target.__dragStart&&this._moveChild(n.target,n.target.__dragStart,n.target._latlng),delete n.target.__dragStart},_removeLayer:function(n,t,e){var i=this._gridClusters,s=this._gridUnclustered,o=this._featureGroup,r=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(n,this._maxZoom);var l=n.__parent,h=l._markers,d;for(this._arraySplice(h,n);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<a));)t&&l._childCount<=1?(d=l._markers[0]===n?l._markers[1]:l._markers[0],i[l._zoom].removeObject(l,r.project(l._cLatLng,l._zoom)),s[l._zoom].addObject(d,r.project(d.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(d),d.__parent=l.__parent,l._icon&&(o.removeLayer(l),e||o.addLayer(d))):l._iconNeedsUpdate=!0,l=l.__parent;delete n.__parent},_isOrIsParent:(n,t)=>{for(;t;){if(n===t)return!0;t=t.parentNode}return!1},fire:function(n,t,e){if(t&&t.propagatedFrom instanceof _.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.propagatedFrom._icon,t.originalEvent.relatedTarget))return;n=`cluster${n}`}_.FeatureGroup.prototype.fire.call(this,n,t,e)},listens:function(n,t){return _.FeatureGroup.prototype.listens.call(this,n,t)||_.FeatureGroup.prototype.listens.call(this,`cluster${n}`,t)},_defaultIconCreateFunction:n=>{const t=n.getChildCount();let e=" marker-cluster-";return t<10?e+="small":t<100?e+="medium":e+="large",new _.DivIcon({html:`<div><span>${t}</span></div>`,className:`marker-cluster ${e}`,iconSize:new _.Point(40,40)})},_bindEvents:function(){var n=this._map,t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick;(t||i)&&this.on("clusterclick",this._zoomOrSpiderfy,this),e&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),n.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(n){const t=n.propagatedFrom;let e=t;for(;e._childClusters.length===1;)e=e._childClusters[0];e._zoom===this._maxZoom&&e._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),n.originalEvent&&n.originalEvent.keyCode===13&&this._map._container.focus()},_showCoverage:function(n){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),n.propagatedFrom.getChildCount()>2&&n.propagatedFrom!==this._spiderfied&&(this._shownPolygon=new _.Polygon(n.propagatedFrom.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var n=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,e=this.options.zoomToBoundsOnClick,i=this._map;(n||e)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),i.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var n=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,n),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),n),this._currentShownBounds=n}},_generateInitialClusters:function(){var n=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),e=this.options.maxClusterRadius,i=e;typeof e!="function"&&(i=()=>e),this.options.disableClusteringAtZoom!==null&&(n=this.options.disableClusteringAtZoom-1),this._maxZoom=n,this._gridClusters={},this._gridUnclustered={};for(let s=n;s>=t;s--)this._gridClusters[s]=new _.DistanceGrid(i(s)),this._gridUnclustered[s]=new _.DistanceGrid(i(s));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(n,t){var e=this._gridClusters,i=this._gridUnclustered,s=Math.floor(this._map.getMinZoom()),o,r;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(n),n.on(this._childMarkerEventHandlers,this);t>=s;t--){o=this._map.project(n.getLatLng(),t);let a=e[t].getNearObject(o);if(a){a._addChild(n),n.__parent=a;return}if(a=i[t].getNearObject(o),a){const l=a.__parent;l&&this._removeLayer(a,!1);const h=new this._markerCluster(this,t,a,n);e[t].addObject(h,this._map.project(h._cLatLng,t)),a.__parent=h,n.__parent=h;let d=h;for(r=t-1;r>l._zoom;r--)d=new this._markerCluster(this,r,d),e[r].addObject(d,this._map.project(a.getLatLng(),r));l._addChild(d),this._removeFromGridUnclustered(a,t);return}i[t].addObject(n,o)}this._topClusterLevel._addChild(n),n.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(n=>{n instanceof _.MarkerCluster&&n._iconNeedsUpdate&&n._updateIcon()})},_enqueue:function(n){this._queue.push(n),this._queueTimeout||(this._queueTimeout=setTimeout(()=>this._processQueue(),300))},_processQueue:function(){for(let n=0;n<this._queue.length;n++)this._queue[n].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var n=Math.round(this._map._zoom);this._processQueue(),this._zoom<n&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,n)):this._zoom>n?(this._animationStart(),this._animationZoomOut(this._zoom,n)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(this.options.removeOutsideVisibleBounds){if(_.Browser.mobile)return this._checkBoundsMaxLat(this._map.getBounds())}else return this._mapBoundsInfinite;return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(n){var t=this._maxLat;return t!==void 0&&(n.getNorth()>=t&&(n._northEast.lat=1/0),n.getSouth()<=-t&&(n._southWest.lat=-1/0)),n},_animationAddLayerNonAnimated:function(n,t){if(t===n)this._featureGroup.addLayer(n);else if(t._childCount===2){t._addToMap();const e=t.getAllChildMarkers();this._featureGroup.removeLayer(e[0]),this._featureGroup.removeLayer(e[1])}else t._updateIcon()},_extractNonGroupLayers:function(n,t){var e=n.getLayers(),i=0,s;for(t=t||[];i<e.length;i++){if(s=e[i],s instanceof _.LayerGroup){this._extractNonGroupLayers(s,t);continue}t.push(s)}return t},_overrideMarkerIcon:function(n){return n.options.icon=this.options.iconCreateFunction({getChildCount:()=>1,getAllChildMarkers:()=>[n]}),n.options.icon}}),_.MarkerClusterGroup.include({_mapBoundsInfinite:new _.LatLngBounds(new _.LatLng(-1/0,-1/0),new _.LatLng(1/0,1/0))}),_.MarkerClusterGroup.include({_noAnimation:{_animationStart:()=>{},_animationZoomIn:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(n,t){this._animationAddLayerNonAnimated(n,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(n,t){var e=this._getExpandedVisibleBounds(),i=this._featureGroup,s=Math.floor(this._map.getMinZoom()),o;this._ignoreMove=!0,this._topClusterLevel._recursively(e,n,s,r=>{var a=r._latlng,l=r._markers,h;for(e.contains(a)||(a=null),r._isSingleParent()&&n+1===t?(i.removeLayer(r),r._recursivelyAddChildrenToMap(null,t,e)):(r.clusterHide(),r._recursivelyAddChildrenToMap(a,t,e)),o=l.length-1;o>=0;o--)h=l[o],e.contains(h._latlng)||i.removeLayer(h)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(e,t),i.eachLayer(r=>{!(r instanceof _.MarkerCluster)&&r._icon&&r.clusterShow()}),this._topClusterLevel._recursively(e,n,t,r=>{r._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(e,n,s,r=>{i.removeLayer(r),r.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(n,t){this._animationZoomOutSingle(this._topClusterLevel,n-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n,this._getExpandedVisibleBounds())},_animationAddLayer:function(n,t){var e=this._featureGroup;e.addLayer(n),t!==n&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),n._setPos(this._map.latLngToLayerPoint(t.getLatLng())),n.clusterHide(),this._enqueue(()=>{e.removeLayer(n),n.clusterShow(),this._animationEnd()})):(this._forceLayout(),this._animationStart(),this._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(n,t,e){var i=this._getExpandedVisibleBounds(),s=Math.floor(this._map.getMinZoom());n._recursivelyAnimateChildrenInAndAddSelfToMap(i,s,t+1,e);var o=this;this._forceLayout(),n._recursivelyBecomeVisible(i,e),this._enqueue(function(){if(n._childCount===1){const r=n._markers[0];this._ignoreMove=!0,r.setLatLng(r.getLatLng()),this._ignoreMove=!1,r.clusterShow&&r.clusterShow()}else n._recursively(i,e,s,r=>{r._recursivelyRemoveChildrenFromMap(i,s,t+1)});o._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:()=>{_.Util.falseFn(document.body.offsetWidth)}}),_.MarkerCluster=_.Marker.extend({initialize:function(n,t,e,i){_.Marker.prototype.initialize.call(this,e?e._cLatLng||e.getLatLng():new _.LatLng(0,0),{icon:this,pane:n.options.clusterPane}),this._group=n,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new _.LatLngBounds,e&&this._addChild(e),i&&this._addChild(i)},getAllChildMarkers:function(n){n=n||[];for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t].getAllChildMarkers(n);for(let t=this._markers.length-1;t>=0;t--)n.push(this._markers[t]);return n},getChildCount:function(){return this._childCount},zoomToBounds:function(n){for(var t=this._childClusters.slice(),e=this._group._map,i=e.getBoundsZoom(this._bounds),s=this._zoom+1,o=e.getZoom(),r;t.length>0&&i>s;){s++;let a=[];for(r=0;r<t.length;r++)a=a.concat(t[r]._childClusters);t=a}i>s?this._group._map.setView(this._latlng,s):i<=o?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,n)},getBounds:function(){var n=new _.LatLngBounds;return n.extend(this._bounds),n},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(n,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(n),n instanceof _.MarkerCluster?(t||(this._childClusters.push(n),n.__parent=this),this._childCount+=n._childCount):(t||this._markers.push(n),this._childCount++),this.__parent&&this.__parent._addChild(n,!0)},_setClusterCenter:function(n){this._cLatLng||(this._cLatLng=n._cLatLng||n._latlng)},_resetBounds:function(){var n=this._bounds;n._southWest&&(n._southWest.lat=1/0,n._southWest.lng=1/0),n._northEast&&(n._northEast.lat=-1/0,n._northEast.lng=-1/0)},_recalculateBounds:function(){var n=this._markers,t=this._childClusters,e=0,i=0,s=this._childCount,o,r,a,l;if(s!==0){for(this._resetBounds(),o=0;o<n.length;o++)a=n[o]._latlng,this._bounds.extend(a),e+=a.lat,i+=a.lng;for(o=0;o<t.length;o++)r=t[o],r._boundsNeedUpdate&&r._recalculateBounds(),this._bounds.extend(r._bounds),a=r._wLatLng,l=r._childCount,e+=a.lat*l,i+=a.lng*l;this._latlng=this._wLatLng=new _.LatLng(e/s,i/s),this._boundsNeedUpdate=!1}},_addToMap:function(n){n&&(this._backupLatlng=this._latlng,this.setLatLng(n)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(n,t,e){this._recursively(n,this._group._map.getMinZoom(),e-1,i=>{var s=i._markers,o,r;for(o=s.length-1;o>=0;o--)r=s[o],r._icon&&(r._setPos(t),r.clusterHide())},i=>{var s=i._childClusters,o,r;for(o=s.length-1;o>=0;o--)r=s[o],r._icon&&(r._setPos(t),r.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(n,t,e,i){this._recursively(n,i,t,s=>{s._recursivelyAnimateChildrenIn(n,s._group._map.latLngToLayerPoint(s.getLatLng()).round(),e),s._isSingleParent()&&e-1===i?(s.clusterShow(),s._recursivelyRemoveChildrenFromMap(n,t,e)):s.clusterHide(),s._addToMap()})},_recursivelyBecomeVisible:function(n,t){this._recursively(n,this._group._map.getMinZoom(),t,null,e=>{e.clusterShow()})},_recursivelyAddChildrenToMap:function(n,t,e){this._recursively(e,this._group._map.getMinZoom()-1,t,i=>{if(t!==i._zoom)for(let s=i._markers.length-1;s>=0;s--){const o=i._markers[s];e.contains(o._latlng)&&(n&&(o._backupLatlng=o.getLatLng(),o.setLatLng(n),o.clusterHide&&o.clusterHide()),i._group._featureGroup.addLayer(o))}},i=>{i._addToMap(n)})},_recursivelyRestoreChildPositions:function(n){for(let t=this._markers.length-1;t>=0;t--){const e=this._markers[t];e._backupLatlng&&(e.setLatLng(e._backupLatlng),delete e._backupLatlng)}if(n-1===this._zoom)for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._restorePosition();else for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._recursivelyRestoreChildPositions(n)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(n,t,e,i){var s,o;this._recursively(n,t-1,e-1,r=>{for(o=r._markers.length-1;o>=0;o--)s=r._markers[o],(!i||!i.contains(s._latlng))&&(r._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())},r=>{for(o=r._childClusters.length-1;o>=0;o--)s=r._childClusters[o],(!i||!i.contains(s._latlng))&&(r._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())})},_recursively:function(n,t,e,i,s){var o=this._childClusters,r=this._zoom,a,l;if(t<=r&&(i&&i(this),s&&r===e&&s(this)),r<t||r<e)for(a=o.length-1;a>=0;a--)l=o[a],n.intersects(l._bounds)&&l._recursively(n,t,e,i,s)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),_.Marker.include({clusterHide:function(){return this.options.opacityWhenUnclustered=this.options.opacity||1,this.setOpacity(0)},clusterShow:function(){var n=this.setOpacity(this.options.opacity||this.options.opacityWhenUnclustered);return delete this.options.opacityWhenUnclustered,n}}),_.DistanceGrid=function(n){this._cellSize=n,this._sqCellSize=n*n,this._grid={},this._objectPoint={}},_.DistanceGrid.prototype={addObject:function(n,t){var e=this._getCoord(t.x),i=this._getCoord(t.y),s=this._grid;s[i]=s[i]||{};var o=s[i];o[e]=o[e]||[];var r=o[e],a=_.Util.stamp(n);this._objectPoint[a]=t,r.push(n)},updateObject:function(n,t){this.removeObject(n),this.addObject(n,t)},removeObject:function(n,t){var e=this._getCoord(t.x),i=this._getCoord(t.y),s=this._grid;s[i]=s[i]||{};var o=s[i];o[e]=o[e]||[];var r=o[e],a,l;for(delete this._objectPoint[_.Util.stamp(n)],a=0,l=r.length;a<l;a++)if(r[a]===n)return r.splice(a,1),l===1&&delete o[e],!0},eachObject:function(n,t){var e,i,s,o,r,a,l,h=this._grid;for(e in h){r=h[e];for(i in r)for(a=r[i],s=0,o=a.length;s<o;s++)l=n.call(t,a[s]),l&&(s--,o--)}},getNearObject:function(n){var t=this._getCoord(n.x),e=this._getCoord(n.y),i,s,o,r,a,l,h,d,c=this._objectPoint,f=this._sqCellSize,m=null;for(i=e-1;i<=e+1;i++)if(r=this._grid[i],r){for(s=t-1;s<=t+1;s++)if(a=r[s],a)for(o=0,l=a.length;o<l;o++)h=a[o],d=this._sqDist(c[_.Util.stamp(h)],n),d<f&&(f=d,m=h)}return m},_getCoord:function(n){return Math.floor(n/this._cellSize)},_sqDist:(n,t)=>{var e=t.x-n.x,i=t.y-n.y;return e*e+i*i}},_.QuickHull={getDistant:(n,t)=>{var e=t[1].lat-t[0].lat,i=t[0].lng-t[1].lng;return i*(n.lat-t[0].lat)+e*(n.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(n,t){var e=0,i=null,s=[],o,r,a;for(o=t.length-1;o>=0;o--){if(r=t[o],a=this.getDistant(r,n),a>0)s.push(r);else continue;a>e&&(e=a,i=r)}return{maxPoint:i,newPoints:s}},buildConvexHull:function(n,t){var e=[],i=this.findMostDistantPointFromBaseLine(n,t);return i.maxPoint?(e=e.concat(this.buildConvexHull([n[0],i.maxPoint],i.newPoints)),e=e.concat(this.buildConvexHull([i.maxPoint,n[1]],i.newPoints)),e):[n[0]]},getConvexHull:function(n){var t=!1,e=!1,i=!1,s=!1,o=null,r=null,a=null,l=null,h=null,d=null,c;for(c=n.length-1;c>=0;c--){const m=n[c];(t===!1||m.lat>t)&&(o=m,t=m.lat),(e===!1||m.lat<e)&&(r=m,e=m.lat),(i===!1||m.lng>i)&&(a=m,i=m.lng),(s===!1||m.lng<s)&&(l=m,s=m.lng)}e!==t?(d=r,h=o):(d=l,h=a);var f=[].concat(this.buildConvexHull([d,h],n),this.buildConvexHull([h,d],n));return f}},_.MarkerCluster.include({getConvexHull:function(){var n=this.getAllChildMarkers(),t=[],e,i;for(i=n.length-1;i>=0;i--)e=n[i].getLatLng(),t.push(e);return _.QuickHull.getConvexHull(t)}}),_.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var n=this.getAllChildMarkers(),t=this._group,e=t._map,i=e.latLngToLayerPoint(this._latlng),s;this._group._unspiderfy(),this._group._spiderfied=this,n.length>=this._circleSpiralSwitchover?s=this._generatePointsSpiral(n.length,i):(i.y+=10,s=this._generatePointsCircle(n.length,i)),this._animationSpiderfy(n,s)}},unspiderfy:function(n){this._group._inZoomAnimation||(this._animationUnspiderfy(n),this._group._spiderfied=null)},_generatePointsCircle:function(n,t){var e=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+n),i=e/this._2PI,s=this._2PI/n,o=[],r,a;for(o.length=n,r=n-1;r>=0;r--)a=this._circleStartAngle+r*s,o[r]=new _.Point(t.x+i*Math.cos(a),t.y+i*Math.sin(a))._round();return o},_generatePointsSpiral:function(n,t){var e=this._group.options.spiderfyDistanceMultiplier,i=e*this._spiralLengthStart,s=e*this._spiralFootSeparation,o=e*this._spiralLengthFactor*this._2PI,r=0,a=[],l;for(a.length=n,l=n-1;l>=0;l--)r+=s/i+l*5e-4,a[l]=new _.Point(t.x+i*Math.cos(r),t.y+i*Math.sin(r))._round(),i+=o/r;return a},_noanimationUnspiderfy:function(){var n=this._group,t=n._map,e=n._featureGroup,i=this.getAllChildMarkers(),s,o;for(n._ignoreMove=!0,this.setOpacity(1),o=i.length-1;o>=0;o--)s=i[o],e.removeLayer(s),s._preSpiderfyLatlng&&(s.setLatLng(s._preSpiderfyLatlng),delete s._preSpiderfyLatlng),s.setZIndexOffset&&s.setZIndexOffset(0),s._spiderLeg&&(t.removeLayer(s._spiderLeg),delete s._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:i}),n._ignoreMove=!1,n._spiderfied=null}}),_.MarkerClusterNonAnimated=_.MarkerCluster.extend({_animationSpiderfy:function(n,t){var e=this._group,i=e._map,s=e._featureGroup,o=this._group.options.spiderLegPolylineOptions,r,a,l,h;for(e._ignoreMove=!0,r=0;r<n.length;r++)h=i.layerPointToLatLng(t[r]),a=n[r],l=new _.Polyline([this._latlng,h],o),i.addLayer(l),a._spiderLeg=l,a._preSpiderfyLatlng=a._latlng,a.setLatLng(h),a.setZIndexOffset&&a.setZIndexOffset(1e6),s.addLayer(a);this.setOpacity(.3),e._ignoreMove=!1,e.fire("spiderfied",{cluster:this,markers:n})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),_.MarkerCluster.include({_animationSpiderfy:function(n,t){var e=this._group,i=e._map,s=e._featureGroup,o=this._latlng,r=i.latLngToLayerPoint(o),a=_.Path.SVG,l=Object.assign({},this._group.options.spiderLegPolylineOptions),h=l.opacity,d,c,f,m,C,k;for(h===void 0&&(h=_.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),a?(l.opacity=0,l.className=`${l.className||""} leaflet-cluster-spider-leg`):l.opacity=h,e._ignoreMove=!0,d=0;d<n.length;d++)c=n[d],k=i.layerPointToLatLng(t[d]),f=new _.Polyline([o,k],l),i.addLayer(f),c._spiderLeg=f,a&&(m=f._path,C=m.getTotalLength()+.1,m.style.strokeDasharray=C,m.style.strokeDashoffset=C),c.setZIndexOffset&&c.setZIndexOffset(1e6),c.clusterHide&&c.clusterHide(),s.addLayer(c),c._setPos&&c._setPos(r);for(e._forceLayout(),e._animationStart(),d=n.length-1;d>=0;d--)k=i.layerPointToLatLng(t[d]),c=n[d],c._preSpiderfyLatlng=c._latlng,c.setLatLng(k),c.clusterShow&&c.clusterShow(),a&&(f=c._spiderLeg,m=f._path,m.style.strokeDashoffset=0,f.setStyle({opacity:h}));this.setOpacity(.3),e._ignoreMove=!1,setTimeout(()=>{e._animationEnd(),e.fire("spiderfied",{cluster:this,markers:n})},200)},_animationUnspiderfy:function(n){var t=this._group,e=t._map,i=t._featureGroup,s=n?e._latLngToNewLayerPoint(this._latlng,n.zoom,n.center):e.latLngToLayerPoint(this._latlng),o=this.getAllChildMarkers(),r=_.Path.SVG,a,l,h,d,c,f;for(t._ignoreMove=!0,t._animationStart(),this.setOpacity(1),l=o.length-1;l>=0;l--)a=o[l],a._preSpiderfyLatlng&&(a.closePopup(),a.setLatLng(a._preSpiderfyLatlng),delete a._preSpiderfyLatlng,f=!0,a._setPos&&(a._setPos(s),f=!1),a.clusterHide&&(a.clusterHide(),f=!1),f&&i.removeLayer(a),r&&(h=a._spiderLeg,d=h._path,c=d.getTotalLength()+.1,d.style.strokeDashoffset=c,h.setStyle({opacity:0})));t._ignoreMove=!1,setTimeout(()=>{var m=0;for(l=o.length-1;l>=0;l--)a=o[l],a._spiderLeg&&m++;for(l=o.length-1;l>=0;l--)a=o[l],a._spiderLeg&&(a.clusterShow&&a.clusterShow(),a.setZIndexOffset&&a.setZIndexOffset(0),m>1&&i.removeLayer(a),e.removeLayer(a._spiderLeg),delete a._spiderLeg);t._animationEnd(),t.fire("unspiderfied",{cluster:this,markers:o})},200)}}),_.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(...n){this._unspiderfy.apply(this,n)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),_.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(n){this._map._mapPane.classList.contains("leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(n))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(n){this._spiderfied&&this._spiderfied.unspiderfy(n)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(n){n._spiderLeg&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow(),n.setZIndexOffset&&n.setZIndexOffset(0),this._map.removeLayer(n._spiderLeg),delete n._spiderLeg)}}),_.MarkerClusterGroup.include({refreshClusters:function(n){return n?n instanceof _.MarkerClusterGroup?n=n._topClusterLevel.getAllChildMarkers():n instanceof _.LayerGroup?n=n._layers:n instanceof _.MarkerCluster?n=n.getAllChildMarkers():n instanceof _.Marker&&(n=[n]):n=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(n),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(n),this},_flagParentsIconsNeedUpdate:n=>{var t,e;for(t in n)for(e=n[t].__parent;e;)e._iconNeedsUpdate=!0,e=e.__parent},_refreshSingleMarkerModeMarkers:function(n){var t,e;for(t in n)e=n[t],this.hasLayer(e)&&e.setIcon(this._overrideMarkerIcon(e))}}),_.Marker.include({refreshIconOptions:function(n,t){var e=this.options.icon;return _.setOptions(e,n),this.setIcon(e),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}});const Cn={dialog:"_dialog_1cl7y_1 _ds-dialog_5rpuv_5"},Tn=typeof window<"u"&&typeof document<"u";function kn(n,t){let e;return function(...i){clearTimeout(e),e=setTimeout(()=>n.apply(this,i),t)}}function D(n,t,e){return e===void 0?n.getAttribute(t)??null:(e===null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e),null)}`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;const Ai=(n,t,[...e])=>{for(const i of e[0].split(","))e[0]=i,t[`${n}EventListener`](...e)},Mn=(n,...t)=>(Ai("add",n,t),()=>zn(n,...t)),zn=(n,...t)=>Ai("remove",n,t);`${Cn.dialog.split(" ")[0]}`;function Sn(n,t){const e=new ResizeObserver(n);return e.observe(t),()=>e.disconnect()}const ze=(n,t,e)=>{const i=document.createElement(n);if(e&&(i.textContent=e),t)for(const[s,o]of Object.entries(t))D(i,s,o);return i},On=typeof HTMLElement>"u"?class{}:HTMLElement,Vt=[30,30],Bi=18,Zn=[[57.5,4.73],[71.5,31.44]],En="https://cache.kartverket.no/v1/wmts/1.0.0/topo/default/webmercator/{z}/{y}/{x}.png";class Kt extends On{cluster;map;static get observedAttributes(){return["data-view","data-scrollzoom"]}constructor(){super(),this.attachShadow({mode:"open"}).append(ze("style",{},`@layer leaflet{${Ln}}
|
|
740
|
+
`;_.MarkerClusterGroup=_.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(n){_.Util.setOptions(this,n),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this.options.clusterPane||(this.options.clusterPane=_.Marker.prototype.options.pane),this._featureGroup=new _.FeatureGroup,this._featureGroup.addEventParent(this),this._nonPointGroup=new _.FeatureGroup,this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=_.DomUtil.TRANSITION&&this.options.animate;Object.assign(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?_.MarkerCluster:_.MarkerClusterNonAnimated},addLayer:function(n){if(n instanceof _.LayerGroup)return this.addLayers([n]);if(!n.getLatLng)return this._nonPointGroup.addLayer(n),this.fire("layeradd",{layer:n,propagatedFrom:n}),this;if(!this._map)return this._needsClustering.push(n),this.fire("layeradd",{layer:n,propagatedFrom:n}),this;if(this.hasLayer(n))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(n,this._maxZoom),this.fire("layeradd",{layer:n,propagatedFrom:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=n,e=this._zoom;if(n.__parent)for(;t.__parent._zoom>=e;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(n,t):this._animationAddLayerNonAnimated(n,t)),this},removeLayer:function(n){return n instanceof _.LayerGroup?this.removeLayers([n]):n.getLatLng?this._map?n.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(n)),this._removeLayer(n,!0),this.fire("layerremove",{layer:n,propagatedFrom:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),n.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(n)&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,n)&&this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire("layerremove",{layer:n,propagatedFrom:n}),this):(this._nonPointGroup.removeLayer(n),this.fire("layerremove",{layer:n,propagatedFrom:n}),this)},addLayers:function(n,t){if(!Array.isArray(n))return this.addLayer(n);var e=this._featureGroup,i=this._nonPointGroup,s=this.options.chunkedLoading,o=this.options.chunkInterval,r=this.options.chunkProgress,a=n.length,l=0,h=!0,d;if(this._map){const c=Date.now(),f=()=>{for(var m=Date.now();l<a&&!(s&&l%200===0&&Date.now()-m>o);l++){if(d=n[l],d instanceof _.LayerGroup){h&&(n=n.slice(),h=!1),this._extractNonGroupLayers(d,n),a=n.length;continue}if(!d.getLatLng){i.addLayer(d),t||this.fire("layeradd",{layer:d,propagatedFrom:d});continue}if(!this.hasLayer(d)&&(this._addLayer(d,this._maxZoom),t||this.fire("layeradd",{layer:d,propagatedFrom:d}),d.__parent&&d.__parent.getChildCount()===2)){const C=d.__parent.getAllChildMarkers(),k=C[0]===d?C[1]:C[0];e.removeLayer(k)}}r&&r(l,a,Date.now()-c),l===a?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(f,this.options.chunkDelay)};f()}else{const c=this._needsClustering;for(;l<a;l++){if(d=n[l],d instanceof _.LayerGroup){h&&(n=n.slice(),h=!1),this._extractNonGroupLayers(d,n),a=n.length;continue}if(!d.getLatLng){i.addLayer(d);continue}this.hasLayer(d)||c.push(d)}}return this},removeLayers:function(n){var t,e,i=n.length,s=this._featureGroup,o=this._nonPointGroup,r=!0;if(!this._map){for(t=0;t<i;t++){if(e=n[t],e instanceof _.LayerGroup){r&&(n=n.slice(),r=!1),this._extractNonGroupLayers(e,n),i=n.length;continue}this._arraySplice(this._needsClustering,e),o.removeLayer(e),this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e,propagatedFrom:e})}return this}if(this._unspiderfy){this._unspiderfy();const a=n.slice();let l=i;for(t=0;t<l;t++){if(e=a[t],e instanceof _.LayerGroup){this._extractNonGroupLayers(e,a),l=a.length;continue}this._unspiderfyLayer(e)}}for(t=0;t<i;t++){if(e=n[t],e instanceof _.LayerGroup){r&&(n=n.slice(),r=!1),this._extractNonGroupLayers(e,n),i=n.length;continue}if(!e.__parent){o.removeLayer(e),this.fire("layerremove",{layer:e,propagatedFrom:e});continue}this._removeLayer(e,!0,!0),this.fire("layerremove",{layer:e,propagatedFrom:e}),s.hasLayer(e)&&(s.removeLayer(e),e.clusterShow&&e.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(n){n.off(this._childMarkerEventHandlers,this),delete n.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var n=new _.LatLngBounds;this._topClusterLevel&&n.extend(this._topClusterLevel._bounds);for(let t=this._needsClustering.length-1;t>=0;t--)n.extend(this._needsClustering[t].getLatLng());return n.extend(this._nonPointGroup.getBounds()),n},eachLayer:function(n,t){var e=this._needsClustering.slice(),i=this._needsRemoving,s,o,r;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(e),o=e.length-1;o>=0;o--){for(s=!0,r=i.length-1;r>=0;r--)if(i[r].layer===e[o]){s=!1;break}s&&n.call(t,e[o])}this._nonPointGroup.eachLayer(n,t)},getLayers:function(){var n=[];return this.eachLayer(t=>{n.push(t)}),n},getLayer:function(n){var t=null;return n=parseInt(n,10),this.eachLayer(e=>{_.stamp(e)===n&&(t=e)}),t},hasLayer:function(n){if(!n)return!1;var t,e=this._needsClustering;for(t=e.length-1;t>=0;t--)if(e[t]===n)return!0;for(e=this._needsRemoving,t=e.length-1;t>=0;t--)if(e[t].layer===n)return!1;return!!(n.__parent&&n.__parent._group===this)||this._nonPointGroup.hasLayer(n)},zoomToShowLayer:function(n,t){typeof t!="function"&&(t=()=>{});var e=function(){(n._icon||n.__parent._icon)&&!this._inZoomAnimation&&(this._map.off("moveend",e,this),this.off("animationend",e,this),n._icon?t():n.__parent._icon&&(this.once("spiderfied",t,this),n.__parent.spiderfy()))};n._icon&&this._map.getBounds().contains(n.getLatLng())?t():n.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",e,this),this._map.panTo(n.getLatLng())):(this._map.on("moveend",e,this),this.on("animationend",e,this),n.__parent.zoomToBounds())},onAdd:function(n){this._map=n;var t,e,i;if(!Number.isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(n),this._nonPointGroup.addTo(n),this._gridClusters||this._generateInitialClusters(),this._maxLat=n.options.crs.projection.MAX_LATITUDE,t=0,e=this._needsRemoving.length;t<e;t++)i=this._needsRemoving[t],i.newlatlng=i.layer._latlng,i.layer._latlng=i.latlng;for(t=0,e=this._needsRemoving.length;t<e;t++)i=this._needsRemoving[t],this._removeLayer(i.layer,!0),i.layer._latlng=i.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),e=this._needsClustering,this._needsClustering=[],this.addLayers(e,!0)},onRemove:function(n){n.off("zoomend",this._zoomEnd,this),n.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:n=>{for(var t=n;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:(n,t)=>{for(let e=n.length-1;e>=0;e--)if(n[e]===t)return n.splice(e,1),!0},_removeFromGridUnclustered:function(n,t){for(var e=this._map,i=this._gridUnclustered,s=Math.floor(this._map.getMinZoom());t>=s&&i[t].removeObject(n,e.project(n.getLatLng(),t));t--);},_childMarkerDragStart:n=>{n.target.__dragStart=n.target._latlng},_childMarkerMoved:function(n){if(!this._ignoreMove&&!n.target.__dragStart){const t=(n.target._popup||null)?.isOpen();this._moveChild(n.target,n.oldLatLng,n.latlng),t&&n.target.openPopup()}},_moveChild:function(n,t,e){n._latlng=t,this.removeLayer(n),n._latlng=e,this.addLayer(n)},_childMarkerDragEnd:function(n){n.target.__dragStart&&this._moveChild(n.target,n.target.__dragStart,n.target._latlng),delete n.target.__dragStart},_removeLayer:function(n,t,e){var i=this._gridClusters,s=this._gridUnclustered,o=this._featureGroup,r=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(n,this._maxZoom);var l=n.__parent,h=l._markers,d;for(this._arraySplice(h,n);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<a));)t&&l._childCount<=1?(d=l._markers[0]===n?l._markers[1]:l._markers[0],i[l._zoom].removeObject(l,r.project(l._cLatLng,l._zoom)),s[l._zoom].addObject(d,r.project(d.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(d),d.__parent=l.__parent,l._icon&&(o.removeLayer(l),e||o.addLayer(d))):l._iconNeedsUpdate=!0,l=l.__parent;delete n.__parent},_isOrIsParent:(n,t)=>{for(;t;){if(n===t)return!0;t=t.parentNode}return!1},fire:function(n,t,e){if(t&&t.propagatedFrom instanceof _.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.propagatedFrom._icon,t.originalEvent.relatedTarget))return;n=`cluster${n}`}_.FeatureGroup.prototype.fire.call(this,n,t,e)},listens:function(n,t){return _.FeatureGroup.prototype.listens.call(this,n,t)||_.FeatureGroup.prototype.listens.call(this,`cluster${n}`,t)},_defaultIconCreateFunction:n=>{const t=n.getChildCount();let e=" marker-cluster-";return t<10?e+="small":t<100?e+="medium":e+="large",new _.DivIcon({html:`<div><span>${t}</span></div>`,className:`marker-cluster ${e}`,iconSize:new _.Point(40,40)})},_bindEvents:function(){var n=this._map,t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick;(t||i)&&this.on("clusterclick",this._zoomOrSpiderfy,this),e&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),n.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(n){const t=n.propagatedFrom;let e=t;for(;e._childClusters.length===1;)e=e._childClusters[0];e._zoom===this._maxZoom&&e._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),n.originalEvent&&n.originalEvent.keyCode===13&&this._map._container.focus()},_showCoverage:function(n){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),n.propagatedFrom.getChildCount()>2&&n.propagatedFrom!==this._spiderfied&&(this._shownPolygon=new _.Polygon(n.propagatedFrom.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var n=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,e=this.options.zoomToBoundsOnClick,i=this._map;(n||e)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),i.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var n=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,n),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),n),this._currentShownBounds=n}},_generateInitialClusters:function(){var n=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),e=this.options.maxClusterRadius,i=e;typeof e!="function"&&(i=()=>e),this.options.disableClusteringAtZoom!==null&&(n=this.options.disableClusteringAtZoom-1),this._maxZoom=n,this._gridClusters={},this._gridUnclustered={};for(let s=n;s>=t;s--)this._gridClusters[s]=new _.DistanceGrid(i(s)),this._gridUnclustered[s]=new _.DistanceGrid(i(s));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(n,t){var e=this._gridClusters,i=this._gridUnclustered,s=Math.floor(this._map.getMinZoom()),o,r;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(n),n.on(this._childMarkerEventHandlers,this);t>=s;t--){o=this._map.project(n.getLatLng(),t);let a=e[t].getNearObject(o);if(a){a._addChild(n),n.__parent=a;return}if(a=i[t].getNearObject(o),a){const l=a.__parent;l&&this._removeLayer(a,!1);const h=new this._markerCluster(this,t,a,n);e[t].addObject(h,this._map.project(h._cLatLng,t)),a.__parent=h,n.__parent=h;let d=h;for(r=t-1;r>l._zoom;r--)d=new this._markerCluster(this,r,d),e[r].addObject(d,this._map.project(a.getLatLng(),r));l._addChild(d),this._removeFromGridUnclustered(a,t);return}i[t].addObject(n,o)}this._topClusterLevel._addChild(n),n.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(n=>{n instanceof _.MarkerCluster&&n._iconNeedsUpdate&&n._updateIcon()})},_enqueue:function(n){this._queue.push(n),this._queueTimeout||(this._queueTimeout=setTimeout(()=>this._processQueue(),300))},_processQueue:function(){for(let n=0;n<this._queue.length;n++)this._queue[n].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var n=Math.round(this._map._zoom);this._processQueue(),this._zoom<n&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,n)):this._zoom>n?(this._animationStart(),this._animationZoomOut(this._zoom,n)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(this.options.removeOutsideVisibleBounds){if(_.Browser.mobile)return this._checkBoundsMaxLat(this._map.getBounds())}else return this._mapBoundsInfinite;return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(n){var t=this._maxLat;return t!==void 0&&(n.getNorth()>=t&&(n._northEast.lat=1/0),n.getSouth()<=-t&&(n._southWest.lat=-1/0)),n},_animationAddLayerNonAnimated:function(n,t){if(t===n)this._featureGroup.addLayer(n);else if(t._childCount===2){t._addToMap();const e=t.getAllChildMarkers();this._featureGroup.removeLayer(e[0]),this._featureGroup.removeLayer(e[1])}else t._updateIcon()},_extractNonGroupLayers:function(n,t){var e=n.getLayers(),i=0,s;for(t=t||[];i<e.length;i++){if(s=e[i],s instanceof _.LayerGroup){this._extractNonGroupLayers(s,t);continue}t.push(s)}return t},_overrideMarkerIcon:function(n){return n.options.icon=this.options.iconCreateFunction({getChildCount:()=>1,getAllChildMarkers:()=>[n]}),n.options.icon}}),_.MarkerClusterGroup.include({_mapBoundsInfinite:new _.LatLngBounds(new _.LatLng(-1/0,-1/0),new _.LatLng(1/0,1/0))}),_.MarkerClusterGroup.include({_noAnimation:{_animationStart:()=>{},_animationZoomIn:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(n,t){this._animationAddLayerNonAnimated(n,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(n,t){var e=this._getExpandedVisibleBounds(),i=this._featureGroup,s=Math.floor(this._map.getMinZoom()),o;this._ignoreMove=!0,this._topClusterLevel._recursively(e,n,s,r=>{var a=r._latlng,l=r._markers,h;for(e.contains(a)||(a=null),r._isSingleParent()&&n+1===t?(i.removeLayer(r),r._recursivelyAddChildrenToMap(null,t,e)):(r.clusterHide(),r._recursivelyAddChildrenToMap(a,t,e)),o=l.length-1;o>=0;o--)h=l[o],e.contains(h._latlng)||i.removeLayer(h)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(e,t),i.eachLayer(r=>{!(r instanceof _.MarkerCluster)&&r._icon&&r.clusterShow()}),this._topClusterLevel._recursively(e,n,t,r=>{r._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(e,n,s,r=>{i.removeLayer(r),r.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(n,t){this._animationZoomOutSingle(this._topClusterLevel,n-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n,this._getExpandedVisibleBounds())},_animationAddLayer:function(n,t){var e=this._featureGroup;e.addLayer(n),t!==n&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),n._setPos(this._map.latLngToLayerPoint(t.getLatLng())),n.clusterHide(),this._enqueue(()=>{e.removeLayer(n),n.clusterShow(),this._animationEnd()})):(this._forceLayout(),this._animationStart(),this._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(n,t,e){var i=this._getExpandedVisibleBounds(),s=Math.floor(this._map.getMinZoom());n._recursivelyAnimateChildrenInAndAddSelfToMap(i,s,t+1,e);var o=this;this._forceLayout(),n._recursivelyBecomeVisible(i,e),this._enqueue(function(){if(n._childCount===1){const r=n._markers[0];this._ignoreMove=!0,r.setLatLng(r.getLatLng()),this._ignoreMove=!1,r.clusterShow&&r.clusterShow()}else n._recursively(i,e,s,r=>{r._recursivelyRemoveChildrenFromMap(i,s,t+1)});o._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:()=>{_.Util.falseFn(document.body.offsetWidth)}}),_.MarkerCluster=_.Marker.extend({initialize:function(n,t,e,i){_.Marker.prototype.initialize.call(this,e?e._cLatLng||e.getLatLng():new _.LatLng(0,0),{icon:this,pane:n.options.clusterPane}),this._group=n,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new _.LatLngBounds,e&&this._addChild(e),i&&this._addChild(i)},getAllChildMarkers:function(n){n=n||[];for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t].getAllChildMarkers(n);for(let t=this._markers.length-1;t>=0;t--)n.push(this._markers[t]);return n},getChildCount:function(){return this._childCount},zoomToBounds:function(n){for(var t=this._childClusters.slice(),e=this._group._map,i=e.getBoundsZoom(this._bounds),s=this._zoom+1,o=e.getZoom(),r;t.length>0&&i>s;){s++;let a=[];for(r=0;r<t.length;r++)a=a.concat(t[r]._childClusters);t=a}i>s?this._group._map.setView(this._latlng,s):i<=o?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,n)},getBounds:function(){var n=new _.LatLngBounds;return n.extend(this._bounds),n},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(n,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(n),n instanceof _.MarkerCluster?(t||(this._childClusters.push(n),n.__parent=this),this._childCount+=n._childCount):(t||this._markers.push(n),this._childCount++),this.__parent&&this.__parent._addChild(n,!0)},_setClusterCenter:function(n){this._cLatLng||(this._cLatLng=n._cLatLng||n._latlng)},_resetBounds:function(){var n=this._bounds;n._southWest&&(n._southWest.lat=1/0,n._southWest.lng=1/0),n._northEast&&(n._northEast.lat=-1/0,n._northEast.lng=-1/0)},_recalculateBounds:function(){var n=this._markers,t=this._childClusters,e=0,i=0,s=this._childCount,o,r,a,l;if(s!==0){for(this._resetBounds(),o=0;o<n.length;o++)a=n[o]._latlng,this._bounds.extend(a),e+=a.lat,i+=a.lng;for(o=0;o<t.length;o++)r=t[o],r._boundsNeedUpdate&&r._recalculateBounds(),this._bounds.extend(r._bounds),a=r._wLatLng,l=r._childCount,e+=a.lat*l,i+=a.lng*l;this._latlng=this._wLatLng=new _.LatLng(e/s,i/s),this._boundsNeedUpdate=!1}},_addToMap:function(n){n&&(this._backupLatlng=this._latlng,this.setLatLng(n)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(n,t,e){this._recursively(n,this._group._map.getMinZoom(),e-1,i=>{var s=i._markers,o,r;for(o=s.length-1;o>=0;o--)r=s[o],r._icon&&(r._setPos(t),r.clusterHide())},i=>{var s=i._childClusters,o,r;for(o=s.length-1;o>=0;o--)r=s[o],r._icon&&(r._setPos(t),r.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(n,t,e,i){this._recursively(n,i,t,s=>{s._recursivelyAnimateChildrenIn(n,s._group._map.latLngToLayerPoint(s.getLatLng()).round(),e),s._isSingleParent()&&e-1===i?(s.clusterShow(),s._recursivelyRemoveChildrenFromMap(n,t,e)):s.clusterHide(),s._addToMap()})},_recursivelyBecomeVisible:function(n,t){this._recursively(n,this._group._map.getMinZoom(),t,null,e=>{e.clusterShow()})},_recursivelyAddChildrenToMap:function(n,t,e){this._recursively(e,this._group._map.getMinZoom()-1,t,i=>{if(t!==i._zoom)for(let s=i._markers.length-1;s>=0;s--){const o=i._markers[s];e.contains(o._latlng)&&(n&&(o._backupLatlng=o.getLatLng(),o.setLatLng(n),o.clusterHide&&o.clusterHide()),i._group._featureGroup.addLayer(o))}},i=>{i._addToMap(n)})},_recursivelyRestoreChildPositions:function(n){for(let t=this._markers.length-1;t>=0;t--){const e=this._markers[t];e._backupLatlng&&(e.setLatLng(e._backupLatlng),delete e._backupLatlng)}if(n-1===this._zoom)for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._restorePosition();else for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._recursivelyRestoreChildPositions(n)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(n,t,e,i){var s,o;this._recursively(n,t-1,e-1,r=>{for(o=r._markers.length-1;o>=0;o--)s=r._markers[o],(!i||!i.contains(s._latlng))&&(r._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())},r=>{for(o=r._childClusters.length-1;o>=0;o--)s=r._childClusters[o],(!i||!i.contains(s._latlng))&&(r._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())})},_recursively:function(n,t,e,i,s){var o=this._childClusters,r=this._zoom,a,l;if(t<=r&&(i&&i(this),s&&r===e&&s(this)),r<t||r<e)for(a=o.length-1;a>=0;a--)l=o[a],n.intersects(l._bounds)&&l._recursively(n,t,e,i,s)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),_.Marker.include({clusterHide:function(){return this.options.opacityWhenUnclustered=this.options.opacity||1,this.setOpacity(0)},clusterShow:function(){var n=this.setOpacity(this.options.opacity||this.options.opacityWhenUnclustered);return delete this.options.opacityWhenUnclustered,n}}),_.DistanceGrid=function(n){this._cellSize=n,this._sqCellSize=n*n,this._grid={},this._objectPoint={}},_.DistanceGrid.prototype={addObject:function(n,t){var e=this._getCoord(t.x),i=this._getCoord(t.y),s=this._grid;s[i]=s[i]||{};var o=s[i];o[e]=o[e]||[];var r=o[e],a=_.Util.stamp(n);this._objectPoint[a]=t,r.push(n)},updateObject:function(n,t){this.removeObject(n),this.addObject(n,t)},removeObject:function(n,t){var e=this._getCoord(t.x),i=this._getCoord(t.y),s=this._grid;s[i]=s[i]||{};var o=s[i];o[e]=o[e]||[];var r=o[e],a,l;for(delete this._objectPoint[_.Util.stamp(n)],a=0,l=r.length;a<l;a++)if(r[a]===n)return r.splice(a,1),l===1&&delete o[e],!0},eachObject:function(n,t){var e,i,s,o,r,a,l,h=this._grid;for(e in h){r=h[e];for(i in r)for(a=r[i],s=0,o=a.length;s<o;s++)l=n.call(t,a[s]),l&&(s--,o--)}},getNearObject:function(n){var t=this._getCoord(n.x),e=this._getCoord(n.y),i,s,o,r,a,l,h,d,c=this._objectPoint,f=this._sqCellSize,m=null;for(i=e-1;i<=e+1;i++)if(r=this._grid[i],r){for(s=t-1;s<=t+1;s++)if(a=r[s],a)for(o=0,l=a.length;o<l;o++)h=a[o],d=this._sqDist(c[_.Util.stamp(h)],n),d<f&&(f=d,m=h)}return m},_getCoord:function(n){return Math.floor(n/this._cellSize)},_sqDist:(n,t)=>{var e=t.x-n.x,i=t.y-n.y;return e*e+i*i}},_.QuickHull={getDistant:(n,t)=>{var e=t[1].lat-t[0].lat,i=t[0].lng-t[1].lng;return i*(n.lat-t[0].lat)+e*(n.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(n,t){var e=0,i=null,s=[],o,r,a;for(o=t.length-1;o>=0;o--){if(r=t[o],a=this.getDistant(r,n),a>0)s.push(r);else continue;a>e&&(e=a,i=r)}return{maxPoint:i,newPoints:s}},buildConvexHull:function(n,t){var e=[],i=this.findMostDistantPointFromBaseLine(n,t);return i.maxPoint?(e=e.concat(this.buildConvexHull([n[0],i.maxPoint],i.newPoints)),e=e.concat(this.buildConvexHull([i.maxPoint,n[1]],i.newPoints)),e):[n[0]]},getConvexHull:function(n){var t=!1,e=!1,i=!1,s=!1,o=null,r=null,a=null,l=null,h=null,d=null,c;for(c=n.length-1;c>=0;c--){const m=n[c];(t===!1||m.lat>t)&&(o=m,t=m.lat),(e===!1||m.lat<e)&&(r=m,e=m.lat),(i===!1||m.lng>i)&&(a=m,i=m.lng),(s===!1||m.lng<s)&&(l=m,s=m.lng)}e!==t?(d=r,h=o):(d=l,h=a);var f=[].concat(this.buildConvexHull([d,h],n),this.buildConvexHull([h,d],n));return f}},_.MarkerCluster.include({getConvexHull:function(){var n=this.getAllChildMarkers(),t=[],e,i;for(i=n.length-1;i>=0;i--)e=n[i].getLatLng(),t.push(e);return _.QuickHull.getConvexHull(t)}}),_.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var n=this.getAllChildMarkers(),t=this._group,e=t._map,i=e.latLngToLayerPoint(this._latlng),s;this._group._unspiderfy(),this._group._spiderfied=this,n.length>=this._circleSpiralSwitchover?s=this._generatePointsSpiral(n.length,i):(i.y+=10,s=this._generatePointsCircle(n.length,i)),this._animationSpiderfy(n,s)}},unspiderfy:function(n){this._group._inZoomAnimation||(this._animationUnspiderfy(n),this._group._spiderfied=null)},_generatePointsCircle:function(n,t){var e=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+n),i=e/this._2PI,s=this._2PI/n,o=[],r,a;for(o.length=n,r=n-1;r>=0;r--)a=this._circleStartAngle+r*s,o[r]=new _.Point(t.x+i*Math.cos(a),t.y+i*Math.sin(a))._round();return o},_generatePointsSpiral:function(n,t){var e=this._group.options.spiderfyDistanceMultiplier,i=e*this._spiralLengthStart,s=e*this._spiralFootSeparation,o=e*this._spiralLengthFactor*this._2PI,r=0,a=[],l;for(a.length=n,l=n-1;l>=0;l--)r+=s/i+l*5e-4,a[l]=new _.Point(t.x+i*Math.cos(r),t.y+i*Math.sin(r))._round(),i+=o/r;return a},_noanimationUnspiderfy:function(){var n=this._group,t=n._map,e=n._featureGroup,i=this.getAllChildMarkers(),s,o;for(n._ignoreMove=!0,this.setOpacity(1),o=i.length-1;o>=0;o--)s=i[o],e.removeLayer(s),s._preSpiderfyLatlng&&(s.setLatLng(s._preSpiderfyLatlng),delete s._preSpiderfyLatlng),s.setZIndexOffset&&s.setZIndexOffset(0),s._spiderLeg&&(t.removeLayer(s._spiderLeg),delete s._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:i}),n._ignoreMove=!1,n._spiderfied=null}}),_.MarkerClusterNonAnimated=_.MarkerCluster.extend({_animationSpiderfy:function(n,t){var e=this._group,i=e._map,s=e._featureGroup,o=this._group.options.spiderLegPolylineOptions,r,a,l,h;for(e._ignoreMove=!0,r=0;r<n.length;r++)h=i.layerPointToLatLng(t[r]),a=n[r],l=new _.Polyline([this._latlng,h],o),i.addLayer(l),a._spiderLeg=l,a._preSpiderfyLatlng=a._latlng,a.setLatLng(h),a.setZIndexOffset&&a.setZIndexOffset(1e6),s.addLayer(a);this.setOpacity(.3),e._ignoreMove=!1,e.fire("spiderfied",{cluster:this,markers:n})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),_.MarkerCluster.include({_animationSpiderfy:function(n,t){var e=this._group,i=e._map,s=e._featureGroup,o=this._latlng,r=i.latLngToLayerPoint(o),a=_.Path.SVG,l=Object.assign({},this._group.options.spiderLegPolylineOptions),h=l.opacity,d,c,f,m,C,k;for(h===void 0&&(h=_.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),a?(l.opacity=0,l.className=`${l.className||""} leaflet-cluster-spider-leg`):l.opacity=h,e._ignoreMove=!0,d=0;d<n.length;d++)c=n[d],k=i.layerPointToLatLng(t[d]),f=new _.Polyline([o,k],l),i.addLayer(f),c._spiderLeg=f,a&&(m=f._path,C=m.getTotalLength()+.1,m.style.strokeDasharray=C,m.style.strokeDashoffset=C),c.setZIndexOffset&&c.setZIndexOffset(1e6),c.clusterHide&&c.clusterHide(),s.addLayer(c),c._setPos&&c._setPos(r);for(e._forceLayout(),e._animationStart(),d=n.length-1;d>=0;d--)k=i.layerPointToLatLng(t[d]),c=n[d],c._preSpiderfyLatlng=c._latlng,c.setLatLng(k),c.clusterShow&&c.clusterShow(),a&&(f=c._spiderLeg,m=f._path,m.style.strokeDashoffset=0,f.setStyle({opacity:h}));this.setOpacity(.3),e._ignoreMove=!1,setTimeout(()=>{e._animationEnd(),e.fire("spiderfied",{cluster:this,markers:n})},200)},_animationUnspiderfy:function(n){var t=this._group,e=t._map,i=t._featureGroup,s=n?e._latLngToNewLayerPoint(this._latlng,n.zoom,n.center):e.latLngToLayerPoint(this._latlng),o=this.getAllChildMarkers(),r=_.Path.SVG,a,l,h,d,c,f;for(t._ignoreMove=!0,t._animationStart(),this.setOpacity(1),l=o.length-1;l>=0;l--)a=o[l],a._preSpiderfyLatlng&&(a.closePopup(),a.setLatLng(a._preSpiderfyLatlng),delete a._preSpiderfyLatlng,f=!0,a._setPos&&(a._setPos(s),f=!1),a.clusterHide&&(a.clusterHide(),f=!1),f&&i.removeLayer(a),r&&(h=a._spiderLeg,d=h._path,c=d.getTotalLength()+.1,d.style.strokeDashoffset=c,h.setStyle({opacity:0})));t._ignoreMove=!1,setTimeout(()=>{var m=0;for(l=o.length-1;l>=0;l--)a=o[l],a._spiderLeg&&m++;for(l=o.length-1;l>=0;l--)a=o[l],a._spiderLeg&&(a.clusterShow&&a.clusterShow(),a.setZIndexOffset&&a.setZIndexOffset(0),m>1&&i.removeLayer(a),e.removeLayer(a._spiderLeg),delete a._spiderLeg);t._animationEnd(),t.fire("unspiderfied",{cluster:this,markers:o})},200)}}),_.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(...n){this._unspiderfy.apply(this,n)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),_.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(n){this._map._mapPane.classList.contains("leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(n))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(n){this._spiderfied&&this._spiderfied.unspiderfy(n)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(n){n._spiderLeg&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow(),n.setZIndexOffset&&n.setZIndexOffset(0),this._map.removeLayer(n._spiderLeg),delete n._spiderLeg)}}),_.MarkerClusterGroup.include({refreshClusters:function(n){return n?n instanceof _.MarkerClusterGroup?n=n._topClusterLevel.getAllChildMarkers():n instanceof _.LayerGroup?n=n._layers:n instanceof _.MarkerCluster?n=n.getAllChildMarkers():n instanceof _.Marker&&(n=[n]):n=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(n),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(n),this},_flagParentsIconsNeedUpdate:n=>{var t,e;for(t in n)for(e=n[t].__parent;e;)e._iconNeedsUpdate=!0,e=e.__parent},_refreshSingleMarkerModeMarkers:function(n){var t,e;for(t in n)e=n[t],this.hasLayer(e)&&e.setIcon(this._overrideMarkerIcon(e))}}),_.Marker.include({refreshIconOptions:function(n,t){var e=this.options.icon;return _.setOptions(e,n),this.setIcon(e),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}});const Cn={dialog:"_dialog_mdphy_1 _ds-dialog_5rpuv_5"},Tn=typeof window<"u"&&typeof document<"u";function kn(n,t){let e;return function(...i){clearTimeout(e),e=setTimeout(()=>n.apply(this,i),t)}}function D(n,t,e){return e===void 0?n.getAttribute(t)??null:(e===null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e),null)}`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;const Ai=(n,t,[...e])=>{for(const i of e[0].split(","))e[0]=i,t[`${n}EventListener`](...e)},Mn=(n,...t)=>(Ai("add",n,t),()=>zn(n,...t)),zn=(n,...t)=>Ai("remove",n,t);`${Cn.dialog.split(" ")[0]}`;function Sn(n,t){const e=new ResizeObserver(n);return e.observe(t),()=>e.disconnect()}const ze=(n,t,e)=>{const i=document.createElement(n);if(e&&(i.textContent=e),t)for(const[s,o]of Object.entries(t))D(i,s,o);return i},On=typeof HTMLElement>"u"?class{}:HTMLElement,Vt=[30,30],Bi=18,Zn=[[57.5,4.73],[71.5,31.44]],En="https://cache.kartverket.no/v1/wmts/1.0.0/topo/default/webmercator/{z}/{y}/{x}.png";class Kt extends On{cluster;map;static get observedAttributes(){return["data-view","data-scrollzoom"]}constructor(){super(),this.attachShadow({mode:"open"}).append(ze("style",{},`@layer leaflet{${Ln}}
|
|
741
741
|
${Pn}`),ze("slot"),ze("div"))}connectedCallback(){const t=this.shadowRoot?.lastElementChild,e=D(this,"data-cluster")??"false",i=new _.TileLayer(En,{attribution:"© Kartverket",maxZoom:Bi});this.map=new _.Map(t,{attributionControl:!1,wheelPxPerZoomLevel:20,zoomControl:!1,zoomSnap:0,layers:[i]}),this.cluster=new _.MarkerClusterGroup({zoomToBoundsOnClick:!0,showCoverageOnHover:!1,disableClusteringAtZoom:e==="false"?1:Number(e)||Bi,iconCreateFunction:s=>new _.DivIcon({className:"leaflet-cluster-icon",html:`${s.getAllChildMarkers().length}`,iconSize:Vt})}).addTo(this.map),this.map.addControl(new _.Control.Attribution({prefix:""})),this.map.addControl(new _.Control.Zoom({position:"bottomright"})),this.map.on("popupopen",Ri),Kt.observedAttributes.forEach(s=>{this.attributeChangedCallback(s,null,D(this,s))})}attributeChangedCallback(t,e=null,i=null){this.map&&(t==="data-view"&&this.setView(i||""),t==="data-scrollzoom"&&this.map.scrollWheelZoom[i==="false"?"disable":"enable"]())}setView(t,e){const i=`${t}`.split(",").map(parseFloat).filter(Number.isFinite),s=this.cluster?.getBounds();i.length===3?this.map?.setView([i[0],i[1]],i[2],e):t!=="fit"?this.map?.fitBounds(Zn,e):s?.isValid()?this.map?.fitBounds(s,e||{padding:Vt}):this.cluster?.on("layeradd",Ii,this)}addMarker(t,e){return new _.Marker(t,e).addTo(this.cluster)}disconnectedCallback(){this.map?.off("popupopen",Ri),this.map?.remove()}}if(Tn&&!window.customElements.get("mtds-atlas")){const n=_.Marker.prototype.onAdd;_.Marker.prototype.onAdd=function(...t){n.apply(this,t);const e=this.getElement();return e&&D(e,"aria-label",this.options.title||null),e&&D(e,"title",null),this},_.Tooltip.prototype.options.direction="top",_.Marker.prototype.options.icon=new _.DivIcon({html:'<svg viewBox="0 0 256 256"><rect x="78" y="50" width="100" height="100" /><path d="M128,16a88.1,88.1,0,0,0-88,88c0,75.3,80,132.17,83.41,134.55a8,8,0,0,0,9.18,0C136,236.17,216,179.3,216,104A88.1,88.1,0,0,0,128,16Zm0,56a32,32,0,1,1-32,32A32,32,0,0,1,128,72Z"/></svg>',iconSize:Vt,iconAnchor:[15,30],popupAnchor:[0,-15],tooltipAnchor:[0,-30]}),window.customElements.define("mtds-atlas",Kt)}const Ii=kn(function(){this.cluster?.off("layeradd",Ii,this),this.cluster?.getBounds().isValid()&&this.setView("fit")},100),Di="popupclose move resize zoom viewreset",Ri=({target:n,popup:t})=>{const e=t.getContent(),i=String(e)[0]==="#"&&document.getElementById(e.slice(1));if(i&&i.closest("mtds-atlas")){const s=t.getLatLng(),o=D(i,"popover");D(t.getElement(),"hidden",""),D(i,"popover",null);const r=h=>{if(h?.type==="popupclose"&&h?.popup===t)n.off(Di,r),D(t.getElement(),"hidden",null),D(i,"data-popover",null),D(i,"popover",o),a(),l();else{const d=n.latLngToContainerPoint(s),c=d.x-i.offsetWidth/2,f=d.y-i.offsetHeight-Vt[1];i.style.translate=`${c}px ${f}px`}},a=Sn(()=>r(),i),l=Mn(i,"click",h=>{h.target?.closest?.('[popovertargetaction="hide"]')&&t.close()});n.on(Di,r),r()}};return R.L=_,R.MTDSAtlasElement=Kt,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),R}({});
|
package/mtds/chart/chart.css.js
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
const t = `/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
2
|
-
:host(:not([hidden])) {
|
|
3
|
-
|
|
4
|
-
gap: var(--mtds-6);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
[data-event-proxy] {
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
}
|
|
2
|
+
:host(:not([hidden])) { display: grid; gap: var(--mtds-6) }
|
|
3
|
+
[data-event] { cursor: pointer } /* Used to forward clicks from Chart ShaowDOM to relevant cell in child table */
|
|
10
4
|
|
|
11
|
-
.pie {
|
|
12
|
-
overflow: visible;
|
|
13
|
-
aspect-ratio: var(--mtdsc-chart-aspect);
|
|
14
|
-
}
|
|
5
|
+
.pie { overflow: visible; aspect-ratio: var(--mtdsc-chart-aspect) }
|
|
15
6
|
.pie > path {
|
|
16
7
|
fill: var(--color);
|
|
17
8
|
outline: none;
|
|
@@ -22,18 +13,15 @@ const t = `/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
|
22
13
|
vector-effect: non-scaling-stroke;
|
|
23
14
|
}
|
|
24
15
|
.pie > path:focus-visible,
|
|
25
|
-
.pie > path:hover {
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
16
|
+
.pie > path:hover { scale: 1.05 }
|
|
17
|
+
:host([data-steps="false"]) .axisStep::before,
|
|
29
18
|
:host([data-variant="doughnut"]) .axis,
|
|
30
|
-
:host([data-variant="pie"]) .axis {
|
|
31
|
-
|
|
32
|
-
}
|
|
19
|
+
:host([data-variant="pie"]) .axis { display: none }
|
|
20
|
+
:host([data-labels="false"]) .axisGroup::before { position: absolute; pointer-events: none; opacity: 0 } /* Keep available for screen readers */
|
|
33
21
|
|
|
34
22
|
.axis {
|
|
35
|
-
font-size: var(--mtds-body-sm-font-size);
|
|
36
23
|
display: grid;
|
|
24
|
+
font-size: var(--mtds-body-sm-font-size);
|
|
37
25
|
gap: var(--mtdsc-chart-axis-gap);
|
|
38
26
|
grid-template-columns: fit-content(7em) 1fr;
|
|
39
27
|
grid-template-rows: 1fr auto;
|
|
@@ -46,8 +34,7 @@ const t = `/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
|
46
34
|
border-bottom-left-radius: var(--mtdsc-chart-axis-edge-radius);
|
|
47
35
|
border-color: var(--mtdsc-chart-axis-edge-color);
|
|
48
36
|
border-style: solid;
|
|
49
|
-
border-width: 0 0 var(--mtdsc-chart-axis-edge-width)
|
|
50
|
-
var(--mtdsc-chart-axis-edge-width);
|
|
37
|
+
border-width: 0 0 var(--mtdsc-chart-axis-edge-width) var(--mtdsc-chart-axis-edge-width);
|
|
51
38
|
content: "";
|
|
52
39
|
grid-area: chart;
|
|
53
40
|
pointer-events: none;
|
|
@@ -57,20 +44,9 @@ const t = `/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
|
57
44
|
.axisSteps,
|
|
58
45
|
.axisStep,
|
|
59
46
|
.axisGroups,
|
|
60
|
-
.axisGroup {
|
|
61
|
-
box-sizing: border-box;
|
|
62
|
-
display: grid;
|
|
63
|
-
position: relative; /* Help .lineContainer positioning */
|
|
64
|
-
}
|
|
47
|
+
.axisGroup { box-sizing: border-box; display: grid; position: relative } /* Help .lineContainer positioning */
|
|
65
48
|
.axisGroups {
|
|
66
|
-
--gap: max(
|
|
67
|
-
1px,
|
|
68
|
-
clamp(
|
|
69
|
-
.5%,
|
|
70
|
-
calc(10% / var(--bars) * var(--groups)),
|
|
71
|
-
var(--mtdsc-chart-axis-gap)
|
|
72
|
-
)
|
|
73
|
-
);
|
|
49
|
+
--gap: max(1px, clamp(.5%, calc(10% / var(--bars) * var(--groups)), var(--mtdsc-chart-axis-gap)));
|
|
74
50
|
gap: var(--mtdsc-chart-axis-gap) var(--gap);
|
|
75
51
|
grid-area: chart / chart / x-axis / chart;
|
|
76
52
|
grid-auto-columns: 1fr;
|
|
@@ -78,83 +54,26 @@ const t = `/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
|
78
54
|
padding: 0 var(--mtdsc-chart-axis-gap);
|
|
79
55
|
text-align: center;
|
|
80
56
|
}
|
|
81
|
-
.axisGroup {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
.axisGroup::after {
|
|
86
|
-
content: attr(data-label);
|
|
87
|
-
direction: ltr; /* Prevent inherited rtl */
|
|
88
|
-
min-width: 0; /* Allow word-wrapping */
|
|
89
|
-
}
|
|
90
|
-
:host(:not([data-variant|="bar"])) {
|
|
91
|
-
.axisGroup::after {
|
|
92
|
-
justify-self: center;
|
|
93
|
-
text-align: start;
|
|
94
|
-
writing-mode: vertical-rl;
|
|
95
|
-
/* If wanting 45deg text: */
|
|
96
|
-
/* justify-self: center;
|
|
97
|
-
rotate: 45deg;
|
|
98
|
-
text-align: end;
|
|
99
|
-
writing-mode: sideways-lr;
|
|
100
|
-
transform-origin: 50% 0; */
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
.axisSteps {
|
|
104
|
-
align-items: end;
|
|
105
|
-
aspect-ratio: var(--mtdsc-chart-aspect);
|
|
106
|
-
grid-area: chart / y-axis / chart / chart;
|
|
107
|
-
grid-auto-rows: 1fr;
|
|
108
|
-
grid-template: 1px / subgrid;
|
|
109
|
-
}
|
|
110
|
-
.axisStep {
|
|
111
|
-
align-items: start;
|
|
112
|
-
grid-column: inherit;
|
|
113
|
-
grid-template-columns: inherit;
|
|
114
|
-
height: 1px;
|
|
115
|
-
text-align: right;
|
|
116
|
-
}
|
|
117
|
-
.axisStep::after {
|
|
118
|
-
border-bottom: var(--mtdsc-chart-axis-border);
|
|
119
|
-
content: "";
|
|
120
|
-
}
|
|
121
|
-
.axisStep::before {
|
|
122
|
-
content: attr(data-label);
|
|
123
|
-
translate: 0 -50%;
|
|
124
|
-
}
|
|
125
|
-
.axisStep[data-label="0"]::after {
|
|
126
|
-
opacity: 0; /* Hide 0 line as it overlapps with .axis::before */
|
|
127
|
-
}
|
|
57
|
+
.axisGroup { grid-row: inherit; grid-template: inherit }
|
|
58
|
+
.axisGroup::before { order: 1; content: attr(data-label); direction: ltr; min-width: 0 } /* Allow word-wrapping */
|
|
59
|
+
:host(:not([data-variant|="bar"])) { .axisGroup::before { justify-self: center; text-align: start; writing-mode: vertical-rl } }
|
|
128
60
|
|
|
129
|
-
|
|
130
|
-
:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
:host(:not([data-variant|="bar"]))
|
|
136
|
-
.axisStepsYHalf
|
|
137
|
-
.axisSteps:has(.axisStep:nth-last-child(even):first-child) {
|
|
138
|
-
grid-template-rows: 0.5fr;
|
|
139
|
-
}
|
|
61
|
+
.axisSteps { align-items: end; aspect-ratio: var(--mtdsc-chart-aspect); grid-area: chart / y-axis / chart / chart; grid-auto-rows: 1fr; grid-template: 1px / subgrid }
|
|
62
|
+
.axisStep { align-items: start; grid-column: inherit; grid-template-columns: inherit; height: 1px; text-align: right }
|
|
63
|
+
.axisStep::after { border-bottom: var(--mtdsc-chart-axis-border); content: "" }
|
|
64
|
+
.axisStep::before { content: attr(data-label) / ""; translate: 0 -50% } /* Hide form screen readers */
|
|
65
|
+
.axisStep[data-label="0"]::after { opacity: 0 } /* Hide 0 line as it overlapps with .axis::before */
|
|
140
66
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
:host([data-variant|="bar"])
|
|
145
|
-
|
|
146
|
-
.axisSteps:has(.axisStep:nth-last-child(even):first-child) {
|
|
147
|
-
grid-template-columns: 0.5fr;
|
|
148
|
-
}
|
|
67
|
+
/* Reduce amount of steps if small space */
|
|
68
|
+
:host(:not([data-variant|="bar"])) .axisStepsYHalf .axisStep:nth-last-child(even) { display: none }
|
|
69
|
+
:host(:not([data-variant|="bar"])) .axisStepsYHalf .axisSteps:has(.axisStep:nth-last-child(even):first-child) { grid-template-rows: 0.5fr }
|
|
70
|
+
:host([data-variant|="bar"]) .axisStepsXHalf .axisStep:nth-last-child(even) { display: none }
|
|
71
|
+
:host([data-variant|="bar"]) .axisStepsXHalf .axisSteps:has(.axisStep:nth-last-child(even):first-child) { grid-template-columns: 0.5fr }
|
|
149
72
|
|
|
150
73
|
:host([data-variant|="bar"]) .axisSteps,
|
|
151
|
-
:host([data-variant|="bar"]) .axisGroup {
|
|
152
|
-
direction: rtl; /* Reverse orders */
|
|
153
|
-
}
|
|
74
|
+
:host([data-variant|="bar"]) .axisGroup { direction: rtl }
|
|
154
75
|
:host([data-variant|="bar"]) .axisSteps > *,
|
|
155
|
-
:host([data-variant|="bar"]) .axisGroup > * {
|
|
156
|
-
direction: ltr;
|
|
157
|
-
}
|
|
76
|
+
:host([data-variant|="bar"]) .axisGroup > * { direction: ltr }
|
|
158
77
|
:host([data-variant|="bar"]) .axisGroups {
|
|
159
78
|
aspect-ratio: var(--mtdsc-chart-aspect);
|
|
160
79
|
gap: 1% var(--mtdsc-chart-axis-gap);
|
|
@@ -164,49 +83,17 @@ const t = `/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
|
164
83
|
row-gap: var(--mtdsc-chart-axis-gap);
|
|
165
84
|
text-align: right;
|
|
166
85
|
}
|
|
167
|
-
:host([data-variant|="bar"]) .axisGroup::
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
:host([data-variant|="bar"]) .
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
:host([data-variant|="bar"]) .axisSteps {
|
|
175
|
-
align-items: stretch;
|
|
176
|
-
aspect-ratio: auto;
|
|
177
|
-
grid-area: chart / chart / x-axis / chart;
|
|
178
|
-
grid-auto-columns: 1fr;
|
|
179
|
-
grid-template: subgrid / 1px;
|
|
180
|
-
}
|
|
181
|
-
:host([data-variant|="bar"]) .axisStep {
|
|
182
|
-
align-items: stretch;
|
|
183
|
-
grid-row: inherit;
|
|
184
|
-
grid-column: auto;
|
|
185
|
-
grid-template-rows: inherit;
|
|
186
|
-
grid-template-columns: none;
|
|
187
|
-
text-align: center;
|
|
188
|
-
}
|
|
189
|
-
:host([data-variant|="bar"]) .axisStep::after {
|
|
190
|
-
order: -1;
|
|
191
|
-
border-left: var(--mtdsc-chart-axis-border);
|
|
192
|
-
border-bottom: 0;
|
|
193
|
-
}
|
|
194
|
-
:host([data-variant|="bar"]) .axisStep::before {
|
|
195
|
-
translate: -50% 0;
|
|
196
|
-
}
|
|
86
|
+
:host([data-variant|="bar"]) .axisGroup::before { align-self: center }
|
|
87
|
+
:host([data-variant|="bar"]) .axisGroup { grid-column: inherit; grid-row: auto }
|
|
88
|
+
:host([data-variant|="bar"]) .axisSteps { align-items: stretch; aspect-ratio: auto; grid-area: chart / chart / x-axis / chart; grid-auto-columns: 1fr; grid-template: subgrid / 1px }
|
|
89
|
+
:host([data-variant|="bar"]) .axisStep { align-items: stretch; grid-row: inherit; grid-column: auto; grid-template-rows: inherit; grid-template-columns: none; text-align: center }
|
|
90
|
+
:host([data-variant|="bar"]) .axisStep::after { order: -1; border-left: var(--mtdsc-chart-axis-border); border-bottom: 0 }
|
|
91
|
+
:host([data-variant|="bar"]) .axisStep::before { translate: -50% 0 }
|
|
197
92
|
|
|
198
|
-
.axisGroupContent {
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
:host([data-variant="
|
|
202
|
-
flex-direction: column-reverse;
|
|
203
|
-
}
|
|
204
|
-
:host([data-variant="bar"]) .axisGroupContent {
|
|
205
|
-
flex-direction: column;
|
|
206
|
-
}
|
|
207
|
-
:host([data-variant="bar-stacked"]) .axisGroupContent {
|
|
208
|
-
flex-direction: row;
|
|
209
|
-
}
|
|
93
|
+
.axisGroupContent { display: flex }
|
|
94
|
+
:host([data-variant="column-stacked"]) .axisGroupContent { flex-direction: column-reverse }
|
|
95
|
+
:host([data-variant="bar"]) .axisGroupContent { flex-direction: column }
|
|
96
|
+
:host([data-variant="bar-stacked"]) .axisGroupContent { flex-direction: row }
|
|
210
97
|
|
|
211
98
|
.bar {
|
|
212
99
|
--size: calc(var(--value) / var(--total, 1) * 100%);
|
|
@@ -219,91 +106,30 @@ const t = `/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
|
219
106
|
width: 100%;
|
|
220
107
|
}
|
|
221
108
|
.bar:focus-visible,
|
|
222
|
-
.linePoint:focus-visible {
|
|
223
|
-
|
|
224
|
-
outline: var(--mtdsc-focus-outline);
|
|
225
|
-
outline-offset: var(--mtds-border-width-focus);
|
|
226
|
-
z-index: 2; /* z-index to place on top when outlined */
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
:host([data-variant|="bar"]) .bar {
|
|
230
|
-
border-radius: 0 var(--mtds-border-radius-sm) var(--mtds-border-radius-sm) 0;
|
|
231
|
-
width: var(--size);
|
|
232
|
-
height: 100%;
|
|
233
|
-
align-self: start;
|
|
234
|
-
}
|
|
109
|
+
.linePoint:focus-visible { box-shadow: var(--mtdsc-focus-boxShadow); outline: var(--mtdsc-focus-outline); outline-offset: var(--mtds-border-width-focus); z-index: 2 }
|
|
110
|
+
:host([data-variant|="bar"]) .bar { border-radius: 0 var(--mtds-border-radius-sm) var(--mtds-border-radius-sm) 0; width: var(--size); height: 100%; align-self: start }
|
|
235
111
|
|
|
236
112
|
/* Prevent double border - using margin to see border around bars */
|
|
237
113
|
/* Prevent double border - using border to avoid affecting size */
|
|
238
114
|
:host(:not([data-variant])) .bar + .bar,
|
|
239
|
-
:host([data-variant="column"]) .bar + .bar {
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
:host([data-variant="
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
:host([data-variant="bar-stacked"]) .bar:not(:last-child) {
|
|
252
|
-
border-radius: 0;
|
|
253
|
-
}
|
|
254
|
-
:host([data-variant="bar-stacked"]) .bar + .bar {
|
|
255
|
-
border-left: none;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.lineContainer {
|
|
259
|
-
align-items: flex-start;
|
|
260
|
-
display: flex;
|
|
261
|
-
justify-content: space-between;
|
|
262
|
-
pointer-events: none;
|
|
263
|
-
grid-row: chart;
|
|
264
|
-
}
|
|
265
|
-
.lineContainer > svg,
|
|
266
|
-
.lineContainer {
|
|
267
|
-
position: absolute;
|
|
268
|
-
width: 100%;
|
|
269
|
-
height: 100%;
|
|
270
|
-
}
|
|
271
|
-
.lineContainer > svg {
|
|
272
|
-
overflow: clip visible;
|
|
273
|
-
}
|
|
274
|
-
.lineContainer > div[role="listitem"] {
|
|
275
|
-
display: contents;
|
|
276
|
-
}
|
|
115
|
+
:host([data-variant="column"]) .bar + .bar { margin-left: -1px }
|
|
116
|
+
:host([data-variant="column-stacked"]) .bar:not(:last-child) { border-radius: 0 }
|
|
117
|
+
:host([data-variant="column-stacked"]) .bar + .bar { border-bottom: none }
|
|
118
|
+
:host([data-variant="bar"]) .bar + .bar { margin-top: -1px }
|
|
119
|
+
:host([data-variant="bar-stacked"]) .bar:not(:last-child) { border-radius: 0 }
|
|
120
|
+
:host([data-variant="bar-stacked"]) .bar + .bar { border-left: none }
|
|
121
|
+
|
|
122
|
+
.lineContainer { align-items: flex-start; display: flex; justify-content: space-between; pointer-events: none; grid-row: chart }
|
|
123
|
+
.lineContainer > svg, .lineContainer { position: absolute; width: 100%; height: 100% }
|
|
124
|
+
.lineContainer > svg { overflow: clip visible }
|
|
125
|
+
.lineContainer > div[role="listitem"] { display: contents }
|
|
277
126
|
|
|
278
127
|
:host([data-variant|="line"]) .axisGroups,
|
|
279
|
-
:host([data-variant|="area"]) .axisGroups {
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.line,
|
|
284
|
-
.lineShade {
|
|
285
|
-
fill: none;
|
|
286
|
-
stroke: var(--color);
|
|
287
|
-
stroke-linejoin: round;
|
|
288
|
-
stroke-linecap: round;
|
|
289
|
-
stroke-width: 1.5;
|
|
290
|
-
vector-effect: non-scaling-stroke;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.lineShade {
|
|
294
|
-
stroke: none;
|
|
295
|
-
fill: var(--color);
|
|
296
|
-
opacity: 0.3;
|
|
297
|
-
mask: linear-gradient(to bottom, black, transparent);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/* Ensure more contrast for line colors */
|
|
301
|
-
.line,
|
|
302
|
-
.linePoint,
|
|
303
|
-
:host:has(.linePoint) .legend::before {
|
|
304
|
-
filter: var(--_mtdsc-chart-line-filter);
|
|
305
|
-
}
|
|
128
|
+
:host([data-variant|="area"]) .axisGroups { padding: 0 }
|
|
129
|
+
.lineShade, .line { fill: none; stroke: var(--color); stroke-linejoin: round; stroke-linecap: round; stroke-width: 1.5; vector-effect: non-scaling-stroke }
|
|
130
|
+
.lineShade { stroke: none; fill: var(--color); opacity: 0.3; mask: linear-gradient(to bottom, black, transparent) }
|
|
306
131
|
|
|
132
|
+
.linePoint, .line, :host:has(.linePoint) .legend::before { filter: var(--_mtdsc-chart-line-filter) } /* Ensure more contrast for line colors */
|
|
307
133
|
.linePoint {
|
|
308
134
|
--size: var(--mtds-2);
|
|
309
135
|
background: var(--color);
|
|
@@ -321,34 +147,13 @@ const t = `/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
|
321
147
|
z-index: 2;
|
|
322
148
|
}
|
|
323
149
|
.linePoint:focus-visible,
|
|
324
|
-
.linePoint:hover {
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
.linePoint::before {
|
|
328
|
-
content: "";
|
|
329
|
-
inset: calc(var(--mtds-3) * -1); /* Increase click surface */
|
|
330
|
-
position: absolute;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
:host([data-dots="false"]) .linePoint,
|
|
334
|
-
:host([data-dots="hidden"]) .linePoint,
|
|
335
|
-
:host([data-dots="none"]) .linePoint {
|
|
336
|
-
background: none;
|
|
337
|
-
border: none;
|
|
338
|
-
}
|
|
150
|
+
.linePoint:hover { scale: 1.3 }
|
|
151
|
+
.linePoint::before { content: ""; position: absolute; inset: calc(var(--mtds-3) * -1); /* Increase click surface */ }
|
|
152
|
+
:host([data-dots="false"]) .linePoint { background: none; border: none }
|
|
339
153
|
|
|
340
|
-
.legends {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
flex-wrap: wrap;
|
|
344
|
-
gap: var(--mtds-2) var(--mtds-5);
|
|
345
|
-
justify-content: center;
|
|
346
|
-
}
|
|
347
|
-
.legend {
|
|
348
|
-
display: flex;
|
|
349
|
-
align-items: center;
|
|
350
|
-
gap: var(--mtds-2);
|
|
351
|
-
}
|
|
154
|
+
:host([data-legend="false"]) .legends { display: none }
|
|
155
|
+
.legends { align-items: center; display: flex; flex-wrap: wrap; gap: var(--mtds-2) var(--mtds-5); justify-content: center }
|
|
156
|
+
.legend { display: flex; align-items: center; gap: var(--mtds-2) }
|
|
352
157
|
.legend::before {
|
|
353
158
|
background: var(--color);
|
|
354
159
|
border-radius: var(--mtds-border-radius-full);
|
|
@@ -360,12 +165,6 @@ const t = `/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
|
360
165
|
vertical-align: middle;
|
|
361
166
|
width: var(--mtds-5);
|
|
362
167
|
}
|
|
363
|
-
|
|
364
|
-
:host([data-legend="false"]) .legends,
|
|
365
|
-
:host([data-legend="hidden"]) .legends,
|
|
366
|
-
:host([data-legend="none"]) .legends {
|
|
367
|
-
display: none;
|
|
368
|
-
}
|
|
369
168
|
`;
|
|
370
169
|
export {
|
|
371
170
|
t as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.css.js","sources":["../../designsystem/chart/chart.css?raw"],"sourcesContent":["export default \"/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */\\n:host(:not([hidden])) {\\n\\tdisplay: grid;\\n\\tgap: var(--mtds-6);\\n}\\n\\n[data-event-proxy] {\\n\\tcursor: pointer;\\n}\\n\\n.pie {\\n\\toverflow: visible;\\n\\taspect-ratio: var(--mtdsc-chart-aspect);\\n}\\n.pie > path {\\n\\tfill: var(--color);\\n\\toutline: none;\\n\\tstroke-width: var(--mtdsc-chart-border-width);\\n\\tstroke: var(--mtdsc-chart-border-color);\\n\\ttransform-origin: center;\\n\\ttransition: scale 0.2s;\\n\\tvector-effect: non-scaling-stroke;\\n}\\n.pie > path:focus-visible,\\n.pie > path:hover {\\n\\tscale: 1.05;\\n}\\n\\n:host([data-variant=\\\"doughnut\\\"]) .axis,\\n:host([data-variant=\\\"pie\\\"]) .axis {\\n\\tdisplay: none;\\n}\\n\\n.axis {\\n\\tfont-size: var(--mtds-body-sm-font-size);\\n\\tdisplay: grid;\\n\\tgap: var(--mtdsc-chart-axis-gap);\\n\\tgrid-template-columns: fit-content(7em) 1fr;\\n\\tgrid-template-rows: 1fr auto;\\n\\tgrid-template-areas:\\n\\t\\t\\\"y-axis chart\\\"\\n\\t\\t\\\"y-axis x-axis\\\";\\n}\\n\\n.axis::before {\\n\\tborder-bottom-left-radius: var(--mtdsc-chart-axis-edge-radius);\\n\\tborder-color: var(--mtdsc-chart-axis-edge-color);\\n\\tborder-style: solid;\\n\\tborder-width: 0 0 var(--mtdsc-chart-axis-edge-width)\\n\\t\\tvar(--mtdsc-chart-axis-edge-width);\\n\\tcontent: \\\"\\\";\\n\\tgrid-area: chart;\\n\\tpointer-events: none;\\n\\tz-index: 2;\\n}\\n\\n.axisSteps,\\n.axisStep,\\n.axisGroups,\\n.axisGroup {\\n\\tbox-sizing: border-box;\\n\\tdisplay: grid;\\n\\tposition: relative; /* Help .lineContainer positioning */\\n}\\n.axisGroups {\\n\\t--gap: max(\\n\\t\\t1px,\\n\\t\\tclamp(\\n\\t\\t\\t.5%,\\n\\t\\t\\tcalc(10% / var(--bars) * var(--groups)),\\n\\t\\t\\tvar(--mtdsc-chart-axis-gap)\\n\\t\\t)\\n\\t);\\n\\tgap: var(--mtdsc-chart-axis-gap) var(--gap);\\n\\tgrid-area: chart / chart / x-axis / chart;\\n\\tgrid-auto-columns: 1fr;\\n\\tgrid-template-rows: subgrid;\\n\\tpadding: 0 var(--mtdsc-chart-axis-gap);\\n\\ttext-align: center;\\n}\\n.axisGroup {\\n\\tgrid-row: inherit;\\n\\tgrid-template: inherit;\\n}\\n.axisGroup::after {\\n\\tcontent: attr(data-label);\\n\\tdirection: ltr; /* Prevent inherited rtl */\\n\\tmin-width: 0; /* Allow word-wrapping */\\n}\\n:host(:not([data-variant|=\\\"bar\\\"])) {\\n\\t.axisGroup::after {\\n\\t\\tjustify-self: center;\\n\\t\\ttext-align: start;\\n\\t\\twriting-mode: vertical-rl;\\n\\t\\t/* If wanting 45deg text: */\\n\\t\\t/* justify-self: center;\\n\\t\\trotate: 45deg;\\n\\t\\ttext-align: end;\\n\\t\\twriting-mode: sideways-lr;\\n\\t\\ttransform-origin: 50% 0; */\\n\\t}\\n}\\n.axisSteps {\\n\\talign-items: end;\\n\\taspect-ratio: var(--mtdsc-chart-aspect);\\n\\tgrid-area: chart / y-axis / chart / chart;\\n\\tgrid-auto-rows: 1fr;\\n\\tgrid-template: 1px / subgrid;\\n}\\n.axisStep {\\n\\talign-items: start;\\n\\tgrid-column: inherit;\\n\\tgrid-template-columns: inherit;\\n\\theight: 1px;\\n\\ttext-align: right;\\n}\\n.axisStep::after {\\n\\tborder-bottom: var(--mtdsc-chart-axis-border);\\n\\tcontent: \\\"\\\";\\n}\\n.axisStep::before {\\n\\tcontent: attr(data-label);\\n\\ttranslate: 0 -50%;\\n}\\n.axisStep[data-label=\\\"0\\\"]::after {\\n\\topacity: 0; /* Hide 0 line as it overlapps with .axis::before */\\n}\\n\\n/* Reduce amount of steps if small space */\\n:host(:not([data-variant|=\\\"bar\\\"]))\\n\\t.axisStepsYHalf\\n\\t.axisStep:nth-last-child(even) {\\n\\tdisplay: none;\\n}\\n:host(:not([data-variant|=\\\"bar\\\"]))\\n\\t.axisStepsYHalf\\n\\t.axisSteps:has(.axisStep:nth-last-child(even):first-child) {\\n\\tgrid-template-rows: 0.5fr;\\n}\\n\\n:host([data-variant|=\\\"bar\\\"]) .axisStepsXHalf .axisStep:nth-last-child(even) {\\n\\tdisplay: none;\\n}\\n:host([data-variant|=\\\"bar\\\"])\\n\\t.axisStepsXHalf\\n\\t.axisSteps:has(.axisStep:nth-last-child(even):first-child) {\\n\\tgrid-template-columns: 0.5fr;\\n}\\n\\n:host([data-variant|=\\\"bar\\\"]) .axisSteps,\\n:host([data-variant|=\\\"bar\\\"]) .axisGroup {\\n\\tdirection: rtl; /* Reverse orders */\\n}\\n:host([data-variant|=\\\"bar\\\"]) .axisSteps > *,\\n:host([data-variant|=\\\"bar\\\"]) .axisGroup > * {\\n\\tdirection: ltr;\\n}\\n:host([data-variant|=\\\"bar\\\"]) .axisGroups {\\n\\taspect-ratio: var(--mtdsc-chart-aspect);\\n\\tgap: 1% var(--mtdsc-chart-axis-gap);\\n\\tgrid-area: chart / y-axis / chart / chart;\\n\\tgrid-template: none / subgrid;\\n\\tpadding: var(--mtdsc-chart-axis-gap) 0;\\n\\trow-gap: var(--mtdsc-chart-axis-gap);\\n\\ttext-align: right;\\n}\\n:host([data-variant|=\\\"bar\\\"]) .axisGroup::after {\\n\\talign-self: center; /* Since text-align does not work vertically */\\n}\\n:host([data-variant|=\\\"bar\\\"]) .axisGroup {\\n\\tgrid-column: inherit;\\n\\tgrid-row: auto;\\n}\\n:host([data-variant|=\\\"bar\\\"]) .axisSteps {\\n\\talign-items: stretch;\\n\\taspect-ratio: auto;\\n\\tgrid-area: chart / chart / x-axis / chart;\\n\\tgrid-auto-columns: 1fr;\\n\\tgrid-template: subgrid / 1px;\\n}\\n:host([data-variant|=\\\"bar\\\"]) .axisStep {\\n\\talign-items: stretch;\\n\\tgrid-row: inherit;\\n\\tgrid-column: auto;\\n\\tgrid-template-rows: inherit;\\n\\tgrid-template-columns: none;\\n\\ttext-align: center;\\n}\\n:host([data-variant|=\\\"bar\\\"]) .axisStep::after {\\n\\torder: -1;\\n\\tborder-left: var(--mtdsc-chart-axis-border);\\n\\tborder-bottom: 0;\\n}\\n:host([data-variant|=\\\"bar\\\"]) .axisStep::before {\\n\\ttranslate: -50% 0;\\n}\\n\\n.axisGroupContent {\\n\\tdisplay: flex;\\n}\\n:host([data-variant=\\\"column-stacked\\\"]) .axisGroupContent {\\n\\tflex-direction: column-reverse;\\n}\\n:host([data-variant=\\\"bar\\\"]) .axisGroupContent {\\n\\tflex-direction: column;\\n}\\n:host([data-variant=\\\"bar-stacked\\\"]) .axisGroupContent {\\n\\tflex-direction: row;\\n}\\n\\n.bar {\\n\\t--size: calc(var(--value) / var(--total, 1) * 100%);\\n\\talign-self: end;\\n\\tbackground: var(--color);\\n\\tborder: var(--mtdsc-chart-border-color) solid var(--mtdsc-chart-border-width);\\n\\tborder-radius: var(--mtds-border-radius-sm) var(--mtds-border-radius-sm) 0 0;\\n\\tbox-sizing: border-box;\\n\\theight: var(--size);\\n\\twidth: 100%;\\n}\\n.bar:focus-visible,\\n.linePoint:focus-visible {\\n\\tbox-shadow: var(--dsc-focus-boxShadow);\\n\\toutline: var(--dsc-focus-outline);\\n\\toutline-offset: var(--mtds-border-width-focus);\\n\\tz-index: 2; /* z-index to place on top when outlined */\\n}\\n\\n:host([data-variant|=\\\"bar\\\"]) .bar {\\n\\tborder-radius: 0 var(--mtds-border-radius-sm) var(--mtds-border-radius-sm) 0;\\n\\twidth: var(--size);\\n\\theight: 100%;\\n\\talign-self: start;\\n}\\n\\n/* Prevent double border - using margin to see border around bars */\\n/* Prevent double border - using border to avoid affecting size */\\n:host(:not([data-variant])) .bar + .bar,\\n:host([data-variant=\\\"column\\\"]) .bar + .bar {\\n\\tmargin-left: -1px;\\n}\\n:host([data-variant=\\\"column-stacked\\\"]) .bar:not(:last-child) {\\n\\tborder-radius: 0;\\n}\\n:host([data-variant=\\\"column-stacked\\\"]) .bar + .bar {\\n\\tborder-bottom: none;\\n}\\n:host([data-variant=\\\"bar\\\"]) .bar + .bar {\\n\\tmargin-top: -1px;\\n}\\n:host([data-variant=\\\"bar-stacked\\\"]) .bar:not(:last-child) {\\n\\tborder-radius: 0;\\n}\\n:host([data-variant=\\\"bar-stacked\\\"]) .bar + .bar {\\n\\tborder-left: none;\\n}\\n\\n.lineContainer {\\n\\talign-items: flex-start;\\n\\tdisplay: flex;\\n\\tjustify-content: space-between;\\n\\tpointer-events: none;\\n\\tgrid-row: chart;\\n}\\n.lineContainer > svg,\\n.lineContainer {\\n\\tposition: absolute;\\n\\twidth: 100%;\\n\\theight: 100%;\\n}\\n.lineContainer > svg {\\n\\toverflow: clip visible;\\n}\\n.lineContainer > div[role=\\\"listitem\\\"] {\\n\\tdisplay: contents;\\n}\\n\\n:host([data-variant|=\\\"line\\\"]) .axisGroups,\\n:host([data-variant|=\\\"area\\\"]) .axisGroups {\\n\\tpadding: 0;\\n}\\n\\n.line,\\n.lineShade {\\n\\tfill: none;\\n\\tstroke: var(--color);\\n\\tstroke-linejoin: round;\\n\\tstroke-linecap: round;\\n\\tstroke-width: 1.5;\\n\\tvector-effect: non-scaling-stroke;\\n}\\n\\n.lineShade {\\n\\tstroke: none;\\n\\tfill: var(--color);\\n\\topacity: 0.3;\\n\\tmask: linear-gradient(to bottom, black, transparent);\\n}\\n\\n/* Ensure more contrast for line colors */\\n.line,\\n.linePoint,\\n:host:has(.linePoint) .legend::before {\\n\\tfilter: var(--_mtdsc-chart-line-filter);\\n}\\n\\n.linePoint {\\n\\t--size: var(--mtds-2);\\n\\tbackground: var(--color);\\n\\tborder-radius: var(--mtds-border-radius-full);\\n\\tborder: var(--mtdsc-chart-border-width) solid var(--mtdsc-chart-border-color);\\n\\tbox-sizing: border-box;\\n\\theight: var(--size);\\n\\tmargin: calc(var(--size) / -2);\\n\\tpadding: 0;\\n\\tpointer-events: all;\\n\\tposition: relative;\\n\\ttop: calc(100% - var(--value) / var(--total, 1) * 100%);\\n\\ttransition: scale 0.2s;\\n\\twidth: var(--size);\\n\\tz-index: 2;\\n}\\n.linePoint:focus-visible,\\n.linePoint:hover {\\n\\tscale: 1.3;\\n}\\n.linePoint::before {\\n\\tcontent: \\\"\\\";\\n\\tinset: calc(var(--mtds-3) * -1); /* Increase click surface */\\n\\tposition: absolute;\\n}\\n\\n:host([data-dots=\\\"false\\\"]) .linePoint,\\n:host([data-dots=\\\"hidden\\\"]) .linePoint,\\n:host([data-dots=\\\"none\\\"]) .linePoint {\\n\\tbackground: none;\\n\\tborder: none;\\n}\\n\\n.legends {\\n\\talign-items: center;\\n\\tdisplay: flex;\\n\\tflex-wrap: wrap;\\n\\tgap: var(--mtds-2) var(--mtds-5);\\n\\tjustify-content: center;\\n}\\n.legend {\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\tgap: var(--mtds-2);\\n}\\n.legend::before {\\n\\tbackground: var(--color);\\n\\tborder-radius: var(--mtds-border-radius-full);\\n\\tborder: var(--mtdsc-chart-border-color) solid var(--mtdsc-chart-border-width);\\n\\tbox-sizing: border-box;\\n\\tcontent: \\\"\\\";\\n\\tdisplay: inline-block;\\n\\theight: var(--mtds-5);\\n\\tvertical-align: middle;\\n\\twidth: var(--mtds-5);\\n}\\n\\n:host([data-legend=\\\"false\\\"]) .legends,\\n:host([data-legend=\\\"hidden\\\"]) .legends,\\n:host([data-legend=\\\"none\\\"]) .legends {\\n\\tdisplay: none;\\n}\\n\""],"names":["css"],"mappings":"AAAA,MAAAA,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
1
|
+
{"version":3,"file":"chart.css.js","sources":["../../designsystem/chart/chart.css?raw"],"sourcesContent":["export default \"/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */\\n:host(:not([hidden])) { display: grid; gap: var(--mtds-6) }\\n[data-event] { cursor: pointer } /* Used to forward clicks from Chart ShaowDOM to relevant cell in child table */\\n\\n.pie { overflow: visible; aspect-ratio: var(--mtdsc-chart-aspect) }\\n.pie > path {\\n\\tfill: var(--color);\\n\\toutline: none;\\n\\tstroke-width: var(--mtdsc-chart-border-width);\\n\\tstroke: var(--mtdsc-chart-border-color);\\n\\ttransform-origin: center;\\n\\ttransition: scale 0.2s;\\n\\tvector-effect: non-scaling-stroke;\\n}\\n.pie > path:focus-visible,\\n.pie > path:hover { scale: 1.05 }\\n:host([data-steps=\\\"false\\\"]) .axisStep::before,\\n:host([data-variant=\\\"doughnut\\\"]) .axis,\\n:host([data-variant=\\\"pie\\\"]) .axis { display: none }\\n:host([data-labels=\\\"false\\\"]) .axisGroup::before { position: absolute; pointer-events: none; opacity: 0 } /* Keep available for screen readers */\\n\\n.axis {\\n\\tdisplay: grid;\\n\\tfont-size: var(--mtds-body-sm-font-size);\\n\\tgap: var(--mtdsc-chart-axis-gap);\\n\\tgrid-template-columns: fit-content(7em) 1fr;\\n\\tgrid-template-rows: 1fr auto;\\n\\tgrid-template-areas:\\n\\t\\t\\\"y-axis chart\\\"\\n\\t\\t\\\"y-axis x-axis\\\";\\n}\\n\\n.axis::before {\\n\\tborder-bottom-left-radius: var(--mtdsc-chart-axis-edge-radius);\\n\\tborder-color: var(--mtdsc-chart-axis-edge-color);\\n\\tborder-style: solid;\\n\\tborder-width: 0 0 var(--mtdsc-chart-axis-edge-width) var(--mtdsc-chart-axis-edge-width);\\n\\tcontent: \\\"\\\";\\n\\tgrid-area: chart;\\n\\tpointer-events: none;\\n\\tz-index: 2;\\n}\\n\\n.axisSteps,\\n.axisStep,\\n.axisGroups,\\n.axisGroup { box-sizing: border-box; display: grid; position: relative } /* Help .lineContainer positioning */\\n.axisGroups {\\n\\t--gap: max(1px, clamp(.5%, calc(10% / var(--bars) * var(--groups)), var(--mtdsc-chart-axis-gap)));\\n\\tgap: var(--mtdsc-chart-axis-gap) var(--gap);\\n\\tgrid-area: chart / chart / x-axis / chart;\\n\\tgrid-auto-columns: 1fr;\\n\\tgrid-template-rows: subgrid;\\n\\tpadding: 0 var(--mtdsc-chart-axis-gap);\\n\\ttext-align: center;\\n}\\n.axisGroup { grid-row: inherit; grid-template: inherit }\\n.axisGroup::before { order: 1; content: attr(data-label); direction: ltr; min-width: 0 } /* Allow word-wrapping */\\n:host(:not([data-variant|=\\\"bar\\\"])) { .axisGroup::before { justify-self: center; text-align: start; writing-mode: vertical-rl } }\\n\\n.axisSteps { align-items: end; aspect-ratio: var(--mtdsc-chart-aspect); grid-area: chart / y-axis / chart / chart; grid-auto-rows: 1fr; grid-template: 1px / subgrid }\\n.axisStep { align-items: start; grid-column: inherit; grid-template-columns: inherit; height: 1px; text-align: right }\\n.axisStep::after { border-bottom: var(--mtdsc-chart-axis-border); content: \\\"\\\" }\\n.axisStep::before { content: attr(data-label) / \\\"\\\"; translate: 0 -50% } /* Hide form screen readers */\\n.axisStep[data-label=\\\"0\\\"]::after { opacity: 0 } /* Hide 0 line as it overlapps with .axis::before */\\n\\n/* Reduce amount of steps if small space */\\n:host(:not([data-variant|=\\\"bar\\\"])) .axisStepsYHalf .axisStep:nth-last-child(even) { display: none }\\n:host(:not([data-variant|=\\\"bar\\\"])) .axisStepsYHalf .axisSteps:has(.axisStep:nth-last-child(even):first-child) { grid-template-rows: 0.5fr }\\n:host([data-variant|=\\\"bar\\\"]) .axisStepsXHalf .axisStep:nth-last-child(even) { display: none }\\n:host([data-variant|=\\\"bar\\\"]) .axisStepsXHalf .axisSteps:has(.axisStep:nth-last-child(even):first-child) { grid-template-columns: 0.5fr }\\n\\n:host([data-variant|=\\\"bar\\\"]) .axisSteps,\\n:host([data-variant|=\\\"bar\\\"]) .axisGroup { direction: rtl }\\n:host([data-variant|=\\\"bar\\\"]) .axisSteps > *,\\n:host([data-variant|=\\\"bar\\\"]) .axisGroup > * { direction: ltr }\\n:host([data-variant|=\\\"bar\\\"]) .axisGroups {\\n\\taspect-ratio: var(--mtdsc-chart-aspect);\\n\\tgap: 1% var(--mtdsc-chart-axis-gap);\\n\\tgrid-area: chart / y-axis / chart / chart;\\n\\tgrid-template: none / subgrid;\\n\\tpadding: var(--mtdsc-chart-axis-gap) 0;\\n\\trow-gap: var(--mtdsc-chart-axis-gap);\\n\\ttext-align: right;\\n}\\n:host([data-variant|=\\\"bar\\\"]) .axisGroup::before { align-self: center }\\n:host([data-variant|=\\\"bar\\\"]) .axisGroup { grid-column: inherit; grid-row: auto }\\n:host([data-variant|=\\\"bar\\\"]) .axisSteps { align-items: stretch; aspect-ratio: auto; grid-area: chart / chart / x-axis / chart; grid-auto-columns: 1fr; grid-template: subgrid / 1px }\\n:host([data-variant|=\\\"bar\\\"]) .axisStep { align-items: stretch; grid-row: inherit; grid-column: auto; grid-template-rows: inherit; grid-template-columns: none; text-align: center }\\n:host([data-variant|=\\\"bar\\\"]) .axisStep::after { order: -1; border-left: var(--mtdsc-chart-axis-border); border-bottom: 0 }\\n:host([data-variant|=\\\"bar\\\"]) .axisStep::before { translate: -50% 0 }\\n\\n.axisGroupContent { display: flex }\\n:host([data-variant=\\\"column-stacked\\\"]) .axisGroupContent { flex-direction: column-reverse }\\n:host([data-variant=\\\"bar\\\"]) .axisGroupContent { flex-direction: column }\\n:host([data-variant=\\\"bar-stacked\\\"]) .axisGroupContent { flex-direction: row }\\n\\n.bar {\\n\\t--size: calc(var(--value) / var(--total, 1) * 100%);\\n\\talign-self: end;\\n\\tbackground: var(--color);\\n\\tborder: var(--mtdsc-chart-border-color) solid var(--mtdsc-chart-border-width);\\n\\tborder-radius: var(--mtds-border-radius-sm) var(--mtds-border-radius-sm) 0 0;\\n\\tbox-sizing: border-box;\\n\\theight: var(--size);\\n\\twidth: 100%;\\n}\\n.bar:focus-visible,\\n.linePoint:focus-visible { box-shadow: var(--mtdsc-focus-boxShadow); outline: var(--mtdsc-focus-outline); outline-offset: var(--mtds-border-width-focus); z-index: 2 }\\n:host([data-variant|=\\\"bar\\\"]) .bar { border-radius: 0 var(--mtds-border-radius-sm) var(--mtds-border-radius-sm) 0; width: var(--size); height: 100%; align-self: start }\\n\\n/* Prevent double border - using margin to see border around bars */\\n/* Prevent double border - using border to avoid affecting size */\\n:host(:not([data-variant])) .bar + .bar,\\n:host([data-variant=\\\"column\\\"]) .bar + .bar { margin-left: -1px }\\n:host([data-variant=\\\"column-stacked\\\"]) .bar:not(:last-child) { border-radius: 0 }\\n:host([data-variant=\\\"column-stacked\\\"]) .bar + .bar { border-bottom: none }\\n:host([data-variant=\\\"bar\\\"]) .bar + .bar { margin-top: -1px }\\n:host([data-variant=\\\"bar-stacked\\\"]) .bar:not(:last-child) { border-radius: 0 }\\n:host([data-variant=\\\"bar-stacked\\\"]) .bar + .bar { border-left: none }\\n\\n.lineContainer { align-items: flex-start; display: flex; justify-content: space-between; pointer-events: none; grid-row: chart }\\n.lineContainer > svg, .lineContainer { position: absolute; width: 100%; height: 100% }\\n.lineContainer > svg { overflow: clip visible }\\n.lineContainer > div[role=\\\"listitem\\\"] { display: contents }\\n\\n:host([data-variant|=\\\"line\\\"]) .axisGroups,\\n:host([data-variant|=\\\"area\\\"]) .axisGroups { padding: 0 }\\n.lineShade, .line { fill: none; stroke: var(--color); stroke-linejoin: round; stroke-linecap: round; stroke-width: 1.5; vector-effect: non-scaling-stroke }\\n.lineShade { stroke: none; fill: var(--color); opacity: 0.3; mask: linear-gradient(to bottom, black, transparent) }\\n\\n.linePoint, .line, :host:has(.linePoint) .legend::before { filter: var(--_mtdsc-chart-line-filter) } /* Ensure more contrast for line colors */\\n.linePoint {\\n\\t--size: var(--mtds-2);\\n\\tbackground: var(--color);\\n\\tborder-radius: var(--mtds-border-radius-full);\\n\\tborder: var(--mtdsc-chart-border-width) solid var(--mtdsc-chart-border-color);\\n\\tbox-sizing: border-box;\\n\\theight: var(--size);\\n\\tmargin: calc(var(--size) / -2);\\n\\tpadding: 0;\\n\\tpointer-events: all;\\n\\tposition: relative;\\n\\ttop: calc(100% - var(--value) / var(--total, 1) * 100%);\\n\\ttransition: scale 0.2s;\\n\\twidth: var(--size);\\n\\tz-index: 2;\\n}\\n.linePoint:focus-visible,\\n.linePoint:hover { scale: 1.3 }\\n.linePoint::before { content: \\\"\\\"; position: absolute; inset: calc(var(--mtds-3) * -1); /* Increase click surface */ }\\n:host([data-dots=\\\"false\\\"]) .linePoint { background: none; border: none }\\n\\n:host([data-legend=\\\"false\\\"]) .legends { display: none }\\n.legends { align-items: center; display: flex; flex-wrap: wrap; gap: var(--mtds-2) var(--mtds-5); justify-content: center }\\n.legend { display: flex; align-items: center; gap: var(--mtds-2) }\\n.legend::before {\\n\\tbackground: var(--color);\\n\\tborder-radius: var(--mtds-border-radius-full);\\n\\tborder: var(--mtdsc-chart-border-color) solid var(--mtdsc-chart-border-width);\\n\\tbox-sizing: border-box;\\n\\tcontent: \\\"\\\";\\n\\tdisplay: inline-block;\\n\\theight: var(--mtds-5);\\n\\tvertical-align: middle;\\n\\twidth: var(--mtds-5);\\n}\\n\""],"names":["css"],"mappings":"AAAA,MAAAA,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|