WordPress/WordPress

View on GitHub
wp-includes/js/dist/commands.js

Summary

Maintainability
F
1 mo
Test Coverage

File commands.js has 2688 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/******/ (() => { // webpackBootstrap
/******/     var __webpack_modules__ = ({

/***/ 6007:
/***/ ((module) => {
Severity: Major
Found in wp-includes/js/dist/commands.js - About 1 wk to fix

    Function RemoveScrollSideCar has 118 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function RemoveScrollSideCar(props) {
        var shouldPreventQueue = external_React_namespaceObject.useRef([]);
        var touchStartRef = external_React_namespaceObject.useRef([0, 0]);
        var activeAxis = external_React_namespaceObject.useRef();
        var id = external_React_namespaceObject.useState(idCounter++)[0];
    Severity: Major
    Found in wp-includes/js/dist/commands.js - About 4 hrs to fix

      Function $d3863c46a17e8a28$export$20e40289641fbbb6 has 115 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
          const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;
          const [container1, setContainer] = (0,external_React_namespaceObject.useState)(null);
          const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);
          const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);
      Severity: Major
      Found in wp-includes/js/dist/commands.js - About 4 hrs to fix

        Function $5cb92bef7577960e$export$177fb62ff3ec1f22 has 90 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
            const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
            const context = (0,external_React_namespaceObject.useContext)($5cb92bef7577960e$var$DismissableLayerContext);
            const [node1, setNode] = (0,external_React_namespaceObject.useState)(null);
            const [, force] = (0,external_React_namespaceObject.useState)({});
        Severity: Major
        Found in wp-includes/js/dist/commands.js - About 3 hrs to fix

          Function CommandMenu has 89 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function CommandMenu() {
            const {
              registerShortcut
            } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
            const [search, setSearch] = (0,external_wp_element_namespaceObject.useState)('');
          Severity: Major
          Found in wp-includes/js/dist/commands.js - About 3 hrs to fix

            Function $921a889cee6df7e8$var$usePresence has 80 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

             * -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence(present) {
                const [node1, setNode] = (0,external_React_namespaceObject.useState)();
                const stylesRef = (0,external_React_namespaceObject.useRef)({});
                const prevPresentRef = (0,external_React_namespaceObject.useRef)(present);
                const prevAnimationNameRef = (0,external_React_namespaceObject.useRef)('none');
            Severity: Major
            Found in wp-includes/js/dist/commands.js - About 3 hrs to fix

              Function applyAttributeToOthers has 71 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {
                  var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
                  if (!markerMap[markerName]) {
                      markerMap[markerName] = new WeakMap();
                  }
              Severity: Major
              Found in wp-includes/js/dist/commands.js - About 2 hrs to fix

                Function 6007 has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                /***/ ((module) => {
                
                // The scores are arranged so that a continuous match of characters will
                // result in a total score of 1.
                //
                Severity: Major
                Found in wp-includes/js/dist/commands.js - About 2 hrs to fix

                  Function innerCreateMedium has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function innerCreateMedium(defaults, middleware) {
                      if (middleware === void 0) { middleware = ItoI; }
                      var buffer = [];
                      var assigned = false;
                      var medium = {
                  Severity: Major
                  Found in wp-includes/js/dist/commands.js - About 2 hrs to fix

                    Function commandScoreInner has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function commandScoreInner(string, abbreviation, lowerString, lowerAbbreviation, stringIndex, abbreviationIndex) {
                    
                        if (abbreviationIndex === abbreviation.length) {
                            if (stringIndex === string.length) {
                                return SCORE_CONTINUE_MATCH;
                    Severity: Minor
                    Found in wp-includes/js/dist/commands.js - About 2 hrs to fix

                      Function $c512c27ab02ef895$export$50c7b4e9d9f19c1 has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                       * -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
                          let defaultContexts = [];
                          /* -----------------------------------------------------------------------------------------------
                         * createContext
                         * ---------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
                      Severity: Minor
                      Found in wp-includes/js/dist/commands.js - About 1 hr to fix

                        Function $5cb92bef7577960e$var$usePointerDownOutside has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                         */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside) {
                            const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
                            const isPointerInsideReactTreeRef = (0,external_React_namespaceObject.useRef)(false);
                            const handleClickRef = (0,external_React_namespaceObject.useRef)(()=>{});
                            (0,external_React_namespaceObject.useEffect)(()=>{
                        Severity: Minor
                        Found in wp-includes/js/dist/commands.js - About 1 hr to fix

                          Function shouldCancelEvent has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              var shouldCancelEvent = external_React_namespaceObject.useCallback(function (event, parent) {
                                  if ('touches' in event && event.touches.length === 2) {
                                      return !lastProps.current.allowPinchZoom;
                                  }
                                  var touch = getTouchXY(event);
                          Severity: Minor
                          Found in wp-includes/js/dist/commands.js - About 1 hr to fix

                            Function handleScroll has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {
                                var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
                                var delta = directionFactor * sourceDelta;
                                // find scrollable target
                                var target = event.target;
                            Severity: Minor
                            Found in wp-includes/js/dist/commands.js - About 1 hr to fix

                              Function $c512c27ab02ef895$var$composeContextScopes has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                               * -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
                                  const baseScope = scopes[0];
                                  if (scopes.length === 1) return baseScope;
                                  const createScope1 = ()=>{
                                      const scopeHooks = scopes.map((createScope)=>({
                              Severity: Minor
                              Found in wp-includes/js/dist/commands.js - About 1 hr to fix

                                Function $5d3850c4d0b4e6c7$var$DialogContentModal has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentModal = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
                                    const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
                                    const contentRef = (0,external_React_namespaceObject.useRef)(null);
                                    const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.contentRef, contentRef); // aria-hide everything except the content (better supported equivalent to setting aria-modal)
                                    (0,external_React_namespaceObject.useEffect)(()=>{
                                Severity: Minor
                                Found in wp-includes/js/dist/commands.js - About 1 hr to fix

                                  Function deep has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      var deep = function (parent) {
                                          if (!parent || elementsToStop.has(parent)) {
                                              return;
                                          }
                                          Array.prototype.forEach.call(parent.children, function (node) {
                                  Severity: Minor
                                  Found in wp-includes/js/dist/commands.js - About 1 hr to fix

                                    Function commandScoreInner has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    function commandScoreInner(string, abbreviation, lowerString, lowerAbbreviation, stringIndex, abbreviationIndex) {
                                    Severity: Minor
                                    Found in wp-includes/js/dist/commands.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          if (loop) $d3863c46a17e8a28$var$focus(last, {
                                                              select: true
                                                          });
                                      Severity: Major
                                      Found in wp-includes/js/dist/commands.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                        if (stringIndex > 0) {
                                                            score *= Math.pow(PENALTY_SKIPPED, index - stringIndex);
                                                        }
                                        Severity: Major
                                        Found in wp-includes/js/dist/commands.js - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                          if (stringIndex > 0) {
                                                              score *= Math.pow(PENALTY_SKIPPED, index - stringIndex);
                                                          }
                                          Severity: Major
                                          Found in wp-includes/js/dist/commands.js - About 45 mins to fix

                                            Function __esDecorate has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                            function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
                                            Severity: Minor
                                            Found in wp-includes/js/dist/commands.js - About 45 mins to fix

                                              Consider simplifying this complex logical expression.
                                              Open

                                              function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
                                              Severity: Major
                                              Found in wp-includes/js/dist/commands.js - About 40 mins to fix

                                                Function handleScroll has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {
                                                Severity: Minor
                                                Found in wp-includes/js/dist/commands.js - About 35 mins to fix

                                                  Function __classPrivateFieldSet has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                  function __classPrivateFieldSet(receiver, state, value, kind, f) {
                                                  Severity: Minor
                                                  Found in wp-includes/js/dist/commands.js - About 35 mins to fix

                                                    Avoid too many return statements within this function.
                                                    Open

                                                                return true;
                                                    Severity: Major
                                                    Found in wp-includes/js/dist/commands.js - About 30 mins to fix

                                                      Avoid too many return statements within this function.
                                                      Open

                                                              return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);
                                                      Severity: Major
                                                      Found in wp-includes/js/dist/commands.js - About 30 mins to fix

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __generator(thisArg, body) {
                                                          var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
                                                          return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
                                                          function verb(n) { return function (v) { return step([n, v]); }; }
                                                          function step(op) {
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 5 days to fix
                                                        wp-includes/js/dist/block-directory.js on lines 835..861
                                                        wp-includes/js/dist/compose.js on lines 2450..2476
                                                        wp-includes/js/dist/core-data.js on lines 1056..1082
                                                        wp-includes/js/dist/element.js on lines 1001..1027
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 183..209
                                                        wp-includes/js/dist/style-engine.js on lines 171..197

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 908.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
                                                          function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
                                                          var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
                                                          var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
                                                          var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 3 days to fix
                                                        wp-includes/js/dist/block-directory.js on lines 776..802
                                                        wp-includes/js/dist/compose.js on lines 2391..2417
                                                        wp-includes/js/dist/core-data.js on lines 997..1023
                                                        wp-includes/js/dist/element.js on lines 942..968
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 124..150
                                                        wp-includes/js/dist/style-engine.js on lines 112..138

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 577.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __asyncGenerator(thisArg, _arguments, generator) {
                                                          if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
                                                          var g = generator.apply(thisArg, _arguments || []), i, q = [];
                                                          return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
                                                          function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 2 days to fix
                                                        wp-includes/js/dist/block-directory.js on lines 938..948
                                                        wp-includes/js/dist/compose.js on lines 2553..2563
                                                        wp-includes/js/dist/core-data.js on lines 1159..1169
                                                        wp-includes/js/dist/element.js on lines 1104..1114
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 286..296
                                                        wp-includes/js/dist/style-engine.js on lines 274..284

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 392.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __asyncValues(o) {
                                                          if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
                                                          var m = o[Symbol.asyncIterator], i;
                                                          return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
                                                          function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 day to fix
                                                        wp-includes/js/dist/block-directory.js on lines 956..962
                                                        wp-includes/js/dist/compose.js on lines 2571..2577
                                                        wp-includes/js/dist/core-data.js on lines 1177..1183
                                                        wp-includes/js/dist/element.js on lines 1122..1128
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 304..310
                                                        wp-includes/js/dist/style-engine.js on lines 292..298

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 274.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __awaiter(thisArg, _arguments, P, generator) {
                                                          function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
                                                          return new (P || (P = Promise))(function (resolve, reject) {
                                                              function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
                                                              function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 day to fix
                                                        wp-includes/js/dist/block-directory.js on lines 825..833
                                                        wp-includes/js/dist/compose.js on lines 2440..2448
                                                        wp-includes/js/dist/core-data.js on lines 1046..1054
                                                        wp-includes/js/dist/element.js on lines 991..999
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 173..181
                                                        wp-includes/js/dist/style-engine.js on lines 161..169

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 242.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                          return (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, commands.map(command => {
                                                            var _command$searchLabel;
                                                            return (0,external_React_namespaceObject.createElement)(Le.Item, {
                                                              key: command.name,
                                                              value: (_command$searchLabel = command.searchLabel) !== null && _command$searchLabel !== void 0 ? _command$searchLabel : command.label,
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 1 day to fix
                                                        wp-includes/js/dist/commands.js on lines 3655..3675

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 236.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                          return (0,external_React_namespaceObject.createElement)(Le.Group, null, commands.map(command => {
                                                            var _command$searchLabel2;
                                                            return (0,external_React_namespaceObject.createElement)(Le.Item, {
                                                              key: command.name,
                                                              value: (_command$searchLabel2 = command.searchLabel) !== null && _command$searchLabel2 !== void 0 ? _command$searchLabel2 : command.label,
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 1 day to fix
                                                        wp-includes/js/dist/commands.js on lines 3584..3604

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 236.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __addDisposableResource(env, value, async) {
                                                          if (value !== null && value !== void 0) {
                                                            if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
                                                            var dispose;
                                                            if (async) {
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 day to fix
                                                        wp-includes/js/dist/block-directory.js on lines 1005..1024
                                                        wp-includes/js/dist/compose.js on lines 2620..2639
                                                        wp-includes/js/dist/core-data.js on lines 1226..1245
                                                        wp-includes/js/dist/element.js on lines 1171..1190
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 353..372
                                                        wp-includes/js/dist/style-engine.js on lines 341..360

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 228.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __disposeResources(env) {
                                                          function fail(e) {
                                                            env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
                                                            env.hasError = true;
                                                          }
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 day to fix
                                                        wp-includes/js/dist/block-directory.js on lines 1031..1050
                                                        wp-includes/js/dist/compose.js on lines 2646..2665
                                                        wp-includes/js/dist/core-data.js on lines 1252..1271
                                                        wp-includes/js/dist/element.js on lines 1197..1216
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 379..398
                                                        wp-includes/js/dist/style-engine.js on lines 367..386

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 223.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __read(o, n) {
                                                          var m = typeof Symbol === "function" && o[Symbol.iterator];
                                                          if (!m) return o;
                                                          var i = m.call(o), r, ar = [], e;
                                                          try {
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 day to fix
                                                        wp-includes/js/dist/block-directory.js on lines 891..906
                                                        wp-includes/js/dist/compose.js on lines 2506..2521
                                                        wp-includes/js/dist/core-data.js on lines 1112..1127
                                                        wp-includes/js/dist/element.js on lines 1057..1072
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 239..254
                                                        wp-includes/js/dist/style-engine.js on lines 227..242

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 221.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __decorate(decorators, target, key, desc) {
                                                          var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
                                                          if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
                                                          else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
                                                          return c > 3 && r && Object.defineProperty(target, key, r), r;
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 day to fix
                                                        wp-includes/js/dist/block-directory.js on lines 765..770
                                                        wp-includes/js/dist/compose.js on lines 2380..2385
                                                        wp-includes/js/dist/core-data.js on lines 986..991
                                                        wp-includes/js/dist/element.js on lines 931..936
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 113..118
                                                        wp-includes/js/dist/style-engine.js on lines 101..106

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 221.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __rest(s, e) {
                                                          var t = {};
                                                          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
                                                              t[p] = s[p];
                                                          if (s != null && typeof Object.getOwnPropertySymbols === "function")
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 day to fix
                                                        wp-includes/js/dist/block-directory.js on lines 753..763
                                                        wp-includes/js/dist/compose.js on lines 2368..2378
                                                        wp-includes/js/dist/core-data.js on lines 974..984
                                                        wp-includes/js/dist/element.js on lines 919..929
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 101..111
                                                        wp-includes/js/dist/style-engine.js on lines 89..99

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 213.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 6 locations. Consider refactoring.
                                                        Open

                                                        function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 5 other locations - About 7 hrs to fix
                                                        wp-includes/js/dist/customize-widgets.js on lines 290..290
                                                        wp-includes/js/dist/edit-post.js on lines 322..322
                                                        wp-includes/js/dist/edit-widgets.js on lines 287..287
                                                        wp-includes/js/dist/primitives.js on lines 59..59
                                                        wp-includes/js/dist/widgets.js on lines 101..101

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 184.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        var __createBinding = Object.create ? (function(o, m, k, k2) {
                                                          if (k2 === undefined) k2 = k;
                                                          var desc = Object.getOwnPropertyDescriptor(m, k);
                                                          if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
                                                              desc = { enumerable: true, get: function() { return m[k]; } };
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 7 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 863..873
                                                        wp-includes/js/dist/compose.js on lines 2478..2488
                                                        wp-includes/js/dist/core-data.js on lines 1084..1094
                                                        wp-includes/js/dist/element.js on lines 1029..1039
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 211..221
                                                        wp-includes/js/dist/style-engine.js on lines 199..209

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 180.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __values(o) {
                                                          var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
                                                          if (m) return m.call(o);
                                                          if (o && typeof o.length === "number") return {
                                                              next: function () {
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 6 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 879..889
                                                        wp-includes/js/dist/compose.js on lines 2494..2504
                                                        wp-includes/js/dist/core-data.js on lines 1100..1110
                                                        wp-includes/js/dist/element.js on lines 1045..1055
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 227..237
                                                        wp-includes/js/dist/style-engine.js on lines 215..225

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 159.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __asyncDelegator(o) {
                                                          var i, p;
                                                          return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
                                                          function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
                                                        }
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 6 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 950..954
                                                        wp-includes/js/dist/compose.js on lines 2565..2569
                                                        wp-includes/js/dist/core-data.js on lines 1171..1175
                                                        wp-includes/js/dist/element.js on lines 1116..1120
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 298..302
                                                        wp-includes/js/dist/style-engine.js on lines 286..290

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 159.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __spreadArray(to, from, pack) {
                                                          if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
                                                              if (ar || !(i in from)) {
                                                                  if (!ar) ar = Array.prototype.slice.call(from, 0, i);
                                                                  ar[i] = from[i];
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 6 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 924..932
                                                        wp-includes/js/dist/compose.js on lines 2539..2547
                                                        wp-includes/js/dist/core-data.js on lines 1145..1153
                                                        wp-includes/js/dist/element.js on lines 1090..1098
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 272..280
                                                        wp-includes/js/dist/style-engine.js on lines 260..268

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 156.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __spreadArrays() {
                                                          for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
                                                          for (var r = Array(s), k = 0, i = 0; i < il; i++)
                                                              for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
                                                                  r[k] = a[j];
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 5 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 916..922
                                                        wp-includes/js/dist/compose.js on lines 2531..2537
                                                        wp-includes/js/dist/core-data.js on lines 1137..1143
                                                        wp-includes/js/dist/element.js on lines 1082..1088
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 264..270
                                                        wp-includes/js/dist/style-engine.js on lines 252..258

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 154.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                        function _extends() {
                                                          _extends = Object.assign ? Object.assign.bind() : function (target) {
                                                            for (var i = 1; i < arguments.length; i++) {
                                                              var source = arguments[i];
                                                              for (var key in source) {
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 5 hrs to fix
                                                        wp-includes/js/dist/router.js on lines 50..63

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 149.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 11 locations. Consider refactoring.
                                                        Open

                                                        /******/     function __webpack_require__(moduleId) {
                                                        /******/         // Check if module is in cache
                                                        /******/         var cachedModule = __webpack_module_cache__[moduleId];
                                                        /******/         if (cachedModule !== undefined) {
                                                        /******/             return cachedModule.exports;
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 10 other locations - About 5 hrs to fix
                                                        wp-includes/js/dist/core-data.js on lines 593..611
                                                        wp-includes/js/dist/customize-widgets.js on lines 90..108
                                                        wp-includes/js/dist/data.js on lines 465..483
                                                        wp-includes/js/dist/element.js on lines 32..50
                                                        wp-includes/js/dist/i18n.js on lines 249..267
                                                        wp-includes/js/dist/priority-queue.js on lines 229..247
                                                        wp-includes/js/dist/redux-routine.js on lines 660..678
                                                        wp-includes/js/dist/server-side-render.js on lines 90..108
                                                        wp-includes/js/dist/undo-manager.js on lines 18..36
                                                        wp-includes/js/dist/url.js on lines 498..516

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 145.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        /* harmony default export */ const tslib_es6 = ({
                                                          __extends,
                                                          __assign,
                                                          __rest,
                                                          __decorate,
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 5 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 1052..1080
                                                        wp-includes/js/dist/compose.js on lines 2667..2695
                                                        wp-includes/js/dist/core-data.js on lines 1273..1301
                                                        wp-includes/js/dist/element.js on lines 1218..1246
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 400..428
                                                        wp-includes/js/dist/style-engine.js on lines 388..416

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 145.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        var __assign = function() {
                                                          __assign = Object.assign || function __assign(t) {
                                                              for (var s, i = 1, n = arguments.length; i < n; i++) {
                                                                  s = arguments[i];
                                                                  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 5 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 742..751
                                                        wp-includes/js/dist/compose.js on lines 2357..2366
                                                        wp-includes/js/dist/core-data.js on lines 963..972
                                                        wp-includes/js/dist/element.js on lines 908..917
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 90..99
                                                        wp-includes/js/dist/style-engine.js on lines 78..87

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 142.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __classPrivateFieldSet(receiver, state, value, kind, f) {
                                                          if (kind === "m") throw new TypeError("Private method is not writable");
                                                          if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
                                                          if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
                                                          return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 5 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 993..998
                                                        wp-includes/js/dist/compose.js on lines 2608..2613
                                                        wp-includes/js/dist/core-data.js on lines 1214..1219
                                                        wp-includes/js/dist/element.js on lines 1159..1164
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 341..346
                                                        wp-includes/js/dist/style-engine.js on lines 329..334

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 140.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        var extendStatics = function(d, b) {
                                                          extendStatics = Object.setPrototypeOf ||
                                                              ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
                                                              function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
                                                          return extendStatics(d, b);
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 4 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 727..732
                                                        wp-includes/js/dist/compose.js on lines 2342..2347
                                                        wp-includes/js/dist/core-data.js on lines 948..953
                                                        wp-includes/js/dist/element.js on lines 893..898
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 75..80
                                                        wp-includes/js/dist/style-engine.js on lines 63..68

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 131.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 22 locations. Consider refactoring.
                                                        Open

                                                        /******/     (() => {
                                                        /******/         // define getter functions for harmony exports
                                                        /******/         __webpack_require__.d = (exports, definition) => {
                                                        /******/             for(var key in definition) {
                                                        /******/                 if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 21 other locations - About 4 hrs to fix
                                                        wp-includes/js/dist/a11y.js on lines 20..29
                                                        wp-includes/js/dist/block-directory.js on lines 20..29
                                                        wp-includes/js/dist/compose.js on lines 2245..2254
                                                        wp-includes/js/dist/core-data.js on lines 627..636
                                                        wp-includes/js/dist/customize-widgets.js on lines 124..133
                                                        wp-includes/js/dist/data-controls.js on lines 20..29
                                                        wp-includes/js/dist/data.js on lines 499..508
                                                        wp-includes/js/dist/dom.js on lines 20..29
                                                        wp-includes/js/dist/edit-post.js on lines 20..29
                                                        wp-includes/js/dist/edit-widgets.js on lines 20..29
                                                        wp-includes/js/dist/i18n.js on lines 283..292
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 20..29
                                                        wp-includes/js/dist/media-utils.js on lines 20..29
                                                        wp-includes/js/dist/nux.js on lines 20..29
                                                        wp-includes/js/dist/plugins.js on lines 20..29
                                                        wp-includes/js/dist/preferences-persistence.js on lines 20..29
                                                        wp-includes/js/dist/preferences.js on lines 20..29
                                                        wp-includes/js/dist/server-side-render.js on lines 124..133
                                                        wp-includes/js/dist/undo-manager.js on lines 52..61
                                                        wp-includes/js/dist/url.js on lines 532..541
                                                        wp-includes/js/dist/widgets.js on lines 20..29

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 129.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __classPrivateFieldGet(receiver, state, kind, f) {
                                                          if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
                                                          if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
                                                          return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
                                                        }
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 4 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 987..991
                                                        wp-includes/js/dist/compose.js on lines 2602..2606
                                                        wp-includes/js/dist/core-data.js on lines 1208..1212
                                                        wp-includes/js/dist/element.js on lines 1153..1157
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 335..339
                                                        wp-includes/js/dist/style-engine.js on lines 323..327

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 125.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __extends(d, b) {
                                                          if (typeof b !== "function" && b !== null)
                                                              throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
                                                          extendStatics(d, b);
                                                          function __() { this.constructor = d; }
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 4 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 734..740
                                                        wp-includes/js/dist/compose.js on lines 2349..2355
                                                        wp-includes/js/dist/core-data.js on lines 955..961
                                                        wp-includes/js/dist/element.js on lines 900..906
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 82..88
                                                        wp-includes/js/dist/style-engine.js on lines 70..76

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 121.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 22 locations. Consider refactoring.
                                                        Open

                                                        /******/     (() => {
                                                        /******/         // getDefaultExport function for compatibility with non-harmony modules
                                                        /******/         __webpack_require__.n = (module) => {
                                                        /******/             var getter = module && module.__esModule ?
                                                        /******/                 () => (module['default']) :
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 21 other locations - About 3 hrs to fix
                                                        wp-includes/js/dist/a11y.js on lines 8..17
                                                        wp-includes/js/dist/block-directory.js on lines 8..17
                                                        wp-includes/js/dist/compose.js on lines 2233..2242
                                                        wp-includes/js/dist/core-data.js on lines 615..624
                                                        wp-includes/js/dist/customize-widgets.js on lines 112..121
                                                        wp-includes/js/dist/data-controls.js on lines 8..17
                                                        wp-includes/js/dist/data.js on lines 487..496
                                                        wp-includes/js/dist/dom.js on lines 8..17
                                                        wp-includes/js/dist/edit-post.js on lines 8..17
                                                        wp-includes/js/dist/edit-widgets.js on lines 8..17
                                                        wp-includes/js/dist/i18n.js on lines 271..280
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 8..17
                                                        wp-includes/js/dist/media-utils.js on lines 8..17
                                                        wp-includes/js/dist/nux.js on lines 8..17
                                                        wp-includes/js/dist/plugins.js on lines 8..17
                                                        wp-includes/js/dist/preferences-persistence.js on lines 8..17
                                                        wp-includes/js/dist/preferences.js on lines 8..17
                                                        wp-includes/js/dist/server-side-render.js on lines 112..121
                                                        wp-includes/js/dist/undo-manager.js on lines 40..49
                                                        wp-includes/js/dist/url.js on lines 520..529
                                                        wp-includes/js/dist/widgets.js on lines 8..17

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 113.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                        const getCommands = (0,external_wp_data_namespaceObject.createSelector)((state, contextual = false) => Object.values(state.commands).filter(command => {
                                                          const isContextual = command.context && command.context === state.context;
                                                          return contextual ? isContextual : !isContextual;
                                                        }), state => [state.commands, state.context]);
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 3 hrs to fix
                                                        wp-includes/js/dist/commands.js on lines 3448..3451

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 106.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                        const getCommandLoaders = (0,external_wp_data_namespaceObject.createSelector)((state, contextual = false) => Object.values(state.commandLoaders).filter(loader => {
                                                          const isContextual = loader.context && loader.context === state.context;
                                                          return contextual ? isContextual : !isContextual;
                                                        }), state => [state.commandLoaders, state.context]);
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 3 hrs to fix
                                                        wp-includes/js/dist/commands.js on lines 3435..3438

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 106.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __runInitializers(thisArg, initializers, value) {
                                                          var useValue = arguments.length > 2;
                                                          for (var i = 0; i < initializers.length; i++) {
                                                              value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
                                                          }
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 3 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 804..810
                                                        wp-includes/js/dist/compose.js on lines 2419..2425
                                                        wp-includes/js/dist/core-data.js on lines 1025..1031
                                                        wp-includes/js/dist/element.js on lines 970..976
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 152..158
                                                        wp-includes/js/dist/style-engine.js on lines 140..146

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 102.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                        const $5d3850c4d0b4e6c7$export$16f7638e4a34b909 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
                                                            const { __scopeDialog: __scopeDialog , ...titleProps } = props;
                                                            const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$TITLE_NAME, __scopeDialog);
                                                            return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.h2, _extends({
                                                                id: context.titleId
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 3 hrs to fix
                                                        wp-includes/js/dist/commands.js on lines 3046..3054

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 100.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                        const $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
                                                            const { __scopeDialog: __scopeDialog , ...descriptionProps } = props;
                                                            const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$DESCRIPTION_NAME, __scopeDialog);
                                                            return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.p, _extends({
                                                                id: context.descriptionId
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 3 hrs to fix
                                                        wp-includes/js/dist/commands.js on lines 3031..3039

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 100.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __importStar(mod) {
                                                          if (mod && mod.__esModule) return mod;
                                                          var result = {};
                                                          if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
                                                          __setModuleDefault(result, mod);
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 3 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 975..981
                                                        wp-includes/js/dist/compose.js on lines 2590..2596
                                                        wp-includes/js/dist/core-data.js on lines 1196..1202
                                                        wp-includes/js/dist/element.js on lines 1141..1147
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 323..329
                                                        wp-includes/js/dist/style-engine.js on lines 311..317

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 99.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __setFunctionName(f, name, prefix) {
                                                          if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
                                                          return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
                                                        };
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 2 hrs to fix
                                                        wp-includes/js/dist/block-directory.js on lines 816..819
                                                        wp-includes/js/dist/compose.js on lines 2431..2434
                                                        wp-includes/js/dist/core-data.js on lines 1037..1040
                                                        wp-includes/js/dist/element.js on lines 982..985
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 164..167
                                                        wp-includes/js/dist/style-engine.js on lines 152..155

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 91.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __classPrivateFieldIn(state, receiver) {
                                                          if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
                                                          return typeof state === "function" ? receiver === state : state.has(receiver);
                                                        }
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 hr to fix
                                                        wp-includes/js/dist/block-directory.js on lines 1000..1003
                                                        wp-includes/js/dist/compose.js on lines 2615..2618
                                                        wp-includes/js/dist/core-data.js on lines 1221..1224
                                                        wp-includes/js/dist/element.js on lines 1166..1169
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 348..351
                                                        wp-includes/js/dist/style-engine.js on lines 336..339

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 72.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                        var elementCouldBeHScrolled = function (node) {
                                                            var styles = window.getComputedStyle(node);
                                                            return (styles.overflowX !== 'hidden' && // not-not-scrollable
                                                                !(styles.overflowY === styles.overflowX && styles.overflowX === 'visible') // scrollable
                                                            );
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 1 hr to fix
                                                        wp-includes/js/dist/commands.js on lines 2357..2362

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 72.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                        var elementCouldBeVScrolled = function (node) {
                                                            var styles = window.getComputedStyle(node);
                                                            return (styles.overflowY !== 'hidden' && // not-not-scrollable
                                                                !(styles.overflowY === styles.overflowX && styles.overflowY === 'visible') // scrollable
                                                            );
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 1 hr to fix
                                                        wp-includes/js/dist/commands.js on lines 2363..2368

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 72.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
                                                          var e = new Error(message);
                                                          return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
                                                        };
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 hr to fix
                                                        wp-includes/js/dist/block-directory.js on lines 1026..1029
                                                        wp-includes/js/dist/compose.js on lines 2641..2644
                                                        wp-includes/js/dist/core-data.js on lines 1247..1250
                                                        wp-includes/js/dist/element.js on lines 1192..1195
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 374..377
                                                        wp-includes/js/dist/style-engine.js on lines 362..365

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 70.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                        Open

                                                        function Icon({
                                                          icon,
                                                          size = 24,
                                                          ...props
                                                        }, ref) {
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 3 other locations - About 1 hr to fix
                                                        wp-includes/js/dist/block-directory.js on lines 1336..1347
                                                        wp-includes/js/dist/format-library.js on lines 1218..1229
                                                        wp-includes/js/dist/preferences.js on lines 536..547

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 69.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __spread() {
                                                          for (var ar = [], i = 0; i < arguments.length; i++)
                                                              ar = ar.concat(__read(arguments[i]));
                                                          return ar;
                                                        }
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 hr to fix
                                                        wp-includes/js/dist/block-directory.js on lines 909..913
                                                        wp-includes/js/dist/compose.js on lines 2524..2528
                                                        wp-includes/js/dist/core-data.js on lines 1130..1134
                                                        wp-includes/js/dist/element.js on lines 1075..1079
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 257..261
                                                        wp-includes/js/dist/style-engine.js on lines 245..249

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 68.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        var __setModuleDefault = Object.create ? (function(o, v) {
                                                          Object.defineProperty(o, "default", { enumerable: true, value: v });
                                                        }) : function(o, v) {
                                                          o["default"] = v;
                                                        };
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 hr to fix
                                                        wp-includes/js/dist/block-directory.js on lines 969..973
                                                        wp-includes/js/dist/compose.js on lines 2584..2588
                                                        wp-includes/js/dist/core-data.js on lines 1190..1194
                                                        wp-includes/js/dist/element.js on lines 1135..1139
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 317..321
                                                        wp-includes/js/dist/style-engine.js on lines 305..309

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 66.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 55 locations. Consider refactoring.
                                                        Open

                                                        const search = (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
                                                          xmlns: "http://www.w3.org/2000/svg",
                                                          viewBox: "0 0 24 24"
                                                        }, (0,external_React_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
                                                          d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 54 other locations - About 1 hr to fix
                                                        wp-includes/js/dist/block-directory.js on lines 1358..1363
                                                        wp-includes/js/dist/block-directory.js on lines 1372..1377
                                                        wp-includes/js/dist/block-directory.js on lines 1760..1765
                                                        wp-includes/js/dist/core-commands.js on lines 59..64
                                                        wp-includes/js/dist/core-commands.js on lines 105..110
                                                        wp-includes/js/dist/core-commands.js on lines 135..140
                                                        wp-includes/js/dist/core-commands.js on lines 149..154
                                                        wp-includes/js/dist/core-commands.js on lines 163..168
                                                        wp-includes/js/dist/core-commands.js on lines 177..182
                                                        wp-includes/js/dist/core-commands.js on lines 191..196
                                                        wp-includes/js/dist/customize-widgets.js on lines 301..306
                                                        wp-includes/js/dist/customize-widgets.js on lines 315..320
                                                        wp-includes/js/dist/customize-widgets.js on lines 329..334
                                                        wp-includes/js/dist/customize-widgets.js on lines 343..348
                                                        wp-includes/js/dist/customize-widgets.js on lines 562..567
                                                        wp-includes/js/dist/customize-widgets.js on lines 576..581
                                                        wp-includes/js/dist/edit-post.js on lines 1980..1985
                                                        wp-includes/js/dist/edit-post.js on lines 2840..2845
                                                        wp-includes/js/dist/edit-post.js on lines 2854..2859
                                                        wp-includes/js/dist/edit-post.js on lines 2868..2873
                                                        wp-includes/js/dist/edit-widgets.js on lines 298..303
                                                        wp-includes/js/dist/edit-widgets.js on lines 312..317
                                                        wp-includes/js/dist/edit-widgets.js on lines 346..351
                                                        wp-includes/js/dist/edit-widgets.js on lines 3113..3118
                                                        wp-includes/js/dist/edit-widgets.js on lines 3350..3355
                                                        wp-includes/js/dist/edit-widgets.js on lines 3364..3369
                                                        wp-includes/js/dist/edit-widgets.js on lines 3378..3383
                                                        wp-includes/js/dist/edit-widgets.js on lines 3392..3397
                                                        wp-includes/js/dist/edit-widgets.js on lines 3600..3605
                                                        wp-includes/js/dist/edit-widgets.js on lines 3614..3619
                                                        wp-includes/js/dist/edit-widgets.js on lines 4152..4157
                                                        wp-includes/js/dist/format-library.js on lines 39..44
                                                        wp-includes/js/dist/format-library.js on lines 106..111
                                                        wp-includes/js/dist/format-library.js on lines 352..357
                                                        wp-includes/js/dist/format-library.js on lines 423..428
                                                        wp-includes/js/dist/format-library.js on lines 1107..1112
                                                        wp-includes/js/dist/format-library.js on lines 1238..1243
                                                        wp-includes/js/dist/format-library.js on lines 1252..1257
                                                        wp-includes/js/dist/format-library.js on lines 1532..1537
                                                        wp-includes/js/dist/format-library.js on lines 1588..1593
                                                        wp-includes/js/dist/format-library.js on lines 1644..1649
                                                        wp-includes/js/dist/format-library.js on lines 1700..1705
                                                        wp-includes/js/dist/format-library.js on lines 1762..1767
                                                        wp-includes/js/dist/nux.js on lines 336..341
                                                        wp-includes/js/dist/patterns.js on lines 826..831
                                                        wp-includes/js/dist/plugins.js on lines 329..334
                                                        wp-includes/js/dist/preferences.js on lines 92..97
                                                        wp-includes/js/dist/preferences.js on lines 556..561
                                                        wp-includes/js/dist/preferences.js on lines 570..575
                                                        wp-includes/js/dist/reusable-blocks.js on lines 238..243
                                                        wp-includes/js/dist/widgets.js on lines 92..97
                                                        wp-includes/js/dist/widgets.js on lines 112..117
                                                        wp-includes/js/dist/widgets.js on lines 1287..1292
                                                        wp-includes/js/dist/widgets.js on lines 1489..1494

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 62.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __exportStar(m, o) {
                                                          for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
                                                        }
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 hr to fix
                                                        wp-includes/js/dist/block-directory.js on lines 875..877
                                                        wp-includes/js/dist/compose.js on lines 2490..2492
                                                        wp-includes/js/dist/core-data.js on lines 1096..1098
                                                        wp-includes/js/dist/element.js on lines 1041..1043
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 223..225
                                                        wp-includes/js/dist/style-engine.js on lines 211..213

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 60.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __makeTemplateObject(cooked, raw) {
                                                          if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
                                                          return cooked;
                                                        };
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 1 hr to fix
                                                        wp-includes/js/dist/block-directory.js on lines 964..967
                                                        wp-includes/js/dist/compose.js on lines 2579..2582
                                                        wp-includes/js/dist/core-data.js on lines 1185..1188
                                                        wp-includes/js/dist/element.js on lines 1130..1133
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 312..315
                                                        wp-includes/js/dist/style-engine.js on lines 300..303

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 58.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 43 locations. Consider refactoring.
                                                        Open

                                                        /******/     (() => {
                                                        /******/         __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
                                                        /******/     })();
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 42 other locations - About 1 hr to fix
                                                        wp-includes/js/dist/a11y.js on lines 32..34
                                                        wp-includes/js/dist/annotations.js on lines 20..22
                                                        wp-includes/js/dist/autop.js on lines 20..22
                                                        wp-includes/js/dist/blob.js on lines 20..22
                                                        wp-includes/js/dist/block-directory.js on lines 32..34
                                                        wp-includes/js/dist/block-serialization-default-parser.js on lines 20..22
                                                        wp-includes/js/dist/compose.js on lines 2257..2259
                                                        wp-includes/js/dist/core-commands.js on lines 20..22
                                                        wp-includes/js/dist/core-data.js on lines 639..641
                                                        wp-includes/js/dist/customize-widgets.js on lines 136..138
                                                        wp-includes/js/dist/data-controls.js on lines 32..34
                                                        wp-includes/js/dist/data.js on lines 511..513
                                                        wp-includes/js/dist/dom.js on lines 32..34
                                                        wp-includes/js/dist/edit-post.js on lines 32..34
                                                        wp-includes/js/dist/edit-widgets.js on lines 32..34
                                                        wp-includes/js/dist/element.js on lines 66..68
                                                        wp-includes/js/dist/escape-html.js on lines 20..22
                                                        wp-includes/js/dist/hooks.js on lines 20..22
                                                        wp-includes/js/dist/html-entities.js on lines 20..22
                                                        wp-includes/js/dist/i18n.js on lines 295..297
                                                        wp-includes/js/dist/is-shallow-equal.js on lines 20..22
                                                        wp-includes/js/dist/keyboard-shortcuts.js on lines 20..22
                                                        wp-includes/js/dist/keycodes.js on lines 20..22
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 32..34
                                                        wp-includes/js/dist/media-utils.js on lines 32..34
                                                        wp-includes/js/dist/notices.js on lines 20..22
                                                        wp-includes/js/dist/nux.js on lines 32..34
                                                        wp-includes/js/dist/patterns.js on lines 20..22
                                                        wp-includes/js/dist/plugins.js on lines 32..34
                                                        wp-includes/js/dist/preferences-persistence.js on lines 32..34
                                                        wp-includes/js/dist/preferences.js on lines 32..34
                                                        wp-includes/js/dist/primitives.js on lines 20..22
                                                        wp-includes/js/dist/priority-queue.js on lines 275..277
                                                        wp-includes/js/dist/private-apis.js on lines 20..22
                                                        wp-includes/js/dist/reusable-blocks.js on lines 20..22
                                                        wp-includes/js/dist/router.js on lines 20..22
                                                        wp-includes/js/dist/style-engine.js on lines 20..22
                                                        wp-includes/js/dist/undo-manager.js on lines 64..66
                                                        wp-includes/js/dist/url.js on lines 544..546
                                                        wp-includes/js/dist/viewport.js on lines 20..22
                                                        wp-includes/js/dist/widgets.js on lines 32..34
                                                        wp-includes/js/dist/wordcount.js on lines 20..22

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 58.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                            var scrollWheel = external_React_namespaceObject.useCallback(function (event) {
                                                                shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
                                                            }, []);
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 1 hr to fix
                                                        wp-includes/js/dist/commands.js on lines 2570..2572

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 58.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                            var scrollTouchMove = external_React_namespaceObject.useCallback(function (event) {
                                                                shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
                                                            }, []);
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 1 hr to fix
                                                        wp-includes/js/dist/commands.js on lines 2567..2569

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 58.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                          (0,external_wp_element_namespaceObject.useEffect)(() => {
                                                            registerShortcut({
                                                              name: 'core/commands',
                                                              category: 'global',
                                                              description: (0,external_wp_i18n_namespaceObject.__)('Open the command palette.'),
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 1 hr to fix
                                                        wp-includes/js/dist/edit-post.js on lines 1738..1748

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 56.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                        var ue='[cmdk-list-sizer=""]',M='[cmdk-group=""]',N='[cmdk-group-items=""]',de='[cmdk-group-heading=""]',ee='[cmdk-item=""]',Z=`${ee}:not([aria-disabled="true"])`,z="cmdk-item-select",S="data-value",fe=(n,a)=>command_score(n,a),te=external_React_namespaceObject.createContext(void 0),k=()=>external_React_namespaceObject.useContext(te),re=external_React_namespaceObject.createContext(void 0),U=()=>external_React_namespaceObject.useContext(re),ne=external_React_namespaceObject.createContext(void 0),oe=external_React_namespaceObject.forwardRef((n,a)=>{let r=external_React_namespaceObject.useRef(null),o=x(()=>({search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}})),u=x(()=>new Set),l=x(()=>new Map),p=x(()=>new Map),f=x(()=>new Set),d=ae(n),{label:v,children:E,value:R,onValueChange:w,filter:O,shouldFilter:ie,...D}=n,F=external_React_namespaceObject.useId(),g=external_React_namespaceObject.useId(),A=external_React_namespaceObject.useId(),y=ye();L(()=>{if(R!==void 0){let e=R.trim().toLowerCase();o.current.value=e,y(6,W),h.emit()}},[R]);let h=external_React_namespaceObject.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>o.current,setState:(e,c,i)=>{var s,m,b;if(!Object.is(o.current[e],c)){if(o.current[e]=c,e==="search")j(),G(),y(1,V);else if(e==="value")if(((s=d.current)==null?void 0:s.value)!==void 0){(b=(m=d.current).onValueChange)==null||b.call(m,c);return}else i||y(5,W);h.emit()}},emit:()=>{f.current.forEach(e=>e())}}),[]),K=external_React_namespaceObject.useMemo(()=>({value:(e,c)=>{c!==p.current.get(e)&&(p.current.set(e,c),o.current.filtered.items.set(e,B(c)),y(2,()=>{G(),h.emit()}))},item:(e,c)=>(u.current.add(e),c&&(l.current.has(c)?l.current.get(c).add(e):l.current.set(c,new Set([e]))),y(3,()=>{j(),G(),o.current.value||V(),h.emit()}),()=>{p.current.delete(e),u.current.delete(e),o.current.filtered.items.delete(e),y(4,()=>{j(),V(),h.emit()})}),group:e=>(l.current.has(e)||l.current.set(e,new Set),()=>{p.current.delete(e),l.current.delete(e)}),filter:()=>d.current.shouldFilter,label:v||n["aria-label"],listId:F,inputId:A,labelId:g}),[]);function B(e){var i;let c=((i=d.current)==null?void 0:i.filter)??fe;return e?c(e,o.current.search):0}function G(){if(!r.current||!o.current.search||d.current.shouldFilter===!1)return;let e=o.current.filtered.items,c=[];o.current.filtered.groups.forEach(s=>{let m=l.current.get(s),b=0;m.forEach(P=>{let ce=e.get(P);b=Math.max(ce,b)}),c.push([s,b])});let i=r.current.querySelector(ue);I().sort((s,m)=>{let b=s.getAttribute(S),P=m.getAttribute(S);return(e.get(P)??0)-(e.get(b)??0)}).forEach(s=>{let m=s.closest(N);m?m.appendChild(s.parentElement===m?s:s.closest(`${N} > *`)):i.appendChild(s.parentElement===i?s:s.closest(`${N} > *`))}),c.sort((s,m)=>m[1]-s[1]).forEach(s=>{let m=r.current.querySelector(`${M}[${S}="${s[0]}"]`);m==null||m.parentElement.appendChild(m)})}function V(){let e=I().find(i=>!i.ariaDisabled),c=e==null?void 0:e.getAttribute(S);h.setState("value",c||void 0)}function j(){if(!o.current.search||d.current.shouldFilter===!1){o.current.filtered.count=u.current.size;return}o.current.filtered.groups=new Set;let e=0;for(let c of u.current){let i=p.current.get(c),s=B(i);o.current.filtered.items.set(c,s),s>0&&e++}for(let[c,i]of l.current)for(let s of i)if(o.current.filtered.items.get(s)>0){o.current.filtered.groups.add(c);break}o.current.filtered.count=e}function W(){var c,i,s;let e=_();e&&(((c=e.parentElement)==null?void 0:c.firstChild)===e&&((s=(i=e.closest(M))==null?void 0:i.querySelector(de))==null||s.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}))}function _(){return r.current.querySelector(`${ee}[aria-selected="true"]`)}function I(){return Array.from(r.current.querySelectorAll(Z))}function q(e){let i=I()[e];i&&h.setState("value",i.getAttribute(S))}function $(e){var b;let c=_(),i=I(),s=i.findIndex(P=>P===c),m=i[s+e];(b=d.current)!=null&&b.loop&&(m=s+e<0?i[i.length-1]:s+e===i.length?i[0]:i[s+e]),m&&h.setState("value",m.getAttribute(S))}function J(e){let c=_(),i=c==null?void 0:c.closest(M),s;for(;i&&!s;)i=e>0?Se(i,M):Ce(i,M),s=i==null?void 0:i.querySelector(Z);s?h.setState("value",s.getAttribute(S)):$(e)}let Q=()=>q(I().length-1),X=e=>{e.preventDefault(),e.metaKey?Q():e.altKey?J(1):$(1)},Y=e=>{e.preventDefault(),e.metaKey?q(0):e.altKey?J(-1):$(-1)};return external_React_namespaceObject.createElement("div",{ref:H([r,a]),...D,"cmdk-root":"",onKeyDown:e=>{var c;if((c=D.onKeyDown)==null||c.call(D,e),!e.defaultPrevented)switch(e.key){case"n":case"j":{e.ctrlKey&&X(e);break}case"ArrowDown":{X(e);break}case"p":case"k":{e.ctrlKey&&Y(e);break}case"ArrowUp":{Y(e);break}case"Home":{e.preventDefault(),q(0);break}case"End":{e.preventDefault(),Q();break}case"Enter":{e.preventDefault();let i=_();if(i){let s=new Event(z);i.dispatchEvent(s)}}}}},external_React_namespaceObject.createElement("label",{"cmdk-label":"",htmlFor:K.inputId,id:K.labelId,style:xe},v),external_React_namespaceObject.createElement(re.Provider,{value:h},external_React_namespaceObject.createElement(te.Provider,{value:K},E)))}),me=external_React_namespaceObject.forwardRef((n,a)=>{let r=external_React_namespaceObject.useId(),o=external_React_namespaceObject.useRef(null),u=external_React_namespaceObject.useContext(ne),l=k(),p=ae(n);L(()=>l.item(r,u),[]);let f=se(r,o,[n.value,n.children,o]),d=U(),v=T(g=>g.value&&g.value===f.current),E=T(g=>l.filter()===!1?!0:g.search?g.filtered.items.get(r)>0:!0);external_React_namespaceObject.useEffect(()=>{let g=o.current;if(!(!g||n.disabled))return g.addEventListener(z,R),()=>g.removeEventListener(z,R)},[E,n.onSelect,n.disabled]);function R(){var g,A;(A=(g=p.current).onSelect)==null||A.call(g,f.current)}function w(){d.setState("value",f.current,!0)}if(!E)return null;let{disabled:O,value:ie,onSelect:D,...F}=n;return external_React_namespaceObject.createElement("div",{ref:H([o,a]),...F,"cmdk-item":"",role:"option","aria-disabled":O||void 0,"aria-selected":v||void 0,"data-selected":v||void 0,onPointerMove:O?void 0:w,onClick:O?void 0:R},n.children)}),pe=external_React_namespaceObject.forwardRef((n,a)=>{let{heading:r,children:o,...u}=n,l=external_React_namespaceObject.useId(),p=external_React_namespaceObject.useRef(null),f=external_React_namespaceObject.useRef(null),d=external_React_namespaceObject.useId(),v=k(),E=T(w=>v.filter()===!1?!0:w.search?w.filtered.groups.has(l):!0);L(()=>v.group(l),[]),se(l,p,[n.value,n.heading,f]);let R=external_React_namespaceObject.createElement(ne.Provider,{value:l},o);return external_React_namespaceObject.createElement("div",{ref:H([p,a]),...u,"cmdk-group":"",role:"presentation",hidden:E?void 0:!0},r&&external_React_namespaceObject.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),external_React_namespaceObject.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},R))}),ge=external_React_namespaceObject.forwardRef((n,a)=>{let{alwaysRender:r,...o}=n,u=external_React_namespaceObject.useRef(null),l=T(p=>!p.search);return!r&&!l?null:external_React_namespaceObject.createElement("div",{ref:H([u,a]),...o,"cmdk-separator":"",role:"separator"})}),ve=external_React_namespaceObject.forwardRef((n,a)=>{let{onValueChange:r,...o}=n,u=n.value!=null,l=U(),p=T(d=>d.search),f=k();return external_React_namespaceObject.useEffect(()=>{n.value!=null&&l.setState("search",n.value)},[n.value]),external_React_namespaceObject.createElement("input",{ref:a,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,id:f.inputId,type:"text",value:u?n.value:p,onChange:d=>{u||l.setState("search",d.target.value),r==null||r(d.target.value)}})}),Re=external_React_namespaceObject.forwardRef((n,a)=>{let{children:r,...o}=n,u=external_React_namespaceObject.useRef(null),l=external_React_namespaceObject.useRef(null),p=k();return external_React_namespaceObject.useEffect(()=>{if(l.current&&u.current){let f=l.current,d=u.current,v,E=new ResizeObserver(()=>{v=requestAnimationFrame(()=>{let R=f.getBoundingClientRect().height;d.style.setProperty("--cmdk-list-height",R.toFixed(1)+"px")})});return E.observe(f),()=>{cancelAnimationFrame(v),E.unobserve(f)}}},[]),external_React_namespaceObject.createElement("div",{ref:H([u,a]),...o,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:p.listId,"aria-labelledby":p.inputId},external_React_namespaceObject.createElement("div",{ref:l,"cmdk-list-sizer":""},r))}),be=external_React_namespaceObject.forwardRef((n,a)=>{let{open:r,onOpenChange:o,container:u,...l}=n;return external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9,{open:r,onOpenChange:o},external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$602eac185826482c,{container:u},external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff,{"cmdk-overlay":""}),external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2,{"aria-label":n.label,"cmdk-dialog":""},external_React_namespaceObject.createElement(oe,{ref:a,...l}))))}),he=external_React_namespaceObject.forwardRef((n,a)=>{let r=external_React_namespaceObject.useRef(!0),o=T(u=>u.filtered.count===0);return external_React_namespaceObject.useEffect(()=>{r.current=!1},[]),r.current||!o?null:external_React_namespaceObject.createElement("div",{ref:a,...n,"cmdk-empty":"",role:"presentation"})}),Ee=external_React_namespaceObject.forwardRef((n,a)=>{let{progress:r,children:o,...u}=n;return external_React_namespaceObject.createElement("div",{ref:a,...u,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},external_React_namespaceObject.createElement("div",{"aria-hidden":!0},o))}),Le=Object.assign(oe,{List:Re,Item:me,Input:ve,Group:pe,Separator:ge,Dialog:be,Empty:he,Loading:Ee});function Se(n,a){let r=n.nextElementSibling;for(;r;){if(r.matches(a))return r;r=r.nextElementSibling}}function Ce(n,a){let r=n.previousElementSibling;for(;r;){if(r.matches(a))return r;r=r.previousElementSibling}}function ae(n){let a=external_React_namespaceObject.useRef(n);return L(()=>{a.current=n}),a}var L=typeof window>"u"?external_React_namespaceObject.useEffect:external_React_namespaceObject.useLayoutEffect;function x(n){let a=external_React_namespaceObject.useRef();return a.current===void 0&&(a.current=n()),a}function H(n){return a=>{n.forEach(r=>{typeof r=="function"?r(a):r!=null&&(r.current=a)})}}function T(n){let a=U(),r=()=>n(a.snapshot());return external_React_namespaceObject.useSyncExternalStore(a.subscribe,r,r)}function se(n,a,r){let o=external_React_namespaceObject.useRef(),u=k();return L(()=>{var p;let l=(()=>{var f;for(let d of r){if(typeof d=="string")return d.trim().toLowerCase();if(typeof d=="object"&&"current"in d&&d.current)return(f=d.current.textContent)==null?void 0:f.trim().toLowerCase()}})();u.value(n,l),(p=a.current)==null||p.setAttribute(S,l),o.current=l}),o}var ye=()=>{let[n,a]=external_React_namespaceObject.useState(),r=x(()=>new Map);return L(()=>{r.current.forEach(o=>o()),r.current=new Map},[n]),(o,u)=>{r.current.set(o,u),a({})}},xe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};
                                                        Severity: Minor
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 55 mins to fix
                                                        wp-includes/js/dist/commands.js on lines 3137..3137

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 54.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                        var getVScrollVariables = function (_a) {
                                                            var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
                                                            return [
                                                                scrollTop,
                                                                scrollHeight,
                                                        Severity: Minor
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 40 mins to fix
                                                        wp-includes/js/dist/commands.js on lines 2395..2402

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 49.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                        var getHScrollVariables = function (_a) {
                                                            var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
                                                            return [
                                                                scrollLeft,
                                                                scrollWidth,
                                                        Severity: Minor
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 40 mins to fix
                                                        wp-includes/js/dist/commands.js on lines 2387..2394

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 49.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 6 locations. Consider refactoring.
                                                        Open

                                                        __webpack_require__.d(selectors_namespaceObject, {
                                                          getCommandLoaders: () => (getCommandLoaders),
                                                          getCommands: () => (getCommands),
                                                          getContext: () => (getContext),
                                                          isOpen: () => (selectors_isOpen)
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 5 other locations - About 35 mins to fix
                                                        wp-includes/js/dist/annotations.js on lines 48..53
                                                        wp-includes/js/dist/nux.js on lines 61..66
                                                        wp-includes/js/dist/patterns.js on lines 49..54
                                                        wp-includes/js/dist/preferences.js on lines 62..67
                                                        wp-includes/js/dist/reusable-blocks.js on lines 49..54

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 47.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                                document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
                                                        Severity: Minor
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 35 mins to fix
                                                        wp-includes/js/dist/commands.js on lines 1518..1518

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 47.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                                document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());
                                                        Severity: Minor
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 35 mins to fix
                                                        wp-includes/js/dist/commands.js on lines 1517..1517

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 47.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Identical blocks of code found in 7 locations. Consider refactoring.
                                                        Open

                                                        function __metadata(metadataKey, metadataValue) {
                                                          if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
                                                        }
                                                        Severity: Major
                                                        Found in wp-includes/js/dist/commands.js and 6 other locations - About 35 mins to fix
                                                        wp-includes/js/dist/block-directory.js on lines 821..823
                                                        wp-includes/js/dist/compose.js on lines 2436..2438
                                                        wp-includes/js/dist/core-data.js on lines 1042..1044
                                                        wp-includes/js/dist/element.js on lines 987..989
                                                        wp-includes/js/dist/list-reusable-blocks.js on lines 169..171
                                                        wp-includes/js/dist/style-engine.js on lines 157..159

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 46.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                                    "\n    padding-left: ".concat(left, "px;\n    padding-top: ").concat(top, "px;\n    padding-right: ").concat(right, "px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(gap, "px ").concat(important, ";\n    "),
                                                        Severity: Minor
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 35 mins to fix
                                                        wp-includes/js/dist/commands.js on lines 2306..2306

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 46.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                        Open

                                                            return "\n  .".concat(noScrollbarsClassName, " {\n   overflow: hidden ").concat(important, ";\n   padding-right: ").concat(gap, "px ").concat(important, ";\n  }\n  body {\n    overflow: hidden ").concat(important, ";\n    overscroll-behavior: contain;\n    ").concat([
                                                        Severity: Minor
                                                        Found in wp-includes/js/dist/commands.js and 1 other location - About 35 mins to fix
                                                        wp-includes/js/dist/commands.js on lines 2309..2309

                                                        Duplicated Code

                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                        Tuning

                                                        This issue has a mass of 46.

                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                        Refactorings

                                                        Further Reading

                                                        There are no issues that match your filters.

                                                        Category
                                                        Status