Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: server-side-render.js
this["wp"] = this["wp"] || {}; this["wp"]["serverSideRender"] =
[0] Fix | Delete
/******/ (function(modules) { // webpackBootstrap
[1] Fix | Delete
/******/ // The module cache
[2] Fix | Delete
/******/ var installedModules = {};
[3] Fix | Delete
/******/
[4] Fix | Delete
/******/ // The require function
[5] Fix | Delete
/******/ function __webpack_require__(moduleId) {
[6] Fix | Delete
/******/
[7] Fix | Delete
/******/ // Check if module is in cache
[8] Fix | Delete
/******/ if(installedModules[moduleId]) {
[9] Fix | Delete
/******/ return installedModules[moduleId].exports;
[10] Fix | Delete
/******/ }
[11] Fix | Delete
/******/ // Create a new module (and put it into the cache)
[12] Fix | Delete
/******/ var module = installedModules[moduleId] = {
[13] Fix | Delete
/******/ i: moduleId,
[14] Fix | Delete
/******/ l: false,
[15] Fix | Delete
/******/ exports: {}
[16] Fix | Delete
/******/ };
[17] Fix | Delete
/******/
[18] Fix | Delete
/******/ // Execute the module function
[19] Fix | Delete
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
[20] Fix | Delete
/******/
[21] Fix | Delete
/******/ // Flag the module as loaded
[22] Fix | Delete
/******/ module.l = true;
[23] Fix | Delete
/******/
[24] Fix | Delete
/******/ // Return the exports of the module
[25] Fix | Delete
/******/ return module.exports;
[26] Fix | Delete
/******/ }
[27] Fix | Delete
/******/
[28] Fix | Delete
/******/
[29] Fix | Delete
/******/ // expose the modules object (__webpack_modules__)
[30] Fix | Delete
/******/ __webpack_require__.m = modules;
[31] Fix | Delete
/******/
[32] Fix | Delete
/******/ // expose the module cache
[33] Fix | Delete
/******/ __webpack_require__.c = installedModules;
[34] Fix | Delete
/******/
[35] Fix | Delete
/******/ // define getter function for harmony exports
[36] Fix | Delete
/******/ __webpack_require__.d = function(exports, name, getter) {
[37] Fix | Delete
/******/ if(!__webpack_require__.o(exports, name)) {
[38] Fix | Delete
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
[39] Fix | Delete
/******/ }
[40] Fix | Delete
/******/ };
[41] Fix | Delete
/******/
[42] Fix | Delete
/******/ // define __esModule on exports
[43] Fix | Delete
/******/ __webpack_require__.r = function(exports) {
[44] Fix | Delete
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
[45] Fix | Delete
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
[46] Fix | Delete
/******/ }
[47] Fix | Delete
/******/ Object.defineProperty(exports, '__esModule', { value: true });
[48] Fix | Delete
/******/ };
[49] Fix | Delete
/******/
[50] Fix | Delete
/******/ // create a fake namespace object
[51] Fix | Delete
/******/ // mode & 1: value is a module id, require it
[52] Fix | Delete
/******/ // mode & 2: merge all properties of value into the ns
[53] Fix | Delete
/******/ // mode & 4: return value when already ns object
[54] Fix | Delete
/******/ // mode & 8|1: behave like require
[55] Fix | Delete
/******/ __webpack_require__.t = function(value, mode) {
[56] Fix | Delete
/******/ if(mode & 1) value = __webpack_require__(value);
[57] Fix | Delete
/******/ if(mode & 8) return value;
[58] Fix | Delete
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
[59] Fix | Delete
/******/ var ns = Object.create(null);
[60] Fix | Delete
/******/ __webpack_require__.r(ns);
[61] Fix | Delete
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
[62] Fix | Delete
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
[63] Fix | Delete
/******/ return ns;
[64] Fix | Delete
/******/ };
[65] Fix | Delete
/******/
[66] Fix | Delete
/******/ // getDefaultExport function for compatibility with non-harmony modules
[67] Fix | Delete
/******/ __webpack_require__.n = function(module) {
[68] Fix | Delete
/******/ var getter = module && module.__esModule ?
[69] Fix | Delete
/******/ function getDefault() { return module['default']; } :
[70] Fix | Delete
/******/ function getModuleExports() { return module; };
[71] Fix | Delete
/******/ __webpack_require__.d(getter, 'a', getter);
[72] Fix | Delete
/******/ return getter;
[73] Fix | Delete
/******/ };
[74] Fix | Delete
/******/
[75] Fix | Delete
/******/ // Object.prototype.hasOwnProperty.call
[76] Fix | Delete
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
[77] Fix | Delete
/******/
[78] Fix | Delete
/******/ // __webpack_public_path__
[79] Fix | Delete
/******/ __webpack_require__.p = "";
[80] Fix | Delete
/******/
[81] Fix | Delete
/******/
[82] Fix | Delete
/******/ // Load entry module and return exports
[83] Fix | Delete
/******/ return __webpack_require__(__webpack_require__.s = "4dqW");
[84] Fix | Delete
/******/ })
[85] Fix | Delete
/************************************************************************/
[86] Fix | Delete
/******/ ({
[87] Fix | Delete
[88] Fix | Delete
/***/ "1OyB":
[89] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[90] Fix | Delete
[91] Fix | Delete
"use strict";
[92] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
[93] Fix | Delete
function _classCallCheck(instance, Constructor) {
[94] Fix | Delete
if (!(instance instanceof Constructor)) {
[95] Fix | Delete
throw new TypeError("Cannot call a class as a function");
[96] Fix | Delete
}
[97] Fix | Delete
}
[98] Fix | Delete
[99] Fix | Delete
/***/ }),
[100] Fix | Delete
[101] Fix | Delete
/***/ "1ZqX":
[102] Fix | Delete
/***/ (function(module, exports) {
[103] Fix | Delete
[104] Fix | Delete
(function() { module.exports = window["wp"]["data"]; }());
[105] Fix | Delete
[106] Fix | Delete
/***/ }),
[107] Fix | Delete
[108] Fix | Delete
/***/ "4dqW":
[109] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[110] Fix | Delete
[111] Fix | Delete
"use strict";
[112] Fix | Delete
// ESM COMPAT FLAG
[113] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[114] Fix | Delete
[115] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
[116] Fix | Delete
var esm_extends = __webpack_require__("wx14");
[117] Fix | Delete
[118] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
[119] Fix | Delete
var defineProperty = __webpack_require__("rePB");
[120] Fix | Delete
[121] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
[122] Fix | Delete
var objectWithoutProperties = __webpack_require__("Ff2n");
[123] Fix | Delete
[124] Fix | Delete
// EXTERNAL MODULE: external ["wp","element"]
[125] Fix | Delete
var external_wp_element_ = __webpack_require__("GRId");
[126] Fix | Delete
[127] Fix | Delete
// EXTERNAL MODULE: external ["wp","data"]
[128] Fix | Delete
var external_wp_data_ = __webpack_require__("1ZqX");
[129] Fix | Delete
[130] Fix | Delete
// EXTERNAL MODULE: external ["wp","deprecated"]
[131] Fix | Delete
var external_wp_deprecated_ = __webpack_require__("NMb1");
[132] Fix | Delete
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_);
[133] Fix | Delete
[134] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
[135] Fix | Delete
var classCallCheck = __webpack_require__("1OyB");
[136] Fix | Delete
[137] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
[138] Fix | Delete
var createClass = __webpack_require__("vuIU");
[139] Fix | Delete
[140] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
[141] Fix | Delete
var inherits = __webpack_require__("Ji7U");
[142] Fix | Delete
[143] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
[144] Fix | Delete
var possibleConstructorReturn = __webpack_require__("md7G");
[145] Fix | Delete
[146] Fix | Delete
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
[147] Fix | Delete
var getPrototypeOf = __webpack_require__("foSv");
[148] Fix | Delete
[149] Fix | Delete
// EXTERNAL MODULE: external "lodash"
[150] Fix | Delete
var external_lodash_ = __webpack_require__("YLtl");
[151] Fix | Delete
[152] Fix | Delete
// EXTERNAL MODULE: external ["wp","i18n"]
[153] Fix | Delete
var external_wp_i18n_ = __webpack_require__("l3Sj");
[154] Fix | Delete
[155] Fix | Delete
// EXTERNAL MODULE: external ["wp","apiFetch"]
[156] Fix | Delete
var external_wp_apiFetch_ = __webpack_require__("ywyh");
[157] Fix | Delete
var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_);
[158] Fix | Delete
[159] Fix | Delete
// EXTERNAL MODULE: external ["wp","url"]
[160] Fix | Delete
var external_wp_url_ = __webpack_require__("Mmq9");
[161] Fix | Delete
[162] Fix | Delete
// EXTERNAL MODULE: external ["wp","components"]
[163] Fix | Delete
var external_wp_components_ = __webpack_require__("tI+e");
[164] Fix | Delete
[165] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/server-side-render/build-module/server-side-render.js
[166] Fix | Delete
[167] Fix | Delete
[168] Fix | Delete
[169] Fix | Delete
[170] Fix | Delete
[171] Fix | Delete
[172] Fix | Delete
[173] Fix | Delete
[174] Fix | Delete
[175] Fix | Delete
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
[176] Fix | Delete
[177] Fix | Delete
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
[178] Fix | Delete
[179] Fix | Delete
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
[180] Fix | Delete
[181] Fix | Delete
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[182] Fix | Delete
[183] Fix | Delete
/**
[184] Fix | Delete
* External dependencies
[185] Fix | Delete
*/
[186] Fix | Delete
[187] Fix | Delete
/**
[188] Fix | Delete
* WordPress dependencies
[189] Fix | Delete
*/
[190] Fix | Delete
[191] Fix | Delete
[192] Fix | Delete
[193] Fix | Delete
[194] Fix | Delete
[195] Fix | Delete
[196] Fix | Delete
function rendererPath(block) {
[197] Fix | Delete
var attributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
[198] Fix | Delete
var urlQueryArgs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
[199] Fix | Delete
return Object(external_wp_url_["addQueryArgs"])("/wp/v2/block-renderer/".concat(block), _objectSpread(_objectSpread({
[200] Fix | Delete
context: 'edit'
[201] Fix | Delete
}, null !== attributes ? {
[202] Fix | Delete
attributes: attributes
[203] Fix | Delete
} : {}), urlQueryArgs));
[204] Fix | Delete
}
[205] Fix | Delete
var server_side_render_ServerSideRender = /*#__PURE__*/function (_Component) {
[206] Fix | Delete
Object(inherits["a" /* default */])(ServerSideRender, _Component);
[207] Fix | Delete
[208] Fix | Delete
var _super = _createSuper(ServerSideRender);
[209] Fix | Delete
[210] Fix | Delete
function ServerSideRender(props) {
[211] Fix | Delete
var _this;
[212] Fix | Delete
[213] Fix | Delete
Object(classCallCheck["a" /* default */])(this, ServerSideRender);
[214] Fix | Delete
[215] Fix | Delete
_this = _super.call(this, props);
[216] Fix | Delete
_this.state = {
[217] Fix | Delete
response: null
[218] Fix | Delete
};
[219] Fix | Delete
return _this;
[220] Fix | Delete
}
[221] Fix | Delete
[222] Fix | Delete
Object(createClass["a" /* default */])(ServerSideRender, [{
[223] Fix | Delete
key: "componentDidMount",
[224] Fix | Delete
value: function componentDidMount() {
[225] Fix | Delete
this.isStillMounted = true;
[226] Fix | Delete
this.fetch(this.props); // Only debounce once the initial fetch occurs to ensure that the first
[227] Fix | Delete
// renders show data as soon as possible.
[228] Fix | Delete
[229] Fix | Delete
this.fetch = Object(external_lodash_["debounce"])(this.fetch, 500);
[230] Fix | Delete
}
[231] Fix | Delete
}, {
[232] Fix | Delete
key: "componentWillUnmount",
[233] Fix | Delete
value: function componentWillUnmount() {
[234] Fix | Delete
this.isStillMounted = false;
[235] Fix | Delete
}
[236] Fix | Delete
}, {
[237] Fix | Delete
key: "componentDidUpdate",
[238] Fix | Delete
value: function componentDidUpdate(prevProps) {
[239] Fix | Delete
if (!Object(external_lodash_["isEqual"])(prevProps, this.props)) {
[240] Fix | Delete
this.fetch(this.props);
[241] Fix | Delete
}
[242] Fix | Delete
}
[243] Fix | Delete
}, {
[244] Fix | Delete
key: "fetch",
[245] Fix | Delete
value: function fetch(props) {
[246] Fix | Delete
var _this2 = this;
[247] Fix | Delete
[248] Fix | Delete
if (!this.isStillMounted) {
[249] Fix | Delete
return;
[250] Fix | Delete
}
[251] Fix | Delete
[252] Fix | Delete
if (null !== this.state.response) {
[253] Fix | Delete
this.setState({
[254] Fix | Delete
response: null
[255] Fix | Delete
});
[256] Fix | Delete
}
[257] Fix | Delete
[258] Fix | Delete
var block = props.block,
[259] Fix | Delete
_props$attributes = props.attributes,
[260] Fix | Delete
attributes = _props$attributes === void 0 ? null : _props$attributes,
[261] Fix | Delete
_props$httpMethod = props.httpMethod,
[262] Fix | Delete
httpMethod = _props$httpMethod === void 0 ? 'GET' : _props$httpMethod,
[263] Fix | Delete
_props$urlQueryArgs = props.urlQueryArgs,
[264] Fix | Delete
urlQueryArgs = _props$urlQueryArgs === void 0 ? {} : _props$urlQueryArgs; // If httpMethod is 'POST', send the attributes in the request body instead of the URL.
[265] Fix | Delete
// This allows sending a larger attributes object than in a GET request, where the attributes are in the URL.
[266] Fix | Delete
[267] Fix | Delete
var isPostRequest = 'POST' === httpMethod;
[268] Fix | Delete
var urlAttributes = isPostRequest ? null : attributes;
[269] Fix | Delete
var path = rendererPath(block, urlAttributes, urlQueryArgs);
[270] Fix | Delete
var data = isPostRequest ? {
[271] Fix | Delete
attributes: attributes
[272] Fix | Delete
} : null; // Store the latest fetch request so that when we process it, we can
[273] Fix | Delete
// check if it is the current request, to avoid race conditions on slow networks.
[274] Fix | Delete
[275] Fix | Delete
var fetchRequest = this.currentFetchRequest = external_wp_apiFetch_default()({
[276] Fix | Delete
path: path,
[277] Fix | Delete
data: data,
[278] Fix | Delete
method: isPostRequest ? 'POST' : 'GET'
[279] Fix | Delete
}).then(function (response) {
[280] Fix | Delete
if (_this2.isStillMounted && fetchRequest === _this2.currentFetchRequest && response) {
[281] Fix | Delete
_this2.setState({
[282] Fix | Delete
response: response.rendered
[283] Fix | Delete
});
[284] Fix | Delete
}
[285] Fix | Delete
}).catch(function (error) {
[286] Fix | Delete
if (_this2.isStillMounted && fetchRequest === _this2.currentFetchRequest) {
[287] Fix | Delete
_this2.setState({
[288] Fix | Delete
response: {
[289] Fix | Delete
error: true,
[290] Fix | Delete
errorMsg: error.message
[291] Fix | Delete
}
[292] Fix | Delete
});
[293] Fix | Delete
}
[294] Fix | Delete
});
[295] Fix | Delete
return fetchRequest;
[296] Fix | Delete
}
[297] Fix | Delete
}, {
[298] Fix | Delete
key: "render",
[299] Fix | Delete
value: function render() {
[300] Fix | Delete
var response = this.state.response;
[301] Fix | Delete
var _this$props = this.props,
[302] Fix | Delete
className = _this$props.className,
[303] Fix | Delete
EmptyResponsePlaceholder = _this$props.EmptyResponsePlaceholder,
[304] Fix | Delete
ErrorResponsePlaceholder = _this$props.ErrorResponsePlaceholder,
[305] Fix | Delete
LoadingResponsePlaceholder = _this$props.LoadingResponsePlaceholder;
[306] Fix | Delete
[307] Fix | Delete
if (response === '') {
[308] Fix | Delete
return Object(external_wp_element_["createElement"])(EmptyResponsePlaceholder, Object(esm_extends["a" /* default */])({
[309] Fix | Delete
response: response
[310] Fix | Delete
}, this.props));
[311] Fix | Delete
} else if (!response) {
[312] Fix | Delete
return Object(external_wp_element_["createElement"])(LoadingResponsePlaceholder, Object(esm_extends["a" /* default */])({
[313] Fix | Delete
response: response
[314] Fix | Delete
}, this.props));
[315] Fix | Delete
} else if (response.error) {
[316] Fix | Delete
return Object(external_wp_element_["createElement"])(ErrorResponsePlaceholder, Object(esm_extends["a" /* default */])({
[317] Fix | Delete
response: response
[318] Fix | Delete
}, this.props));
[319] Fix | Delete
}
[320] Fix | Delete
[321] Fix | Delete
return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], {
[322] Fix | Delete
key: "html",
[323] Fix | Delete
className: className
[324] Fix | Delete
}, response);
[325] Fix | Delete
}
[326] Fix | Delete
}]);
[327] Fix | Delete
[328] Fix | Delete
return ServerSideRender;
[329] Fix | Delete
}(external_wp_element_["Component"]);
[330] Fix | Delete
server_side_render_ServerSideRender.defaultProps = {
[331] Fix | Delete
EmptyResponsePlaceholder: function EmptyResponsePlaceholder(_ref) {
[332] Fix | Delete
var className = _ref.className;
[333] Fix | Delete
return Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
[334] Fix | Delete
className: className
[335] Fix | Delete
}, Object(external_wp_i18n_["__"])('Block rendered as empty.'));
[336] Fix | Delete
},
[337] Fix | Delete
ErrorResponsePlaceholder: function ErrorResponsePlaceholder(_ref2) {
[338] Fix | Delete
var response = _ref2.response,
[339] Fix | Delete
className = _ref2.className;
[340] Fix | Delete
var errorMessage = Object(external_wp_i18n_["sprintf"])( // translators: %s: error message describing the problem
[341] Fix | Delete
Object(external_wp_i18n_["__"])('Error loading block: %s'), response.errorMsg);
[342] Fix | Delete
return Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
[343] Fix | Delete
className: className
[344] Fix | Delete
}, errorMessage);
[345] Fix | Delete
},
[346] Fix | Delete
LoadingResponsePlaceholder: function LoadingResponsePlaceholder(_ref3) {
[347] Fix | Delete
var className = _ref3.className;
[348] Fix | Delete
return Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], {
[349] Fix | Delete
className: className
[350] Fix | Delete
}, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null));
[351] Fix | Delete
}
[352] Fix | Delete
};
[353] Fix | Delete
/* harmony default export */ var server_side_render = (server_side_render_ServerSideRender);
[354] Fix | Delete
[355] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/server-side-render/build-module/index.js
[356] Fix | Delete
[357] Fix | Delete
[358] Fix | Delete
[359] Fix | Delete
[360] Fix | Delete
[361] Fix | Delete
function build_module_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
[362] Fix | Delete
[363] Fix | Delete
function build_module_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { build_module_ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { build_module_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[364] Fix | Delete
[365] Fix | Delete
/**
[366] Fix | Delete
* WordPress dependencies
[367] Fix | Delete
*/
[368] Fix | Delete
[369] Fix | Delete
[370] Fix | Delete
[371] Fix | Delete
/**
[372] Fix | Delete
* Internal dependencies
[373] Fix | Delete
*/
[374] Fix | Delete
[375] Fix | Delete
[376] Fix | Delete
/**
[377] Fix | Delete
* Constants
[378] Fix | Delete
*/
[379] Fix | Delete
[380] Fix | Delete
var EMPTY_OBJECT = {};
[381] Fix | Delete
var ExportedServerSideRender = Object(external_wp_data_["withSelect"])(function (select) {
[382] Fix | Delete
var coreEditorSelect = select('core/editor');
[383] Fix | Delete
[384] Fix | Delete
if (coreEditorSelect) {
[385] Fix | Delete
var currentPostId = coreEditorSelect.getCurrentPostId();
[386] Fix | Delete
[387] Fix | Delete
if (currentPostId) {
[388] Fix | Delete
return {
[389] Fix | Delete
currentPostId: currentPostId
[390] Fix | Delete
};
[391] Fix | Delete
}
[392] Fix | Delete
}
[393] Fix | Delete
[394] Fix | Delete
return EMPTY_OBJECT;
[395] Fix | Delete
})(function (_ref) {
[396] Fix | Delete
var _ref$urlQueryArgs = _ref.urlQueryArgs,
[397] Fix | Delete
urlQueryArgs = _ref$urlQueryArgs === void 0 ? EMPTY_OBJECT : _ref$urlQueryArgs,
[398] Fix | Delete
currentPostId = _ref.currentPostId,
[399] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["urlQueryArgs", "currentPostId"]);
[400] Fix | Delete
[401] Fix | Delete
var newUrlQueryArgs = Object(external_wp_element_["useMemo"])(function () {
[402] Fix | Delete
if (!currentPostId) {
[403] Fix | Delete
return urlQueryArgs;
[404] Fix | Delete
}
[405] Fix | Delete
[406] Fix | Delete
return build_module_objectSpread({
[407] Fix | Delete
post_id: currentPostId
[408] Fix | Delete
}, urlQueryArgs);
[409] Fix | Delete
}, [currentPostId, urlQueryArgs]);
[410] Fix | Delete
return Object(external_wp_element_["createElement"])(server_side_render, Object(esm_extends["a" /* default */])({
[411] Fix | Delete
urlQueryArgs: newUrlQueryArgs
[412] Fix | Delete
}, props));
[413] Fix | Delete
});
[414] Fix | Delete
[415] Fix | Delete
if (window && window.wp && window.wp.components) {
[416] Fix | Delete
window.wp.components.ServerSideRender = Object(external_wp_element_["forwardRef"])(function (props, ref) {
[417] Fix | Delete
external_wp_deprecated_default()('wp.components.ServerSideRender', {
[418] Fix | Delete
alternative: 'wp.serverSideRender'
[419] Fix | Delete
});
[420] Fix | Delete
return Object(external_wp_element_["createElement"])(ExportedServerSideRender, Object(esm_extends["a" /* default */])({}, props, {
[421] Fix | Delete
ref: ref
[422] Fix | Delete
}));
[423] Fix | Delete
});
[424] Fix | Delete
}
[425] Fix | Delete
[426] Fix | Delete
/* harmony default export */ var build_module = __webpack_exports__["default"] = (ExportedServerSideRender);
[427] Fix | Delete
[428] Fix | Delete
[429] Fix | Delete
/***/ }),
[430] Fix | Delete
[431] Fix | Delete
/***/ "Ff2n":
[432] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[433] Fix | Delete
[434] Fix | Delete
"use strict";
[435] Fix | Delete
[436] Fix | Delete
// EXPORTS
[437] Fix | Delete
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _objectWithoutProperties; });
[438] Fix | Delete
[439] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
[440] Fix | Delete
function _objectWithoutPropertiesLoose(source, excluded) {
[441] Fix | Delete
if (source == null) return {};
[442] Fix | Delete
var target = {};
[443] Fix | Delete
var sourceKeys = Object.keys(source);
[444] Fix | Delete
var key, i;
[445] Fix | Delete
[446] Fix | Delete
for (i = 0; i < sourceKeys.length; i++) {
[447] Fix | Delete
key = sourceKeys[i];
[448] Fix | Delete
if (excluded.indexOf(key) >= 0) continue;
[449] Fix | Delete
target[key] = source[key];
[450] Fix | Delete
}
[451] Fix | Delete
[452] Fix | Delete
return target;
[453] Fix | Delete
}
[454] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
[455] Fix | Delete
[456] Fix | Delete
function _objectWithoutProperties(source, excluded) {
[457] Fix | Delete
if (source == null) return {};
[458] Fix | Delete
var target = _objectWithoutPropertiesLoose(source, excluded);
[459] Fix | Delete
var key, i;
[460] Fix | Delete
[461] Fix | Delete
if (Object.getOwnPropertySymbols) {
[462] Fix | Delete
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
[463] Fix | Delete
[464] Fix | Delete
for (i = 0; i < sourceSymbolKeys.length; i++) {
[465] Fix | Delete
key = sourceSymbolKeys[i];
[466] Fix | Delete
if (excluded.indexOf(key) >= 0) continue;
[467] Fix | Delete
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
[468] Fix | Delete
target[key] = source[key];
[469] Fix | Delete
}
[470] Fix | Delete
}
[471] Fix | Delete
[472] Fix | Delete
return target;
[473] Fix | Delete
}
[474] Fix | Delete
[475] Fix | Delete
/***/ }),
[476] Fix | Delete
[477] Fix | Delete
/***/ "GRId":
[478] Fix | Delete
/***/ (function(module, exports) {
[479] Fix | Delete
[480] Fix | Delete
(function() { module.exports = window["wp"]["element"]; }());
[481] Fix | Delete
[482] Fix | Delete
/***/ }),
[483] Fix | Delete
[484] Fix | Delete
/***/ "JX7q":
[485] Fix | Delete
/***/ (function(module, __webpack_exports__, __webpack_require__) {
[486] Fix | Delete
[487] Fix | Delete
"use strict";
[488] Fix | Delete
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
[489] Fix | Delete
function _assertThisInitialized(self) {
[490] Fix | Delete
if (self === void 0) {
[491] Fix | Delete
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
[492] Fix | Delete
}
[493] Fix | Delete
[494] Fix | Delete
return self;
[495] Fix | Delete
}
[496] Fix | Delete
[497] Fix | Delete
/***/ }),
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function