wp/wp-includes/js/dist/warning.js
author ymh <ymh.work@gmail.com>
Fri, 05 Sep 2025 18:40:08 +0200
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
permissions -rw-r--r--
Add CLAUDE.md documentation and sync WordPress core files - Add comprehensive CLAUDE.md documentation file with project architecture, development setup, database operations, WordPress CLI usage, file sync procedures, and Mercurial commands - Update WordPress core files from wordpress/ to wp/ directory - Sync latest WordPress admin interface, includes, and core functionality - Update plugins: portfolio plugin with latest BWS framework and fancybox integration - Maintain custom configuration and theme files 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
     1
/******/ (() => { // webpackBootstrap
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     2
/******/ 	"use strict";
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     3
/******/ 	// The require scope
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     4
/******/ 	var __webpack_require__ = {};
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     5
/******/ 	
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     6
/************************************************************************/
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     7
/******/ 	/* webpack/runtime/define property getters */
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
     8
/******/ 	(() => {
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
     9
/******/ 		// define getter functions for harmony exports
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    10
/******/ 		__webpack_require__.d = (exports, definition) => {
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    11
/******/ 			for(var key in definition) {
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    12
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    13
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    14
/******/ 				}
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    15
/******/ 			}
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
/******/ 		};
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    17
/******/ 	})();
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    18
/******/ 	
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    19
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    20
/******/ 	(() => {
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    21
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    22
/******/ 	})();
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    23
/******/ 	
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
/************************************************************************/
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    25
var __webpack_exports__ = {};
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    27
// EXPORTS
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    28
__webpack_require__.d(__webpack_exports__, {
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    29
  "default": () => (/* binding */ warning)
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    30
});
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    32
;// CONCATENATED MODULE: ./node_modules/@wordpress/warning/build-module/utils.js
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    33
/**
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    34
 * Object map tracking messages which have been logged, for use in ensuring a
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    35
 * message is only logged once.
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    36
 *
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    37
 * @type {Set<string>}
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    38
 */
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    39
const logged = new Set();
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    40
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    41
;// CONCATENATED MODULE: ./node_modules/@wordpress/warning/build-module/index.js
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    42
/**
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    43
 * Internal dependencies
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    44
 */
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    46
function isDev() {
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    47
  // eslint-disable-next-line @wordpress/wp-global-usage
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    48
  return true === true;
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    49
}
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
/**
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
 * Shows a warning with `message` if environment is not `production`.
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
 *
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
 * @param {string} message Message to show in the warning.
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
 *
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
 * @example
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
 * ```js
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
 * import warning from '@wordpress/warning';
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
 *
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
 * function MyComponent( props ) {
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
 *   if ( ! props.title ) {
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
 *     warning( '`props.title` was not passed' );
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
 *   }
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
 *   ...
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
 * }
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
 * ```
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
 */
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
function warning(message) {
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
  if (!isDev()) {
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
    return;
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    71
  }
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    72
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    73
  // Skip if already logged.
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    74
  if (logged.has(message)) {
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    75
    return;
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    76
  }
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    78
  // eslint-disable-next-line no-console
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    79
  console.warn(message);
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    81
  // Throwing an error and catching it immediately to improve debugging
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
  // A consumer can use 'pause on caught exceptions'
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
  // https://github.com/facebook/react/issues/4216
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
  try {
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
    throw Error(message);
21
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    86
  } catch (x) {
48c4eec2b7e6 Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents: 19
diff changeset
    87
    // Do nothing.
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
  }
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    89
  logged.add(message);
16
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
}
a86126ab1dd4 update enmi-conf
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
19
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    92
(window.wp = window.wp || {}).warning = __webpack_exports__["default"];
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    93
/******/ })()
3d72ae0968f4 upgrade wordpress to 6.0.2
ymh <ymh.work@gmail.com>
parents: 18
diff changeset
    94
;