mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-08 06:20:04 +00:00
Props peterwilsoncc, desrosj, gziolo. Merges [50940] in to the 5.7 branch. Fixes #53192. Built from https://develop.svn.wordpress.org/branches/5.7@50990 git-svn-id: http://core.svn.wordpress.org/branches/5.7@50599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
/*! This file is auto-generated */
|
|
this.wp=this.wp||{},this.wp.nux=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s="./node_modules/@wordpress/nux/build-module/index.js")}({"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":function(e,r,t){"use strict";function n(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}t.d(r,"a",(function(){return n}))},"./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":function(e,r,t){"use strict";function n(e){if(Array.isArray(e))return e}t.d(r,"a",(function(){return n}))},"./node_modules/@babel/runtime/helpers/esm/defineProperty.js":function(e,r,t){"use strict";function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}t.d(r,"a",(function(){return n}))},"./node_modules/@babel/runtime/helpers/esm/iterableToArray.js":function(e,r,t){"use strict";function n(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}t.d(r,"a",(function(){return n}))},"./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":function(e,r,t){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}t.d(r,"a",(function(){return n}))},"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":function(e,r,t){"use strict";t.d(r,"a",(function(){return s}));var n=t("./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");var o=t("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"),i=t("./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");function s(e,r){return Object(n.a)(e)||function(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],n=!0,o=!1,i=void 0;try{for(var s,u=e[Symbol.iterator]();!(n=(s=u.next()).done)&&(t.push(s.value),!r||t.length!==r);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return t}}(e,r)||Object(o.a)(e,r)||Object(i.a)()}},"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":function(e,r,t){"use strict";t.d(r,"a",(function(){return s}));var n=t("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");var o=t("./node_modules/@babel/runtime/helpers/esm/iterableToArray.js"),i=t("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");function s(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||Object(o.a)(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":function(e,r,t){"use strict";t.d(r,"a",(function(){return o}));var n=t("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");function o(e,r){if(e){if("string"==typeof e)return Object(n.a)(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Object(n.a)(e,r):void 0}}},"./node_modules/@wordpress/icons/build-module/library/close.js":function(e,r,t){"use strict";var n=t("@wordpress/element"),o=t("@wordpress/primitives"),i=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));r.a=i},"./node_modules/@wordpress/nux/build-module/index.js":function(e,r,t){"use strict";t.r(r),t.d(r,"store",(function(){return I})),t.d(r,"DotTip",(function(){return M}));var n={};t.r(n),t.d(n,"triggerGuide",(function(){return b})),t.d(n,"dismissTip",(function(){return m})),t.d(n,"disableTips",(function(){return y})),t.d(n,"enableTips",(function(){return h}));var o={};t.r(o),t.d(o,"getAssociatedGuide",(function(){return _})),t.d(o,"isTipVisible",(function(){return T})),t.d(o,"areTipsEnabled",(function(){return x}));var i=t("@wordpress/deprecated"),s=t.n(i),u=t("@wordpress/data"),a=t("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),c=t("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){Object(a.a)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var p=Object(u.combineReducers)({areTipsEnabled:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"DISABLE_TIPS":return!1;case"ENABLE_TIPS":return!0}return e},dismissedTips:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"DISMISS_TIP":return d(d({},e),{},Object(a.a)({},r.id,!0));case"ENABLE_TIPS":return{}}return e}}),f=Object(u.combineReducers)({guides:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"TRIGGER_GUIDE":return[].concat(Object(c.a)(e),[r.tipIds])}return e},preferences:p});function b(e){return{type:"TRIGGER_GUIDE",tipIds:e}}function m(e){return{type:"DISMISS_TIP",id:e}}function y(){return{type:"DISABLE_TIPS"}}function h(){return{type:"ENABLE_TIPS"}}var j=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),v=t("./node_modules/rememo/es/rememo.js"),w=t("lodash");function O(e,r){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e,r){if(!e)return;if("string"==typeof e)return g(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return g(e,r)}(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==t.return||t.return()}finally{if(u)throw i}}}}function g(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var _=Object(v.a)((function(e,r){var t,n=O(e.guides);try{for(n.s();!(t=n.n()).done;){var o=t.value;if(Object(w.includes)(o,r)){var i=Object(w.difference)(o,Object(w.keys)(e.preferences.dismissedTips)),s=Object(j.a)(i,2),u=s[0],a=void 0===u?null:u,c=s[1];return{tipIds:o,currentTipId:a,nextTipId:void 0===c?null:c}}}}catch(e){n.e(e)}finally{n.f()}return null}),(function(e){return[e.guides,e.preferences.dismissedTips]}));function T(e,r){if(!e.preferences.areTipsEnabled)return!1;if(Object(w.has)(e.preferences.dismissedTips,[r]))return!1;var t=_(e,r);return!t||t.currentTipId===r}function x(e){return e.preferences.areTipsEnabled}var I=Object(u.createReduxStore)("core/nux",{reducer:f,actions:n,selectors:o,persist:["preferences"]});Object(u.registerStore)("core/nux",{reducer:f,actions:n,selectors:o,persist:["preferences"]});var S=t("@wordpress/element"),A=t("@wordpress/compose"),E=t("@wordpress/components"),P=t("@wordpress/i18n"),D=t("./node_modules/@wordpress/icons/build-module/library/close.js");function k(e){e.stopPropagation()}var M=Object(A.compose)(Object(u.withSelect)((function(e,r){var t=r.tipId,n=e("core/nux"),o=n.isTipVisible,i=(0,n.getAssociatedGuide)(t);return{isVisible:o(t),hasNextTip:!(!i||!i.nextTipId)}})),Object(u.withDispatch)((function(e,r){var t=r.tipId,n=e("core/nux"),o=n.dismissTip,i=n.disableTips;return{onDismiss:function(){o(t)},onDisable:function(){i()}}})))((function(e){var r=e.position,t=void 0===r?"middle right":r,n=e.children,o=e.isVisible,i=e.hasNextTip,s=e.onDismiss,u=e.onDisable,a=Object(S.useRef)(null),c=Object(S.useCallback)((function(e){a.current&&(a.current.contains(e.relatedTarget)||u())}),[u,a]);return o?Object(S.createElement)(E.Popover,{className:"nux-dot-tip",position:t,noArrow:!0,focusOnMount:"container",shouldAnchorIncludePadding:!0,role:"dialog","aria-label":Object(P.__)("Editor tips"),onClick:k,onFocusOutside:c},Object(S.createElement)("p",null,n),Object(S.createElement)("p",null,Object(S.createElement)(E.Button,{isLink:!0,onClick:s},i?Object(P.__)("See next tip"):Object(P.__)("Got it"))),Object(S.createElement)(E.Button,{className:"nux-dot-tip__disable",icon:D.a,label:Object(P.__)("Disable tips"),onClick:u})):null}));s()("wp.nux",{hint:"wp.components.Guide can be used to show a user guide."})},"./node_modules/rememo/es/rememo.js":function(e,r,t){"use strict";var n,o;function i(e){return[e]}function s(){var e={clear:function(){e.head=null}};return e}function u(e,r,t){var n;if(e.length!==r.length)return!1;for(n=t;n<e.length;n++)if(e[n]!==r[n])return!1;return!0}n={},o="undefined"!=typeof WeakMap,r.a=function(e,r){var t,a;function c(){t=o?new WeakMap:s()}function l(){var t,n,o,i,s,c=arguments.length;for(i=new Array(c),o=0;o<c;o++)i[o]=arguments[o];for(s=r.apply(null,i),(t=a(s)).isUniqueByDependants||(t.lastDependants&&!u(s,t.lastDependants,0)&&t.clear(),t.lastDependants=s),n=t.head;n;){if(u(n.args,i,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,i)},i[0]=null,n.args=i,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return r||(r=i),a=o?function(e){var r,o,i,u,a,c=t,l=!0;for(r=0;r<e.length;r++){if(o=e[r],!(a=o)||"object"!=typeof a){l=!1;break}c.has(o)?c=c.get(o):(i=new WeakMap,c.set(o,i),c=i)}return c.has(n)||((u=s()).isUniqueByDependants=l,c.set(n,u)),c.get(n)}:function(){return t},l.getDependants=r,l.clear=c,c(),l}},"@wordpress/components":function(e,r){e.exports=window.wp.components},"@wordpress/compose":function(e,r){e.exports=window.wp.compose},"@wordpress/data":function(e,r){e.exports=window.wp.data},"@wordpress/deprecated":function(e,r){e.exports=window.wp.deprecated},"@wordpress/element":function(e,r){e.exports=window.wp.element},"@wordpress/i18n":function(e,r){e.exports=window.wp.i18n},"@wordpress/primitives":function(e,r){e.exports=window.wp.primitives},lodash:function(e,r){e.exports=window.lodash}}); |