WordPress/wp-includes/js/dist/element.min.js
Gary Pendergast 158cbdbf03 Build Tools: Copy package JavaScript and CSS into wp-includes.
- `grunt webpack:dev` now copies packages JS into `/src/wp-includes/js/dist`, and CSS into `/src/wp-includes/css/dist`.
- `grunt webpack:prod` does the same, but into `/build` instead of `/src`.
- `grunt build` now runs the `webpack:prod` task.

Props atimmer, pento.
Fixes #45119.


Built from https://develop.svn.wordpress.org/branches/5.0@43760


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 06:06:46 +00:00

1 line
8.2 KiB
JavaScript

this.wp=this.wp||{},this.wp.element=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=378)}({1:function(e,t){!function(){e.exports=this.lodash}()},16:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return r})},18:function(e,t){!function(){e.exports=this.React}()},22:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,"a",function(){return r})},27:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.d(t,"a",function(){return o})},378:function(e,t,n){"use strict";n.r(t);var r=n(9),o=n(22),i=n(18),u=n(1);function c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t,n){return i.Children.forEach(t,function(t,r){t&&"string"!=typeof t&&(t=Object(i.cloneElement)(t,{key:[n,r].join()})),e.push(t)}),e},[])}function a(e,t){return e&&i.Children.map(e,function(e,n){if(Object(u.isString)(e))return Object(i.createElement)(t,{key:n},e);var c=e.props,a=c.children,l=Object(o.a)(c,["children"]);return Object(i.createElement)(t,Object(r.a)({key:n},l),a)})}var l=n(52),f=function(e){return!Object(u.isNumber)(e)&&(Object(u.isString)(e)||Object(u.isArray)(e)?!e.length:!e)},s=n(27),d=n(63);function p(e){var t=e.children,n=Object(o.a)(e,["children"]);return Object(i.createElement)("div",Object(r.a)({dangerouslySetInnerHTML:{__html:t}},n))}var b=Object(i.createContext)(),m=b.Provider,y=b.Consumer,h=new Set(["string","boolean","number"]),O=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),g=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),v=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),j=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function S(e,t){return t.some(function(t){return 0===e.indexOf(t)})}function w(e){return"key"===e||"children"===e}function x(e,t){switch(e){case"style":return function(e){if(!Object(u.isPlainObject)(e))return e;var t;for(var n in e){var r=e[n];if(null!==r&&void 0!==r){t?t+=";":t="";var o=k(n),i=M(n,r);t+=o+":"+i}}return t}(t)}return t}function C(e){switch(e){case"htmlFor":return"for";case"className":return"class"}return e.toLowerCase()}function k(e){return Object(u.startsWith)(e,"--")?e:S(e,["ms","O","Moz","Webkit"])?"-"+Object(u.kebabCase)(e):Object(u.kebabCase)(e)}function M(e,t){return"number"!=typeof t||0===t||j.has(e)?t:t+"px"}function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e||void 0===e||!1===e)return"";if(Array.isArray(e))return _(e,t,n);switch(Object(s.a)(e)){case"string":return Object(d.escapeHTML)(e);case"number":return e.toString()}var c=e.type,a=e.props;switch(c){case i.StrictMode:case i.Fragment:return _(a.children,t,n);case p:var l=a.children,f=Object(o.a)(a,["children"]);return P(Object(u.isEmpty)(f)?null:"div",Object(r.a)({},f,{dangerouslySetInnerHTML:{__html:l}}),t,n)}switch(Object(s.a)(c)){case"string":return P(c,a,t,n);case"function":return c.prototype&&"function"==typeof c.prototype.render?function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=new e(t,r);"function"==typeof o.getChildContext&&Object.assign(r,o.getChildContext());return E(o.render(),n,r)}(c,a,t,n):E(c(a,n),t,n)}switch(c&&c.$$typeof){case m.$$typeof:return _(a.children,a.value,n);case y.$$typeof:return E(a.children(t||c._currentValue),t,n)}return""}function P(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o="";if("textarea"===e&&t.hasOwnProperty("value")?(o=_(t.value,n,r),t=Object(u.omit)(t,"value")):t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?o=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(o=_(t.children,n,r)),!e)return o;var i=function(e){var t="";for(var n in e){var r=C(n);if(Object(d.isValidAttributeName)(r)){var o=x(n,e[n]);if(h.has(Object(s.a)(o))&&!w(n)){var i=g.has(r);if(!i||!1!==o){var u=i||S(n,["data-","aria-"])||v.has(r);("boolean"!=typeof o||u)&&(t+=" "+r,i||("string"==typeof o&&(o=Object(d.escapeAttribute)(o)),t+='="'+o+'"'))}}}}return t}(t);return O.has(e)?"<"+e+i+"/>":"<"+e+i+">"+o+"</"+e+">"}function _(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="";e=Object(u.castArray)(e);for(var o=0;o<e.length;o++){r+=E(e[o],t,n)}return r}var I=E;n.d(t,"Children",function(){return i.Children}),n.d(t,"cloneElement",function(){return i.cloneElement}),n.d(t,"Component",function(){return i.Component}),n.d(t,"createContext",function(){return i.createContext}),n.d(t,"createElement",function(){return i.createElement}),n.d(t,"createRef",function(){return i.createRef}),n.d(t,"forwardRef",function(){return i.forwardRef}),n.d(t,"Fragment",function(){return i.Fragment}),n.d(t,"isValidElement",function(){return i.isValidElement}),n.d(t,"StrictMode",function(){return i.StrictMode}),n.d(t,"concatChildren",function(){return c}),n.d(t,"switchChildrenNodeName",function(){return a}),n.d(t,"createPortal",function(){return l.createPortal}),n.d(t,"findDOMNode",function(){return l.findDOMNode}),n.d(t,"render",function(){return l.render}),n.d(t,"unmountComponentAtNode",function(){return l.unmountComponentAtNode}),n.d(t,"isEmptyElement",function(){return f}),n.d(t,"renderToString",function(){return I}),n.d(t,"RawHTML",function(){return p})},52:function(e,t){!function(){e.exports=this.ReactDOM}()},63:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},9:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(16);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){Object(r.a)(e,t,n[t])})}return e}}});