WordPress/wp-includes/js/dist/block-library.min.js

14 lines
591 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.blockLibrary=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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="K51g")}({"+WrK":function(e,t,n){"use strict";var o=n("GRId"),r=n("Tqx9");const a=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}));t.a=a},"//kF":function(e,t,n){"use strict";var o=n("GRId"),r=n("Tqx9");const a=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=a},"1CF3":function(e,t){e.exports=window.wp.dom},"1Yn1":function(e,t,n){"use strict";var o=n("GRId"),r=n("Tqx9");const a=Object(o.createElement)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(r.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}));t.a=a},"1ZqX":function(e,t){e.exports=window.wp.data},"1iEr":function(e,t,n){"use strict";var o=n("GRId"),r=n("Tqx9");const a=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=a},"2gm7":function(e,t,n){"use strict";var o=n("GRId"),r=n("Tqx9");const a=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=a},"4eJC":function(e,t,n){e.exports=function(e,t){var n,o,r=0;function a(){var a,l,c=n,i=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(l=0;l<i;l++)if(c.args[l]!==arguments[l]){c=c.next;continue e}return c!==n&&(c===o&&(o=c.prev),c.prev.next=c.next,c.next&&(c.next.prev=c.prev),c.next=n,c.prev=null,n.prev=c,n=c),c.val}c=c.next}for(a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return c={args:a,val:e.apply(null,a)},n?(n.prev=c,c.next=n):o=c,r===t.maxSize?(o=o.prev).next=null:r++,n=c,c.val}return t=t||{},a.clear=function(){n=null,o=null,r=0},a}},"A/WM":function(e,t,n){var o;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n=function(){function e(){}function t(e,t){for(var n=t.length,o=0;o<n;++o)r(e,t[o])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var o=/\s+/;function r(e,r){if(r){var a=typeof r;"string"===a?function(e,t){for(var n=t.split(o),r=n.length,a=0;a<r;++a)e[n[a]]=!0}(e,r):Array.isArray(r)?t(e,r):"object"===a?function(e,t){if(t.toString===Object.prototype.toString)for(var o in t)n.call(t,o)&&(e[o]=!!t[o]);else e[t.toString()]=!0}(e,r):"number"===a&&function(e,t){e[t]=!0}(e,r)}}return function(){for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];var a=new e;t(a,o);var l=[];for(var c in a)a[c]&&l.push(c);return l.join(" ")}}();e.exports?(n.default=n,e.exports=n):void 0===(o=function(){return n}.apply(t,[]))||(e.exports=o)}()},B9Az:function(e,t,n){"use strict";var o=n("GRId"),r=n("Tqx9");var a=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=a},Bpkj:function(e,t,n){"use strict";var o=n("GRId"),r=n("Tqx9");const a=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"}));t.a=a},Civd:function(e,t,n){"use strict";var o=n("GRId"),r=n("Tqx9");const a=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}));t.a=a},FEKF:function(e,t,n){
/*! Fast Average Color | © 2019 Denis Seleznev | MIT License | https://github.com/hcodes/fast-average-color/ */
e.exports=function(){"use strict";function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],o=!0,r=!1,a=void 0;try{for(var l,c=e[Symbol.iterator]();!(o=(l=c.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(r)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}return function(){function n(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n)}var o,r,a;return o=n,(r=[{key:"getColorAsync",value:function(e,t,n){e.complete?t.call(e,this.getColor(e,n),n&&n.data):this._bindImageEvents(e,t,n)}},{key:"getColor",value:function(e,t){t=t||{};var n=this._getDefaultColor(t),o=this._getOriginalSize(e),r=this._prepareSizeAndPosition(o,t),a=null,l=n;if(!(r.srcWidth&&r.srcHeight&&r.destWidth&&r.destHeight))return this._prepareResult(n,new Error("FastAverageColor: Incorrect sizes."));if(!this._ctx&&(this._canvas=this._makeCanvas(),this._ctx=this._canvas.getContext&&this._canvas.getContext("2d"),!this._ctx))return this._prepareResult(n,new Error("FastAverageColor: Canvas Context 2D is not supported in this browser."));this._canvas.width=r.destWidth,this._canvas.height=r.destHeight;try{this._ctx.clearRect(0,0,r.destWidth,r.destHeight),this._ctx.drawImage(e,r.srcLeft,r.srcTop,r.srcWidth,r.srcHeight,0,0,r.destWidth,r.destHeight);var c=this._ctx.getImageData(0,0,r.destWidth,r.destHeight).data;l=this.getColorFromArray4(c,t)}catch(e){a=e}return this._prepareResult(l,a)}},{key:"getColorFromArray4",value:function(e,t){t=t||{};var n=e.length;if(n<4)return this._getDefaultColor(t);var o=n-n%4,r=4*(t.step||1),a="_"+(t.algorithm||"sqrt")+"Algorithm";if("function"!=typeof this[a])throw new Error("FastAverageColor: ".concat(t.algorithm," is unknown algorithm."));return this[a](e,o,r)}},{key:"destroy",value:function(){delete this._canvas,delete this._ctx}},{key:"_getDefaultColor",value:function(e){return this._getOption(e,"defaultColor",[255,255,255,255])}},{key:"_getOption",value:function(e,t,n){return void 0===e[t]?n:e[t]}},{key:"_prepareSizeAndPosition",value:function(e,t){var n,o=this._getOption(t,"left",0),r=this._getOption(t,"top",0),a=this._getOption(t,"width",e.width),l=this._getOption(t,"height",e.height),c=a,i=l;return"precision"===t.mode||(a>l?(n=a/l,c=100,i=Math.round(c/n)):(n=l/a,i=100,c=Math.round(i/n)),(c>a||i>l||c<10||i<10)&&(c=a,i=l)),{srcLeft:o,srcTop:r,srcWidth:a,srcHeight:l,destWidth:c,destHeight:i}}},{key:"_simpleAlgorithm",value:function(e,t,n){for(var o=0,r=0,a=0,l=0,c=0,i=0;i<t;i+=n){var s=e[i+3];o+=e[i]*s,r+=e[i+1]*s,a+=e[i+2]*s,l+=s,c++}return l?[Math.round(o/l),Math.round(r/l),Math.round(a/l),Math.round(l/c)]:[0,0,0,0]}},{key:"_sqrtAlgorithm",value:function(e,t,n){for(var o=0,r=0,a=0,l=0,c=0,i=0;i<t;i+=n){var s=e[i],u=e[i+1],m=e[i+2],d=e[i+3];o+=s*s*d,r+=u*u*d,a+=m*m*d,l+=d,c++}return l?[Math.round(Math.sqrt(o/l)),Math.round(Math.sqrt(r/l)),Math.round(Math.sqrt(a/l)),Math.round(l/c)]:[0,0,0,0]}},{key:"_dominantAlgorithm",value:function(e,n,o){for(var r={},a=0;a<n;a+=o){var l=e[a],c=e[a+1],i=e[a+2],s=e[a+3],u=Math.round(l/24)+","+Math.round(c/24)+","+Math.round(i/24);r[u]?r[u]=[r[u][0]+l*s,r[u][1]+c*s,r[u][2]+i*s,r[u][3]+s,r[u][4]+1]:r[u]=[l*s,c*s,i*s,s,1]}var m=t(Object.keys(r).map((function(e){return r[e]})).sort((function(e,t){var n=e[4],o=t[4];return n>o?-1:n===o?0:1}))[0],5),d=m[0],b=m[1],p=m[2],g=m[3],h=m[4];return g?[Math.round(d/g),Math.round(b/g),Math.round(p/g),Math.round(g/h)]:[0,0,0,0]}},{key:"_bindImageEvents",value:function(e,t,n){var o=this,r=(n=n||{})&&n.data,a=this._getDefaultColor(n),l=function(){s(),t.call(e,o.getColor(e,n),r)},c=function(){s(),t.call(e,o._prepareResult(a,new Error("Image error")),r)},i=function(){s(),t.call(e,o._prepareResult(a,new Error("Image abort")),r)},s=function(){e.removeEventListener("load",l),e.remo
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)){if(o.length){var l=r.apply(null,o);l&&e.push(l)}}else if("object"===a)if(o.toString===Object.prototype.toString)for(var c in o)n.call(o,c)&&o[c]&&e.push(c);else e.push(o.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},Tqx9:function(e,t){e.exports=window.wp.primitives},TvNi:function(e,t){e.exports=window.wp.plugins},U60i:function(e,t,n){"use strict";n.d(t,"b",(function(){return $})),n.d(t,"c",(function(){return D})),n.d(t,"d",(function(){return Z})),n.d(t,"e",(function(){return J})),n.d(t,"h",(function(){return q})),n.d(t,"f",(function(){return Y})),n.d(t,"g",(function(){return ee})),n.d(t,"a",(function(){return H})),n.d(t,"i",(function(){return I}));var o={};n.r(o),n.d(o,"enableComplementaryArea",(function(){return k})),n.d(o,"disableComplementaryArea",(function(){return w})),n.d(o,"pinItem",(function(){return C})),n.d(o,"unpinItem",(function(){return x})),n.d(o,"toggleFeature",(function(){return S})),n.d(o,"setFeatureValue",(function(){return B})),n.d(o,"setFeatureDefaults",(function(){return T}));var r={};n.r(r),n.d(r,"getActiveComplementaryArea",(function(){return N})),n.d(r,"isItemPinned",(function(){return P})),n.d(r,"isFeatureActive",(function(){return z}));var a=n("wx14"),l=n("GRId"),c=n("TSYQ"),i=n.n(c),s=n("tI+e"),u=n("1ZqX"),m=n("l3Sj"),d=n("RMJe"),b=n("URob"),p=n("Xxwi"),g=n("KEfo"),h=n("bWcr"),v=n("YLtl");const O=Object(u.combineReducers)({features(e={},t){if("SET_FEATURE_DEFAULTS"===t.type){const{scope:n,defaults:o}=t;return{...e,[n]:{...e[n],...o}}}return e}}),j=Object(u.combineReducers)({features(e={},t){if("SET_FEATURE_VALUE"===t.type){const{scope:n,featureName:o,value:r}=t;return{...e,[n]:{...e[n],[o]:r}}}return e}}),y=Object(u.combineReducers)({singleEnableItems:function(e={},{type:t,itemType:n,scope:o,item:r}){return"SET_SINGLE_ENABLE_ITEM"===t&&n&&o?{...e,[n]:{...e[n],[o]:r||null}}:e},multipleEnableItems:function(e={},{type:t,itemType:n,scope:o,item:r,isEnable:a}){if("SET_MULTIPLE_ENABLE_ITEM"!==t||!n||!o||!r||Object(v.get)(e,[n,o,r])===a)return e;const l=e[n]||{},c=l[o]||{};return{...e,[n]:{...l,[o]:{...c,[r]:a||!1}}}}});var f=Object(u.combineReducers)({enableItems:y,preferenceDefaults:O,preferences:j});function _(e,t,n){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:n}}function k(e,t){return _("complementaryArea",e,t)}function w(e){return _("complementaryArea",e,void 0)}function E(e,t,n,o){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:n,isEnable:o}}function C(e,t){return E("pinnedItems",e,t,!0)}function x(e,t){return E("pinnedItems",e,t,!1)}function S(e,t){return function({select:n,dispatch:o}){const r=n.isFeatureActive(e,t);o.setFeatureValue(e,t,!r)}}function B(e,t,n){return{type:"SET_FEATURE_VALUE",scope:e,featureName:t,value:!!n}}function T(e,t){return{type:"SET_FEATURE_DEFAULTS",scope:e,defaults:t}}function N(e,t){return function(e,t,n){return Object(v.get)(e.enableItems.singleEnableItems,[t,n])}(e,"complementaryArea",t)}function P(e,t,n){return!1!==function(e,t,n,o){return Object(v.get)(e.enableItems.multipleEnableItems,[t,n,o])}(e,"pinnedItems",t,n)}function z(e,t,n){var o,r;const a=null===(o=e.preferences.features[t])||void 0===o?void 0:o[n];return!!(void 0!==a?a:null===(r=e.preferenceDefaults.features[t])||void 0===r?void 0:r[n])}const I=Object(u.createReduxStore)("core/interface",{reducer:f,actions:o,selectors:r,persist:["enableItems","preferences"],__experimentalUseThunks:!0});Object(u.registerStore)("core/interface",{reducer:f,actions:o,selectors:r,persist:["enableItems","preferences"],__experimentalUseThunks:!0});var M=n("TvNi"),R=Object(M.withPluginContext)((e,t)=>({icon:t.icon||e.icon,identifier:t.identifier||`${e.name}/${t.name}`}));var L=R((function({as:e=s.Button,scope:t,identifier:n,icon:o,selectedIcon:r,...c}){const i=e,m=Object(u.useSelect)(e=>e(I).getActive