[ Index ] |
PHP Cross Reference of WordPress |
[Summary view] [Print] [Text view]
1 this["wp"] = this["wp"] || {}; this["wp"]["element"] = 2 /******/ (function(modules) { // webpackBootstrap 3 /******/ // The module cache 4 /******/ var installedModules = {}; 5 /******/ 6 /******/ // The require function 7 /******/ function __webpack_require__(moduleId) { 8 /******/ 9 /******/ // Check if module is in cache 10 /******/ if(installedModules[moduleId]) { 11 /******/ return installedModules[moduleId].exports; 12 /******/ } 13 /******/ // Create a new module (and put it into the cache) 14 /******/ var module = installedModules[moduleId] = { 15 /******/ i: moduleId, 16 /******/ l: false, 17 /******/ exports: {} 18 /******/ }; 19 /******/ 20 /******/ // Execute the module function 21 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 22 /******/ 23 /******/ // Flag the module as loaded 24 /******/ module.l = true; 25 /******/ 26 /******/ // Return the exports of the module 27 /******/ return module.exports; 28 /******/ } 29 /******/ 30 /******/ 31 /******/ // expose the modules object (__webpack_modules__) 32 /******/ __webpack_require__.m = modules; 33 /******/ 34 /******/ // expose the module cache 35 /******/ __webpack_require__.c = installedModules; 36 /******/ 37 /******/ // define getter function for harmony exports 38 /******/ __webpack_require__.d = function(exports, name, getter) { 39 /******/ if(!__webpack_require__.o(exports, name)) { 40 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 41 /******/ } 42 /******/ }; 43 /******/ 44 /******/ // define __esModule on exports 45 /******/ __webpack_require__.r = function(exports) { 46 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 47 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 48 /******/ } 49 /******/ Object.defineProperty(exports, '__esModule', { value: true }); 50 /******/ }; 51 /******/ 52 /******/ // create a fake namespace object 53 /******/ // mode & 1: value is a module id, require it 54 /******/ // mode & 2: merge all properties of value into the ns 55 /******/ // mode & 4: return value when already ns object 56 /******/ // mode & 8|1: behave like require 57 /******/ __webpack_require__.t = function(value, mode) { 58 /******/ if(mode & 1) value = __webpack_require__(value); 59 /******/ if(mode & 8) return value; 60 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 61 /******/ var ns = Object.create(null); 62 /******/ __webpack_require__.r(ns); 63 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 64 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 65 /******/ return ns; 66 /******/ }; 67 /******/ 68 /******/ // getDefaultExport function for compatibility with non-harmony modules 69 /******/ __webpack_require__.n = function(module) { 70 /******/ var getter = module && module.__esModule ? 71 /******/ function getDefault() { return module['default']; } : 72 /******/ function getModuleExports() { return module; }; 73 /******/ __webpack_require__.d(getter, 'a', getter); 74 /******/ return getter; 75 /******/ }; 76 /******/ 77 /******/ // Object.prototype.hasOwnProperty.call 78 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 79 /******/ 80 /******/ // __webpack_public_path__ 81 /******/ __webpack_require__.p = ""; 82 /******/ 83 /******/ 84 /******/ // Load entry module and return exports 85 /******/ return __webpack_require__(__webpack_require__.s = "./node_modules/@wordpress/element/build-module/index.js"); 86 /******/ }) 87 /************************************************************************/ 88 /******/ ({ 89 90 /***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js": 91 /*!*******************************************************************!*\ 92 !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! 93 \*******************************************************************/ 94 /*! exports provided: default */ 95 /***/ (function(module, __webpack_exports__, __webpack_require__) { 96 97 "use strict"; 98 __webpack_require__.r(__webpack_exports__); 99 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _defineProperty; }); 100 function _defineProperty(obj, key, value) { 101 if (key in obj) { 102 Object.defineProperty(obj, key, { 103 value: value, 104 enumerable: true, 105 configurable: true, 106 writable: true 107 }); 108 } else { 109 obj[key] = value; 110 } 111 112 return obj; 113 } 114 115 /***/ }), 116 117 /***/ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js": 118 /*!*****************************************************************!*\ 119 !*** ./node_modules/@babel/runtime/helpers/esm/objectSpread.js ***! 120 \*****************************************************************/ 121 /*! exports provided: default */ 122 /***/ (function(module, __webpack_exports__, __webpack_require__) { 123 124 "use strict"; 125 __webpack_require__.r(__webpack_exports__); 126 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectSpread; }); 127 /* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); 128 129 function _objectSpread(target) { 130 for (var i = 1; i < arguments.length; i++) { 131 var source = arguments[i] != null ? arguments[i] : {}; 132 var ownKeys = Object.keys(source); 133 134 if (typeof Object.getOwnPropertySymbols === 'function') { 135 ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { 136 return Object.getOwnPropertyDescriptor(source, sym).enumerable; 137 })); 138 } 139 140 ownKeys.forEach(function (key) { 141 Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); 142 }); 143 } 144 145 return target; 146 } 147 148 /***/ }), 149 150 /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js": 151 /*!****************************************************************************!*\ 152 !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js ***! 153 \****************************************************************************/ 154 /*! exports provided: default */ 155 /***/ (function(module, __webpack_exports__, __webpack_require__) { 156 157 "use strict"; 158 __webpack_require__.r(__webpack_exports__); 159 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectWithoutProperties; }); 160 /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"); 161 162 function _objectWithoutProperties(source, excluded) { 163 if (source == null) return {}; 164 var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(source, excluded); 165 var key, i; 166 167 if (Object.getOwnPropertySymbols) { 168 var sourceSymbolKeys = Object.getOwnPropertySymbols(source); 169 170 for (i = 0; i < sourceSymbolKeys.length; i++) { 171 key = sourceSymbolKeys[i]; 172 if (excluded.indexOf(key) >= 0) continue; 173 if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; 174 target[key] = source[key]; 175 } 176 } 177 178 return target; 179 } 180 181 /***/ }), 182 183 /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js": 184 /*!*********************************************************************************!*\ 185 !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***! 186 \*********************************************************************************/ 187 /*! exports provided: default */ 188 /***/ (function(module, __webpack_exports__, __webpack_require__) { 189 190 "use strict"; 191 __webpack_require__.r(__webpack_exports__); 192 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectWithoutPropertiesLoose; }); 193 function _objectWithoutPropertiesLoose(source, excluded) { 194 if (source == null) return {}; 195 var target = {}; 196 var sourceKeys = Object.keys(source); 197 var key, i; 198 199 for (i = 0; i < sourceKeys.length; i++) { 200 key = sourceKeys[i]; 201 if (excluded.indexOf(key) >= 0) continue; 202 target[key] = source[key]; 203 } 204 205 return target; 206 } 207 208 /***/ }), 209 210 /***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js": 211 /*!***********************************************************!*\ 212 !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***! 213 \***********************************************************/ 214 /*! exports provided: default */ 215 /***/ (function(module, __webpack_exports__, __webpack_require__) { 216 217 "use strict"; 218 __webpack_require__.r(__webpack_exports__); 219 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _typeof; }); 220 function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } 221 222 function _typeof(obj) { 223 if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { 224 _typeof = function _typeof(obj) { 225 return _typeof2(obj); 226 }; 227 } else { 228 _typeof = function _typeof(obj) { 229 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); 230 }; 231 } 232 233 return _typeof(obj); 234 } 235 236 /***/ }), 237 238 /***/ "./node_modules/@wordpress/element/build-module/index.js": 239 /*!***************************************************************!*\ 240 !*** ./node_modules/@wordpress/element/build-module/index.js ***! 241 \***************************************************************/ 242 /*! exports provided: renderToString, RawHTML, Children, cloneElement, Component, createContext, createElement, createRef, forwardRef, Fragment, isValidElement, StrictMode, concatChildren, switchChildrenNodeName, createPortal, findDOMNode, render, unmountComponentAtNode, isEmptyElement */ 243 /***/ (function(module, __webpack_exports__, __webpack_require__) { 244 245 "use strict"; 246 __webpack_require__.r(__webpack_exports__); 247 /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./react */ "./node_modules/@wordpress/element/build-module/react.js"); 248 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Children", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["Children"]; }); 249 250 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cloneElement", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"]; }); 251 252 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["Component"]; }); 253 254 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createContext", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["createContext"]; }); 255 256 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createElement", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["createElement"]; }); 257 258 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createRef", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["createRef"]; }); 259 260 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forwardRef", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["forwardRef"]; }); 261 262 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Fragment", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["Fragment"]; }); 263 264 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isValidElement", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"]; }); 265 266 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StrictMode", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["StrictMode"]; }); 267 268 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatChildren", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["concatChildren"]; }); 269 270 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchChildrenNodeName", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["switchChildrenNodeName"]; }); 271 272 /* harmony import */ var _react_platform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./react-platform */ "./node_modules/@wordpress/element/build-module/react-platform.js"); 273 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPortal", function() { return _react_platform__WEBPACK_IMPORTED_MODULE_1__["createPortal"]; }); 274 275 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findDOMNode", function() { return _react_platform__WEBPACK_IMPORTED_MODULE_1__["findDOMNode"]; }); 276 277 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _react_platform__WEBPACK_IMPORTED_MODULE_1__["render"]; }); 278 279 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unmountComponentAtNode", function() { return _react_platform__WEBPACK_IMPORTED_MODULE_1__["unmountComponentAtNode"]; }); 280 281 /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@wordpress/element/build-module/utils.js"); 282 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmptyElement", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["isEmptyElement"]; }); 283 284 /* harmony import */ var _serialize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./serialize */ "./node_modules/@wordpress/element/build-module/serialize.js"); 285 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "renderToString", function() { return _serialize__WEBPACK_IMPORTED_MODULE_3__["default"]; }); 286 287 /* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./raw-html */ "./node_modules/@wordpress/element/build-module/raw-html.js"); 288 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RawHTML", function() { return _raw_html__WEBPACK_IMPORTED_MODULE_4__["default"]; }); 289 290 291 292 293 294 295 296 297 /***/ }), 298 299 /***/ "./node_modules/@wordpress/element/build-module/raw-html.js": 300 /*!******************************************************************!*\ 301 !*** ./node_modules/@wordpress/element/build-module/raw-html.js ***! 302 \******************************************************************/ 303 /*! exports provided: default */ 304 /***/ (function(module, __webpack_exports__, __webpack_require__) { 305 306 "use strict"; 307 __webpack_require__.r(__webpack_exports__); 308 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return RawHTML; }); 309 /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); 310 /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); 311 /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./react */ "./node_modules/@wordpress/element/build-module/react.js"); 312 313 314 315 /** 316 * External dependencies 317 */ 318 319 /** 320 * Component used as equivalent of Fragment with unescaped HTML, in cases where 321 * it is desirable to render dangerous HTML without needing a wrapper element. 322 * To preserve additional props, a `div` wrapper _will_ be created if any props 323 * aside from `children` are passed. 324 * 325 * @param {string} props.children HTML to render. 326 * 327 * @return {WPElement} Dangerously-rendering element. 328 */ 329 330 function RawHTML(_ref) { 331 var children = _ref.children, 332 props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, ["children"]); 333 334 // The DIV wrapper will be stripped by serializer, unless there are 335 // non-children props present. 336 return Object(_react__WEBPACK_IMPORTED_MODULE_2__["createElement"])('div', Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({ 337 dangerouslySetInnerHTML: { 338 __html: children 339 } 340 }, props)); 341 } 342 343 344 /***/ }), 345 346 /***/ "./node_modules/@wordpress/element/build-module/react-platform.js": 347 /*!************************************************************************!*\ 348 !*** ./node_modules/@wordpress/element/build-module/react-platform.js ***! 349 \************************************************************************/ 350 /*! exports provided: createPortal, findDOMNode, render, unmountComponentAtNode */ 351 /***/ (function(module, __webpack_exports__, __webpack_require__) { 352 353 "use strict"; 354 __webpack_require__.r(__webpack_exports__); 355 /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ "react-dom"); 356 /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__); 357 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPortal", function() { return react_dom__WEBPACK_IMPORTED_MODULE_0__["createPortal"]; }); 358 359 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findDOMNode", function() { return react_dom__WEBPACK_IMPORTED_MODULE_0__["findDOMNode"]; }); 360 361 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return react_dom__WEBPACK_IMPORTED_MODULE_0__["render"]; }); 362 363 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unmountComponentAtNode", function() { return react_dom__WEBPACK_IMPORTED_MODULE_0__["unmountComponentAtNode"]; }); 364 365 /** 366 * External dependencies 367 */ 368 369 /** 370 * Creates a portal into which a component can be rendered. 371 * 372 * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235 373 * 374 * @param {Component} component Component 375 * @param {Element} target DOM node into which element should be rendered 376 */ 377 378 379 /** 380 * Finds the dom node of a React component 381 * 382 * @param {Component} component component's instance 383 * @param {Element} target DOM node into which element should be rendered 384 */ 385 386 387 /** 388 * Renders a given element into the target DOM node. 389 * 390 * @param {WPElement} element Element to render 391 * @param {Element} target DOM node into which element should be rendered 392 */ 393 394 395 /** 396 * Removes any mounted element from the target DOM node. 397 * 398 * @param {Element} target DOM node in which element is to be removed 399 */ 400 401 402 403 404 /***/ }), 405 406 /***/ "./node_modules/@wordpress/element/build-module/react.js": 407 /*!***************************************************************!*\ 408 !*** ./node_modules/@wordpress/element/build-module/react.js ***! 409 \***************************************************************/ 410 /*! exports provided: Children, cloneElement, Component, createContext, createElement, createRef, forwardRef, Fragment, isValidElement, StrictMode, concatChildren, switchChildrenNodeName */ 411 /***/ (function(module, __webpack_exports__, __webpack_require__) { 412 413 "use strict"; 414 __webpack_require__.r(__webpack_exports__); 415 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatChildren", function() { return concatChildren; }); 416 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchChildrenNodeName", function() { return switchChildrenNodeName; }); 417 /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); 418 /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); 419 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); 420 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); 421 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Children", function() { return react__WEBPACK_IMPORTED_MODULE_2__["Children"]; }); 422 423 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cloneElement", function() { return react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"]; }); 424 425 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return react__WEBPACK_IMPORTED_MODULE_2__["Component"]; }); 426 427 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createContext", function() { return react__WEBPACK_IMPORTED_MODULE_2__["createContext"]; }); 428 429 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createElement", function() { return react__WEBPACK_IMPORTED_MODULE_2__["createElement"]; }); 430 431 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createRef", function() { return react__WEBPACK_IMPORTED_MODULE_2__["createRef"]; }); 432 433 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forwardRef", function() { return react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"]; }); 434 435 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Fragment", function() { return react__WEBPACK_IMPORTED_MODULE_2__["Fragment"]; }); 436 437 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isValidElement", function() { return react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"]; }); 438 439 /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StrictMode", function() { return react__WEBPACK_IMPORTED_MODULE_2__["StrictMode"]; }); 440 441 /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "lodash"); 442 /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__); 443 444 445 446 /** 447 * External dependencies 448 */ 449 450 451 452 /** 453 * Creates a copy of an element with extended props. 454 * 455 * @param {WPElement} element Element 456 * @param {?Object} props Props to apply to cloned element 457 * 458 * @return {WPElement} Cloned element. 459 */ 460 461 462 /** 463 * A base class to create WordPress Components (Refs, state and lifecycle hooks) 464 */ 465 466 467 /** 468 * Creates a context object containing two components: a provider and consumer. 469 * 470 * @param {Object} defaultValue A default data stored in the context. 471 * 472 * @return {Object} Context object. 473 */ 474 475 476 /** 477 * Returns a new element of given type. Type can be either a string tag name or 478 * another function which itself returns an element. 479 * 480 * @param {?(string|Function)} type Tag name or element creator 481 * @param {Object} props Element properties, either attribute 482 * set to apply to DOM node or values to 483 * pass through to element creator 484 * @param {...WPElement} children Descendant elements 485 * 486 * @return {WPElement} Element. 487 */ 488 489 490 /** 491 * Returns an object tracking a reference to a rendered element via its 492 * `current` property as either a DOMElement or Element, dependent upon the 493 * type of element rendered with the ref attribute. 494 * 495 * @return {Object} Ref object. 496 */ 497 498 499 /** 500 * Component enhancer used to enable passing a ref to its wrapped component. 501 * Pass a function argument which receives `props` and `ref` as its arguments, 502 * returning an element using the forwarded ref. The return value is a new 503 * component which forwards its ref. 504 * 505 * @param {Function} forwarder Function passed `props` and `ref`, expected to 506 * return an element. 507 * 508 * @return {WPComponent} Enhanced component. 509 */ 510 511 512 /** 513 * A component which renders its children without any wrapping element. 514 */ 515 516 517 /** 518 * Checks if an object is a valid WPElement 519 * 520 * @param {Object} objectToCheck The object to be checked. 521 * 522 * @return {boolean} true if objectToTest is a valid WPElement and false otherwise. 523 */ 524 525 526 527 /** 528 * Concatenate two or more React children objects. 529 * 530 * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate. 531 * 532 * @return {Array} The concatenated value. 533 */ 534 535 function concatChildren() { 536 for (var _len = arguments.length, childrenArguments = new Array(_len), _key = 0; _key < _len; _key++) { 537 childrenArguments[_key] = arguments[_key]; 538 } 539 540 return childrenArguments.reduce(function (memo, children, i) { 541 react__WEBPACK_IMPORTED_MODULE_2__["Children"].forEach(children, function (child, j) { 542 if (child && 'string' !== typeof child) { 543 child = Object(react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"])(child, { 544 key: [i, j].join() 545 }); 546 } 547 548 memo.push(child); 549 }); 550 return memo; 551 }, []); 552 } 553 /** 554 * Switches the nodeName of all the elements in the children object. 555 * 556 * @param {?Object} children Children object. 557 * @param {string} nodeName Node name. 558 * 559 * @return {?Object} The updated children object. 560 */ 561 562 function switchChildrenNodeName(children, nodeName) { 563 return children && react__WEBPACK_IMPORTED_MODULE_2__["Children"].map(children, function (elt, index) { 564 if (Object(lodash__WEBPACK_IMPORTED_MODULE_3__["isString"])(elt)) { 565 return Object(react__WEBPACK_IMPORTED_MODULE_2__["createElement"])(nodeName, { 566 key: index 567 }, elt); 568 } 569 570 var _elt$props = elt.props, 571 childrenProp = _elt$props.children, 572 props = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_elt$props, ["children"]); 573 574 return Object(react__WEBPACK_IMPORTED_MODULE_2__["createElement"])(nodeName, Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({ 575 key: index 576 }, props), childrenProp); 577 }); 578 } 579 580 581 /***/ }), 582 583 /***/ "./node_modules/@wordpress/element/build-module/serialize.js": 584 /*!*******************************************************************!*\ 585 !*** ./node_modules/@wordpress/element/build-module/serialize.js ***! 586 \*******************************************************************/ 587 /*! exports provided: hasPrefix, renderElement, renderNativeComponent, renderComponent, renderAttributes, renderStyle, default */ 588 /***/ (function(module, __webpack_exports__, __webpack_require__) { 589 590 "use strict"; 591 __webpack_require__.r(__webpack_exports__); 592 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasPrefix", function() { return hasPrefix; }); 593 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderElement", function() { return renderElement; }); 594 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderNativeComponent", function() { return renderNativeComponent; }); 595 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderComponent", function() { return renderComponent; }); 596 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderAttributes", function() { return renderAttributes; }); 597 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderStyle", function() { return renderStyle; }); 598 /* harmony import */ var _babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread */ "./node_modules/@babel/runtime/helpers/esm/objectSpread.js"); 599 /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); 600 /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); 601 /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "lodash"); 602 /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__); 603 /* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/escape-html */ "@wordpress/escape-html"); 604 /* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_4__); 605 /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./react */ "./node_modules/@wordpress/element/build-module/react.js"); 606 /* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./raw-html */ "./node_modules/@wordpress/element/build-module/raw-html.js"); 607 608 609 610 611 /** 612 * Parts of this source were derived and modified from fast-react-render, 613 * released under the MIT license. 614 * 615 * https://github.com/alt-j/fast-react-render 616 * 617 * Copyright (c) 2016 Andrey Morozov 618 * 619 * Permission is hereby granted, free of charge, to any person obtaining a copy 620 * of this software and associated documentation files (the "Software"), to deal 621 * in the Software without restriction, including without limitation the rights 622 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 623 * copies of the Software, and to permit persons to whom the Software is 624 * furnished to do so, subject to the following conditions: 625 * 626 * The above copyright notice and this permission notice shall be included in 627 * all copies or substantial portions of the Software. 628 * 629 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 630 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 631 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 632 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 633 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 634 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 635 * THE SOFTWARE. 636 */ 637 638 /** 639 * External dependencies 640 */ 641 642 /** 643 * WordPress dependencies 644 */ 645 646 647 /** 648 * Internal dependencies 649 */ 650 651 652 653 654 var _createContext = Object(_react__WEBPACK_IMPORTED_MODULE_5__["createContext"])(), 655 Provider = _createContext.Provider, 656 Consumer = _createContext.Consumer; 657 /** 658 * Valid attribute types. 659 * 660 * @type {Set} 661 */ 662 663 664 var ATTRIBUTES_TYPES = new Set(['string', 'boolean', 'number']); 665 /** 666 * Element tags which can be self-closing. 667 * 668 * @type {Set} 669 */ 670 671 var SELF_CLOSING_TAGS = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']); 672 /** 673 * Boolean attributes are attributes whose presence as being assigned is 674 * meaningful, even if only empty. 675 * 676 * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes 677 * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3 678 * 679 * Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ] 680 * .filter( ( tr ) => tr.lastChild.textContent.indexOf( 'Boolean attribute' ) !== -1 ) 681 * .reduce( ( result, tr ) => Object.assign( result, { 682 * [ tr.firstChild.textContent.trim() ]: true 683 * } ), {} ) ).sort(); 684 * 685 * @type {Set} 686 */ 687 688 var BOOLEAN_ATTRIBUTES = new Set(['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch']); 689 /** 690 * Enumerated attributes are attributes which must be of a specific value form. 691 * Like boolean attributes, these are meaningful if specified, even if not of a 692 * valid enumerated value. 693 * 694 * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute 695 * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3 696 * 697 * Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ] 698 * .filter( ( tr ) => /^("(.+?)";?\s*)+/.test( tr.lastChild.textContent.trim() ) ) 699 * .reduce( ( result, tr ) => Object.assign( result, { 700 * [ tr.firstChild.textContent.trim() ]: true 701 * } ), {} ) ).sort(); 702 * 703 * Some notable omissions: 704 * 705 * - `alt`: https://blog.whatwg.org/omit-alt 706 * 707 * @type {Set} 708 */ 709 710 var ENUMERATED_ATTRIBUTES = new Set(['autocapitalize', 'autocomplete', 'charset', 'contenteditable', 'crossorigin', 'decoding', 'dir', 'draggable', 'enctype', 'formenctype', 'formmethod', 'http-equiv', 'inputmode', 'kind', 'method', 'preload', 'scope', 'shape', 'spellcheck', 'translate', 'type', 'wrap']); 711 /** 712 * Set of CSS style properties which support assignment of unitless numbers. 713 * Used in rendering of style properties, where `px` unit is assumed unless 714 * property is included in this set or value is zero. 715 * 716 * Generated via: 717 * 718 * Object.entries( document.createElement( 'div' ).style ) 719 * .filter( ( [ key ] ) => ( 720 * ! /^(webkit|ms|moz)/.test( key ) && 721 * ( e.style[ key ] = 10 ) && 722 * e.style[ key ] === '10' 723 * ) ) 724 * .map( ( [ key ] ) => key ) 725 * .sort(); 726 * 727 * @type {Set} 728 */ 729 730 var CSS_PROPERTIES_SUPPORTS_UNITLESS = new Set(['animation', 'animationIterationCount', 'baselineShift', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'columnCount', 'cx', 'cy', 'fillOpacity', 'flexGrow', 'flexShrink', 'floodOpacity', 'fontWeight', 'gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart', 'lineHeight', 'opacity', 'order', 'orphans', 'r', 'rx', 'ry', 'shapeImageThreshold', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'tabSize', 'widows', 'x', 'y', 'zIndex', 'zoom']); 731 /** 732 * Returns true if the specified string is prefixed by one of an array of 733 * possible prefixes. 734 * 735 * @param {string} string String to check. 736 * @param {string[]} prefixes Possible prefixes. 737 * 738 * @return {boolean} Whether string has prefix. 739 */ 740 741 function hasPrefix(string, prefixes) { 742 return prefixes.some(function (prefix) { 743 return string.indexOf(prefix) === 0; 744 }); 745 } 746 /** 747 * Returns true if the given prop name should be ignored in attributes 748 * serialization, or false otherwise. 749 * 750 * @param {string} attribute Attribute to check. 751 * 752 * @return {boolean} Whether attribute should be ignored. 753 */ 754 755 function isInternalAttribute(attribute) { 756 return 'key' === attribute || 'children' === attribute; 757 } 758 /** 759 * Returns the normal form of the element's attribute value for HTML. 760 * 761 * @param {string} attribute Attribute name. 762 * @param {*} value Non-normalized attribute value. 763 * 764 * @return {string} Normalized attribute value. 765 */ 766 767 768 function getNormalAttributeValue(attribute, value) { 769 switch (attribute) { 770 case 'style': 771 return renderStyle(value); 772 } 773 774 return value; 775 } 776 /** 777 * Returns the normal form of the element's attribute name for HTML. 778 * 779 * @param {string} attribute Non-normalized attribute name. 780 * 781 * @return {string} Normalized attribute name. 782 */ 783 784 785 function getNormalAttributeName(attribute) { 786 switch (attribute) { 787 case 'htmlFor': 788 return 'for'; 789 790 case 'className': 791 return 'class'; 792 } 793 794 return attribute.toLowerCase(); 795 } 796 /** 797 * Returns the normal form of the style property name for HTML. 798 * 799 * - Converts property names to kebab-case, e.g. 'backgroundColor' → 'background-color' 800 * - Leaves custom attributes alone, e.g. '--myBackgroundColor' → '--myBackgroundColor' 801 * - Converts vendor-prefixed property names to -kebab-case, e.g. 'MozTransform' → '-moz-transform' 802 * 803 * @param {string} property Property name. 804 * 805 * @return {string} Normalized property name. 806 */ 807 808 809 function getNormalStylePropertyName(property) { 810 if (Object(lodash__WEBPACK_IMPORTED_MODULE_3__["startsWith"])(property, '--')) { 811 return property; 812 } 813 814 if (hasPrefix(property, ['ms', 'O', 'Moz', 'Webkit'])) { 815 return '-' + Object(lodash__WEBPACK_IMPORTED_MODULE_3__["kebabCase"])(property); 816 } 817 818 return Object(lodash__WEBPACK_IMPORTED_MODULE_3__["kebabCase"])(property); 819 } 820 /** 821 * Returns the normal form of the style property value for HTML. Appends a 822 * default pixel unit if numeric, not a unitless property, and not zero. 823 * 824 * @param {string} property Property name. 825 * @param {*} value Non-normalized property value. 826 * 827 * @return {*} Normalized property value. 828 */ 829 830 831 function getNormalStylePropertyValue(property, value) { 832 if (typeof value === 'number' && 0 !== value && !CSS_PROPERTIES_SUPPORTS_UNITLESS.has(property)) { 833 return value + 'px'; 834 } 835 836 return value; 837 } 838 /** 839 * Serializes a React element to string. 840 * 841 * @param {WPElement} element Element to serialize. 842 * @param {?Object} context Context object. 843 * @param {?Object} legacyContext Legacy context object. 844 * 845 * @return {string} Serialized element. 846 */ 847 848 849 function renderElement(element, context) { 850 var legacyContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; 851 852 if (null === element || undefined === element || false === element) { 853 return ''; 854 } 855 856 if (Array.isArray(element)) { 857 return renderChildren(element, context, legacyContext); 858 } 859 860 switch (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__["default"])(element)) { 861 case 'string': 862 return Object(_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_4__["escapeHTML"])(element); 863 864 case 'number': 865 return element.toString(); 866 } 867 868 var type = element.type, 869 props = element.props; 870 871 switch (type) { 872 case _react__WEBPACK_IMPORTED_MODULE_5__["StrictMode"]: 873 case _react__WEBPACK_IMPORTED_MODULE_5__["Fragment"]: 874 return renderChildren(props.children, context, legacyContext); 875 876 case _raw_html__WEBPACK_IMPORTED_MODULE_6__["default"]: 877 var children = props.children, 878 wrapperProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children"]); 879 880 return renderNativeComponent(Object(lodash__WEBPACK_IMPORTED_MODULE_3__["isEmpty"])(wrapperProps) ? null : 'div', Object(_babel_runtime_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_0__["default"])({}, wrapperProps, { 881 dangerouslySetInnerHTML: { 882 __html: children 883 } 884 }), context, legacyContext); 885 } 886 887 switch (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__["default"])(type)) { 888 case 'string': 889 return renderNativeComponent(type, props, context, legacyContext); 890 891 case 'function': 892 if (type.prototype && typeof type.prototype.render === 'function') { 893 return renderComponent(type, props, context, legacyContext); 894 } 895 896 return renderElement(type(props, legacyContext), context, legacyContext); 897 } 898 899 switch (type && type.$$typeof) { 900 case Provider.$$typeof: 901 return renderChildren(props.children, props.value, legacyContext); 902 903 case Consumer.$$typeof: 904 return renderElement(props.children(context || type._currentValue), context, legacyContext); 905 } 906 907 return ''; 908 } 909 /** 910 * Serializes a native component type to string. 911 * 912 * @param {?string} type Native component type to serialize, or null if 913 * rendering as fragment of children content. 914 * @param {Object} props Props object. 915 * @param {?Object} context Context object. 916 * @param {?Object} legacyContext Legacy context object. 917 * 918 * @return {string} Serialized element. 919 */ 920 921 function renderNativeComponent(type, props, context) { 922 var legacyContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; 923 var content = ''; 924 925 if (type === 'textarea' && props.hasOwnProperty('value')) { 926 // Textarea children can be assigned as value prop. If it is, render in 927 // place of children. Ensure to omit so it is not assigned as attribute 928 // as well. 929 content = renderChildren(props.value, context, legacyContext); 930 props = Object(lodash__WEBPACK_IMPORTED_MODULE_3__["omit"])(props, 'value'); 931 } else if (props.dangerouslySetInnerHTML && typeof props.dangerouslySetInnerHTML.__html === 'string') { 932 // Dangerous content is left unescaped. 933 content = props.dangerouslySetInnerHTML.__html; 934 } else if (typeof props.children !== 'undefined') { 935 content = renderChildren(props.children, context, legacyContext); 936 } 937 938 if (!type) { 939 return content; 940 } 941 942 var attributes = renderAttributes(props); 943 944 if (SELF_CLOSING_TAGS.has(type)) { 945 return '<' + type + attributes + '/>'; 946 } 947 948 return '<' + type + attributes + '>' + content + '</' + type + '>'; 949 } 950 /** 951 * Serializes a non-native component type to string. 952 * 953 * @param {Function} Component Component type to serialize. 954 * @param {Object} props Props object. 955 * @param {?Object} context Context object. 956 * @param {?Object} legacyContext Legacy context object. 957 * 958 * @return {string} Serialized element 959 */ 960 961 function renderComponent(Component, props, context) { 962 var legacyContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; 963 var instance = new Component(props, legacyContext); 964 965 if (typeof instance.getChildContext === 'function') { 966 Object.assign(legacyContext, instance.getChildContext()); 967 } 968 969 var html = renderElement(instance.render(), context, legacyContext); 970 return html; 971 } 972 /** 973 * Serializes an array of children to string. 974 * 975 * @param {Array} children Children to serialize. 976 * @param {?Object} context Context object. 977 * @param {?Object} legacyContext Legacy context object. 978 * 979 * @return {string} Serialized children. 980 */ 981 982 function renderChildren(children, context) { 983 var legacyContext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; 984 var result = ''; 985 children = Object(lodash__WEBPACK_IMPORTED_MODULE_3__["castArray"])(children); 986 987 for (var i = 0; i < children.length; i++) { 988 var child = children[i]; 989 result += renderElement(child, context, legacyContext); 990 } 991 992 return result; 993 } 994 /** 995 * Renders a props object as a string of HTML attributes. 996 * 997 * @param {Object} props Props object. 998 * 999 * @return {string} Attributes string. 1000 */ 1001 1002 1003 function renderAttributes(props) { 1004 var result = ''; 1005 1006 for (var key in props) { 1007 var attribute = getNormalAttributeName(key); 1008 1009 if (!Object(_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_4__["isValidAttributeName"])(attribute)) { 1010 continue; 1011 } 1012 1013 var value = getNormalAttributeValue(key, props[key]); // If value is not of serializeable type, skip. 1014 1015 if (!ATTRIBUTES_TYPES.has(Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__["default"])(value))) { 1016 continue; 1017 } // Don't render internal attribute names. 1018 1019 1020 if (isInternalAttribute(key)) { 1021 continue; 1022 } 1023 1024 var isBooleanAttribute = BOOLEAN_ATTRIBUTES.has(attribute); // Boolean attribute should be omitted outright if its value is false. 1025 1026 if (isBooleanAttribute && value === false) { 1027 continue; 1028 } 1029 1030 var isMeaningfulAttribute = isBooleanAttribute || hasPrefix(key, ['data-', 'aria-']) || ENUMERATED_ATTRIBUTES.has(attribute); // Only write boolean value as attribute if meaningful. 1031 1032 if (typeof value === 'boolean' && !isMeaningfulAttribute) { 1033 continue; 1034 } 1035 1036 result += ' ' + attribute; // Boolean attributes should write attribute name, but without value. 1037 // Mere presence of attribute name is effective truthiness. 1038 1039 if (isBooleanAttribute) { 1040 continue; 1041 } 1042 1043 if (typeof value === 'string') { 1044 value = Object(_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_4__["escapeAttribute"])(value); 1045 } 1046 1047 result += '="' + value + '"'; 1048 } 1049 1050 return result; 1051 } 1052 /** 1053 * Renders a style object as a string attribute value. 1054 * 1055 * @param {Object} style Style object. 1056 * 1057 * @return {string} Style attribute value. 1058 */ 1059 1060 function renderStyle(style) { 1061 // Only generate from object, e.g. tolerate string value. 1062 if (!Object(lodash__WEBPACK_IMPORTED_MODULE_3__["isPlainObject"])(style)) { 1063 return style; 1064 } 1065 1066 var result; 1067 1068 for (var property in style) { 1069 var value = style[property]; 1070 1071 if (null === value || undefined === value) { 1072 continue; 1073 } 1074 1075 if (result) { 1076 result += ';'; 1077 } else { 1078 result = ''; 1079 } 1080 1081 var normalName = getNormalStylePropertyName(property); 1082 var normalValue = getNormalStylePropertyValue(property, value); 1083 result += normalName + ':' + normalValue; 1084 } 1085 1086 return result; 1087 } 1088 /* harmony default export */ __webpack_exports__["default"] = (renderElement); 1089 1090 1091 /***/ }), 1092 1093 /***/ "./node_modules/@wordpress/element/build-module/utils.js": 1094 /*!***************************************************************!*\ 1095 !*** ./node_modules/@wordpress/element/build-module/utils.js ***! 1096 \***************************************************************/ 1097 /*! exports provided: isEmptyElement */ 1098 /***/ (function(module, __webpack_exports__, __webpack_require__) { 1099 1100 "use strict"; 1101 __webpack_require__.r(__webpack_exports__); 1102 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmptyElement", function() { return isEmptyElement; }); 1103 /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); 1104 /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); 1105 /** 1106 * External dependencies 1107 */ 1108 1109 /** 1110 * Checks if the provided WP element is empty. 1111 * 1112 * @param {*} element WP element to check. 1113 * @return {boolean} True when an element is considered empty. 1114 */ 1115 1116 var isEmptyElement = function isEmptyElement(element) { 1117 if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isNumber"])(element)) { 1118 return false; 1119 } 1120 1121 if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isString"])(element) || Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isArray"])(element)) { 1122 return !element.length; 1123 } 1124 1125 return !element; 1126 }; 1127 1128 1129 /***/ }), 1130 1131 /***/ "@wordpress/escape-html": 1132 /*!*********************************************!*\ 1133 !*** external {"this":["wp","escapeHtml"]} ***! 1134 \*********************************************/ 1135 /*! no static exports found */ 1136 /***/ (function(module, exports) { 1137 1138 (function() { module.exports = this["wp"]["escapeHtml"]; }()); 1139 1140 /***/ }), 1141 1142 /***/ "lodash": 1143 /*!*************************!*\ 1144 !*** external "lodash" ***! 1145 \*************************/ 1146 /*! no static exports found */ 1147 /***/ (function(module, exports) { 1148 1149 (function() { module.exports = this["lodash"]; }()); 1150 1151 /***/ }), 1152 1153 /***/ "react": 1154 /*!************************!*\ 1155 !*** external "React" ***! 1156 \************************/ 1157 /*! no static exports found */ 1158 /***/ (function(module, exports) { 1159 1160 (function() { module.exports = this["React"]; }()); 1161 1162 /***/ }), 1163 1164 /***/ "react-dom": 1165 /*!***************************!*\ 1166 !*** external "ReactDOM" ***! 1167 \***************************/ 1168 /*! no static exports found */ 1169 /***/ (function(module, exports) { 1170 1171 (function() { module.exports = this["ReactDOM"]; }()); 1172 1173 /***/ }) 1174 1175 /******/ }); 1176 //# sourceMappingURL=element.js.map
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Mon Jan 7 01:00:05 2019 | Cross-referenced by PHPXref 0.7.1 |