laipower/wp-content/plugins/gp-premium/dist/block-elements.js

3 lines
186 KiB
JavaScript
Raw Normal View History

!function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},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=59)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.React},,function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},,function(e,t,n){e.exports=n(29)()},function(e,t){e.exports=window.wp.hooks},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}e.exports=function(e,t,a){return t&&n(e.prototype,t),a&&n(e,a),e}},function(e,t,n){var a=n(24);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}},function(e,t,n){var a=n(14),o=n(13);e.exports=function(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?o(e):t}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(0);function o(e){return"generatepress"===e?Object(a.createElement)("svg",{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 600 600",preserveAspectRatio:"none"},Object(a.createElement)("path",{d:"M485.2 427.8l-99.1-46.2 15.8-34c5.6-11.9 8.8-24.3 10-36.7 3.3-33.7-9-67.3-33.2-91.1-8.9-8.7-19.3-16.1-31.3-21.7-11.9-5.6-24.3-8.8-36.7-10-33.7-3.3-67.4 9-91.1 33.2-8.7 8.9-16.1 19.3-21.7 31.3l-15.8 34-30.4 65.2c-.7 1.5-.1 3.3 1.5 4l65.2 30.4 34 15.8 34 15.8 68 31.7 74.7 34.8c-65 45.4-152.1 55.2-228.7 17.4C90.2 447.4 44.1 313.3 97.3 202.6c53.3-110.8 186-158.5 297.8-106.3 88.1 41.1 137.1 131.9 129.1 223.4-.1 1.3.6 2.4 1.7 3l65.6 30.6c1.8.8 3.9-.3 4.2-2.2 22.6-130.7-44-265.4-170.5-323.5-150.3-69-327-4.1-396.9 145.8-70 150.1-5.1 328.5 145.1 398.5 114.1 53.2 244.5 28.4 331.3-52.3 17.9-16.6 33.9-35.6 47.5-56.8 1-1.5.4-3.6-1.3-4.3l-65.7-30.7zm-235-109.6l15.8-34c8.8-18.8 31.1-26.9 49.8-18.1s26.9 31 18.1 49.8l-15.8 34-34-15.8-33.9-15.9z"})):"dynamic"===e?Object(a.createElement)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 256 256"},Object(a.createElement)("path",{d:"M128 26c-52.71 0-94 23.72-94 54v96c0 30.28 41.29 54 94 54s94-23.72 94-54V80c0-30.28-41.29-54-94-54zm0 12c44.449 0 82 19.233 82 42s-37.551 42-82 42-82-19.233-82-42 37.551-42 82-42zm82 138c0 22.767-37.551 42-82 42s-82-19.233-82-42v-21.21C61.97 171.163 92.374 182 128 182s66.03-10.837 82-27.21zm0-48c0 22.767-37.551 42-82 42s-82-19.233-82-42v-21.21C61.97 123.163 92.374 134 128 134s66.03-
/* translators: Unit type (px, em, %) */,{text:Object(i.sprintf)(Object(i.__)("%s Units","gp-premium"),t),key:e},Object(a.createElement)(l.Button,{key:e,className:"components-generatepress-control-button__units--"+e,isSmall:!0,isPrimary:n===e,"aria-pressed":n===e
/* translators: %s: values associated with CSS syntax, 'Pixel', 'Em', 'Percentage' */,"aria-label":Object(i.sprintf)(Object(i.__)("%s Units","gp-premium"),t),onClick:function(){return o(e)}},e))})))))}}]),r}(a.Component),K=n(3),Y=n.n(K);function $(e,t){const{key:n,options:a}=t,o=a.length-1;let r="ArrowDown"===n?e+1:e-1;r<0?r=o:r>o&&(r=0);const i=a[r];return i&&i.disabled?$(r,{key:n,options:a}):r}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){Z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(e,t){return Array.isArray(e)?e.map(e=>t.find(t=>t.value===e)):t.find(t=>t.value===e)||null}function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let ie=null;try{ie=n(50)}catch(e){}function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se({value:e=null,disabled:t=!1,multiple:n=!1,search:a=!1,fuse:o=!1,options:r,onChange:i=(()=>{}),getOptions:c=null,allowEmpty:l=!0,closeOnSelect:p=!0,closable:s=!0}){const d=Object(K.useRef)(null),g=Object(K.useMemo)(()=>function(e){if(!Array.isArray(e))return[];const t=[];return e.forEach((e,n)=>{if("type"in e&&"group"===e.type){const a=e.name.replace(/\s+/g,"-").toLowerCase()+"-"+n;e.items.forEach(n=>{t.push(X(X({},n),{},{groupId:a,groupName:e.name,_id:""+n.value}))})}else t.push(X(X({},e),{},{_id:""+e.value,index:n}))}),t}(r),[r]),[u,m]=Object(K.useState)({flat:[],addedOptions:[],value:e,search:"",focus:!1,searching:!1,highlighted:-1,changed:!1}),{flat:b,addedOptions:h,value:f,search:y,focus:x,searching:v,highlighted:_}=u,k=Object(K.useMemo)(()=>{let e=ne(f,[...g,...h]);return e||l||n||([e]=g),e},[f,g,h,l,n]),w=Object(K.useMemo)(()=>function(e){const t=[];return e.forEach((e,n)=>{if("groupId"in e){const a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object