Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi/js
File: custom.js
/** Used as references for various `Number` constants. */
[3000] Fix | Delete
var NAN = 0 / 0;
[3001] Fix | Delete
[3002] Fix | Delete
/** Used to match leading and trailing whitespace. */
[3003] Fix | Delete
var reTrim = /^\s+|\s+$/g;
[3004] Fix | Delete
[3005] Fix | Delete
/** Used to detect bad signed hexadecimal string values. */
[3006] Fix | Delete
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
[3007] Fix | Delete
[3008] Fix | Delete
/** Used to detect binary string values. */
[3009] Fix | Delete
var reIsBinary = /^0b[01]+$/i;
[3010] Fix | Delete
[3011] Fix | Delete
/** Used to detect octal string values. */
[3012] Fix | Delete
var reIsOctal = /^0o[0-7]+$/i;
[3013] Fix | Delete
[3014] Fix | Delete
/** Built-in method references without a dependency on `root`. */
[3015] Fix | Delete
var freeParseInt = parseInt;
[3016] Fix | Delete
[3017] Fix | Delete
/**
[3018] Fix | Delete
* Converts `value` to a number.
[3019] Fix | Delete
*
[3020] Fix | Delete
* @static
[3021] Fix | Delete
* @memberOf _
[3022] Fix | Delete
* @since 4.0.0
[3023] Fix | Delete
* @category Lang
[3024] Fix | Delete
* @param {*} value The value to process.
[3025] Fix | Delete
* @returns {number} Returns the number.
[3026] Fix | Delete
* @example
[3027] Fix | Delete
*
[3028] Fix | Delete
* _.toNumber(3.2);
[3029] Fix | Delete
* // => 3.2
[3030] Fix | Delete
*
[3031] Fix | Delete
* _.toNumber(Number.MIN_VALUE);
[3032] Fix | Delete
* // => 5e-324
[3033] Fix | Delete
*
[3034] Fix | Delete
* _.toNumber(Infinity);
[3035] Fix | Delete
* // => Infinity
[3036] Fix | Delete
*
[3037] Fix | Delete
* _.toNumber('3.2');
[3038] Fix | Delete
* // => 3.2
[3039] Fix | Delete
*/
[3040] Fix | Delete
function toNumber(value) {
[3041] Fix | Delete
if (typeof value == 'number') {
[3042] Fix | Delete
return value;
[3043] Fix | Delete
}
[3044] Fix | Delete
if (isSymbol(value)) {
[3045] Fix | Delete
return NAN;
[3046] Fix | Delete
}
[3047] Fix | Delete
if (isObject(value)) {
[3048] Fix | Delete
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
[3049] Fix | Delete
value = isObject(other) ? (other + '') : other;
[3050] Fix | Delete
}
[3051] Fix | Delete
if (typeof value != 'string') {
[3052] Fix | Delete
return value === 0 ? value : +value;
[3053] Fix | Delete
}
[3054] Fix | Delete
value = value.replace(reTrim, '');
[3055] Fix | Delete
var isBinary = reIsBinary.test(value);
[3056] Fix | Delete
return (isBinary || reIsOctal.test(value))
[3057] Fix | Delete
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
[3058] Fix | Delete
: (reIsBadHex.test(value) ? NAN : +value);
[3059] Fix | Delete
}
[3060] Fix | Delete
[3061] Fix | Delete
module.exports = toNumber;
[3062] Fix | Delete
[3063] Fix | Delete
[3064] Fix | Delete
/***/ }),
[3065] Fix | Delete
[3066] Fix | Delete
/***/ "./includes/builder/node_modules/lodash/toString.js":
[3067] Fix | Delete
/*!**********************************************************!*\
[3068] Fix | Delete
!*** ./includes/builder/node_modules/lodash/toString.js ***!
[3069] Fix | Delete
\**********************************************************/
[3070] Fix | Delete
/*! no static exports found */
[3071] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[3072] Fix | Delete
[3073] Fix | Delete
var baseToString = __webpack_require__(/*! ./_baseToString */ "./includes/builder/node_modules/lodash/_baseToString.js");
[3074] Fix | Delete
[3075] Fix | Delete
/**
[3076] Fix | Delete
* Converts `value` to a string. An empty string is returned for `null`
[3077] Fix | Delete
* and `undefined` values. The sign of `-0` is preserved.
[3078] Fix | Delete
*
[3079] Fix | Delete
* @static
[3080] Fix | Delete
* @memberOf _
[3081] Fix | Delete
* @since 4.0.0
[3082] Fix | Delete
* @category Lang
[3083] Fix | Delete
* @param {*} value The value to convert.
[3084] Fix | Delete
* @returns {string} Returns the converted string.
[3085] Fix | Delete
* @example
[3086] Fix | Delete
*
[3087] Fix | Delete
* _.toString(null);
[3088] Fix | Delete
* // => ''
[3089] Fix | Delete
*
[3090] Fix | Delete
* _.toString(-0);
[3091] Fix | Delete
* // => '-0'
[3092] Fix | Delete
*
[3093] Fix | Delete
* _.toString([1, 2, 3]);
[3094] Fix | Delete
* // => '1,2,3'
[3095] Fix | Delete
*/
[3096] Fix | Delete
function toString(value) {
[3097] Fix | Delete
return value == null ? '' : baseToString(value);
[3098] Fix | Delete
}
[3099] Fix | Delete
[3100] Fix | Delete
module.exports = toString;
[3101] Fix | Delete
[3102] Fix | Delete
[3103] Fix | Delete
/***/ }),
[3104] Fix | Delete
[3105] Fix | Delete
/***/ "./includes/builder/node_modules/lodash/values.js":
[3106] Fix | Delete
/*!********************************************************!*\
[3107] Fix | Delete
!*** ./includes/builder/node_modules/lodash/values.js ***!
[3108] Fix | Delete
\********************************************************/
[3109] Fix | Delete
/*! no static exports found */
[3110] Fix | Delete
/***/ (function(module, exports, __webpack_require__) {
[3111] Fix | Delete
[3112] Fix | Delete
var baseValues = __webpack_require__(/*! ./_baseValues */ "./includes/builder/node_modules/lodash/_baseValues.js"),
[3113] Fix | Delete
keys = __webpack_require__(/*! ./keys */ "./includes/builder/node_modules/lodash/keys.js");
[3114] Fix | Delete
[3115] Fix | Delete
/**
[3116] Fix | Delete
* Creates an array of the own enumerable string keyed property values of `object`.
[3117] Fix | Delete
*
[3118] Fix | Delete
* **Note:** Non-object values are coerced to objects.
[3119] Fix | Delete
*
[3120] Fix | Delete
* @static
[3121] Fix | Delete
* @since 0.1.0
[3122] Fix | Delete
* @memberOf _
[3123] Fix | Delete
* @category Object
[3124] Fix | Delete
* @param {Object} object The object to query.
[3125] Fix | Delete
* @returns {Array} Returns the array of property values.
[3126] Fix | Delete
* @example
[3127] Fix | Delete
*
[3128] Fix | Delete
* function Foo() {
[3129] Fix | Delete
* this.a = 1;
[3130] Fix | Delete
* this.b = 2;
[3131] Fix | Delete
* }
[3132] Fix | Delete
*
[3133] Fix | Delete
* Foo.prototype.c = 3;
[3134] Fix | Delete
*
[3135] Fix | Delete
* _.values(new Foo);
[3136] Fix | Delete
* // => [1, 2] (iteration order is not guaranteed)
[3137] Fix | Delete
*
[3138] Fix | Delete
* _.values('hi');
[3139] Fix | Delete
* // => ['h', 'i']
[3140] Fix | Delete
*/
[3141] Fix | Delete
function values(object) {
[3142] Fix | Delete
return object == null ? [] : baseValues(object, keys(object));
[3143] Fix | Delete
}
[3144] Fix | Delete
[3145] Fix | Delete
module.exports = values;
[3146] Fix | Delete
[3147] Fix | Delete
[3148] Fix | Delete
/***/ }),
[3149] Fix | Delete
[3150] Fix | Delete
/***/ "./includes/builder/scripts/utils/utils.js":
[3151] Fix | Delete
/*!*************************************************!*\
[3152] Fix | Delete
!*** ./includes/builder/scripts/utils/utils.js ***!
[3153] Fix | Delete
\*************************************************/
[3154] Fix | Delete
/*! exports provided: isBuilderType, is, isFE, isVB, isBFB, isTB, isLBB, isDiviTheme, isExtraTheme, isLBP, isBlockEditor, isBuilder, getOffsets, maybeIncreaseEmitterMaxListeners, maybeDecreaseEmitterMaxListeners, registerFrontendComponent, setImportantInlineValue */
[3155] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[3156] Fix | Delete
[3157] Fix | Delete
"use strict";
[3158] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[3159] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBuilderType", function() { return isBuilderType; });
[3160] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "is", function() { return is; });
[3161] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFE", function() { return isFE; });
[3162] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVB", function() { return isVB; });
[3163] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBFB", function() { return isBFB; });
[3164] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isTB", function() { return isTB; });
[3165] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLBB", function() { return isLBB; });
[3166] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDiviTheme", function() { return isDiviTheme; });
[3167] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isExtraTheme", function() { return isExtraTheme; });
[3168] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLBP", function() { return isLBP; });
[3169] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBlockEditor", function() { return isBlockEditor; });
[3170] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBuilder", function() { return isBuilder; });
[3171] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOffsets", function() { return getOffsets; });
[3172] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "maybeIncreaseEmitterMaxListeners", function() { return maybeIncreaseEmitterMaxListeners; });
[3173] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "maybeDecreaseEmitterMaxListeners", function() { return maybeDecreaseEmitterMaxListeners; });
[3174] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerFrontendComponent", function() { return registerFrontendComponent; });
[3175] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setImportantInlineValue", function() { return setImportantInlineValue; });
[3176] Fix | Delete
/* harmony import */ var lodash_includes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/includes */ "./includes/builder/node_modules/lodash/includes.js");
[3177] Fix | Delete
/* harmony import */ var lodash_includes__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_includes__WEBPACK_IMPORTED_MODULE_0__);
[3178] Fix | Delete
/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/get */ "./includes/builder/node_modules/lodash/get.js");
[3179] Fix | Delete
/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_1__);
[3180] Fix | Delete
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jquery */ "jquery");
[3181] Fix | Delete
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_2__);
[3182] Fix | Delete
/* harmony import */ var _core_admin_js_frame_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @core/admin/js/frame-helpers */ "./core/admin/js/frame-helpers.js");
[3183] Fix | Delete
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
[3184] Fix | Delete
[3185] Fix | Delete
/**
[3186] Fix | Delete
* IMPORTANT: Keep external dependencies as low as possible since this utils might be
[3187] Fix | Delete
* imported by various frontend scripts; need to keep frontend script size low.
[3188] Fix | Delete
*/
[3189] Fix | Delete
// External dependencies
[3190] Fix | Delete
[3191] Fix | Delete
[3192] Fix | Delete
// Internal dependencies
[3193] Fix | Delete
[3194] Fix | Delete
[3195] Fix | Delete
/**
[3196] Fix | Delete
* Check current page's builder Type.
[3197] Fix | Delete
*
[3198] Fix | Delete
* @since 4.6.0
[3199] Fix | Delete
*
[3200] Fix | Delete
* @param {string} builderType Fe|vb|bfb|tb|lbb|lbp.
[3201] Fix | Delete
*
[3202] Fix | Delete
* @returns {bool}
[3203] Fix | Delete
*/
[3204] Fix | Delete
[3205] Fix | Delete
var isBuilderType = function isBuilderType(builderType) {
[3206] Fix | Delete
return builderType === window.et_builder_utils_params.builderType;
[3207] Fix | Delete
};
[3208] Fix | Delete
/**
[3209] Fix | Delete
* Return condition value.
[3210] Fix | Delete
*
[3211] Fix | Delete
* @since 4.6.0
[3212] Fix | Delete
*
[3213] Fix | Delete
* @param {string} conditionName
[3214] Fix | Delete
*
[3215] Fix | Delete
* @returns {bool}
[3216] Fix | Delete
*/
[3217] Fix | Delete
[3218] Fix | Delete
var is = function is(conditionName) {
[3219] Fix | Delete
return window.et_builder_utils_params.condition[conditionName];
[3220] Fix | Delete
};
[3221] Fix | Delete
/**
[3222] Fix | Delete
* Is current page Frontend.
[3223] Fix | Delete
*
[3224] Fix | Delete
* @since 4.6.0
[3225] Fix | Delete
*
[3226] Fix | Delete
* @type {bool}
[3227] Fix | Delete
*/
[3228] Fix | Delete
[3229] Fix | Delete
var isFE = isBuilderType('fe');
[3230] Fix | Delete
/**
[3231] Fix | Delete
* Is current page Visual Builder.
[3232] Fix | Delete
*
[3233] Fix | Delete
* @since 4.6.0
[3234] Fix | Delete
*
[3235] Fix | Delete
* @type {bool}
[3236] Fix | Delete
*/
[3237] Fix | Delete
[3238] Fix | Delete
var isVB = isBuilderType('vb');
[3239] Fix | Delete
/**
[3240] Fix | Delete
* Is current page BFB / New Builder Experience.
[3241] Fix | Delete
*
[3242] Fix | Delete
* @since 4.6.0
[3243] Fix | Delete
*
[3244] Fix | Delete
* @type {bool}
[3245] Fix | Delete
*/
[3246] Fix | Delete
[3247] Fix | Delete
var isBFB = isBuilderType('bfb');
[3248] Fix | Delete
/**
[3249] Fix | Delete
* Is current page Theme Builder.
[3250] Fix | Delete
*
[3251] Fix | Delete
* @since 4.6.0
[3252] Fix | Delete
*
[3253] Fix | Delete
* @type {bool}
[3254] Fix | Delete
*/
[3255] Fix | Delete
[3256] Fix | Delete
var isTB = isBuilderType('tb');
[3257] Fix | Delete
/**
[3258] Fix | Delete
* Is current page Layout Block Builder.
[3259] Fix | Delete
*
[3260] Fix | Delete
* @type {bool}
[3261] Fix | Delete
*/
[3262] Fix | Delete
[3263] Fix | Delete
var isLBB = isBuilderType('lbb');
[3264] Fix | Delete
/**
[3265] Fix | Delete
* Is current page uses Divi Theme.
[3266] Fix | Delete
*
[3267] Fix | Delete
* @since 4.6.0
[3268] Fix | Delete
*
[3269] Fix | Delete
* @type {bool}
[3270] Fix | Delete
*/
[3271] Fix | Delete
[3272] Fix | Delete
var isDiviTheme = is('diviTheme');
[3273] Fix | Delete
/**
[3274] Fix | Delete
* Is current page uses Extra Theme.
[3275] Fix | Delete
*
[3276] Fix | Delete
* @since 4.6.0
[3277] Fix | Delete
*
[3278] Fix | Delete
* @type {bool}
[3279] Fix | Delete
*/
[3280] Fix | Delete
[3281] Fix | Delete
var isExtraTheme = is('extraTheme');
[3282] Fix | Delete
/**
[3283] Fix | Delete
* Is current page Layout Block Preview.
[3284] Fix | Delete
*
[3285] Fix | Delete
* @since 4.6.0
[3286] Fix | Delete
*
[3287] Fix | Delete
* @type {bool}
[3288] Fix | Delete
*/
[3289] Fix | Delete
[3290] Fix | Delete
var isLBP = isBuilderType('lbp');
[3291] Fix | Delete
/**
[3292] Fix | Delete
* Check if current window is block editor window (gutenberg editing page).
[3293] Fix | Delete
*
[3294] Fix | Delete
* @since 4.6.0
[3295] Fix | Delete
*
[3296] Fix | Delete
* @type {bool}
[3297] Fix | Delete
*/
[3298] Fix | Delete
[3299] Fix | Delete
var isBlockEditor = 0 < jquery__WEBPACK_IMPORTED_MODULE_2___default()(_core_admin_js_frame_helpers__WEBPACK_IMPORTED_MODULE_3__["top_window"].document).find('.edit-post-layout__content').length;
[3300] Fix | Delete
/**
[3301] Fix | Delete
* Check if current window is builder window (VB, BFB, TB, LBB).
[3302] Fix | Delete
*
[3303] Fix | Delete
* @since 4.6.0
[3304] Fix | Delete
*
[3305] Fix | Delete
* @type {bool}
[3306] Fix | Delete
*/
[3307] Fix | Delete
[3308] Fix | Delete
var isBuilder = lodash_includes__WEBPACK_IMPORTED_MODULE_0___default()(['vb', 'bfb', 'tb', 'lbb'], window.et_builder_utils_params.builderType);
[3309] Fix | Delete
/**
[3310] Fix | Delete
* Get offsets value of all sides.
[3311] Fix | Delete
*
[3312] Fix | Delete
* @since 4.6.0
[3313] Fix | Delete
*
[3314] Fix | Delete
* @param {object} $selector JQuery selector instance.
[3315] Fix | Delete
* @param {number} height
[3316] Fix | Delete
* @param {number} width
[3317] Fix | Delete
*
[3318] Fix | Delete
* @returns {object}
[3319] Fix | Delete
*/
[3320] Fix | Delete
[3321] Fix | Delete
var getOffsets = function getOffsets($selector) {
[3322] Fix | Delete
var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
[3323] Fix | Delete
var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
[3324] Fix | Delete
// Return previously saved offset if sticky tab is active; retrieving actual offset contain risk
[3325] Fix | Delete
// of incorrect offsets if sticky horizontal / vertical offset of relative position is modified.
[3326] Fix | Delete
var isStickyTabActive = isBuilder && $selector.hasClass('et_pb_sticky') && 'fixed' !== $selector.css('position');
[3327] Fix | Delete
var cachedOffsets = $selector.data('et-offsets');
[3328] Fix | Delete
var cachedDevice = $selector.data('et-offsets-device');
[3329] Fix | Delete
var currentDevice = lodash_get__WEBPACK_IMPORTED_MODULE_1___default()(window.ET_FE, 'stores.window.breakpoint', ''); // Only return cachedOffsets if sticky tab is active and cachedOffsets is not undefined and
[3330] Fix | Delete
// cachedDevice equal to currentDevice.
[3331] Fix | Delete
[3332] Fix | Delete
if (isStickyTabActive && cachedOffsets !== undefined && cachedDevice === currentDevice) {
[3333] Fix | Delete
return cachedOffsets;
[3334] Fix | Delete
} // Get top & left offsets
[3335] Fix | Delete
[3336] Fix | Delete
[3337] Fix | Delete
var offsets = $selector.offset(); // If no offsets found, return empty object
[3338] Fix | Delete
[3339] Fix | Delete
if ('undefined' === typeof offsets) {
[3340] Fix | Delete
return {};
[3341] Fix | Delete
} // FE sets the flag for sticky module which uses transform as classname on module wrapper while
[3342] Fix | Delete
// VB, BFB, TB, and LB sets the flag on CSS output's <style> element because it can't modify
[3343] Fix | Delete
// its parent. This compromises avoids the needs to extract transform rendering logic
[3344] Fix | Delete
[3345] Fix | Delete
[3346] Fix | Delete
var hasTransform = isBuilder ? $selector.children('.et-fb-custom-css-output[data-sticky-has-transform="on"]').length > 0 : $selector.hasClass('et_pb_sticky--has-transform');
[3347] Fix | Delete
var top = 'undefined' === typeof offsets.top ? 0 : offsets.top;
[3348] Fix | Delete
var left = 'undefined' === typeof offsets.left ? 0 : offsets.left; // If module is sticky module that uses transform, its offset calculation needs to be adjusted
[3349] Fix | Delete
// because transform tends to modify the positioning of the module
[3350] Fix | Delete
[3351] Fix | Delete
if (hasTransform) {
[3352] Fix | Delete
// Calculate offset (relative to selector's parent) AFTER it is affected by transform
[3353] Fix | Delete
// NOTE: Can't use jQuery's position() because it considers margin-left `auto` which causes issue
[3354] Fix | Delete
// on row thus this manually calculate the difference between element and its parent's offset
[3355] Fix | Delete
// @see https://github.com/jquery/jquery/blob/1.12-stable/src/offset.js#L149-L155
[3356] Fix | Delete
var parentOffsets = $selector.parent().offset();
[3357] Fix | Delete
var transformedPosition = {
[3358] Fix | Delete
top: offsets.top - parentOffsets.top,
[3359] Fix | Delete
left: offsets.left - parentOffsets.left
[3360] Fix | Delete
}; // Calculate offset (relative to selector's parent) BEFORE it is affected by transform
[3361] Fix | Delete
[3362] Fix | Delete
var preTransformedPosition = {
[3363] Fix | Delete
top: $selector[0].offsetTop,
[3364] Fix | Delete
left: $selector[0].offsetLeft
[3365] Fix | Delete
}; // Update offset's top value
[3366] Fix | Delete
[3367] Fix | Delete
top += preTransformedPosition.top - transformedPosition.top;
[3368] Fix | Delete
offsets.top = top; // Update offset's left value
[3369] Fix | Delete
[3370] Fix | Delete
left += preTransformedPosition.left - transformedPosition.left;
[3371] Fix | Delete
offsets.left = left;
[3372] Fix | Delete
} // Manually calculate right & bottom offsets
[3373] Fix | Delete
[3374] Fix | Delete
[3375] Fix | Delete
offsets.right = left + width;
[3376] Fix | Delete
offsets.bottom = top + height; // Save copy of the offset on element's .data() in case of scenario where retrieving actual
[3377] Fix | Delete
// offset value will lead to incorrect offset value (eg. sticky tab active with position offset)
[3378] Fix | Delete
[3379] Fix | Delete
$selector.data('et-offsets', offsets); // Add current device to cache
[3380] Fix | Delete
[3381] Fix | Delete
if ('' !== currentDevice) {
[3382] Fix | Delete
$selector.data('et-offsets-device', offsets);
[3383] Fix | Delete
}
[3384] Fix | Delete
[3385] Fix | Delete
return offsets;
[3386] Fix | Delete
};
[3387] Fix | Delete
/**
[3388] Fix | Delete
* Increase EventEmitter's max listeners if lister count is about to surpass the max listeners limit
[3389] Fix | Delete
* IMPORTANT: Need to be placed BEFORE `.on()`.
[3390] Fix | Delete
*
[3391] Fix | Delete
* @since 4.6.0
[3392] Fix | Delete
* @param {EventEmitter} emitter
[3393] Fix | Delete
* @param eventName
[3394] Fix | Delete
* @param {string} EventName
[3395] Fix | Delete
*/
[3396] Fix | Delete
[3397] Fix | Delete
var maybeIncreaseEmitterMaxListeners = function maybeIncreaseEmitterMaxListeners(emitter, eventName) {
[3398] Fix | Delete
var currentCount = emitter.listenerCount(eventName);
[3399] Fix | Delete
var maxListeners = emitter.getMaxListeners();
[3400] Fix | Delete
[3401] Fix | Delete
if (currentCount === maxListeners) {
[3402] Fix | Delete
emitter.setMaxListeners(maxListeners + 1);
[3403] Fix | Delete
}
[3404] Fix | Delete
};
[3405] Fix | Delete
/**
[3406] Fix | Delete
* Decrease EventEmitter's max listeners if listener count is less than max listener limit and above
[3407] Fix | Delete
* 10 (default max listener limit). If listener count is less than 10, max listener limit will
[3408] Fix | Delete
* remain at 10
[3409] Fix | Delete
* IMPORTANT: Need to be placed AFTER `.removeListener()`.
[3410] Fix | Delete
*
[3411] Fix | Delete
* @since 4.6.0
[3412] Fix | Delete
*
[3413] Fix | Delete
* @param {EventEmitter} emitter
[3414] Fix | Delete
* @param {string} eventName
[3415] Fix | Delete
*/
[3416] Fix | Delete
[3417] Fix | Delete
var maybeDecreaseEmitterMaxListeners = function maybeDecreaseEmitterMaxListeners(emitter, eventName) {
[3418] Fix | Delete
var currentCount = emitter.listenerCount(eventName);
[3419] Fix | Delete
var maxListeners = emitter.getMaxListeners();
[3420] Fix | Delete
[3421] Fix | Delete
if (maxListeners > 10) {
[3422] Fix | Delete
emitter.setMaxListeners(currentCount);
[3423] Fix | Delete
}
[3424] Fix | Delete
};
[3425] Fix | Delete
/**
[3426] Fix | Delete
* Expose frontend (FE) component via global object so it can be accessed and reused externally
[3427] Fix | Delete
* Note: window.ET_Builder is for builder app's component; window.ET_FE is for frontend component.
[3428] Fix | Delete
*
[3429] Fix | Delete
* @since 4.6.0
[3430] Fix | Delete
*
[3431] Fix | Delete
* @param {string} type
[3432] Fix | Delete
* @param {string} name
[3433] Fix | Delete
* @param {mixed} component
[3434] Fix | Delete
*/
[3435] Fix | Delete
[3436] Fix | Delete
var registerFrontendComponent = function registerFrontendComponent(type, name, component) {
[3437] Fix | Delete
// Make sure that ET_FE is available
[3438] Fix | Delete
if ('undefined' === typeof window.ET_FE) {
[3439] Fix | Delete
window.ET_FE = {};
[3440] Fix | Delete
}
[3441] Fix | Delete
[3442] Fix | Delete
if ('object' !== _typeof(window.ET_FE[type])) {
[3443] Fix | Delete
window.ET_FE[type] = {};
[3444] Fix | Delete
}
[3445] Fix | Delete
[3446] Fix | Delete
window.ET_FE[type][name] = component;
[3447] Fix | Delete
};
[3448] Fix | Delete
/**
[3449] Fix | Delete
* Set inline style with !important tag. JQuery's .css() can't set value with `!important` tag so
[3450] Fix | Delete
* here it is.
[3451] Fix | Delete
*
[3452] Fix | Delete
* @since 4.6.2
[3453] Fix | Delete
*
[3454] Fix | Delete
* @param {object} $element
[3455] Fix | Delete
* @param {string} cssProp
[3456] Fix | Delete
* @param {string} value
[3457] Fix | Delete
*/
[3458] Fix | Delete
[3459] Fix | Delete
var setImportantInlineValue = function setImportantInlineValue($element, cssProp, value) {
[3460] Fix | Delete
// Remove prop from current inline style in case the prop is already exist
[3461] Fix | Delete
$element.css(cssProp, ''); // Get current inline style
[3462] Fix | Delete
[3463] Fix | Delete
var inlineStyle = $element.attr('style'); // Re-insert inline style + property with important tag
[3464] Fix | Delete
[3465] Fix | Delete
$element.attr('style', "".concat(inlineStyle, " ").concat(cssProp, ": ").concat(value, " !important;"));
[3466] Fix | Delete
};
[3467] Fix | Delete
[3468] Fix | Delete
/***/ }),
[3469] Fix | Delete
[3470] Fix | Delete
/***/ "./js/src/custom.js":
[3471] Fix | Delete
/*!**************************!*\
[3472] Fix | Delete
!*** ./js/src/custom.js ***!
[3473] Fix | Delete
\**************************/
[3474] Fix | Delete
/*! no exports provided */
[3475] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[3476] Fix | Delete
[3477] Fix | Delete
"use strict";
[3478] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[3479] Fix | Delete
/* harmony import */ var builder_scripts_utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! builder/scripts/utils/utils */ "./includes/builder/scripts/utils/utils.js");
[3480] Fix | Delete
// Internal dependencies
[3481] Fix | Delete
[3482] Fix | Delete
/*! ET custom.js */
[3483] Fix | Delete
[3484] Fix | Delete
(function ($) {
[3485] Fix | Delete
window.et_calculating_scroll_position = false;
[3486] Fix | Delete
window.et_side_nav_links_initialized = false;
[3487] Fix | Delete
var top_window = builder_scripts_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isBuilder"] ? ET_Builder.Frames.top : window;
[3488] Fix | Delete
[3489] Fix | Delete
function et_get_first_section() {
[3490] Fix | Delete
return $('.et-l:not(.et-l--footer) .et_pb_section:visible:first');
[3491] Fix | Delete
}
[3492] Fix | Delete
[3493] Fix | Delete
function et_get_first_module() {
[3494] Fix | Delete
return $('.et-l .et_pb_module:visible:first');
[3495] Fix | Delete
}
[3496] Fix | Delete
[3497] Fix | Delete
var $et_pb_post_fullwidth = $('.single.et_pb_pagebuilder_layout.et_full_width_page'),
[3498] Fix | Delete
et_is_mobile_device = navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/),
[3499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function